Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

How to enable extended messages

RankRank

Total Posts: 33

Joined 0

PM

Hi,

I developped a program with a background search function.
Therefore i need to enabler the extended messages.

I just setup channel 0 with the appropiate settings. But i cannot find how to enable the extended messages.

Can anyone give me clue?

I use vb.net but examples in another languages is no problem for me.

Best Regards,
Klaasjan      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi Klaasjan,

For enabling extended messages refer to Section 7.1.1 of the ANT Message Protocol and Usage document.
Section 9.5.2.19 describes the Lib Config (0x6E) message which can be used to enable extended messages. Lib Config can be used to enable channel ID, RSSI and timestamp information in the extended bytes.

If you only wish to enable channel ID information in the extended bytes you may also use the Enable Extended Messages (0x66) message, Section 9.5.2.16.

(ANT Message Protocol and Usage Document: http://www.thisisant.com/resources/ant-message-protocol-and-usage/)

     
RankRank

Total Posts: 33

Joined 0

PM

Hi usamak,

i read this chapter and come to the conclusion i need 7.1.1. and can skip the RSSI (7.1.1.2) because i m not interested in the strenght of the signal
But i'm a newbe in ant+ programming. how do i enable the extended messages, in other words how do i do that in code (c++, c# or vb.net)
I miss that clue, sorry for that.

Best Regards,
Klaasjan      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi Klaasjan,

If you are using the ANT_Managed_Library (C#) you can use the enableRxExtendedMessages() method of the ANT_Device class to enable extended messages.

For an example, you can refer to the source code of the ANT RSSI demo, which uses the enableRxExtendedMessages() method to enable extended messages.

For C++ and VB you should be able to use ANT_RxExtMesgsEnable() function available in the ANT_DLL.

Windows Library Package: http://www.thisisant.com/resources/ant-windows-library-package-with-source-code/
ANT RSSI Demo: http://www.thisisant.com/resources/ant-rssi-demo/

     
RankRank

Total Posts: 33

Joined 0

PM

Hi,

Thanks, it works perfect.

But now another question: is it possible to stop the background search and prevent the sensors of sending data?      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

You can stop the background search by closing the background scanning channel.

In the Ant_Managed_Library (C#) this can be accomplished by using the closeChannel() method of the ANT_Channel class.

You cannot prevent sensors from sending data using ANT communication. Some ANT+ sensors are programmed to enter sleep mode when they are no longer receiving an input signal (i.e heart rate for HRMs). If that is not an option, you would have to remove the batteries.

Could you summarize your use case where you would want to prevent sensors from sending data? Your program can choose to ignore transmissions from certain sensors using an inclusion/exclusion list or by specifying a device # whenever it opens a new channel.

Refer to this pairing question in the FAQ for more information: http://www.thisisant.com/developer/resources/tech-faq/when-is-pairing-critical/