The data rate the next uplink goes out at, before any back-off step.
The address the device is on the network by, or null before joining.
The last downlink frame counter accepted, or null before any downlink.
The next uplink frame counter.
The lowest and highest frequency the device transmits or listens on, which is the band a radio that calibrates for one, as an SX126x does, calibrates for.
Whether the device is on a network: once joined, or from the start for a personalized device.
The delay from the end of an uplink to the first receive window, in microseconds.
How the device decides whether to use a relay.
Whether the next uplink goes through a relay.
What the relay's last acknowledgment said about itself, or null before one
arrived.
What the device knows of when its relay listens, TS011-1.0.1 section 3.9.
Where the second receive window listens.
How many times each uplink goes out, as the network last set it.
The wake-on-radio frame counter the next frame will use, TS011-1.0.1 section 5.3.2.
The channels the device may send on.
Reads a frame heard in one of the receive windows of the last transmission.
A frame that is not for this device, does not verify, or is longer than the window's
data rate carries throws and leaves the transmission waiting, so the second window
still opens. Without window, a frame may be as long as the faster window allows.
Optionalwindow: LorawanReceiveWindow | nullReads the acknowledgment a relay answered the last wake-on-radio frame with.
The device is now synchronized: it knows when the relay scans, so its next frames carry only as much preamble as the two clocks could have drifted apart.
Builds a join request, with a nonce this device has never used with its join identifier.
Says what comes next once both receive windows closed with nothing for the device.
Says what to do once the acknowledgment window closed with nothing in it: send the
uplink anyway, or wake the relay again first, as the network's BackOff asks.
Sends the last uplink again, the same frame on a channel chosen afresh.
Asks the network, with the next uplink, for the time.
Asks the network, with the next uplink, how well it hears the device.
Puts a saved state back on a device made the same way, on the clock it woke to.
Saves a joined device's state, to keep across a loss of power.
The bytes hold the session keys, so keep them wherever the keys would be safe.
Builds an uplink carrying a payload on an application port, 1 to 223, or 224 for the certification test port.
Builds an uplink with no payload, carrying the answers the device owes, an acknowledgment, or an ADR acknowledgment request.
Sets what the device reports its battery as when a network asks: a level from 1,
empty, to 254, full, "external" for a device on external power, or null when it
cannot tell.
Optionalbattery: string | number | nullTurns relay mode on or off, TS011-1.0.1 section 10.2 and appendix 5.
From here on the decision is the caller's rather than the device's own policy, until
its network takes it over with EndDeviceConfReq or hands it back. Returns false
when the network holds the decision, leaving the mode as it was.
StaticoverMakes a device that joins over the air.
Throws if the plan was built rather than published, or the settings run backward.
Optionalcounters: LorawanFrameCounters | nullStaticpersonalizedMakes a device activated by personalization, with its session provisioned.
Such a device never resets its frame counters, TS001-1.0.4 section 4.3.1.5, so one that lost power passes the counters it kept.
Optionalcounters: LorawanFrameCounters | null
A LoRaWAN Class A end device.
One exchange runs like this:
joinorsendreturns a transmission to put on the air and two receive windows timed from its end. A frame heard in either window goes toheard. If neither window held one,nothingHeardsays whether to send the same frame again withrepeat, or move on.