Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

How to check ANT USB device is connected with system or not?

Rank

Total Posts: 3

Joined 2014-03-22

PM


Currently i am developing one window application in .Net C#. So, How i can get any event when ANT USB device is disconnected with system. I am applicable to get number of ANT devices which are connected with system. But when any ANT USB device is unplugged with system at that time i want to get that ANT USB device number which is disconnected. And also I want to know How to get ANT device USB serial#?
     
Rank

Total Posts: 3

Joined 2014-03-22

PM

Currently, I am developing one window application in .Net with C# by using ANT USB device. I am not applicable to get ANT USB device serial#? Please support me..
Thanks.
     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

To get the USB stick serial number, you can use the getSerialNumber method of ANT_Device.

You can use the serialError event of ANT_Device to see if there was a communication failure with the USB stick, as would happen if the USB stick was disconnected. You can call getOpenedUSBDeviceNum to get the USB ennumerated number.      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

Two tiny addons:
1. the previous answer means that there are NO NOTIFICATIONS (i.e. C# events), when a stick is plugged or unplugged - you have to poll
2. if I remember right, the first hardware revision of ANT USB sticks did not support serial numbers.

Cheers,
OMB      
Rank

Total Posts: 3

Joined 2014-03-22

PM

Thanks for support...

I have try to get ANT USB device Serial# as per below link

ANT_Response objANTSerial = ANTDevice.requestMessageAndResponse(ANT_ReferenceLibrary.RequestMessageID.SERIAL_NUMBER_0x61, 500);

In objANTSerial object i am not applicable to find where ANT Device serial# is store. So, How i get the ANT device Serial#? If i pass the request to ANT device.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

alejandra - 14 April 2014 02:28 PM
To get the USB stick serial number, you can use the getSerialNumber method of ANT_Device..