Skip to content

lorawan

pierre drezet edited this page Aug 20, 2025 · 1 revision

OTAA LoRaWAN module

This function block describes the LoRaWAN communication with external LoRaWAN module. The communication between the platform and this module is UART. The UART port on the platform is hardware to the first instance (e.g. UART0). The authentication mode is OTAA mode only. This is Class C (continuous) LoRaWAN communication only.

name type default min. max. description
Target I 0 0 0 The LoRaWAN target module. Default to 0 (WIO-E5). 0 for Wio-E5.
Mode B False None None The connection mode of LoRaWAN. 0 for OTAA, 1 for ABP. Default to 0 (OTAA).
Region S EU868 None None Region Parameters of LoRaWAN communications. Default to "EU868". The options are: "EU868", "US915", "CN779", "EU433", "AU915", "CN470", "AS923", "KR920", "IN865", "RU864", "STE920".
REPT I 1 1 15 Unconfirmed message repeat time. From 1 to 15.
RETRY I 3 0 254 Confirmed message retry times. From 0 to 254.
In Ev.
connect Connect to LoRaWAN server
send_msg Send message to a connected LoRaWAN server
reset Reset the LoRaWAN module
get_data Get the module specific data in JSON string and DevEui
Data In
AppKey OTAA AppKey for connection. Used only when Mode=False.
AppEui OTAA AppEui for connection. Used only when Mode=False.
DevAddr_ABP ABP DevAddr_ABP for connection. Used only when Mode=True.
AppSKey ABP AppSKey (App Session Key) for connection. Used only when Mode=True.
NwkSKey ABP NwkSKey (Network Session Key) for connection. Used only when Mode=True.
msg_confirmed Whether to send the unconfirmed or the confirmed message to the LoRaWAN server.
payload The payload to be sent.
Data Out
DevAddr The DevAddr after the connection
recv_msg The received message
send_errCode When message send fails, an error code returns to indicate the error type.
status The status data (e.g. temperature, voltage) ina JSON format.
DevEui The DevEui of this LoRaWAN device
Out Ev.
ok Connection complete without any error.
fail Connection Failed.
received Message is received from the LoRaWAN server.
ok Message sending completes without any error.
fail Message sending encounters an error. An error code is returned.
resetDone LoRaWAN module reset completes
ok All the system status data is got.
State Machine None
Toolbox Core Version v1.0.
Licence Type MPL2.0 Component Supplier inx ltd.
Minumum DCC A0000 Profiles All.

Core Components

Events & Triggers

State Management

  • STATE - Represents a State in Lucid
  • state_condition - Event driven state condition --> transition and actions
  • state_debug - To debug state machines this function block is required.
  • state_manager - Each state machine is defined by a State Manager

Array & Data Structures

Buffers & Queues

Primitive Data Constants

Data Converters

Boolean Logic



Mathematics

Alebraic Evaluation

Mathematical Operators

Inequalities

Trigonometry

Other Functions

Data Selection

  • indexed_mux_int - Indexed Mux Int
  • indexed_mux_str - Indexed Mux String
  • map_int - Map Int
  • mux_1b - mux_1b
  • mux_1i - mux_1i
  • mux_1r - mux_1r
  • mux_1s - mux_1s
  • mux_2b - MultiplexTwo Input Bool
  • mux_2i - MultiplexTwo Input Int
  • mux_2r - MultiplexTwo Input Real
  • mux_2s - MultiplexTwo Input String
  • mux_3b - MultiplexThree Input Bool
  • mux_3i - MultiplexThree Input Int
  • mux_3r - MultiplexThree Input Real
  • mux_3s - MultiplexThree Input String
  • mux_4b - MultiplexFour Input Bool
  • mux_4i - MultiplexFour Input Int
  • mux_4r - MultiplexFour Input Real
  • mux_4s - MultiplexFour Input String
  • mux_8b - 8-Input Indexed Boolean Multiplexer Function Block
  • mux_8i - 8-Input Indexed Integer Multiplexer Function Block
  • mux_8r - 8-Input Real Number Multiplexer Function Block
  • mux_8s - Number Multiplexer Function Block
  • num_mux - Numeric Multiplexer Function Block

Data Processing & Parsers

Database & Storage

Demultiplexers

String Functions

File Operations



Basic IO Components

GPIO & Hardware I/O



Graphics and UI Components

GUI & User Interface

User Input

  • keypress - Reads key presses & control keys

Unity & Web Integration

  • inx-unity - Provides media and animation widget interface
  • unity2 - Unity 3D
  • webkit - JavaScript/WebKit Interface (Obsolete)

Language & Localization



Media Components

Audio & Media

Digital TV & Media Control



Communications Components

TCPIP Network & Communication

Wireless & LPWAN Networks

Fieldbus Comms



Digital Signal Processing

  • ADC Polled Analogue to Digital converter.
  • ADC_continuous Advanced ADC supporting clocked ISR modes and advanced signal averaging.
  • FFT8 Fast Fourier Transform of 8 bit binary input data
  • FIR8 Finite Impulse Response filter for 8 bit binary data.
  • IIR8 Infinite Impulse Response filter for 8 bit binary data.
  • [calibrate](ADC calibrate) - Calibrates the ADCs


Control Systems Components

PID Controllers



Machine Learning & Machine Vision

  • mv_camera - Provides access to camera input data image streams
  • mv_idsplay - Renders camera image streams.
  • mv_resize - Resizes an image using given interpolation method
  • mv_crop - Crops and image width and height at a give offset
  • mv_apriltag_reader Plain Old Prgramming AprilTag Reader
  • ml_tflite_inference Machine learning model inference.
  • ml_osvm Online iterative machine learning (training& inference).


Platform Components

System Utilities

  • reboot - Reboot the device
  • rtc - RealTimeClock - provdes date/time from RTC device or OS.
  • rtinfo - RuntimeInfo (e.g. MAC/IP address, memory,... )
  • scheduler - Weekly Scheduler
  • system_exec - Executes linux shell commands
  • rng - Random Number Generator (may use hardware RNG)

Time Components

Application Management

Over the Air Update (OTA)

  • ota - OTA Function Block for updating firmware
  • ota_data_parser - Assembles OTA data files from Devman.


Non-functional Components

Some function blocks that can be used Lucid app are for visual/organisation purposes only and do not translate into any executable ert-components.

Sub System Input/Output Ports

-Note this file is autogenerated from ert-config help files and may not currently be complete or properly categorised!

Clone this wiki locally