Mistake on this page?
Report an issue in GitHub or email us
lorawan_types.h
Go to the documentation of this file.
1 /**
2  * @file lorawan_types.h
3  *
4  * @brief Contains data structures required by LoRaWANBase class.
5  *
6  * \code
7  * ______ _
8  * / _____) _ | |
9  * ( (____ _____ ____ _| |_ _____ ____| |__
10  * \____ \| ___ | (_ _) ___ |/ ___) _ \
11  * _____) ) ____| | | || |_| ____( (___| | | |
12  * (______/|_____)_|_|_| \__)_____)\____)_| |_|
13  * (C)2013 Semtech
14  * ___ _____ _ ___ _ _____ ___ ___ ___ ___
15  * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
16  * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
17  * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
18  * embedded.connectivity.solutions===============
19  *
20  * \endcode
21  *
22  *
23  * License: Revised BSD License, see LICENSE.TXT file include in the project
24  *
25  * Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jaeckle ( STACKFORCE )
26  *
27  * Copyright (c) 2017, Arm Limited and affiliates.
28  * SPDX-License-Identifier: BSD-3-Clause
29  *
30  */
31 
32 #ifndef MBED_LORAWAN_TYPES_H_
33 #define MBED_LORAWAN_TYPES_H_
34 
35 #include "platform/Callback.h"
36 
37 /**
38  * A mask for the network ID.
39  */
40 #define LORAWAN_NETWORK_ID_MASK (uint32_t) 0xFE000000
41 
42 /**
43  * Option Flags for send(), receive() APIs
44  *
45  * Special Notes for UPLINK:
46  * i) All of the flags are mutually exclusive.
47  * ii) MSG_MULTICAST_FLAG cannot be used.
48  */
49 #define MSG_UNCONFIRMED_FLAG 0x01
50 #define MSG_CONFIRMED_FLAG 0x02
51 #define MSG_MULTICAST_FLAG 0x04
52 #define MSG_PROPRIETARY_FLAG 0x08
53 
54 /**
55  * LoRaWAN device classes definition.
56  *
57  * LoRaWAN Specification V1.0.2, chapter 2.1.
58  */
59 typedef enum {
60  /**
61  * LoRaWAN device class A.
62  *
63  * LoRaWAN Specification V1.0.2, chapter 3.
64  */
66  /**
67  * LoRaWAN device class B.
68  *
69  * LoRaWAN Specification V1.0.2, chapter 8.
70  */
72  /**
73  * LoRaWAN device class C.
74  *
75  * LoRaWAN Specification V1.0.2, chapter 17.
76  */
79 
80 /**
81  * lorawan_status_t contains status codes in
82  * response to stack operations
83  */
84 typedef enum lorawan_status {
85  LORAWAN_STATUS_OK = 0, /**< Service started successfully */
86  LORAWAN_STATUS_BUSY = -1000, /**< Service not started - LoRaMAC is busy */
87  LORAWAN_STATUS_WOULD_BLOCK = -1001, /**< LoRaMAC cannot send at the moment or have nothing to read */
88  LORAWAN_STATUS_SERVICE_UNKNOWN = -1002, /**< Service unknown */
89  LORAWAN_STATUS_PARAMETER_INVALID = -1003, /**< Service not started - invalid parameter */
90  LORAWAN_STATUS_FREQUENCY_INVALID = -1004, /**< Service not started - invalid frequency */
91  LORAWAN_STATUS_DATARATE_INVALID = -1005, /**< Service not started - invalid datarate */
92  LORAWAN_STATUS_FREQ_AND_DR_INVALID = -1006, /**< Service not started - invalid frequency and datarate */
93  LORAWAN_STATUS_NO_NETWORK_JOINED = -1009, /**< Service not started - the device is not in a LoRaWAN */
94  LORAWAN_STATUS_LENGTH_ERROR = -1010, /**< Service not started - payload lenght error */
95  LORAWAN_STATUS_DEVICE_OFF = -1011, /**< Service not started - the device is switched off */
96  LORAWAN_STATUS_NOT_INITIALIZED = -1012, /**< Service not started - stack not initialized */
97  LORAWAN_STATUS_UNSUPPORTED = -1013, /**< Service not supported */
98  LORAWAN_STATUS_CRYPTO_FAIL = -1014, /**< Service not started - crypto failure */
99  LORAWAN_STATUS_PORT_INVALID = -1015, /**< Invalid port */
100  LORAWAN_STATUS_CONNECT_IN_PROGRESS = -1016, /**< Services started - Connection in progress */
101  LORAWAN_STATUS_NO_ACTIVE_SESSIONS = -1017, /**< Services not started - No active session */
102  LORAWAN_STATUS_IDLE = -1018, /**< Services started - Idle at the moment */
103  LORAWAN_STATUS_NO_OP = -1019, /**< Cannot perform requested operation */
104  LORAWAN_STATUS_DUTYCYCLE_RESTRICTED = -1020, /**< Transmission will continue after duty cycle backoff*/
105  LORAWAN_STATUS_NO_CHANNEL_FOUND = -1021, /**< None of the channels is enabled at the moment*/
106  LORAWAN_STATUS_NO_FREE_CHANNEL_FOUND = -1022, /**< None of the enabled channels is ready for another TX (duty cycle limited)*/
107  LORAWAN_STATUS_METADATA_NOT_AVAILABLE = -1023, /**< Meta-data after an RX or TX is stale*/
108  LORAWAN_STATUS_ALREADY_CONNECTED = -1024 /**< The device has already joined a network*/
110 
111 /** The lorawan_connect_otaa structure.
112  *
113  * A structure representing the LoRaWAN Over The Air Activation
114  * parameters.
115  */
116 typedef struct {
117  /** End-device identifier
118  *
119  * LoRaWAN Specification V1.0.2, chapter 6.2.1
120  */
121  uint8_t *dev_eui;
122  /** Application identifier
123  *
124  * LoRaWAN Specification V1.0.2, chapter 6.1.2
125  */
126  uint8_t *app_eui;
127  /** AES-128 application key
128  *
129  * LoRaWAN Specification V1.0.2, chapter 6.2.2
130  */
131  uint8_t *app_key;
132  /** Join request trials
133  *
134  * Number of trials for the join request.
135  */
136  uint8_t nb_trials;
138 
139 /** The lorawan_connect_abp structure.
140  *
141  * A structure representing the LoRaWAN Activation By Personalization
142  * parameters.
143  */
144 typedef struct {
145  /** Network identifier
146  *
147  * LoRaWAN Specification V1.0.2, chapter 6.1.1
148  */
149  uint32_t nwk_id;
150  /** End-device address
151  *
152  * LoRaWAN Specification V1.0.2, chapter 6.1.1
153  */
154  uint32_t dev_addr;
155  /** Network session key
156  *
157  * LoRaWAN Specification V1.0.2, chapter 6.1.3
158  */
159  uint8_t *nwk_skey;
160  /** Application session key
161  *
162  * LoRaWAN Specification V1.0.2, chapter 6.1.4
163  */
164  uint8_t *app_skey;
166 
167 /** lorawan_connect_t structure
168  *
169  * A structure representing the parameters for different connections.
170  */
171 typedef struct lorawan_connect {
172  /**
173  * Select the connection type, either LORAWAN_CONNECTION_OTAA
174  * or LORAWAN_CONNECTION_ABP.
175  */
176  uint8_t connect_type;
177 
178  union {
179  /**
180  * Join the network using OTA
181  */
183  /**
184  * Authentication by personalization
185  */
187  } connection_u;
188 
190 
191 /**
192  * Events needed to announce stack operation results.
193  *
194  * CONNECTED - When the connection is complete
195  * DISCONNECTED - When the protocol is shut down in response to disconnect()
196  * TX_DONE - When a packet is sent
197  * TX_TIMEOUT, - When stack was unable to send packet in TX window
198  * TX_ERROR, - A general TX error
199  * CRYPTO_ERROR, - A crypto error indicating wrong keys
200  * TX_SCHEDULING_ERROR, - When stack is unable to schedule packet
201  * RX_DONE, - When there is something to receive
202  * RX_TIMEOUT, - Not yet mapped
203  * RX_ERROR - A general RX error
204  * JOIN_FAILURE - When all Joining retries are exhausted
205  * UPLINK_REQUIRED - Stack indicates application that some uplink needed
206  * AUTOMATIC_UPLINK_ERROR - Stack tried automatically send uplink but some error occurred.
207  * Application should initiate uplink as soon as possible.
208  *
209  */
210 typedef enum lora_events {
211  CONNECTED = 0,
212  DISCONNECTED,
213  TX_DONE,
214  TX_TIMEOUT,
215  TX_ERROR,
216  CRYPTO_ERROR,
217  TX_CRYPTO_ERROR = CRYPTO_ERROR, //keeping this for backward compatibility
218  TX_SCHEDULING_ERROR,
219  RX_DONE,
220  RX_TIMEOUT,
221  RX_ERROR,
222  JOIN_FAILURE,
223  UPLINK_REQUIRED,
224  AUTOMATIC_UPLINK_ERROR,
226 
227 /**
228  * Stack level callback functions
229  *
230  * 'lorawan_app_callbacks_t' is a structure that holds pointers to the application
231  * provided methods which are needed to be called in response to certain
232  * requests. The structure is default constructed to set all pointers to NULL.
233  * So if the user does not provide the pointer, a response will not be posted.
234  * However, the 'lorawan_events' callback is mandatory to be provided as it
235  * contains essential events.
236  *
237  * A link check request could be sent whenever the device tries to send a
238  * message and if the network server responds with a link check response,
239  * the stack notifies the application be calling the appropriate method set using
240  * 'link_check_resp' callback. The result is thus transported to the application
241  * via callback function provided.
242  *
243  * 'battery_level' callback goes in the down direction, i.e., it informs
244  * the stack about the battery level by calling a function provided
245  * by the upper layers.
246  */
247 typedef struct {
248  /**
249  * Mandatory. Event Callback must be provided
250  */
252 
253  /**
254  * This callback is optional
255  *
256  * The first parameter to the callback function is the demodulation margin, and the second
257  * parameter is the number of gateways that successfully received the last request.
258  */
260 
261  /**
262  * This callback is optional. If the callback is not set, the stack returns 255 to gateway.
263  *
264  * Battery level return value must follow the specification
265  * for DevStatusAns MAC command:
266  *
267  * 0 The end-device is connected to an external power source
268  * 1 - 254 The battery level, 1 being at minimum and 254 being at maximum
269  * 255 The end-device was not able to measure the battery level.
270  */
273 
274 /**
275  * DO NOT MODIFY, WILL BREAK THE API!
276  *
277  * Structure containing a given data rate range.
278  */
279 typedef union {
280  /**
281  * Byte-access to the bits.
282  */
283  uint8_t value;
284  /**
285  * The structure to store the minimum and the maximum datarate.
286  */
287  struct fields_s {
288  /**
289  * The minimum data rate.
290  *
291  * LoRaWAN Regional Parameters V1.0.2rB.
292  *
293  * The allowed ranges are region-specific.
294  * Please refer to \ref DR_0 to \ref DR_15 for details.
295  */
296  uint8_t min : 4;
297  /**
298  * The maximum data rate.
299  *
300  * LoRaWAN Regional Parameters V1.0.2rB.
301  *
302  * The allowed ranges are region-specific.
303  * Please refer to \ref DR_0 to \ref DR_15 for details.
304  */
305  uint8_t max : 4;
306  } fields;
307 } dr_range_t;
308 
309 /**
310  * DO NOT MODIFY, WILL BREAK THE API!
311  *
312  * LoRaMAC channel definition.
313  */
314 typedef struct {
315  /**
316  * The frequency in Hz.
317  */
318  uint32_t frequency;
319  /**
320  * The alternative frequency for RX window 1.
321  */
322  uint32_t rx1_frequency;
323  /**
324  * The data rate definition.
325  */
327  /**
328  * The band index.
329  */
330  uint8_t band;
332 
333 /**
334  * DO NOT MODIFY, WILL BREAK THE API!
335  *
336  * Structure to hold parameters for a LoRa channel.
337  */
338 typedef struct lora_channels_s {
339  uint8_t id;
340  channel_params_t ch_param;
342 
343 /**
344  * DO NOT MODIFY, WILL BREAK THE API!
345  *
346  * This data structures contains LoRaWAN channel plan, i.e., a pointer to a
347  * list of channels and the total number of channels included in the plan.
348  */
349 typedef struct lora_channelplan {
350  uint8_t nb_channels; // number of channels
351  loramac_channel_t *channels;
353 
354 /*!
355  * Region | SF
356  * ------------ | :-----:
357  * AS923 | SF12 - BW125
358  * AU915 | SF10 - BW125
359  * CN470 | SF12 - BW125
360  * CN779 | SF12 - BW125
361  * EU433 | SF12 - BW125
362  * EU868 | SF12 - BW125
363  * IN865 | SF12 - BW125
364  * KR920 | SF12 - BW125
365  * US915 | SF10 - BW125
366  * US915_HYBRID | SF10 - BW125
367  */
368 #define DR_0 0
369 
370 /*!
371  * Region | SF
372  * ------------ | :-----:
373  * AS923 | SF11 - BW125
374  * AU915 | SF9 - BW125
375  * CN470 | SF11 - BW125
376  * CN779 | SF11 - BW125
377  * EU433 | SF11 - BW125
378  * EU868 | SF11 - BW125
379  * IN865 | SF11 - BW125
380  * KR920 | SF11 - BW125
381  * US915 | SF9 - BW125
382  * US915_HYBRID | SF9 - BW125
383  */
384 #define DR_1 1
385 
386 /*!
387  * Region | SF
388  * ------------ | :-----:
389  * AS923 | SF10 - BW125
390  * AU915 | SF8 - BW125
391  * CN470 | SF10 - BW125
392  * CN779 | SF10 - BW125
393  * EU433 | SF10 - BW125
394  * EU868 | SF10 - BW125
395  * IN865 | SF10 - BW125
396  * KR920 | SF10 - BW125
397  * US915 | SF8 - BW125
398  * US915_HYBRID | SF8 - BW125
399  */
400 #define DR_2 2
401 
402 /*!
403  * Region | SF
404  * ------------ | :-----:
405  * AS923 | SF9 - BW125
406  * AU915 | SF7 - BW125
407  * CN470 | SF9 - BW125
408  * CN779 | SF9 - BW125
409  * EU433 | SF9 - BW125
410  * EU868 | SF9 - BW125
411  * IN865 | SF9 - BW125
412  * KR920 | SF9 - BW125
413  * US915 | SF7 - BW125
414  * US915_HYBRID | SF7 - BW125
415  */
416 #define DR_3 3
417 
418 /*!
419  * Region | SF
420  * ------------ | :-----:
421  * AS923 | SF8 - BW125
422  * AU915 | SF8 - BW500
423  * CN470 | SF8 - BW125
424  * CN779 | SF8 - BW125
425  * EU433 | SF8 - BW125
426  * EU868 | SF8 - BW125
427  * IN865 | SF8 - BW125
428  * KR920 | SF8 - BW125
429  * US915 | SF8 - BW500
430  * US915_HYBRID | SF8 - BW500
431  */
432 #define DR_4 4
433 
434 /*!
435  * Region | SF
436  * ------------ | :-----:
437  * AS923 | SF7 - BW125
438  * AU915 | RFU
439  * CN470 | SF7 - BW125
440  * CN779 | SF7 - BW125
441  * EU433 | SF7 - BW125
442  * EU868 | SF7 - BW125
443  * IN865 | SF7 - BW125
444  * KR920 | SF7 - BW125
445  * US915 | RFU
446  * US915_HYBRID | RFU
447  */
448 #define DR_5 5
449 
450 /*!
451  * Region | SF
452  * ------------ | :-----:
453  * AS923 | SF7 - BW250
454  * AU915 | RFU
455  * CN470 | SF12 - BW125
456  * CN779 | SF7 - BW250
457  * EU433 | SF7 - BW250
458  * EU868 | SF7 - BW250
459  * IN865 | SF7 - BW250
460  * KR920 | RFU
461  * US915 | RFU
462  * US915_HYBRID | RFU
463  */
464 #define DR_6 6
465 
466 /*!
467  * Region | SF
468  * ------------ | :-----:
469  * AS923 | FSK
470  * AU915 | RFU
471  * CN470 | SF12 - BW125
472  * CN779 | FSK
473  * EU433 | FSK
474  * EU868 | FSK
475  * IN865 | FSK
476  * KR920 | RFU
477  * US915 | RFU
478  * US915_HYBRID | RFU
479  */
480 #define DR_7 7
481 
482 /*!
483  * Region | SF
484  * ------------ | :-----:
485  * AS923 | RFU
486  * AU915 | SF12 - BW500
487  * CN470 | RFU
488  * CN779 | RFU
489  * EU433 | RFU
490  * EU868 | RFU
491  * IN865 | RFU
492  * KR920 | RFU
493  * US915 | SF12 - BW500
494  * US915_HYBRID | SF12 - BW500
495  */
496 #define DR_8 8
497 
498 /*!
499  * Region | SF
500  * ------------ | :-----:
501  * AS923 | RFU
502  * AU915 | SF11 - BW500
503  * CN470 | RFU
504  * CN779 | RFU
505  * EU433 | RFU
506  * EU868 | RFU
507  * IN865 | RFU
508  * KR920 | RFU
509  * US915 | SF11 - BW500
510  * US915_HYBRID | SF11 - BW500
511  */
512 #define DR_9 9
513 
514 /*!
515  * Region | SF
516  * ------------ | :-----:
517  * AS923 | RFU
518  * AU915 | SF10 - BW500
519  * CN470 | RFU
520  * CN779 | RFU
521  * EU433 | RFU
522  * EU868 | RFU
523  * IN865 | RFU
524  * KR920 | RFU
525  * US915 | SF10 - BW500
526  * US915_HYBRID | SF10 - BW500
527  */
528 #define DR_10 10
529 
530 /*!
531  * Region | SF
532  * ------------ | :-----:
533  * AS923 | RFU
534  * AU915 | SF9 - BW500
535  * CN470 | RFU
536  * CN779 | RFU
537  * EU433 | RFU
538  * EU868 | RFU
539  * IN865 | RFU
540  * KR920 | RFU
541  * US915 | SF9 - BW500
542  * US915_HYBRID | SF9 - BW500
543  */
544 #define DR_11 11
545 
546 /*!
547  * Region | SF
548  * ------------ | :-----:
549  * AS923 | RFU
550  * AU915 | SF8 - BW500
551  * CN470 | RFU
552  * CN779 | RFU
553  * EU433 | RFU
554  * EU868 | RFU
555  * IN865 | RFU
556  * KR920 | RFU
557  * US915 | SF8 - BW500
558  * US915_HYBRID | SF8 - BW500
559  */
560 #define DR_12 12
561 
562 /*!
563  * Region | SF
564  * ------------ | :-----:
565  * AS923 | RFU
566  * AU915 | SF7 - BW500
567  * CN470 | RFU
568  * CN779 | RFU
569  * EU433 | RFU
570  * EU868 | RFU
571  * IN865 | RFU
572  * KR920 | RFU
573  * US915 | SF7 - BW500
574  * US915_HYBRID | SF7 - BW500
575  */
576 #define DR_13 13
577 
578 /*!
579  * Region | SF
580  * ------------ | :-----:
581  * AS923 | RFU
582  * AU915 | RFU
583  * CN470 | RFU
584  * CN779 | RFU
585  * EU433 | RFU
586  * EU868 | RFU
587  * IN865 | RFU
588  * KR920 | RFU
589  * US915 | RFU
590  * US915_HYBRID | RFU
591  */
592 #define DR_14 14
593 
594 /*!
595  * Region | SF
596  * ------------ | :-----:
597  * AS923 | RFU
598  * AU915 | RFU
599  * CN470 | RFU
600  * CN779 | RFU
601  * EU433 | RFU
602  * EU868 | RFU
603  * IN865 | RFU
604  * KR920 | RFU
605  * US915 | RFU
606  * US915_HYBRID | RFU
607  */
608 #define DR_15 15
609 
610 /**
611  * Enumeration for LoRaWAN connection type.
612  */
613 typedef enum lorawan_connect_type {
614  LORAWAN_CONNECTION_OTAA = 0, /**< Over The Air Activation */
615  LORAWAN_CONNECTION_ABP /**< Activation By Personalization */
617 
618 
619 /**
620  * Meta-data collection for a transmission
621  */
622 typedef struct {
623  /**
624  * The transmission time on air of the frame.
625  */
626  uint32_t tx_toa;
627  /**
628  * The uplink channel used for transmission.
629  */
630  uint32_t channel;
631  /**
632  * The transmission power.
633  */
634  int8_t tx_power;
635  /**
636  * The uplink datarate.
637  */
638  uint8_t data_rate;
639  /**
640  * Provides the number of retransmissions.
641  */
642  uint8_t nb_retries;
643  /**
644  * A boolean to mark if the meta data is stale
645  */
646  bool stale;
648 
649 /**
650  * Meta-data collection for the received packet
651  */
652 typedef struct {
653  /**
654  * The RSSI for the received packet.
655  */
656  int16_t rssi;
657  /**
658  * Data rate of reception
659  */
660  uint8_t rx_datarate;
661  /**
662  * The SNR for the received packet.
663  */
664  int8_t snr;
665  /**
666  * A boolean to mark if the meta data is stale
667  */
668  bool stale;
669  /**
670  * Frequency for the downlink channel
671  */
672  uint32_t channel;
673  /**
674  * Time spent on air by the RX frame
675  */
676  uint32_t rx_toa;
678 
679 #endif /* MBED_LORAWAN_TYPES_H_ */
The lorawan_connect_abp structure.
Meta-data collection for the received packet.
enum lora_events lorawan_event_t
Events needed to announce stack operation results.
Services not started - No active session.
LoRaWAN device class C.
Definition: lorawan_types.h:77
dr_range_t dr_range
The data rate definition.
LoRaWAN device class B.
Definition: lorawan_types.h:71
uint8_t nb_retries
Provides the number of retransmissions.
Service not started - payload lenght error.
Definition: lorawan_types.h:94
uint32_t tx_toa
The transmission time on air of the frame.
uint8_t * nwk_skey
Network session key.
Meta-data collection for a transmission.
The device has already joined a network.
uint8_t connect_type
Select the connection type, either LORAWAN_CONNECTION_OTAA or LORAWAN_CONNECTION_ABP.
enum lorawan_connect_type lorawan_connect_type_t
Enumeration for LoRaWAN connection type.
uint8_t rx_datarate
Data rate of reception.
device_class_t
LoRaWAN device classes definition.
Definition: lorawan_types.h:59
Service not started - LoRaMAC is busy.
Definition: lorawan_types.h:86
struct lorawan_connect lorawan_connect_t
lorawan_connect_t structure
uint8_t * app_key
AES-128 application key.
None of the channels is enabled at the moment.
lorawan_status
lorawan_status_t contains status codes in response to stack operations
Definition: lorawan_types.h:84
DO NOT MODIFY, WILL BREAK THE API!
Cannot perform requested operation.
bool stale
A boolean to mark if the meta data is stale.
uint32_t dev_addr
End-device address.
bool stale
A boolean to mark if the meta data is stale.
The lorawan_connect_otaa structure.
mbed::Callback< void(lorawan_event_t)> events
Mandatory.
Service not started - invalid frequency and datarate.
Definition: lorawan_types.h:92
uint8_t value
Byte-access to the bits.
Service not supported.
Definition: lorawan_types.h:97
uint32_t rx_toa
Time spent on air by the RX frame.
Stack level callback functions.
uint8_t * app_skey
Application session key.
enum lorawan_status lorawan_status_t
lorawan_status_t contains status codes in response to stack operations
lorawan_connect_t structure
Activation By Personalization.
int8_t tx_power
The transmission power.
Transmission will continue after duty cycle backoff.
uint32_t channel
Frequency for the downlink channel.
lorawan_connect_abp_t abp
Authentication by personalization.
DO NOT MODIFY, WILL BREAK THE API!
Service not started - invalid parameter.
Definition: lorawan_types.h:89
uint32_t channel
The uplink channel used for transmission.
Services started - Idle at the moment.
LoRaWAN device class A.
Definition: lorawan_types.h:65
DO NOT MODIFY, WILL BREAK THE API!
struct lora_channelplan lorawan_channelplan_t
DO NOT MODIFY, WILL BREAK THE API!
mbed::Callback< void(uint8_t, uint8_t)> link_check_resp
This callback is optional.
Service not started - the device is switched off.
Definition: lorawan_types.h:95
lora_events
Events needed to announce stack operation results.
uint8_t * dev_eui
End-device identifier.
int8_t snr
The SNR for the received packet.
uint32_t nwk_id
Network identifier.
uint8_t band
The band index.
Service not started - invalid frequency.
Definition: lorawan_types.h:90
Service not started - the device is not in a LoRaWAN.
Definition: lorawan_types.h:93
Service not started - crypto failure.
Definition: lorawan_types.h:98
uint32_t frequency
The frequency in Hz.
uint32_t rx1_frequency
The alternative frequency for RX window 1.
uint8_t data_rate
The uplink datarate.
The structure to store the minimum and the maximum datarate.
Service not started - stack not initialized.
Definition: lorawan_types.h:96
lorawan_connect_type
Enumeration for LoRaWAN connection type.
Over The Air Activation.
struct lora_channels_s loramac_channel_t
DO NOT MODIFY, WILL BREAK THE API!
None of the enabled channels is ready for another TX (duty cycle limited)
uint8_t nb_trials
Join request trials.
Services started - Connection in progress.
int16_t rssi
The RSSI for the received packet.
DO NOT MODIFY, WILL BREAK THE API!
Service not started - invalid datarate.
Definition: lorawan_types.h:91
Meta-data after an RX or TX is stale.
lorawan_connect_otaa_t otaa
Join the network using OTA.
uint8_t * app_eui
Application identifier.
mbed::Callback< uint8_t(void)> battery_level
This callback is optional.
Service started successfully.
Definition: lorawan_types.h:85
LoRaMAC cannot send at the moment or have nothing to read.
Definition: lorawan_types.h:87
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.