diff --git a/pkg/semtech-loramac/contrib/semtech_loramac.c b/pkg/semtech-loramac/contrib/semtech_loramac.c index 3593d8e930..eafb861a2d 100644 --- a/pkg/semtech-loramac/contrib/semtech_loramac.c +++ b/pkg/semtech-loramac/contrib/semtech_loramac.c @@ -40,6 +40,7 @@ #include "semtech_loramac.h" #include "LoRaMac.h" +#include "LoRaMacTest.h" #include "region/Region.h" #ifdef MODULE_PERIPH_EEPROM @@ -427,6 +428,9 @@ void _init_loramac(semtech_loramac_t *mac, primitives->MacMlmeIndication = mlme_indication; LoRaMacInitialization(&semtech_loramac_radio_events, primitives, callbacks, LORAMAC_ACTIVE_REGION); +#ifdef DISABLE_LORAMAC_DUTYCYCLE + LoRaMacTestSetDutyCycleOn(false); +#endif mutex_unlock(&mac->lock); semtech_loramac_set_dr(mac, LORAMAC_DEFAULT_DR); diff --git a/tests/pkg_semtech-loramac/README.md b/tests/pkg_semtech-loramac/README.md index d32316e2ab..298f88be31 100644 --- a/tests/pkg_semtech-loramac/README.md +++ b/tests/pkg_semtech-loramac/README.md @@ -66,6 +66,11 @@ for US915 region. The default region is `EU868`. +**For testing purpose**, it is possible to disable the duty-cycle restriction +implemented in the MAC layer with the `DISABLE_LORAMAC_DUTYCYCLE` macro: + + CFLAGS=-DDISABLE_LORAMAC_DUTYCYCLE LORA_REGION=US915 LORA_DRIVER=sx1272 make ... + ## Using the shell This application provides the `loramac` command for configuring the MAC,