User Tools

Site Tools


Sidebar

Kerlink Wiki Home Page

Home

Setups

General information

Wirnet™ iBTS information

Wirnet™ iFemtoCell information

Wirnet™ iFemtoCell-evolution information

Wirnet™ iStation information

System management

Network management

LoRa Features

KerOS customization

Support and resources



www.kerlink.com

wiki:lora:multiforwarder

This is an old revision of the document!


Multi Packet Forwarder

Multi lorafwd instance management

Compatibility

This feature is available from KerOS version 5.1.

Features

Following features are available:

  • Add a new instance of lorafwd
  • Delete an instance of lorafwd
  • Check if an instance exists
  • List all added instances

How does it work?

KerOS firmware contains lorafwd template files located in /etc/lorafwd/templates/. These files must not be deleted or modified.

Each time a lorafwd is added, these templates files are copied, modified and suffixed with new lorafwd instance name.

For example, if lorafwd instance “foo” is added and runs, it leads to the following created files:

  • /etc/default/lorafwd_foo # Created with lorafwd_instance_manager script
  • /etc/init.d/lorafwd_foo # Created with lorafwd_instance_manager script
  • /etc/monit.d/lorafwd_foo # Created with lorafwd_instance_manager script
  • /etc/rcK.d/K52lorafwd_foo # Created with lorafwd_instance_manager script
  • /etc/rcU.d/S51lorafwd_foo # Created with lorafwd_instance_manager script
  • /etc/rsyslog.d/lorafwd_foo # Created with lorafwd_instance_manager script
  • /etc/sysupgrade.d/lorafwd_foo.conf # Created at first start
  • /etc/lorafwd_foo.toml # Created with lorafwd_instance_manager script
  • /run/lora/lorafwd_foo.pid # Created each time it is started
  • /tmp/lorafwd_foo_version # Created each time it is started
  • /usr/sbin/lorafwd_foo → /usr/sbin/lorafwd # Created with lorafwd_instance_manager script
  • /var/lib/lorafwd_foo/database.sqlite # Created at first start
  • Configuration files, sqlite database and pid files are duplicated. That means all lorafwd instances are separated.

lorafwd_instance_manager commands

add command Add lorafwd instance. The arguments are the following:

  • instance_name: unique lorafwd instance name (“foo” in previous example)

Example: lorafwd_instance_manager add foo

delete command Delete additional lorafwd instance. The arguments are the following:

  • instance_name: unique lorafwd instance name (“foo” in previous example)

Example: lorafwd_instance_manager delete foo

check command Check if additional lorafwd instance exists. The arguments are the following:

  • instance_name: unique lorafwd instance name (“foo” in previous example)

Example: lorafwd_instance_manager check foo

list command List additional lorafwd instances.​

Example: lorafwd_instance_manager list

Logs Example:

Logs All lorafwd instances write to the same log file (like lorad) /var/log/lora.log, but each lorafwd is suffixed, for example:

  • 2021-05-20T14:17:11.588309+00:00 klk-wifc-03001D lorad[10784]: <6> Sent 1 uplink message
  • 2021-05-20T14:17:11.631126+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> Heartbeat (F938) sent
  • 2021-05-20T14:17:11.633762+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> Heartbeat (F938) acknowledged in 2.6289 ms
  • 2021-05-20T14:17:13.446644+00:00 klk-wifc-03001D lorafwd[11552]: <6> Heartbeat (9FC3) sent
  • 2021-05-20T14:17:13.449302+00:00 klk-wifc-03001D lorafwd[11552]: <6> Heartbeat (9FC3) acknowledged in 2.6239 ms
  • 2021-05-20T14:17:14.179913+00:00 klk-wifc-03001D lorafwd[11552]: <6> Received uplink message:
  • 2021-05-20T14:17:14.180028+00:00 klk-wifc-03001D lorafwd[11552]: <6> | lora uplink (1F70167D), payload 25 B, channel 868.1 MHz, crc ok, bw 125 kHz, sf 7, cr 4/5
  • 2021-05-20T14:17:14.180093+00:00 klk-wifc-03001D lorafwd[11552]: <6> | Unconfirmed Data Up, DevAddr 00430024, FCnt 467, FPort 25
  • 2021-05-20T14:17:14.180139+00:00 klk-wifc-03001D lorafwd[11552]: <6> | - radio (00000105)
  • 2021-05-20T14:17:14.180233+00:00 klk-wifc-03001D lorafwd[11552]: <6> | - demodulator counter 3502620444, UTC time 2021-05-20T14:17:14.173866Z, rssi -64 dB, snr 7.5< 10 <12.5 dB
  • 2021-05-20T14:17:14.181910+00:00 klk-wifc-03001D lorafwd[11552]: <6> Uplink message (ABD8) sent
  • 2021-05-20T14:17:14.183471+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> Received uplink message:
  • 2021-05-20T14:17:14.183584+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> | lora uplink (1F70167D), payload 25 B, channel 868.1 MHz, crc ok, bw 125 kHz, sf 7, cr 4/5
  • 2021-05-20T14:17:14.183651+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> | Unconfirmed Data Up, DevAddr 00430024, FCnt 467, FPort 25
  • 2021-05-20T14:17:14.183695+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> | - radio (00000105)
  • 2021-05-20T14:17:14.183786+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> | - demodulator counter 3502620444, UTC time 2021-05-20T14:17:14.173866Z, rssi -64 dB, snr 7.5< 10 <12.5 dB
  • 2021-05-20T14:17:14.185793+00:00 klk-wifc-03001D lorafwd[11552]: <6> Uplink message (ABD8) acknowledged in 3.85701 ms
  • 2021-05-20T14:17:14.186798+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> Uplink message (FB49) sent
  • 2021-05-20T14:17:14.187286+00:00 klk-wifc-03001D lorad[10784]: <6> Sent 1 uplink message
  • 2021-05-20T14:17:14.189619+00:00 klk-wifc-03001D lorafwd_foo[11880]: <6> Uplink message (FB49) acknowledged in 2.80792 ms
wiki/lora/multiforwarder.1661868515.txt.gz · Last modified: 2022/08/30 16:08 by mbi