Hi Edvard,
Customer found Carrier sense is already implemented in Contiki-NG source.
They missed that. Sorry about that.
Now customer confirmed Contiki-NG handles CS and if interfering noises exist, CC1312R does not output its RF.
But they found below two issues for their usecase.
a) To meet Japan regulation, CS time needs to be maintained for 5ms (or 128us depends on channel#).
It seems CC1312R starts output as soon as interfering noises are not detected in current implementation.
Please see page#1 of attached slides.
Is it possible to implement CS time?
b) There is timing gap between CS and RF output start timing.
Please see attached slide#2.
As far as customer checked, ~300us delay exist in current implementation.
Customer thought below codes add the timing delay.
If MAX(CLOCK_SECOND / 3125, 1); is shorter, the delay also gets shorter.
Is it OK to modify this parts of the codes?
Customer wants to change it as small as possible.
C:\contiki-ng\os\net\mac\csma\csma-output.c
/*---------------------------------------------------------------------------*/
static clock_time_t
backoff_period(void)
{
#if CONTIKI_TARGET_COOJA
/* Increase normal value by 20 to compensate for the coarse-grained
radio medium with Cooja motes */
return MAX(20 * CLOCK_SECOND / 3125, 1);
#else /* CONTIKI_TARGET_COOJA */
/* Use the default in IEEE 802.15.4: aUnitBackoffPeriod which is
* 20 symbols i.e. 320 usec. That is, 1/3125 second. */
return MAX(CLOCK_SECOND / 3125, 1);
#endif /* CONTIKI_TARGET_COOJA */
}
/*---------------------------------------------------------------------------*/
Please let me know if you need further information.
Contiki-NG CarrierSense_20181005.pdf
Thanks and regards,
KoT