Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Requesting Data Pages

Rank

Total Posts: 2

Joined 0

PM

I wish to:
a) Scan for all detectable sensors.
b) Query the sensors for information (Page 80, 81, 82 etc..) without waiting for the long cycle of these common pages.

Right now my steps are:

Open Device and enable extended messages.
.setNetworkKey(...)
.assignChannel(...)
.setChannelSearchTimeout(0xFF)
.setChannelPeriod(0x1F86)
.setChannelFreq(0x39)
.openRxScanMode.

This seems to work and I seem to receive messages from all available sensors. Assuming I know the device num(id) and type of teh sensor -- how do I force immediate transmission on a common data page.

I am using .net.

Also - are there any adds or subtracts to the steps above that people might suggest. Thanks.

s.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Because you are opening an RX scan mode, you only need to set the network key, channel frequency, device ID parameters (most of which will be wildcarded as you are listening for multiple devices) and enable extended messaging.

Channel period and search time out do not matter in RX Scan Mode.

The "ANT+ Common Data Pages" document describes Page 70, "Request Data Page".
Immediately after you receive a message from the device you wish to query, you can request one of the common data pages by sending page 70 with the appropriate parameters.

Cheers      
Rank

Total Posts: 2

Joined 0

PM

Using the .net wrapper, how do I send page 70?

I have hunted through every code example and can find nothing that comes close.

Thanks.      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

... but honestly, I wouldn't expect that all sensors on the market process that request and immediately send the requested page.
Be prepared that lots of sensor simply ignore your request and stubbornly continue periodic transmission.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

You just need to send a standard ANT acknowledged message formatted as page 70 on any channel other than channel 0. The channel you use to send messages with must be configured with the same channel ID as your intended destination (master).

ANT_Device theDevice = ...
ANT_Channel theChannel;

theChannel = theDevice.getChannel((1 to 7));
(assign channel)
...

byte[] pageToSend = new byte[8] {...};
theChannel.sendAcknowledgedData(pageToSend);

If you have not already looked at the AN14 Continuous Scanning Mode application note, it describes how communication in continuous scanning mode is done.

And yes, implementation of the request common page is dependent on the manufacturer so your mileage may vary.

Cheers      
Rank

Total Posts: 2

Joined 0

PM

need a bit more help here...
My scanning code is:
channel device.getChannel(0)
device.ResetSystem()
device.setNetworkKey(0myKey)
...
channel.assignChannel(ANT_ReferenceLibrary.ChannelType.BASE_Slave_Receive_0x000)
channel.setChannelID(device_idFalse00)
channel.setChannelSearchTimeout(&HFF)
channel.setChannelPeriod(&H1F86)
channel.setChannelFreq(&H39)
device.enableRxExtendedMessages(True)
device.openRxScanMode() 


This seems to work well. All sensors are detected and their messages picked up.

When I want to request a summary page (let's say Page 2 of a Garmin HRM)...I do this:

Dim msgData() As Byte {&H46, &HFF, &HFF, &HFF, &HFF4Val1}
Dim channel2 
As ANT_Channel device.getChannel(1)
channel2.sendAcknowledgedData(msgData


Val is the page number and for the Garmin HRM is set to 1, 2 or 3.

I get a device response of 31
and then a channel response of Transfer Failed.

So, either the device doesn't want to respond or my code is wrong. Thoughts?      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

I didn't see the code for this here but you need to assign the device ID of the master your attempting to communicate with to the channel your sending the message with.

Dim channel2 As ANT_Channel = device.getChannel(1)
channel2.setChannelID(...) // Master your communicating with
channel2.sendAcknowledgedData(msgData)

Transfer failures can also occur due to intermittent RF, so I'd recommend putting in some form of retry when mechanism if an ack message fails.      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

Please read my previous post. I was SERIOUS about this.

If I remember right, ANT+ specs do not require sensors to respond to requests for standard pages, so you cannot expect this.

Plainly stated: don't write software that relies on sensors responsing to your page requests. Use periodic transmissions instead and you'll be happy.      
Rank

Total Posts: 4

Joined 2019-05-16

PM

I am trying to request Manufacturer's ID so that i can display proper Device Name.
I am calling sendAckData( ) function with given parameters:
UCHAR aucTempBuffer[] = {0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x50, 0x01};
sendAcknowledgedData(2, aucTempBuffer);
I am trying to get Response on Channel # 2. As I just read in this thread that I have to use channel other than 0.
As I need Manufacturer's Information that's why I am requesting Page Number 0x50.
I am not getting Manufacturer's Information in channel callback.
instead I am getting Response callback.
Message: Unhandled response [BUFFER_DATA3]:15 to message [BUFFER_DATA2]:4F
with Data: [06],[4f],[15],[ba],[36],[00],[df],[04]      
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

The 0x15 code is channel in wrong state from Section 9.5.6.1 of the document "ANT Message Protocol and Usage". This most likely indicates you have not assigned, and opened the channel you are attempting to use with sendAcknowledgedData.

See the post from Harrison 19 September 2012 06:51 PM      

Signature

Ian Haigh

Rank

Total Posts: 14

Joined 2017-11-26

PM

Sorry to open an old post. But Where I can get a list of device Names.........I can get Manu ID, but I can't a reference on the Site here. I look in the FIT SDK profile list, but that doesnt seem to correlate with Actual Names.

regards