Dear OMB,
I have opened up USB device like this:
try{
usb = new ANT_Device();
}
catch (Exception){
MessageBox.Show("Error initialising ANT module.");
return false;
}
usb.ResetSystem();
if (usb.enableRxExtendedMessages(true, 50)) //extended messages are enabled
{
usbCapabilities = usb.getDeviceCapabilities(20);
if (usbCapabilities.ExtendedMessaging)
{
MessageBox.Show("Extended Messaging is enabled", "ANT Debug", MessageBoxButtons.OK);
}
}
however when I try to access the extended messages it gives me the following message:
ANT_Managed_Library: Response is not an extended message.
I am accessing the capabilities and then the extended messages in the ANT_Channel event function as:
try
{
if (usbCapabilities.ExtendedMessaging)
{
currChannelID = ANTresponse.getDeviceIDfromExt();
}
}catch(ANT_Exception e){
MessageBox.Show(e.Message.ToString(), "ANT Error",
MessageBoxButtons.YesNo);
}
then latter from the currChannelID when I try to access the device type it returns me zero.I am expecting it 25 in the case of temperature sensor. Any suggestions please.
thanks