Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Burstmode missing packets

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

I am currently experimenting with burst mode, sending a burst transfer from one ANT USB Stick to another ANT USB Stick. With this constellation I experience missing packets
on the receiver side. Here is what I have logged:

At sender side the following messages were send:
a4,9,50,60,61,73,20,63,6f,6e,63,65,cb
a4,9,50,20,6e,74,72,61,74,69,6e,67,c0
a4,9,50,40,2e,20,48,65,20,73,61,69,c5
a4,9,50,e0,64,2c,20,22,47,6f,6f,64,74

At the receiver side I get:
a4,9,50,60,61,73,20,63,6f,6e,63,65,cb
a4,9,50,20,6e,74,72,61,74,69,6e,67,c0
a4,9,50,e0,64,2c,20,22,47,6f,6f,64,74

As you can see the third packet disapeared.
The log was created by an usb sniffer.

How can this happen?      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

From the messages you posted, it seems most likely that the USB sniffer is either not being able to keep up or is interfering with the serial messaging (for example, it might be affecting the flow control), since the receiver shows that it got the last packet (sequence number 0xE0). The sender of the burst would not have been able to send this last packet over the air if the previous one had not succeeded - it would have seen an EVENT_TRANSFER_TX_FAILED or TRANSFER_SEQUENCE_NUMBER_ERROR message from ANT. Are there any other messages from ANT at the end of the burst, at either the receiver or sender?

Are you using ANTware or your own custom application to test the burst mode?
Either way, applications using the ANT library can generate a log of the serial communication, including all messages exchanged over the serial interface between ANT and the host PC, so there is no need to use a USB sniffer.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

It is not the sniffer. In fact, I get the same effect in my application and I used the sniffer to see if there is a bug in my code.
I am not using ANTWare, but a custom interface which must also run on a pic-processor. (which logs exactly the same).

My test program does the following:
It sends a 20kb block. I divided it into
512 Byte Junks. These are transmitted via burst.

In the described case, I got a
EVENT_TRANSFER_TX_COMPLETED on the sender side. It just goes on as nothings happens.

This behaviour is not reproduceable.
Sometimes (maybe 20%) it works without any problem.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Finally I found the error (after some sleepless nights). It has nothing to do with ANT, thank you for your help.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Can I know your cause and solution? I am also encountering a similar issue but mine is always the second packet missing.

More details:
Send out 2 burst in a row, one after another. Both burst's second packet is always missing. Tried many time, always the same result.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hi,

I realized I just found a possible solution. Both my sender and receiver and set to the same period, and both are executing minimum task to speed up the system. It seems that after I start loading more task at the receiver, I started receiving the missing packet again.

Not sure if tx & rx speed is too similar is the cause.

Whatever the cause, I realize I always get missing packets and retransmission is inevitable.