Skip to main content

Module lorawan_relay_node

Module lorawan_relay_node 

Source
Expand description

A LoRaWAN relay across the C ABI, TS011-1.0.1.

pamoja_lorawan::relay::Relay is an end device that also listens for others: it scans its channels, verifies the wake-on-radio frames of the devices its network trusts it with, answers them, takes the uplinks behind them, forwards those to the network on port 226, and sends the answers on in each device’s relay window. It owns no radio and no clock, so every call takes the time and hands back what to put on the air.

A relay is opened on a plan and a session or a set of credentials, and released with pamoja_lorawan_relay_free. Its own device joins and sends through pamoja_lorawan_relay_join and pamoja_lorawan_relay_send, and every downlink goes through pamoja_lorawan_relay_heard_in, which acts on the relay commands in it.

Structs§

PamojaLorawanRelay
An opaque handle to a LoRaWAN relay, which owns the end device it was made from.
PamojaLorawanRxr
A downlink for an end device, to send in its relay window.
PamojaLorawanScan
A scan for wake-on-radio frames, due next.
PamojaLorawanWake
What a wake-on-radio frame led a relay to do.

Constants§

PAMOJA_LORAWAN_RELAY_HEARD_DEVICE
The frame was for the relay’s own device.
PAMOJA_LORAWAN_RELAY_HEARD_DOWNLINK
It carried a downlink for an end device, to send on in its relay window.
PAMOJA_LORAWAN_RELAY_HEARD_UNDELIVERABLE
It carried one the relay cannot send on.
PAMOJA_LORAWAN_WAKE_JOIN_REQUEST
A join request follows the wake-on-radio frame; listen for it.
PAMOJA_LORAWAN_WAKE_NOTIFIED
A device the relay does not trust woke it, and its network will hear of it.
PAMOJA_LORAWAN_WAKE_UPLINK
A trusted device’s uplink follows.

Functions§

pamoja_lorawan_relay_error⚠
Returns why the last relay call failed.
pamoja_lorawan_relay_forward⚠
Sends the uplink the relay is holding, in its own uplink on port 226.
pamoja_lorawan_relay_forward_due⚠
Returns when the forwarded uplink waiting to go out is due.
pamoja_lorawan_relay_free⚠
Releases a relay and its own device.
pamoja_lorawan_relay_heard_in⚠
Reads a frame the relay’s own device heard, acting on the relay commands in it.
pamoja_lorawan_relay_heard_uplink⚠
Reads the uplink a wake-on-radio frame announced, and holds it to forward.
pamoja_lorawan_relay_heard_wor⚠
Reads a wake-on-radio frame a scan heard.
pamoja_lorawan_relay_join⚠
Makes the relay’s own join request, as a device’s own would be.
pamoja_lorawan_relay_new⚠
Makes a relay whose own device joins over the air.
pamoja_lorawan_relay_next_scan⚠
Says when and where to scan next.
pamoja_lorawan_relay_nothing_heard⚠
Says what comes next once the relay’s own receive windows closed with nothing in them.
pamoja_lorawan_relay_personalized⚠
Makes a relay whose own device is activated by personalization.
pamoja_lorawan_relay_running⚠
Reports whether the relay is scanning.
pamoja_lorawan_relay_send⚠
Sends one of the relay’s own uplinks, which also carries what it owes its network.
pamoja_lorawan_relay_start⚠
Starts the relay scanning, or changes what a running one scans.
pamoja_lorawan_relay_status⚠
Reports what the relay’s own device is doing.
pamoja_lorawan_relay_stop⚠
Stops the relay scanning.
pamoja_lorawan_relay_trust⚠
Trusts an end device, as an UpdateUplinkListReq with the same fields does.
pamoja_lorawan_relay_uplink_missed⚠
Clears the uplink a wake-on-radio frame announced, once listening for it heard nothing.