Skip to main content

Module lorawan_link

Module lorawan_link 

Source
Expand description

The C ABI for what keeps a LoRaWAN link running: the specification revision a device follows, the timings and counts its regional parameters recommend, the back-off that hands back what adaptive data rate tuned away once the network falls silent, and the channel list a join accept can carry.

A back-off is a counter that moves with every uplink, so it crosses as an opaque handle. A channel list is sixteen bytes, so it crosses as those bytes and every call reads or writes them in place.

Structs§

PamojaLorawanBackoff
An opaque handle to a device’s count of how long the network has been silent.
PamojaLorawanBackoffStep
What a back-off says to do with one uplink.

Constants§

PAMOJA_LORAWAN_ADR_ACK_DELAY
How many more before a device starts giving back what adaptive data rate took.
PAMOJA_LORAWAN_ADR_ACK_LIMIT
How many unanswered uplinks before a device asks the network to answer.
PAMOJA_LORAWAN_CFLIST_FREQUENCIES
How many frequencies a type 0 channel list carries.
PAMOJA_LORAWAN_CFLIST_LEN
The number of bytes a channel list occupies.
PAMOJA_LORAWAN_CFLIST_MASK_GROUPS
How many sixteen-bit masks a type 1 channel list carries.
PAMOJA_LORAWAN_CFLIST_TYPE_CHANNEL_MASKS
The CFListType byte of a list of channel mask groups.
PAMOJA_LORAWAN_CFLIST_TYPE_FREQUENCIES
The CFListType byte of a list of frequencies.
PAMOJA_LORAWAN_JOIN_ACCEPT_DELAY1_US
How long after a join request the first join accept window opens.
PAMOJA_LORAWAN_JOIN_ACCEPT_DELAY2_US
How long after a join request the second join accept window opens.
PAMOJA_LORAWAN_MAX_FCNT_GAP
The largest gap a frame counter may jump across and still be accepted.
PAMOJA_LORAWAN_RECEIVE_DELAY1_US
How long after an uplink the first receive window opens, RP002-1.0.5 section 3.3.
PAMOJA_LORAWAN_RECEIVE_DELAY2_US
How long after an uplink the second receive window opens.
PAMOJA_LORAWAN_RECEIVE_WINDOW_TOLERANCE_US
How far a receive window may open either side of its time, LoRaWAN 1.0.3 section 3.3.1.
PAMOJA_LORAWAN_RETRANSMIT_TIMEOUT_MAX_US
The longest wait before a confirmed uplink is sent again.
PAMOJA_LORAWAN_RETRANSMIT_TIMEOUT_MIN_US
The shortest wait before a confirmed uplink is sent again.
PAMOJA_LORAWAN_VERSION_1_0_3
LoRaWAN 1.0.3.
PAMOJA_LORAWAN_VERSION_1_0_4
TS001-1.0.4, the LoRaWAN 1.0.4 link layer.

Functions§

pamoja_lorawan_backoff_counter⚠
Returns how many uplinks have gone unanswered.
pamoja_lorawan_backoff_downlink⚠
Counts a Class A downlink, which proves the network still hears the device and resets the count.
pamoja_lorawan_backoff_free⚠
Releases a back-off handle.
pamoja_lorawan_backoff_new⚠
Starts a back-off count from zero.
pamoja_lorawan_backoff_uplink⚠
Counts one new uplink, and says what to do before sending it.
pamoja_lorawan_backoff_version⚠
Returns the revision whose steps a count follows.
pamoja_lorawan_cflist_channel_masks⚠
Reads the mask groups out of a type 1 channel list.
pamoja_lorawan_cflist_enables⚠
Reports whether a type 1 channel list enables a channel.
pamoja_lorawan_cflist_frequencies⚠
Reads the frequencies out of a type 0 channel list.
pamoja_lorawan_cflist_from_channel_masks⚠
Builds a type 1 channel list from channel mask groups.
pamoja_lorawan_cflist_from_frequencies⚠
Builds a type 0 channel list from frequencies.
pamoja_lorawan_cflist_type⚠
Reads which form a channel list takes.