Go to the documentation of this file.
22 #ifndef __LORAMACHELPER_H__
23 #define __LORAMACHELPER_H__
34 #define LORAWAN_CONFIRMED_MSG_ON 0
35 #define LORAWAN_CERTIF_PORT 224
36 #define LORAWAN_APP_PORT 2
37 #define LORAWAN_APP_DATA_MAX_SIZE 242
38 #define LORAWAN_DEFAULT_DATARATE DR_0
39 #define LORAWAN_DEFAULT_TX_POWER TX_POWER_0
41 typedef struct lmh_param_s
void lmh_setSingleChannelGateway(uint8_t userSingleChannel, int8_t userDatarate)
Disable channel hoping for connnection to single channel gateways Check the file CHANNELS....
Definition: LoRaMacHelper.cpp:128
bool running
Definition: LoRaMacHelper.h:119
int8_t tx_power
Definition: LoRaMacHelper.h:47
struct LoraMacHelper_ComplianceTest_s lmh_compliance_test_t
LoRaWAN compliance tests support data.
uint8_t data_buffer[64]
Definition: LoRaMacHelper.h:124
lmh_error_status lmh_send(lmh_app_data_t *app_data, lmh_confirm is_txconfirmed)
Send data.
Definition: LoRaMacHelper.cpp:875
void(* lmh_RxData)(lmh_app_data_t *appdata)
Process Rx Data received from Lora network.
Definition: LoRaMacHelper.h:102
uint8_t * buffer
Definition: LoRaMacHelper.h:73
lmh_join_status
Definition: LoRaMacHelper.h:52
uint32_t(* BoardGetRandomSeed)(void)
Returns a pseudo random seed generated using the MCU Unique ID.
Definition: LoRaMacHelper.h:97
void lmh_setDevEui(uint8_t *userDevEui)
Set Device IEEE EUI (big endian)
uint8_t app_port
Definition: LoRaMacHelper.h:122
uint8_t nb_trials
Definition: LoRaMacHelper.h:46
lmh_confirm
Definition: LoRaMacHelper.h:64
Application Data structure.
Definition: LoRaMacHelper.h:72
lmh_error_status lmh_init(lmh_callback_t *callbacks, lmh_param_t lora_param)
Lora Initialisation.
Definition: LoRaMacHelper.cpp:675
void lmh_datarate_set(uint8_t data_rate, uint8_t enable_adr)
Configure data rate.
Definition: LoRaMacHelper.cpp:803
uint8_t(* BoardGetBatteryLevel)(void)
Get the current battery level.
Definition: LoRaMacHelper.h:87
void lmh_setNwkSKey(uint8_t *userNwkSKey)
Set Network Session Key AES encryption/decryption cipher network session key.
Definition: LoRaMacHelper.cpp:113
bool link_check
Definition: LoRaMacHelper.h:126
bool lmh_setSubBandChannels(uint8_t subBand)
Set custom channel mask.
Definition: LoRaMacHelper.cpp:135
void(* lmh_has_joined)()
callback indicating EndNode has just joined
Definition: LoRaMacHelper.h:106
@ LMH_ERROR
Definition: LoRaMacHelper.h:59
uint8_t buffsize
Definition: LoRaMacHelper.h:74
LoRaMac Helper Callbacks.
Definition: LoRaMacHelper.h:83
uint8_t snr
Definition: LoRaMacHelper.h:77
lmh_error_status lmh_class_request(DeviceClass_t newClass)
change Lora Class
Definition: LoRaMacHelper.cpp:923
@ LMH_UNCONFIRMED_MSG
Definition: LoRaMacHelper.h:65
struct lmh_callback_s lmh_callback_t
LoRaMac Helper Callbacks.
enum eDeviceClass DeviceClass_t
bool adr_enable
Definition: LoRaMacHelper.h:43
void lmh_tx_power_set(uint8_t tx_power)
Configure tx power.
Definition: LoRaMacHelper.cpp:813
void(* lmh_ConfirmClass)(DeviceClass_t Class)
Confirms the class change.
Definition: LoRaMacHelper.h:111
uint16_t downlink_counter
Definition: LoRaMacHelper.h:125
lmh_join_status lmh_join_status_get(void)
Check whether the Device is joined to the network.
Definition: LoRaMacHelper.cpp:859
@ LMH_RESET
Definition: LoRaMacHelper.h:53
int16_t rssi
Definition: LoRaMacHelper.h:76
uint8_t port
Definition: LoRaMacHelper.h:75
uint8_t state
Definition: LoRaMacHelper.h:120
void(* BoardGetUniqueId)(uint8_t *id)
Gets the board 64 bits unique ID.
Definition: LoRaMacHelper.h:92
LoRa MAC layer implementation.
@ LMH_CONFIRMED_MSG
Definition: LoRaMacHelper.h:66
struct lmh_param_s lmh_param_t
uint8_t demod_margin
Definition: LoRaMacHelper.h:127
uint8_t data_buffer_size
Definition: LoRaMacHelper.h:123
int8_t tx_data_rate
Definition: LoRaMacHelper.h:44
void lmh_join(void)
Join a Lora Network in class A.
Definition: LoRaMacHelper.cpp:820
Definition: LoRaMacHelper.h:42
void lmh_class_get(DeviceClass_t *currentClass)
get the current Lora Class
Definition: LoRaMacHelper.cpp:1002
@ LMH_SET
Definition: LoRaMacHelper.h:54
uint8_t nb_gateways
Definition: LoRaMacHelper.h:128
LoRaWAN compliance tests support data.
Definition: LoRaMacHelper.h:118
@ LMH_SUCCESS
Definition: LoRaMacHelper.h:60
void lmh_setAppSKey(uint8_t *userAppSKey)
Set Application Session Key AES encryption/decryption cipher application session key.
Definition: LoRaMacHelper.cpp:118
bool is_tx_confirmed
Definition: LoRaMacHelper.h:121
void lmh_setDevAddr(uint32_t userDevAddr)
Set Device address on the network (big endian)
Definition: LoRaMacHelper.cpp:123
void lmh_setAppEui(uint8_t *userAppEui)
Set Application IEEE EUI.
Definition: LoRaMacHelper.cpp:103
void lmh_setAppKey(uint8_t *userAppKey)
Set Application Key AES encryption/decryption cipher application key.
Definition: LoRaMacHelper.cpp:108
bool enable_public_network
Definition: LoRaMacHelper.h:45
lmh_error_status
Definition: LoRaMacHelper.h:58