23.2 Other changes

  1. After backing off macMaxCSMABackoffs and being unable to transmit a packet, the MAC has to report a channel access failure. The older implementation kept attempting to transmit the packet indefinitely, instead of reporting channel access failure. This has been fixed in the Mac802_15_4::mcps_data_request() function. Also the node is put to sleep (if need be) at this stage.
    Files affected: ./wpan/p802_15_4mac.cc

  2. A new constant called aCCATime has been added, which indicates the CCA duration in symbol periods.
    Files affected: ./wpan/p802_15_4const.h

  3. CCA duration has been specified to be 8 symbol durations. In the older implementation, CCA was being done right at the end of the 8th symbol duration to determine channel idleness. As a result, if the channel is busy for the first 8 symbol durations and goes idle after that (which is likely), the implementation would indicate channel idle while in reality it shouldn't. This has been fixed by doing the CCA at the end of the 4th symbol duration, but reporting channel status at the 8th. For this purpose, a new timer CCAReportH has been added which on expiry calls CCAReportHandler that does the reporting. Files affected: ./wpan/p802_15_4phy.cc, ./wpan/p802_15_4phy.h

  4. The Phy802_15_4::PD_DATA_indication() function calls WirelessChannel::sendUp() to check if the packet has been received correctly and to decrement the energy consumed in the packet reception. The SendUp() function is already being called by recv() and calling it a second time causes energy to be decremented twice. This bug has been fixed in Phy802_15_4::PD_DATA_indication().
    Files affected: ./wpan/p802_15_4phy.cc

  5. Phy802_15_4::recv() function that receives packets from the channel checks if the packet has been received correctly using WirelessPhy::sendUp(), failing which the packet is freed. sendUp() returns a 0 either when the node is asleep or when the packets received power is less than the CS threshold. In the former case, the variables rxTotPower and rxTotNum need to be updated for CS purposes before dropping the packet, while in the latter case the packet simply needs to be dropped. Zheng's implementation was dropping all packets without updating the variables. This has been fixed in Phy802_15_4::recv().
    Files affected: ./wpan/p802_15_4phy.cc

  6. The receiver has to be turned on for the carrier sensing operation and therefore receive power $P_r$ is consumed during this period. The earlier implementation did not decrement receive energy due to carrier sensing. This has been added in function Phy802_15_4::CarrierSenser(). Also, energy is spent during the tx-rx turnaround. This has been accounted for as well.
    Files affected: ./wpan/p802_15_4phy.cc

Tom Henderson 2011-11-05