LMIC lib Lora OTA device for Everynet

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

Embed: (wiki syntax)

« Back to documentation index

lmic.cpp File Reference

lmic.cpp File Reference

Go to the source code of this file.

Functions

u2_t os_rlsbf2 (xref2cu1_t buf)
 Read 16-bit quantity from given pointer in little endian byte order.
u4_t os_rlsbf4 (xref2cu1_t buf)
 Read 32-bit quantity from given pointer in little endian byte order.
u4_t os_rmsbf4 (xref2cu1_t buf)
 Read 32-bit quantity from given pointer in big endian byte order.
void os_wlsbf2 (xref2u1_t buf, u2_t v)
 Write 16-bit quntity into buffer in little endian byte order.
void os_wlsbf4 (xref2u1_t buf, u4_t v)
 Write 32-bit quntity into buffer in little endian byte order.
void os_wmsbf4 (xref2u1_t buf, u4_t v)
 Write 32-bit quntity into buffer in big endian byte order.
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

Definition in file lmic.cpp.


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.

u2_t os_rlsbf2 ( xref2cu1_t  buf )

Read 16-bit quantity from given pointer in little endian byte order.

Definition at line 63 of file lmic.cpp.

u4_t os_rlsbf4 ( xref2cu1_t  buf )

Read 32-bit quantity from given pointer in little endian byte order.

Definition at line 69 of file lmic.cpp.

u4_t os_rmsbf4 ( xref2cu1_t  buf )

Read 32-bit quantity from given pointer in big endian byte order.

Definition at line 76 of file lmic.cpp.

void os_wlsbf2 ( xref2u1_t  buf,
u2_t  v 
)

Write 16-bit quntity into buffer in little endian byte order.

Definition at line 83 of file lmic.cpp.

void os_wlsbf4 ( xref2u1_t  buf,
u4_t  v 
)

Write 32-bit quntity into buffer in little endian byte order.

Definition at line 90 of file lmic.cpp.

void os_wmsbf4 ( xref2u1_t  buf,
u4_t  v 
)

Write 32-bit quntity into buffer in big endian byte order.

Definition at line 99 of file lmic.cpp.