Autostart of track download

karlm's picture

Hi,

I run a BT747 command to download tracks from a Qstarz BT-Q1000x. Does anyone know if there is a way to autostart the command when I connect the GPS to the computer?

Cheers, Karl

mdeweerd's picture

Hi For info, I've already

Hi

For info, I've already been searching for this but I did not find anything yet.  The only solution that would be possible (up to now) is to set up a deamon monitoring the devices and startup BT747 when the device appears.
Such a deamon is possible in Java on Windows (so then BT747 could itself be the deamon, but then it also uses the memory).

Anyway, that would be nice to autodownload the data from the logger, that is clear.

karlm's picture

Hi, Thank you for the reply.

Hi,

Thank you for the reply. Do you plan to implement this feature? It would be really elegant!

Karl

mdeweerd's picture

Hi Karl I would like to know

Hi Karl

I would like to know a method to launch the program on device insertion by event notification rather than polling the device setup.
Now as far as I understand, it would also be possible to define a service and have it listen for device insertion events.

I do not really like either of these two methods - they would also represent some investigation I do not like to do for the moment.

Now, if I discover the method to indicate to windows that a specific program has to be started when a specific device is inserted, I am willing to adjust BT747 as much as necessary to make automated start possible.

Since the required conditions are not met, I am not adding it, but I do have the motivation to do it.

karlm's picture

Hi, Thanks, I'll keep my eyes

Hi,

Thanks, I'll keep my eyes open too.

Karl

karlm's picture

The information given in this

The information given in this thread

http://www.pcguide.com/vb/showthread.php?t=70158

on The PC Guide Discussion Forums enabled me to set up automatic download of the Qstarz BT-Q1000X memory on connection to a USB port.

Karl

mdeweerd's picture

Hi Karl Thank you for sharing

Hi Karl

Thank you for sharing that.  This is the method where a running program captures the event.  That is fine of course.

It would be nice if you give a short description of how you got it to work.  It does not seem to work properly on Win7_64bit (it lauches ok, but does not detect device insertion - I may investigate more later).

mdeweerd's picture

I found a source link that is

I found a source link that is surely using the same functions.  Maybe there could be an adapted version specifically for serial devices and BT747....

.net / C# programming .  Maybe there are some readers here that could do the job ;-).

 

http://www.codeproject.com/KB/cs/UsbManager.aspx

karlm's picture

I am running WinXP Pro SP3.

I am running WinXP Pro SP3. Here is what I did:

1. Download USBTrigger30.zip from

http://www.pcguide.com/vb/showthread.php?t=70158

(Thank you, Paul Komski!)

You will find it  towards the end of the thread.

2. Unzip to wherever you want to have the files (USBTrigger30.exe and USBTrigger.ini).

3. Create a startup shortcut for USBTrigger30.exe in the Startup folder. Make sure that the the "Start in" path points to the folder where you have the USBTrigger files.

4. I use the following BT747 command for the download:

BT747cmd.bat -a -f "C:\BT747\GPS log files\NMEA log files\QSTARZ" -p COM13 --outtype NMEA --download-method REPORTED --splittype TRACK --timesplit 60

5. Put the command in a .bat file

6. Start USBTrigger30.exe and connect the GPS.

7. Save the Device ID and choose your .bat file to run on connection of the GPS

8. Click "Test File" to test the function

 You can connect the GPS to any USB port that has the GPS driver installed. USBTRigger30 will find the correct port for you. However, if you connect to the port that is specified in the BT747 command, you will get some useful information listed in the DOS window that USBTrigger30 opens. To be able to see that information I have inserted a "pause" at the end of the BT747cmd.bat.