Ticket #178 (new defect)
checksum overhead not considered in rf_polling_rx_packet().
| Reported by: | bma4@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | component1 | Version: | 2.0 |
| Keywords: | Cc: | bma4@… |
Description
I believe that the checksum overhead is not considered when receiving a packet via rf_polling_rx_packet() in basic_rf.c. On line 838 the following check is done:
| (length-RF_PACKET_OVERHEAD_SIZE)> rfSettings.pRxInfo->max_length) |
This check makes sure that the length of the incoming packet is not larger than the overheads and the packet buffer. However, later in the function on line 851 the length of the packet subtracts CHECKSUM_OVERHEAD:
rfSettings.pRxInfo->length = length - RF_PACKET_OVERHEAD_SIZE - CHECKSUM_OVERHEAD;
I believe that the check on line 838 should subtract CHECKSUM_OVERHEAD as well.
This problem manifested itself in the following manner: Using rt_link I set the buffer to be a given size (ex: 28 bytes). I can receive packets of 27 bytes and less, but not 28 bytes. One byte of my buffer cannot be used. As CHECKSUM_OVERHEAD == 1, I think that CHECKSUM_OVERHEAD is not subtracted but should be.
If I an incorrect and have missed something, please let me know.

Milestone RT-Link Enhancements deleted