I'm trying to get the Garmin ANT Agent 2.2.7 to run (http://www8.garmin.com/fitness/ant_product_page.jsp). This software talks over the ANT+ protocol (carried over USB) to the watch, to download Heart Rate and GPS info. I cannot get the program to install because it checks that the ANT dongle is plugged in before it will complete installation, and it won't detect it. I also cannot debug this .exe using IDA very effectively because it is a self-extracting zip executable.
When I plug in the ANT dongle, it is recognized by Linux and mapped to ttyUSB0. The dongle came with the watch and is Garmin branded, but it's really a Dynastream ANT2USB chip. Below is what /var/log/messages shows when I insert the device.
Nov 22 15:23:27 desktop kernel: [1982277.092697] usb 4-1: reset full speed USB device using uhci_hcd and address 24 Nov 22 15:23:27 desktop kernel: [1982277.335442] cp210x 4-1:1.0: cp210x converter detected Nov 22 15:23:27 desktop kernel: [1982277.452593] usb 4-1: reset full speed USB device using uhci_hcd and address 24 Nov 22 15:23:27 desktop kernel: [1982277.610343] usb 4-1: cp210x converter now attached to ttyUSB0
I'm trying to figure out exactly what the installer is looking for to see if the dongle is present. I get a "You must connect your USB ANT Stick.." message in a dialogbox, and a Retry button. I thought it was checking for the presence of a new COM port or maybe something in the Windows device tree?
I have installed the app on a Windows box, copied over the directory to Linux and run the program successfully under Wine. I do not know if it is communicating with the ttyUSB0 device though, I suspect it is not and I test that out tonight. On Windows, inserting the USB Dongle does not create a new COM port - so my guess is that the software is not treating this as a virtual COM port. If so using the old dosdevices file won't work. Any suggestions for either of these problems: - debugging a self extracting zip installer - getting a Windows app to use ttyUSB0 instead of whatever Windows USB device it would normally read/write from
Thanks for any ideas, Chris
This really belongs on the wine-users mailing list.
Chip
Am 24.11.2009 um 22:43 schrieb Charles Davis:
This really belongs on the wine-users mailing list.
I'm not sure - I think from the context of the mail Chris is a coder himself, and the answer to his question on wine-users would be "Wine currently cannot do this".
I am not too involved into the device mapping stuff in Wine, but I think what the app is missing is the enumeration of the USB device in the Windows USB services and/or the proper registry keys.
Currently the only way to make the device accessible for Windows apps is doing something like
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/COM1
Which gives you a classic serial port. But your app wants a USB-to-serial adapter with the right USB IDs etc.
I think what is needed is an extension of the drive handling system that adds new drives when new disks are mounted to also add COM ports when serial ports appear, and add USB information when USB devices appear. I think this would be done somewhere in mountmgr.sys, but I am not sure.
Maarten Lankhorst has written patches to get USB Storage devices listed properly a few years ago, in an attempt to make Windows Itunes sync to an Ipod. Those patches weren't committed because they need more work, but I think they would be a good starting point.
On 11/24/2009 10:58 PM, Stefan Dösinger wrote:
Am 24.11.2009 um 22:43 schrieb Charles Davis:
This really belongs on the wine-users mailing list.
I'm not sure - I think from the context of the mail Chris is a coder himself, and the answer to his question on wine-users would be "Wine currently cannot do this".
I am not too involved into the device mapping stuff in Wine, but I think what the app is missing is the enumeration of the USB device in the Windows USB services and/or the proper registry keys.
Currently the only way to make the device accessible for Windows apps is doing something like
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/COM1
Which gives you a classic serial port. But your app wants a USB-to-serial adapter with the right USB IDs etc.
I think what is needed is an extension of the drive handling system that adds new drives when new disks are mounted to also add COM ports when serial ports appear, and add USB information when USB devices appear. I think this would be done somewhere in mountmgr.sys, but I am not sure.
Maarten Lankhorst has written patches to get USB Storage devices listed properly a few years ago, in an attempt to make Windows Itunes sync to an Ipod. Those patches weren't committed because they need more work, but I think they would be a good starting point.
Stefan, let me guess, you just wanted to point him to http://wiki.winehq.org/USB ? ;)
bye michael
Am 24.11.2009 um 23:05 schrieb Michael Stefaniuc:
Stefan, let me guess, you just wanted to point him to http://wiki.winehq.org/USB ? ;)
Whaaa. Searching the wiki might have saved me lots of typing...
Am Tuesday 24 November 2009 22:38:53 schrieb Chris Teague:
I'm trying to figure out exactly what the installer is looking for to see if the dongle is present. I get a "You must connect your USB ANT Stick.." message in a dialogbox, and a Retry button. I thought it was checking for the presence of a new COM port or maybe something in the Windows device tree?
I think your problem is here:
001c:Call setupapi.SetupDiGetClassDevsW(00488150,00000000,00000000,00000012) ret=00401ef5 001c:Call advapi32.RegOpenKeyExW(80000002,7d92a160 L"System\CurrentControlSet\Control\DeviceClasses",00000000,00020019,0033ef18) ret=7d906628 001c:Ret advapi32.RegOpenKeyExW() retval=00000002 ret=7d906628 001c:Ret setupapi.SetupDiGetClassDevsW() retval=00196458 ret=00401ef5 001c:Call setupapi.SetupDiEnumDeviceInterfaces(00196458,00000000,00488150,00000000,0033f29c) ret=00401f16 001c:Ret setupapi.SetupDiEnumDeviceInterfaces() retval=00000000 ret=00401f16 0