32#ifndef MBED_LORAWAN_TYPES_H_
33#define MBED_LORAWAN_TYPES_H_
35#include "platform/Callback.h"
40#define LORAWAN_NETWORK_ID_MASK (uint32_t) 0xFE000000
49#define MSG_UNCONFIRMED_FLAG 0x01
50#define MSG_CONFIRMED_FLAG 0x02
51#define MSG_MULTICAST_FLAG 0x04
52#define MSG_PROPRIETARY_FLAG 0x08
217 TX_CRYPTO_ERROR = CRYPTO_ERROR,
224 AUTOMATIC_UPLINK_ERROR,
Callback class based on template specialization.
enum lorawan_status lorawan_status_t
lorawan_status_t contains status codes in response to stack operations
enum lora_events lorawan_event_t
Events needed to announce stack operation results.
struct lorawan_connect lorawan_connect_t
lorawan_connect_t structure
struct lora_channels_s loramac_channel_t
DO NOT MODIFY, WILL BREAK THE API!
lora_events
Events needed to announce stack operation results.
device_class_t
LoRaWAN device classes definition.
@ CLASS_B
LoRaWAN device class B.
@ CLASS_A
LoRaWAN device class A.
@ CLASS_C
LoRaWAN device class C.
lorawan_connect_type
Enumeration for LoRaWAN connection type.
@ LORAWAN_CONNECTION_ABP
Activation By Personalization.
@ LORAWAN_CONNECTION_OTAA
Over The Air Activation.
struct lora_channelplan lorawan_channelplan_t
DO NOT MODIFY, WILL BREAK THE API!
lorawan_status
lorawan_status_t contains status codes in response to stack operations
@ LORAWAN_STATUS_OK
Service started successfully.
@ LORAWAN_STATUS_PORT_INVALID
Invalid port.
@ LORAWAN_STATUS_DEVICE_OFF
Service not started - the device is switched off.
@ LORAWAN_STATUS_METADATA_NOT_AVAILABLE
Meta-data after an RX or TX is stale.
@ LORAWAN_STATUS_BUSY
Service not started - LoRaMAC is busy.
@ LORAWAN_STATUS_WOULD_BLOCK
LoRaMAC cannot send at the moment or have nothing to read.
@ LORAWAN_STATUS_ALREADY_CONNECTED
The device has already joined a network.
@ LORAWAN_STATUS_SERVICE_UNKNOWN
Service unknown.
@ LORAWAN_STATUS_NO_CHANNEL_FOUND
None of the channels is enabled at the moment.
@ LORAWAN_STATUS_IDLE
Services started - Idle at the moment.
@ LORAWAN_STATUS_NOT_INITIALIZED
Service not started - stack not initialized.
@ LORAWAN_STATUS_NO_OP
Cannot perform requested operation.
@ LORAWAN_STATUS_CRYPTO_FAIL
Service not started - crypto failure.
@ LORAWAN_STATUS_NO_NETWORK_JOINED
Service not started - the device is not in a LoRaWAN.
@ LORAWAN_STATUS_NO_FREE_CHANNEL_FOUND
None of the enabled channels is ready for another TX (duty cycle limited)
@ LORAWAN_STATUS_PARAMETER_INVALID
Service not started - invalid parameter.
@ LORAWAN_STATUS_DUTYCYCLE_RESTRICTED
Transmission will continue after duty cycle backoff.
@ LORAWAN_STATUS_UNSUPPORTED
Service not supported.
@ LORAWAN_STATUS_LENGTH_ERROR
Service not started - payload lenght error.
@ LORAWAN_STATUS_DATARATE_INVALID
Service not started - invalid datarate.
@ LORAWAN_STATUS_CONNECT_IN_PROGRESS
Services started - Connection in progress.
@ LORAWAN_STATUS_NO_ACTIVE_SESSIONS
Services not started - No active session.
@ LORAWAN_STATUS_FREQ_AND_DR_INVALID
Service not started - invalid frequency and datarate.
@ LORAWAN_STATUS_FREQUENCY_INVALID
Service not started - invalid frequency.
enum lorawan_connect_type lorawan_connect_type_t
Enumeration for LoRaWAN connection type.
DO NOT MODIFY, WILL BREAK THE API!
uint8_t band
The band index.
uint32_t frequency
The frequency in Hz.
uint32_t rx1_frequency
The alternative frequency for RX window 1.
dr_range_t dr_range
The data rate definition.
The structure to store the minimum and the maximum datarate.
uint8_t min
The minimum data rate.
uint8_t max
The maximum data rate.
DO NOT MODIFY, WILL BREAK THE API!
DO NOT MODIFY, WILL BREAK THE API!
Stack level callback functions.
mbed::Callback< void(uint8_t, uint8_t)> link_check_resp
This callback is optional.
mbed::Callback< void(lorawan_event_t)> events
Mandatory.
mbed::Callback< uint8_t(void)> battery_level
This callback is optional.
The lorawan_connect_abp structure.
uint8_t * nwk_skey
Network session key.
uint32_t dev_addr
End-device address.
uint32_t nwk_id
Network identifier.
uint8_t * app_skey
Application session key.
The lorawan_connect_otaa structure.
uint8_t * app_eui
Application identifier.
uint8_t nb_trials
Join request trials.
uint8_t * dev_eui
End-device identifier.
uint8_t * app_key
AES-128 application key.
lorawan_connect_t structure
lorawan_connect_otaa_t otaa
Join the network using OTA.
lorawan_connect_abp_t abp
Authentication by personalization.
uint8_t connect_type
Select the connection type, either LORAWAN_CONNECTION_OTAA or LORAWAN_CONNECTION_ABP.
DO NOT MODIFY, WILL BREAK THE API!
uint8_t value
Byte-access to the bits.