Ticket #178 (new defect)

Opened 4 years ago

Last modified 20 months ago

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:

if (length < RF_ACK_PACKET_SIZE
(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.

Change History

comment:1 Changed 20 months ago by agr

  • Milestone RT-Link Enhancements deleted

Milestone RT-Link Enhancements deleted

Note: See TracTickets for help on using tickets.