Expand description
The C ABI for LoRaWAN 1.0.x MAC framing.
These functions wrap [pamoja_lorawan] for callers that reach the SDK through
the flat C boundary: the secured frame a long-range node puts on the air, and
the over-the-air activation that hands it its session keys.
A session and a device hold key material, so they cross as opaque handles and
the keys never leave the library once set. An encoded frame comes back as a
PamojaBuffer, and a decoded one as a handle carrying its recovered payload.
The header flags a sender chooses are only scalars, so they cross by value as
PamojaLorawanFlags.
Structs§
- Pamoja
Lorawan Device - An opaque handle to the root credentials of a device.
- Pamoja
Lorawan Flags - The header flags a sender sets on a data frame.
- Pamoja
Lorawan Grant - What a network grants a device that joined.
- Pamoja
Lorawan Header - What a frame says about itself before any key is involved.
- Pamoja
Lorawan Join Accept - An opaque handle to an accepted join.
- Pamoja
Lorawan Join Request - An opaque handle to a verified join-request.
- Pamoja
Lorawan Rx - An opaque handle to a decoded data frame.
- Pamoja
Lorawan Session - An opaque handle to an activated LoRaWAN session.
Enums§
- Pamoja
Lorawan Direction - The direction a frame travelled, which its MIC and encryption both fold in.
- Pamoja
Lorawan Message Type - What kind of message a frame is, read from its header.
Constants§
- PAMOJA_
LORAWAN_ EUI_ LEN - The length of a LoRaWAN EUI, in bytes.
- PAMOJA_
LORAWAN_ FRAME_ MAX - The largest LoRaWAN frame, in bytes, this build accepts.
- PAMOJA_
LORAWAN_ KEY_ LEN - The length of a LoRaWAN key, in bytes.
- PAMOJA_
LORAWAN_ PAYLOAD_ MAX - The largest application payload, in bytes, a single frame can carry.
Functions§
- pamoja_
lorawan_ ⚠device_ accept_ join - Turns the join accept a network sent into the settings it grants.
- pamoja_
lorawan_ ⚠device_ free - Releases a device handle.
- pamoja_
lorawan_ ⚠device_ join_ request - Builds the join request a device broadcasts to activate.
- pamoja_
lorawan_ ⚠device_ new - Creates a device from the root credentials over-the-air activation uses.
- pamoja_
lorawan_ ⚠grant_ accept - Builds the signed join-accept a network sends to admit a device.
- pamoja_
lorawan_ ⚠grant_ session - Derives the session a grant activates, the same one the device computes.
- pamoja_
lorawan_ ⚠header_ parse - Reads a frame far enough to route it, without any key.
- pamoja_
lorawan_ ⚠join_ accept_ dev_ addr - Returns the device address a join grants.
- pamoja_
lorawan_ ⚠join_ accept_ dl_ settings - Returns the downlink settings byte a join grants.
- pamoja_
lorawan_ ⚠join_ accept_ free - Releases an accepted join handle.
- pamoja_
lorawan_ ⚠join_ accept_ net_ id - Returns the identifier of the network that accepted a join.
- pamoja_
lorawan_ ⚠join_ accept_ rx_ delay - Returns the delay before the first receive window, in seconds.
- pamoja_
lorawan_ ⚠join_ accept_ session - Takes the activated session a join grants.
- pamoja_
lorawan_ ⚠join_ request_ app_ eui - Copies the application identifier out of a verified join-request.
- pamoja_
lorawan_ ⚠join_ request_ dev_ eui - Copies the device identifier out of a verified join-request.
- pamoja_
lorawan_ ⚠join_ request_ dev_ nonce - Returns the nonce a verified join-request carried.
- pamoja_
lorawan_ ⚠join_ request_ free - Releases a verified join-request handle.
- pamoja_
lorawan_ ⚠join_ request_ parse - Verifies a join-request and reads the identifiers out of it.
- pamoja_
lorawan_ ⚠rx_ ack - Reports whether a decoded frame acknowledges the last confirmed one.
- pamoja_
lorawan_ ⚠rx_ adr - Reports whether a decoded frame takes part in adaptive data rate.
- pamoja_
lorawan_ ⚠rx_ confirmed - Reports whether a decoded frame asks to be acknowledged.
- pamoja_
lorawan_ ⚠rx_ dev_ addr - Returns the device address a decoded frame carries.
- pamoja_
lorawan_ ⚠rx_ direction - Returns the direction a decoded frame travelled.
- pamoja_
lorawan_ ⚠rx_ fcnt - Returns the low 16 bits of the frame counter a decoded frame carries.
- pamoja_
lorawan_ ⚠rx_ fopts - Returns a pointer to the frame options a decoded frame carries.
- pamoja_
lorawan_ ⚠rx_ fopts_ len - Returns the length in bytes of the frame options a decoded frame carries.
- pamoja_
lorawan_ ⚠rx_ fpending - Reports whether the network has more downlink data waiting.
- pamoja_
lorawan_ ⚠rx_ fport - Returns the port a decoded frame was sent on.
- pamoja_
lorawan_ ⚠rx_ free - Releases a decoded frame handle.
- pamoja_
lorawan_ ⚠rx_ payload - Returns a pointer to the decrypted payload of a decoded frame.
- pamoja_
lorawan_ ⚠rx_ payload_ len - Returns the length in bytes of the decrypted payload of a decoded frame.
- pamoja_
lorawan_ ⚠session_ decode - Decodes a received data frame: verifies the MIC, then decrypts the payload.
- pamoja_
lorawan_ ⚠session_ dev_ addr - Returns the device address a session is bound to.
- pamoja_
lorawan_ ⚠session_ encode_ downlink - Encodes a downlink data frame, encrypting the payload and appending the MIC.
- pamoja_
lorawan_ ⚠session_ encode_ uplink - Encodes an uplink data frame, encrypting the payload and appending the MIC.
- pamoja_
lorawan_ ⚠session_ free - Releases a session handle.
- pamoja_
lorawan_ ⚠session_ new - Creates a session from a device address and its two session keys.