Skip to main content

Module lorawan_packages

Module lorawan_packages 

Source
Expand description

The C ABI for the LoRaWAN application layer packages: clock synchronization TS003-2.0.0, fragmented data block transport TS004-2.0.0, remote multicast setup TS005-2.0.0, and firmware management TS006-2.0.0.

The key derivations and the parity matrix are pure functions of their arguments. What has to remember something crosses as an opaque handle: a clock synchronization package, a firmware manager, a fragmentation session being put back together, and the code taken over a block as it arrives.

Structs§

PamojaLorawanBlockMic
A code being taken over a data block, released with pamoja_lorawan_block_mic_free.
PamojaLorawanClockSync
A clock synchronization package on a device, released with pamoja_lorawan_clock_sync_free.
PamojaLorawanDefrag
A fragmentation session being put back together, released with pamoja_lorawan_defrag_free.
PamojaLorawanFirmware
A firmware management package on a device, released with pamoja_lorawan_firmware_free.
PamojaLorawanPackageCommand
One command of an application layer package, whichever package it belongs to.

Constants§

PAMOJA_LORAWAN_CLOCK_PORT
The port clock synchronization is spoken on, TS003-2.0.0.
PAMOJA_LORAWAN_FIRMWARE_PORT
The port firmware management is spoken on, TS006-1.0.0.
PAMOJA_LORAWAN_FRAGMENT_PORT
The port fragmented data block transport is spoken on, TS004-2.0.0.
PAMOJA_LORAWAN_IMAGE_CORRUPT
One is there, but it is corrupt or its signature does not verify.
PAMOJA_LORAWAN_IMAGE_NONE
The device holds no firmware upgrade image.
PAMOJA_LORAWAN_IMAGE_VALID
One is there, and it can be installed.
PAMOJA_LORAWAN_IMAGE_WRONG_HARDWARE
One is there and authentic, but it is not for this hardware.
PAMOJA_LORAWAN_MAX_FRAGMENTS
The most fragments one session carries.
PAMOJA_LORAWAN_MULTICAST_PORT
The port remote multicast setup is spoken on, TS005-2.0.0.

Functions§

pamoja_lorawan_block_mic_finish⚠
Finishes a code and releases it.
pamoja_lorawan_block_mic_free⚠
Releases a code that was never finished. Passing null is a no-op.
pamoja_lorawan_block_mic_start⚠
Starts a code over one session’s block, TS004-2.0.0 section 3.3.
pamoja_lorawan_block_mic_update⚠
Adds a piece of the block to a code.
pamoja_lorawan_clock_sync_answer⚠
Writes the answer a device owes its clock server, if it owes one.
pamoja_lorawan_clock_sync_free⚠
Releases a clock synchronization package. Passing null is a no-op.
pamoja_lorawan_clock_sync_heard⚠
Reads a downlink on the clock port and acts on it, section 3.2.
pamoja_lorawan_clock_sync_new⚠
Starts the clock synchronization package on a device, TS003-2.0.0.
pamoja_lorawan_clock_sync_request⚠
Builds the request that asks a server for a clock correction, section 3.2.
pamoja_lorawan_clock_sync_status⚠
Reports where a clock synchronization package stands.
pamoja_lorawan_data_block_int_key⚠
Derives the key that signs a data block, TS004-2.0.0 section 3.3.
pamoja_lorawan_defrag_block⚠
Reads the block a session has put back together.
pamoja_lorawan_defrag_fragment⚠
Takes one fragment of a session.
pamoja_lorawan_defrag_free⚠
Releases a fragmentation session. Passing null is a no-op.
pamoja_lorawan_defrag_matrix_len
How many bytes of working storage a session needs.
pamoja_lorawan_defrag_new⚠
Opens a fragmentation session.
pamoja_lorawan_defrag_status⚠
Reports what a session has taken so far.
pamoja_lorawan_firmware_free⚠
Releases a firmware management package. Passing null is a no-op.
pamoja_lorawan_firmware_heard⚠
Reads a downlink on the firmware port and writes the answers it calls for.
pamoja_lorawan_firmware_image⚠
Says what firmware upgrade image the device is holding.
pamoja_lorawan_firmware_new⚠
Starts the firmware management package on a device, TS006-1.0.0.
pamoja_lorawan_firmware_reboot⚠
Reports the reboot a firmware management package is holding.
pamoja_lorawan_firmware_rebooted⚠
Forgets the programmed reboot, for a device that has carried it out.
pamoja_lorawan_firmware_set_image⚠
Says what firmware upgrade image the device is holding.
pamoja_lorawan_frag_fragment⚠
Builds one fragment of a session out of a block held whole.
pamoja_lorawan_frag_parity_line⚠
Builds one row of the parity matrix: which uncoded fragments a coded one is made of.
pamoja_lorawan_frag_prbs23
Steps the pseudo-random sequence the parity matrix is drawn from, appendix A.1.
pamoja_lorawan_frag_session⚠
How many fragments a block of a given size takes, and how much padding the last one needs.
pamoja_lorawan_mc_app_s_key⚠
Derives the key that reads a multicast group’s payloads, section 4.3.
pamoja_lorawan_mc_ke_key⚠
Derives the key a multicast group’s key travels under, section 4.3.
pamoja_lorawan_mc_key⚠
Unwraps the group key a setup command carried, section 4.3.
pamoja_lorawan_mc_nwk_s_key⚠
Derives the key that verifies a multicast group’s frames, section 4.3.
pamoja_lorawan_mc_root_key⚠
Derives a device’s multicast root key, TS005-2.0.0 section 4.3.
pamoja_lorawan_package_encode⚠
Writes one command of an application layer package.
pamoja_lorawan_package_parse⚠
Reads one command of an application layer package.
pamoja_lorawan_package_status_item⚠
Reads one group record of a multicast status answer, TS005-2.0.0 section 4.2.
pamoja_lorawan_wrap_mc_key⚠
Wraps a group key for a device, which is what a server does before sending it.