Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Heart Rate Monitor → Thread

   

Perfect transmission but no reception

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

I am using a Transceiver nRF24AP1 (http://www.sparkfun.com/products/8565) with an Arduino board, and I am trying to communicate with a heart rate sensor.

I have not been able to receive data from either an HRM or a simulated one from the ANT+ Sensor Simulator software (with a Garmin ANT+ usb stick). I can set up and open the channel, but it always times out during search.

However, I can use the same device to perfectly emulate an HRM and receivng the data with the ANT+ display simulator software on my PC.

Below is the complete log of communications with my ant transceiver when trying to connect to the ANT+ sensor simulator. the same code with just the modification of the channel type (to 0x10) when assiging the channel and correct channel Id setup works perfectly for transmission.

I have tried using/not using wild cards for the assign channel, using other sensors, changing period or network key...
Does anyone have any idea what the issue could be ?

thanks a lot for any help available

Reset
TX
A4 1 4A 10 FF 
RX
A4 3 40 10 4A 28 95

Request info
TX
A4 2 4D 0 54 BF 
RX
A4 4 54 4 3 0 3 F0

Set network key
TX
A4 9 46 0 B9 A5 21 FB BD 72 C3 45 64 
RX
A4 3 40 0 46 0 A1

Assign channel
TX
A4 3 42 0 0 0 E5 
RX
A4 3 40 0 42 15 B0

Set channel ID
TX
A4 5 51 0 0 0 78 1 89 
RX
A4 3 40 0 51 0 B6

Set search timeout
TX
A4 2 44 0 1E FC 
RX
A4 3 40 0 44 0 A3

Set frequency
TX
A4 2 45 0 39 DA 
RX
A4 3 40 0 45 0 A2

set period
TX
A4 3 43 0 86 1F 7D 
RX
A4 3 40 0 43 0 A4

Open Channel
TX
A4 1 4B 0 EE 
RX
A4 3 40 0 4B 15 B9

RX
A4 3 40 0 1 1 E7
 
     
Avatar
RankRank

Total Posts: 39

Joined 2011-06-29

PM

I looked over the traffic log and noticed a few things:

1. Your reset param is 0x10, it should be 0 (see ANT Message Protocol an Usage). That is why it is returning event response 0x28: invalid message
2. Your assign channel returns event response 0x15: channel in wrong state
3. Your open channel also returns event response 0x15: channel in wrong state

Since your assign response says it is already assigned, and your open response says it is either un-assigned, or already open; my bet is that the channel is already open. This is consistent with the time out response.

If you fix the reset command (Tx - [A4][01][4A][00][EF], Rx - [A4][01][6F][20][EA]) that will bring the channel to an un-assigned state and it should work.      
Rank

Total Posts: 4

Joined 2010-11-09

PM

I'm using the Verification Tool to verify a HRM Sensor. Can't pass the Master Device Channel Period Test...

Any Clues or feedback is appreciated..Regatrds!
*****************************************************************

RESET
997.344 {1206127453} Tx - [A4][01][4A][00][EF][00][00]
997.344 {1206127453} Rx - [A4][01][6F][20][EA]


997.844 {1206127953} Tx - [A4][02][6E][00][20][E8][00][00]
997.844 {1206127953} Rx - [A4][03][40][00][6E][00][89]

SET NETWORK KEY
997.844 {1206127953} Tx - [A4][09][46][00][00][00][00][00][00][00][00][00][64][00][00]
997.844 {1206127953} Rx - [A4][03][40][00][46][00][A1]

ASSIGN CHANNEL
997.844 {1206127953} Tx - [A4][03][42][00][00][00][E5][00][00]
997.859 {1206127968} Rx - [A4][03][40][00][42][00][A5]

SET CHANNEL ID
997.859 {1206127968} Tx - [A4][05][51][00][00][01][78][00][89][00][00]
997.859 {1206127968} Rx - [A4][03][40][00][51][00][B6]

SET RF FREQUENCY
997.859 {1206127968} Tx - [A4][02][45][00][39][DA][00][00]
997.859 {1206127968} Rx - [A4][03][40][00][45][00][A2]

SET PERIOD
997.859 {1206127968} Tx - [A4][03][43][00][86][1F][7D][00][00]
997.859 {1206127968} Rx - [A4][03][40][00][43][00][A4]

OPEN CHANNEL
997.859 {1206127968} Tx - [A4][01][4B][00][EE][00][00]
997.875 {1206127984} Rx - [A4][03][40][00][4B][00][AC]
1027.875 {1206157984} Rx - [A4][03][40][00][01][01][E7]
1027.875 {1206157984} Rx - [A4][03][40][00][01][07][E1]
1027.875 {1206157984} Tx - [A4][01][4A][00][EF][00][00]
1027.875 {1206157984} Rx - [A4][01][6F][20][EA]      
RankRankRankRank

Total Posts: 116

Joined 2008-11-21

PM

what is your channel period set to in your HR master device?      
Rank

Total Posts: 4

Joined 2010-11-09

PM

Its set to 1F86 Hex = 8070      
Rank

Total Posts: 4

Joined 2010-11-09

PM

Heres the associated Code I'm using to set the period,

void AntMaster::setchperiod()
{
uint8_t msgbuf[3];
msgbuf[0] = 0x43;
msgbuf[1] = (ANT_CH_PER & 0xFF00) >> 8; // Ch period LSB
msgbuf[2] = (ANT_CH_PER & 0xFF); // Ch period MSB
txMessage(msgbuf, 3);
}      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

In your code, you are formatting the channel period MSB first. It should be:
msgbuf[1] = (ANT_CH_PER & 0xFF); // Ch period LSB
msgbuf[2] = (ANT_CH_PER & 0xFF00) >> 8; // Ch period MSB      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

The endienness looks wrong there. Your comment says lsb but you use the msb and vise versa.... try it the other way around...