Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Ant dongle not found.

Rank

Total Posts: 19

Joined 2013-04-03

PM

I am developing an application with Qt to use an ANT+ usb dongle. I am using the ANT API to access and control the dongle. Until today this has been fine. All of sudden whenever I call "ANT_Init" I get returned a false indicating that something has gone wrong in the initialization. I know that my system recognizes that the dongle is connected and I can still access and control the dongle through AntWareII. In AntWareII I am explicitly releasing the dongle to make sure it is not tied up. I have removed and inserted the dongle several times and I have reset my computer a couple of times - neither of these helped. I also tried initializing using a different channel number (originally I was using 0) but this did not change the behavior. Any insight would be appreciated.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Are you using a USB1 or USB2?

To be able to connect to USB1, you need to make sure that the DSI* DLLs included in the library package are in the working path of your application.      
Rank

Total Posts: 19

Joined 2013-04-03

PM

alejandra - 09 April 2013 08:49 AM
Are you using a USB1 or USB2?

To be able to connect to USB1, you need to make sure that the DSI* DLLs included in the library package are in the working path of your application.


1. I believe I am using USB2. The computer is relatively new and I do not get the "Your device could perform faster" message when I plug in USB devices. I also checked in the device manager and checked both of my USB hubs and both are listed as operating at high speed which I interpret as using USB2.0.

2. I have not moved the DSI* DLLs. This is issue perplexes me because it started occurring all of a sudden. I made no significant changes to the application. I will try placing the DSI* DLLs in my debug directory to see if that helps.

Thanks.      
Rank

Total Posts: 19

Joined 2013-04-03

PM

alejandra - 09 April 2013 08:49 AM
Are you using a USB1 or USB2?

To be able to connect to USB1, you need to make sure that the DSI* DLLs included in the library package are in the working path of your application.


I deleted my build directory and did a fresh build plus I copied the DSI* DLLs to my build directory (two of them, DSI_CP210xManufacturing_3_1 and DSI_SiUBXp_3_1). The one USB stick that was not working previously appeared to get a little further. The dongle was recognized but after setting the network key (ANT_SetNetworkKey) things seemed to freeze (i.e. the dongle did not start pinging). The other dongle I have continues to work fine.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

You can recognize the type of USB stick by the markings on the plastic. Since the DSI DLLs were needed to connect to it, you most likely have a USB1. Please be aware that USB1 only supports max baud rate of 50000 - make sure you are configuring your code correctly to connect at that baud rate (the demo code has some comments regarding this).      
Rank

Total Posts: 19

Joined 2013-04-03

PM

alejandra - 10 April 2013 10:53 AM
You can recognize the type of USB stick by the markings on the plastic. Since the DSI DLLs were needed to connect to it, you most likely have a USB1. Please be aware that USB1 only supports max baud rate of 50000 - make sure you are configuring your code correctly to connect at that baud rate (the demo code has some comments regarding this).


Okay, I think that worked. I do have a mix of USB1 and USB2 sticks. I tried both on AntWareII and realized that the baud rate was being changed for each type of stick. I could have sworn that I had been using the USB1 stick for a while and that it stopped working all of a sudden. I must have switched sticks and not realized it.

Is there a way to poll the stick to determine what baud rate to use? I assume there must be since AntWareII can detect the rate.

Thanks.      
Rank

Total Posts: 19

Joined 2013-04-03

PM

Corey - 11 April 2013 07:03 AM

Is there a way to poll the stick to determine what baud rate to use? I assume there must be since AntWareII can detect the rate.

Thanks.


I just saw in the Ant DLL the ANT_GetDeviceUSBInfo command but did not see it in the Ant Protocol and Message guide. This seems like it is the function I should use. Is there documentation on this?

Thanks.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

No, it is not possible to poll the USB stick for its Baud Rate.

The automatic detection code in ANTware basically tries to connect at one baud rate, attempts to send a command to ANT to see if serial communication is functional, and if it fails, it tries a different baud rate.      
Rank

Total Posts: 19

Joined 2013-04-03

PM

alejandra - 11 April 2013 08:36 AM
No, it is not possible to poll the USB stick for its Baud Rate.

The automatic detection code in ANTware basically tries to connect at one baud rate, attempts to send a command to ANT to see if serial communication is functional, and if it fails, it tries a different baud rate.


Got it. I will give it a try. Thanks for getting me on the right path.