Hi, The current 802.15.4 code does not check if a CCA is already on before starting another CCA (see p802_15_4csmaca.cc::CsmaCA802_15_4::RX_ON_confirm()). This causes the event associated with the CCAhandler to be inserted twice in CalendarScheduler's "bucket" (see scheduler.cc::CalendarScheduler::insert()) which may potentially cause the CalendarScheduler to go into an infinite loop (see the "for (before = head; e->time_ >= before->time_; before = before->next_)" loop in scheduler.cc::CalendarScheduler::insert()). I am seeing this behavior in my simulations.
I think a reasonable solution is to directly call CsmaCA802_15_4::CCA_confirm(p_BUSY) from CsmaCA802_15_4::RX_ON_confirm() (rather than calling PLME_CCA_request()) if a CCA is already on (ie mac->taskP.taskStatus(TP_CCA_csmaca) is already true). Thanks Mukul