Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Burst Transfer failing even though data is transmitted

Avatar
Rank

Total Posts: 21

Joined 2011-11-08

PM

Hi,

I'm trying to get Burst Transfers to work and I'm not having much luck. I'm using an ANTC7_Ver2.

I have successfully established a connection and my broadcast data is working fine. My channel types are 0x10 and 0x00.

I then try and send a burst of 2 packets. I receive EVENT_TRANSFER_TX_START followed by EVENT_TRANSFER_TX_FAILED.

Using ANTWareII on the PC I see the two burst packets arrive followed by EVENT_TRANSFER_RX_FAILED.

The comms between my mcu and ant look like:

-> A4 09 50 06 C4 00 05 00 00 00 00 00 3A
-> A4 09 50 26 C4 00 05 00 00 00 00 00 1A
<- A4 03 40 06 01 0A EA
<- A4 03 40 06 01 06 E6

Is there a message I need to send to indicate transmission complete?

Any other ideas?
Thx      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hello,

On initial inspection, the sequence numbers of your burst transfer seem off.

First of all, the upper 3 bits of the first byte are used as the sequence number. This is used to ensure transfer integrity.

To indicate a burst transfer has started, the sequence number will be 0x00. Subsequent packets will then cycle through sequence numbers of 0x20, 0x40, and 0x60. On the final packet, the most significant bit of the sequence number will be set to high.

It appears as though your sequence number for your final burst packet is not being set to the expected 0xA6. Without the msb being set high, ANT has no way of knowing when the burst transfer is complete or not.

Cheers,

Kassandra

Kass      
Avatar
Rank

Total Posts: 21

Joined 2011-11-08

PM

Thank you, I was using sequence incorrectly. I was using all 3 bits as the number.      
Avatar
Rank

Total Posts: 21

Joined 2011-11-08

PM

Is I receive TRANSFER_IN_PROGRESS does that mean I am transmitting to fast? Most likely because I am not handling the RTS signal correctly?      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hello,

TRANSFER_IN_PROGRESS is returned when you try to send a burst or acknowledged message on a channel that already has a pending burst or acknowledged. This typically happens when a channel drops to search and you try and send a burst or acknowledged.

Can you send me your ANT device log, this would give me a better idea of what is going on to cause the TRANSFER_IN_PROGRESS.

Kassandra      
Avatar
Rank

Total Posts: 21

Joined 2011-11-08

PM

I'm sending the following data:

SA103310 12:59:35.201ant txA4 09 50 06 C4 00 09 00 00 00 00 00 
SA103310 12
:59:35.201ant txA4 09 50 26 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.201ant txA4 09 50 46 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 66 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 26 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 46 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 66 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 26 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 46 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 66 14 08 14 08 14 08 14 08 
SA103310 12
:59:35.202ant txA4 09 50 A6 C5 00 00 00 00 00 00 00 


The responses I get are:
EVENT_TRANSFER_TX_START
EVENT_TRANSFER_TX_FAILED

My log file on the rx side looks like:

75468.759 {  98276963} Rx [A4][09][4E][00][83][00][30][30][13][08][00][00][7B]
 75469.758 {  98277962} Rx 
[A4][03][40][00][01][02][E4]
 75470.756 {  98278960} Rx 
[A4][09][4E][00][01][00][6E][61][14][08][00][00][F1]
 75471.755 {  98279959} Rx 
[A4][09][4E][00][02][00][6D][65][14][08][00][00][F5]
 75472.753 {  98280957} Rx 
[A4][09][4E][00][03][00][64][00][14][08][00][00][98]
 75473.751 {  98281955} Rx 
[A4][09][4E][00][80][00][53][41][14][08][00][00][6D]
 75474.750 {  98282954} Rx 
[A4][03][40][00][01][02][E4]
 75475.764 {  98283968} Rx 
[A4][09][4E][00][82][00][30][30][14][08][00][00][7D]
 75476.762 {  98284966} Rx 
[A4][09][50][00][C4][00][09][00][00][00][00][00][30]
 75476.762 {  98284966} Rx 
[A4][09][50][20][14][08][14][08][14][08][14][08][DD]
 75476.762 {  98284966} Rx 
[A4][09][50][40][14][08][14][08][14][08][14][08][BD]
 75476.762 {  98284966} Rx 
[A4][09][50][60][14][08][14][08][14][08][14][08][9D]
 75476.778 {  98284982} Rx 
[A4][09][50][20][14][08][14][08][14][08][14][08][DD]
 75476.778 {  98284982} Rx 
[A4][09][50][40][14][08][14][08][14][08][14][08][BD]
 75476.778 {  98284982} Rx 
[A4][09][50][60][14][08][14][08][14][08][14][08][9D]
 75476.778 {  98284982} Rx 
[A4][09][50][20][14][08][14][08][14][08][14][08][DD]
 75476.778 {  98284982} Rx 
[A4][09][50][40][14][08][14][08][14][08][14][08][BD]
 75476.793 {  98284997} Rx 
[A4][09][50][60][14][08][14][08][14][08][14][08][9D]
 75476.809 {  98285013} Rx 
[A4][03][40][00][01][04][E2]
 75477.761 {  98285965} Rx 
[A4][09][4E][00][14][08][14][08][14][08][14][08][E3]
 75478.759 {  98286963} Rx 
[A4][09][4E][00][00][00][55][6E][14][08][00][00][C4]
 75479.757 {  98287961} Rx 
[A4][09][4E][00][01][00][6E][61][14][08][00][00][F1] 


My code works if I send 10 or less burst messages. 11 or more it fails, which leads me to believe I'm sending burst messages too fast and some are getting dropped.      
Avatar
Rank

Total Posts: 21

Joined 2011-11-08

PM

I have it working much better now, I can do burst transfers of 100 packets 9 out of 10 times without failures. Before I could send 15 packets 50% of the time.

Originally I had my channel set to 1Hz. The ANT module would buffer 9 burst messages, wait for the channel period and then usually fail to transmit.

I increased my channel to 10Hz and now it seems much more reliable.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The symptoms you describe seem to indicate you are either sending packets too fast to ANT and overruning the buffer, or sending them too slow, starving the burst. Typically, this means there is a problem in the flow control implementation. Are you using synchronous or asynchronous serial communication? If you do want to further investigate this, using a logic analyzer to get traces of the serial lines during the burst will be helpful to pinpoint the problem.