LMIC lib Lora OTA device for Everynet

Fork of LMiC-10secs by Alcatel-Lucent IoT Development

Embed: (wiki syntax)

« Back to documentation index

lmic.h File Reference

lmic.h File Reference

LMIC API. More...

Go to the source code of this file.

Data Structures

struct  bcninfo_t
 Information about the last and previous beacons. More...

Enumerations

enum  { BCN_NONE = 0x00, BCN_PARTIAL = 0x01, BCN_FULL = 0x02, BCN_NODRIFT = 0x04 }
 

Parsing and tracking states of beacons.

More...

Functions

void LMIC_setSession (u4_t netid, devaddr_t devaddr, xref2u1_t nwkKey, xref2u1_t artKey)
 Setup given session keys and put the MAC in a state as if a join request/accept would have negotiated just these keys.

Detailed Description

LMIC API.

Definition in file lmic.h.


Enumeration Type Documentation

anonymous enum

Parsing and tracking states of beacons.

Enumerator:
BCN_NONE 

No beacon received.

BCN_PARTIAL 

Only first (common) part could be decoded (info,lat,lon invalid/previous)

BCN_FULL 

Full beacon decoded.

BCN_NODRIFT 

No drift value measured yet.

Definition at line 103 of file lmic.h.


Function Documentation

void LMIC_setSession ( u4_t  netid,
devaddr_t  devaddr,
xref2u1_t  nwkKey,
xref2u1_t  artKey 
)

Setup given session keys and put the MAC in a state as if a join request/accept would have negotiated just these keys.

It is crucial that the combinations `devaddr/nwkkey` and `devaddr/artkey` are unique within the network identified by `netid`. NOTE: on Harvard architectures when session keys are in flash: Caller has to fill in LMIC.{nwk,art}Key before and pass {nwk,art}Key are NULL

Parameters:
netida 24 bit number describing the network id this device is using
devaddrthe 32 bit session address of the device. It is strongly recommended to ensure that different devices use different numbers with high probability.
nwkKeythe 16 byte network session key used for message integrity. If NULL the caller has copied the key into `LMIC.nwkKey` before.
artKeythe 16 byte application router session key used for message confidentiality. If NULL the caller has copied the key into `LMIC.artKey` before.

Definition at line 2511 of file lmic.cpp.