isShortAddr = (shortAddress != 0xFFFE);
m_beaconFrame.header->mhr[MHR_INDEX_FC1] = FC1_FRAMETYPE_BEACON;
m_beaconFrame.header->mhr[MHR_INDEX_FC2] = isShortAddr ? FC2_SRC_MODE_SHORT : FC2_SRC_MODE_EXTENDED;
- m_beaconFrame.header->mhr[MHR_INDEX_SEQNO] = call MLME_GET.macBSN();
+ m_beaconFrame.header->mhr[MHR_INDEX_SEQNO] = call MLME_GET.macBSN() + 1;
offset = MHR_INDEX_ADDRESS;
*((nxle_uint16_t*) &m_beaconFrame.header->mhr[offset]) = m_updatePANId;
offset += sizeof(ieee154_macPANId_t);
task void txDoneTask()
{
- call MLME_SET.macBSN(m_beaconFrame.header->mhr[MHR_INDEX_SEQNO]+1);
+ call MLME_SET.macBSN(m_beaconFrame.header->mhr[MHR_INDEX_SEQNO]);
m_beaconFrame.header->mhr[MHR_INDEX_SEQNO] += 1; // may be overwritten by the next higher layer
call SetMacBeaconTxTime.set(m_lastBeaconTxTime); // start of slot0, ie. first preamble byte of beacon
call BeaconPayloadUpdateTimer.startOneShotAt(m_lastBeaconTxTime,
} // end atomic (give BeaconSendAlarm.fired() the chance to execute)
signal IEEE154TxBeaconPayload.aboutToTransmit();
- m_beaconFrame.header->mhr[MHR_INDEX_SEQNO] = call MLME_GET.macBSN();
+ m_beaconFrame.header->mhr[MHR_INDEX_SEQNO] = call MLME_GET.macBSN() + 1;
atomic {
// (4) try to update beacon payload