Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Help me interpret this Rx message

Rank

Total Posts: 6

Joined 2012-01-12

PM

I have been working on a sensor with a relay, and it is pretty much complete. At the moment I am working on interpreting the data I receive. Here is an example line:

Rx - [A4][09][4E][00][41][00][00][00][3D][23][80][27][1B]

From what I understand, this should be sync, message length, broadcast data type, channel number 0, 8 data bytes, and then checksum.

The channel is configured with Channel ID 49,1,1. Channel type is set to Slave 0x00.

What I am curious about is the [41], the first data byte. I keep seeing it no matter what, and I am wondering if there is something I am missing here.      
Avatar
Rank

Total Posts: 19

Joined 2012-05-08

PM

Hi Bard,

In a broadcase message such as this, the information in that position refers to the data page being sent by the sensor.

0x41 corresponds to data page 65, which could be formatted in a couple ways depending on what sensor is transmitting the data.      
Rank

Total Posts: 6

Joined 2012-01-12

PM

laprairie wrote:
Hi Bard,

In a broadcase message such as this, the information in that position refers to the data page being sent by the sensor.

0x41 corresponds to data page 65, which could be formatted in a couple ways depending on what sensor is transmitting the data.


Currently there is only a potentiometer connected as a "sensor", but I see this [41] in the same position in every broadcast data message no matter what.      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

What data are you expecting to receive?

Unless you change the contents of the broadcast data, you will always see the same data payload.

What do you mean that you see [41] no matter what you do? Have you tried setting the data payload to something else using the ANT_SendBroadcastData message?      
Rank

Total Posts: 6

Joined 2012-01-12

PM

rizopoulos wrote:
What data are you expecting to receive?

Unless you change the contents of the broadcast data, you will always see the same data payload.

What do you mean that you see [41] no matter what you do? Have you tried setting the data payload to something else using the ANT_SendBroadcastData message?


What I mean is that when I alter the resistor in my "sensor", the data changes (last four bytes) but the [41] remains constant in every single message. From the ANT messaging and protocol document, you see that the first databyte should be the channel number (00), but it does not say anything about the next one being anything else than data.

Is this just some number that varies with the type of sensor connected or something?      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Unless you have specifically set the data using the ANT_SetBroadcastData message, the data that is being transmitted will be garbage data. The data that you send depends specically on the type of sensor. For example, the ANT+ device profiles specify the kind of data that ANT+ devices shall send, and specifies how a receiving device shall interpret that data.

You explicitly set the contents of the data, it is not set by ANT to represent anything by default, it is completely application specific. Try using the ANT_SetBroadcastData message to set the data if you want to see other data in that byte.      
Rank

Total Posts: 6

Joined 2012-01-12

PM

rizopoulos wrote:
Unless you have specifically set the data using the ANT_SetBroadcastData message, the data that is being transmitted will be garbage data. The data that you send depends specically on the type of sensor. For example, the ANT+ device profiles specify the kind of data that ANT+ devices shall send, and specifies how a receiving device shall interpret that data.

You explicitly set the contents of the data, it is not set by ANT to represent anything by default, it is completely application specific. Try using the ANT_SetBroadcastData message to set the data if you want to see other data in that byte.


Well it's not really garbage as it varies from 00 00 00 00 all the way up to FF FF FF FF (last four bytes) when I alter the resistor value, and thus the voltage from 0 to 2.5V. If i go over 2.5V, the whole thing seems to freeze though, but since I have Vref at 2.5V that makes sense.

I shall attempt to attach my SensRcore script, as I see there is an entry of [41] in there.

[file name=sensor.txt size=747]http://www.thisisant.com/images/fbfiles/files/sensor.txt[/file]      
Rank

Total Posts: 6

Joined 2012-01-12

PM

Also, here is an image. It is an ANT AT3 with battery board, with a potentiometer wired to pins 1, 2 and 6.



Here is a link if the upload should fail.      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hello,

I did not realize that you were using a SensRcore node. Have you had a look at the SensRcore Messaging and Usage document? 0x41 indicates that you are receiving a page from a SensRcore node. What are you trying to configure your script to do?

Cheers,

Kassandra      
Rank

Total Posts: 6

Joined 2012-01-12

PM

It is a simple script that samples data from the AIO0 pin. After having a look at the document you mentioned, I was able to successfully convert the data into the actual voltage. Many thanks.