qdot/libfitbit — Issue #19: Trying to re-transmit data, failing in an odd way...
Author: marcushall42
Created: 2012-01-15 22:32:59+00:00
State: open

OK, I'm trying to add re-transmission to send_acknowledged_data(), but what I am seeing is a bit odd:

sent: ['a4', '09', '4f', '00', '3c', '22', '05', '00', '00', '00', '00', '00', 'f9']
^^^ This is the original packet that was sent

received: ['a4', '09', '4e', '00', '3b', '81', '00', '00', '00', '00', '00', '00', '59']
^^^ Received broadcast data this cell, nothing unusual

received: ['a4', '03', '40', '00', '01', '02', 'e4']
^^^ Received channel event, '02' => EVENT_RX_FAIL

sent: ['a4', '09', '4f', '00', '3c', '22', '05', '00', '00', '00', '00', '00', 'f9']
^^^ So, I re-transmit the original packet

received: ['a4', '03', '40', '00', '4f', '1f', 'b7']
^^^ And receive a channel event that looks like the response to configuration messages..

sent: ['a4', '09', '4f', '00', '3c', '22', '05', '00', '00', '00', '00', '00', 'f9']
^^^ Re-transmit again...

received: ['a4', '03', '40', '00', '4f', '1f', 'b7']
^^^ Keep getting this style of response..

The description of EVENT_RX_FAIL is:
A receive channel missed a message which it was expecting. This happens when a slave is tracking a master and is expecting a message at the set message rate.

This does occur just after an http exchange, if that may make a difference... Still, what would be the proper recovery out of this state? It seems that I need to re-transmit the original packet, but it looks like ANT won't accept the packet again..

Any ideas?

Thanks!