Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/semtech-loramac: provide a way to disable dutycycle #11241

Merged
merged 2 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/semtech-loramac/contrib/semtech_loramac.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include "semtech_loramac.h"
#include "LoRaMac.h"
#include "LoRaMacTest.h"
#include "region/Region.h"

#ifdef MODULE_PERIPH_EEPROM
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions tests/pkg_semtech-loramac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down