Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Identifying the data page

RankRank

Total Posts: 42

Joined 2020-01-26

PM

Hi,

I would like to analyse the data received from my garmin heart rate monitor. Everything works fine, except I struggle to identify the data page and the corresponding page specific bytes. In the document "Device Profile Heart Rate Rev 2.1" it is written that the 7 Bits (bits 0:6) of byte 0 correspond to the data page number and that the byte 1,2,3 are page specific.

I use openant under python and when I log the received messages I get something similar to this:
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 84 ff a5 e2 a5 e6 ca 3c 80 52 62 78 71 d6] (byte 0 = 84)
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 04 ff a5 e6 a5 ea cb 3c 80 52 62 78 71 5f] (byte 0 =04)
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 84 ff a5 ea a5 ee cc 3c 80 52 62 78 71 d0] (byte 0 = 84)
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 04 ff a5 ee a5 f2 cd 3c 80 52 62 78 71 49] (byte 0 = 04)
DEBUG:ant.base.ant:Read data: [a4 03 40 02 01 09 ed]
DEBUG:ant.base.ant:Read data: [a4 03 40 02 01 09 ed]
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 84 ff b6 fa c7 fe d0 3b 80 52 62 78 71 ba] (byte 0 = 84)
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 04 ff c7 fe d8 02 d1 3b 80 52 62 78 71 ad] (byte 0 = 04)
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 84 ff d8 02 e9 06 d2 3b 80 52 62 78 71 f8] (byte 0 = 84)
DEBUG:ant.base.ant:Read data: [a4 0e 4e 02 04 ff e9 06 fa 0a d3 3b 80 52 62 78 71 53] (byte 0 = 04)

So i get sometimes 0x84 and sometimes 0x04 as byte 0, meaning:
Hex 0x84 = Binary 10000100 -> bits 0:6 -> Binary 1000010 = Decimal 66
Hex 0x04 = Binary 00000100 -> bits 0:6 -> Binary 0000010 = Decimal 02

Am I missing something? Data page 66 seems wrong.
Thx      
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

You have selected bits 1:7 instead of 0:6. Bit 0 is the LSB which is the right most bit in your binary representation. 0x84 and 0x04 are page 4.      

Signature

Ian Haigh