 |
SX126x-Arduino
2.0.1
|
Go to the documentation of this file.
22 #ifndef __LORAMACHELPER_H__
23 #define __LORAMACHELPER_H__
35 #define LORAWAN_CONFIRMED_MSG_ON 0
36 #define LORAWAN_CERTIF_PORT 224
37 #define LORAWAN_APP_PORT 2
38 #define LORAWAN_APP_DATA_MAX_SIZE 242
39 #define LORAWAN_DEFAULT_DATARATE DR_0
40 #define LORAWAN_DEFAULT_TX_POWER TX_POWER_0
42 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:137
bool running
Definition: LoRaMacHelper.h:126
int8_t tx_power
Definition: LoRaMacHelper.h:48
struct LoraMacHelper_ComplianceTest_s lmh_compliance_test_t
LoRaWAN compliance tests support data.
uint8_t data_buffer[64]
Definition: LoRaMacHelper.h:131
lmh_error_status lmh_send(lmh_app_data_t *app_data, lmh_confirm is_txconfirmed)
Send data.
Definition: LoRaMacHelper.cpp:927
void(* lmh_RxData)(lmh_app_data_t *appdata)
Process Rx Data received from Lora network.
Definition: LoRaMacHelper.h:105
uint8_t * buffer
Definition: LoRaMacHelper.h:76
lmh_join_status
Definition: LoRaMacHelper.h:53
Region definition for AS923.
lmh_error_status lmh_init(lmh_callback_t *callbacks, lmh_param_t lora_param, bool otaa, eDeviceClass nodeClass=CLASS_A, LoRaMacRegion_t region=LORAMAC_REGION_EU868)
Lora Initialisation.
Definition: LoRaMacHelper.cpp:682
uint32_t(* BoardGetRandomSeed)(void)
Returns a pseudo random seed generated using the MCU Unique ID.
Definition: LoRaMacHelper.h:100
void lmh_setDevEui(uint8_t *userDevEui)
Set Device IEEE EUI (big endian)
uint8_t app_port
Definition: LoRaMacHelper.h:129
uint8_t nb_trials
Definition: LoRaMacHelper.h:47
lmh_confirm
Definition: LoRaMacHelper.h:67
Application Data structure.
Definition: LoRaMacHelper.h:75
void lmh_datarate_set(uint8_t data_rate, uint8_t enable_adr)
Configure data rate.
Definition: LoRaMacHelper.cpp:850
uint8_t(* BoardGetBatteryLevel)(void)
Get the current battery level.
Definition: LoRaMacHelper.h:90
void lmh_setNwkSKey(uint8_t *userNwkSKey)
Set Network Session Key AES encryption/decryption cipher network session key.
Definition: LoRaMacHelper.cpp:122
bool link_check
Definition: LoRaMacHelper.h:133
bool lmh_setSubBandChannels(uint8_t subBand)
Set custom channel mask.
Definition: LoRaMacHelper.cpp:144
void(* lmh_has_joined)()
callback indicating EndNode has just joined
Definition: LoRaMacHelper.h:109
@ LMH_ERROR
Definition: LoRaMacHelper.h:62
uint8_t buffsize
Definition: LoRaMacHelper.h:77
LoRaMac Helper Callbacks.
Definition: LoRaMacHelper.h:86
uint32_t lmh_getDevAddr(void)
Returns the Device address set by the LoRaWan server after OTAA join success.
Definition: LoRaMacHelper.cpp:1097
uint8_t snr
Definition: LoRaMacHelper.h:80
lmh_error_status lmh_class_request(DeviceClass_t newClass)
change Lora Class
Definition: LoRaMacHelper.cpp:1008
@ LMH_UNCONFIRMED_MSG
Definition: LoRaMacHelper.h:68
struct lmh_callback_s lmh_callback_t
LoRaMac Helper Callbacks.
lmh_error_status lmh_send_blocking(lmh_app_data_t *app_data, lmh_confirm is_tx_confirmed, uint32_t time_out)
Send data and wait for RX2 window closed or timeout occurs.
Definition: LoRaMacHelper.cpp:988
enum eDeviceClass DeviceClass_t
bool adr_enable
Definition: LoRaMacHelper.h:44
void lmh_tx_power_set(uint8_t tx_power)
Configure tx power.
Definition: LoRaMacHelper.cpp:860
void(* lmh_ConfirmClass)(DeviceClass_t Class)
Confirms the class change.
Definition: LoRaMacHelper.h:114
uint16_t downlink_counter
Definition: LoRaMacHelper.h:132
lmh_join_status lmh_join_status_get(void)
Check whether the Device is joined to the network.
Definition: LoRaMacHelper.cpp:909
void(* lmh_has_joined_failed)()
callback indicating EndNode has just joined failed
Definition: LoRaMacHelper.h:118
@ LMH_RESET
Definition: LoRaMacHelper.h:54
int16_t rssi
Definition: LoRaMacHelper.h:79
@ CLASS_A
Definition: LoRaMac.h:92
uint8_t port
Definition: LoRaMacHelper.h:78
eDeviceClass
Definition: LoRaMac.h:86
@ LORAMAC_REGION_EU868
Definition: LoRaMac.h:1614
uint8_t state
Definition: LoRaMacHelper.h:127
LoRaMacRegion_t region
Definition: LoRaMacHelper.cpp:37
@ LMH_ONGOING
Definition: LoRaMacHelper.h:56
bool duty_cycle
Definition: LoRaMacHelper.h:49
bool lmh_setAS923Version(uint8_t version)
Adjust frequency band to AS923-1, AS923-2, AS923-3.
Definition: LoRaMacHelper.cpp:1102
void(* BoardGetUniqueId)(uint8_t *id)
Gets the board 64 bits unique ID.
Definition: LoRaMacHelper.h:95
LoRa MAC layer implementation.
@ LMH_CONFIRMED_MSG
Definition: LoRaMacHelper.h:69
struct lmh_param_s lmh_param_t
uint8_t demod_margin
Definition: LoRaMacHelper.h:134
uint8_t data_buffer_size
Definition: LoRaMacHelper.h:130
@ LMH_FAILED
Definition: LoRaMacHelper.h:57
int8_t tx_data_rate
Definition: LoRaMacHelper.h:45
void lmh_join(void)
Join a Lora Network in class A.
Definition: LoRaMacHelper.cpp:867
Definition: LoRaMacHelper.h:43
void lmh_class_get(DeviceClass_t *currentClass)
get the current Lora Class
Definition: LoRaMacHelper.cpp:1087
@ LMH_SET
Definition: LoRaMacHelper.h:55
uint8_t nb_gateways
Definition: LoRaMacHelper.h:135
LoRaWAN compliance tests support data.
Definition: LoRaMacHelper.h:125
@ LMH_SUCCESS
Definition: LoRaMacHelper.h:63
void lmh_setAppSKey(uint8_t *userAppSKey)
Set Application Session Key AES encryption/decryption cipher application session key.
Definition: LoRaMacHelper.cpp:127
bool is_tx_confirmed
Definition: LoRaMacHelper.h:128
void lmh_setDevAddr(uint32_t userDevAddr)
Set Device address on the network (big endian)
Definition: LoRaMacHelper.cpp:132
void lmh_setAppEui(uint8_t *userAppEui)
Set Application IEEE EUI.
Definition: LoRaMacHelper.cpp:112
void lmh_setAppKey(uint8_t *userAppKey)
Set Application Key AES encryption/decryption cipher application key.
Definition: LoRaMacHelper.cpp:117
enum eLoRaMacRegion_t LoRaMacRegion_t
bool enable_public_network
Definition: LoRaMacHelper.h:46
lmh_error_status
Definition: LoRaMacHelper.h:61