User Tools

Site Tools


wiki:lora:multiforwarder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:lora:multiforwarder [2022/12/08 12:05]
ehe
wiki:lora:multiforwarder [2022/12/20 17:11] (current)
ehe [Creation of the instance]
Line 1: Line 1:
 ====== Multi Packet Forwarder ​ ====== ====== Multi Packet Forwarder ​ ======
  
 +<note important>​**This functionnality is only available for Keros version 5.5.1 and above**</​note>​
  
-This feature allows to create multiple instances of packet forwarder (each on a different LNS). 
-  
-Only UDP/GWMP packet forwarder instances can be created but they can be used in same time than a [[basic_station_forwarder|Kerlink Basic Station Packet forwarder]]. 
  
-<​note>​When using multi packet forwarder feature, usage of netid filtering is highly recommended to avoid downlink collision.</​note>​ 
  
-===== Compatibility ​=====+===== lorafwd_instance_manager ​=====
  
-Available since Keros 5.1.+This tool allows the create and manage multiple instances of packet forwarder to connect a gateway to multiple LNS.
  
-===== Features ===== 
 Following features are available in ''​lorafwd_instance_manager''​ tool: Following features are available in ''​lorafwd_instance_manager''​ tool:
  
Line 20: Line 16:
   *  List all added instances ​     (''​list''​)   *  List all added instances ​     (''​list''​)
  
-===== How does it work? ===== +  
-KerOS firmware contains lorafwd template files located in /etc/​lorafwd/​templates/​. These files must **not** ​be deleted or modified.+Only UDP/GWMP packet forwarder instances can be created but they can be used at the same time as a [[basic_station_forwarder|Kerlink Basic Station Packet forwarder]].
  
-Each time a lorafwd instance is added, these templates files are copied, modified and suffixed with new lorafwd instance name. 
  
-===== Example ===== +<note important>​When using the multi-packet forwarder feature, usage of netid filtering is highly recommended to avoid downlink collision.
-Following commands will create an additional lorafwd instance named "​foo"​ targeting "foo.lns.local"​ on UDP port 1700:+
  
-<​code>​lorafwd_instance_manager add foo +**Note also that the last instance of lorafwd will define the radio parameters of your gateway**</note>
-klk_apps_config -i foo --lns-server foo.lns.local --lns-dport 1700 --lns-uport 1700</code>+
  
-It leads to the following ​created ​files:+ 
 + 
 +===== How to create and configure multiple instances ===== 
 +==== Creation of the instance ==== 
 +If you want to connect your gateway to a second LNS, you will need to create a new instance of lorafwd. To do this, use the following ​command: 
 +<​code>​lorafwd_instance_manager add second_instance</​code>​ 
 +<​note>​ In the example the instance is named "​second_instance"​ but you can name it as you like.</​note>​ 
 + 
 +It will create all the files needed for its configuration. 
 + 
 +**List of generated ​files:**
 <code bash> <code bash>
 / /
 |-- etc |-- etc
-|   ​|-- ​lorafwd_foo.toml+|   ​|-- ​lorafwd_second_instance.toml
 |   |-- default |   |-- default
-|   ​| ​  ​`-- ​lorafwd_foo+|   ​| ​  ​`-- ​lorafwd_second_instance
 |   |-- init.d |   |-- init.d
-|   ​| ​  ​`-- ​lorafwd_foo+|   ​| ​  ​`-- ​lorafwd_second_instance
 |   |-- monit.d |   |-- monit.d
-|   ​| ​  ​`-- ​lorafwd_foo+|   ​| ​  ​`-- ​lorafwd_second_instance
 |   |-- rcK.d |   |-- rcK.d
-|   ​| ​  ​`-- ​K52lorafwd_foo ​-> /​etc/​init.d/​lorafwd_foo+|   ​| ​  ​`-- ​K52lorafwd_second_instance ​-> /​etc/​init.d/​lorafwd_second_instance
 |   |-- rcU.d |   |-- rcU.d
-|   ​| ​  ​`-- ​S51lorafwd_foo ​-> /​etc/​init.d/​lorafwd_foo+|   ​| ​  ​`-- ​S51lorafwd_second_instance ​-> /​etc/​init.d/​lorafwd_second_instance
 |   |-- rsyslog.d |   |-- rsyslog.d
-|   ​| ​  ​`-- ​lorafwd_foo+|   ​| ​  ​`-- ​lorafwd_second_instance
 |   `-- sysupgrade.d |   `-- sysupgrade.d
-|       ​`-- ​lorafwd_foo.conf+|       ​`-- ​lorafwd_second_instance.conf
 |-- run |-- run
 |   `-- lora |   `-- lora
-|       ​`-- ​lorafwd_foo.pid # Created each time it is started+|       ​`-- ​lorafwd_second_instance.pid # Created each time it is started
 |-- tmp |-- tmp
-|   ​`-- ​lorafwd_foo_version ​# Created each time it is started+|   ​`-- ​lorafwd_second_instance_version ​# Created each time it is started
 |-- usr |-- usr
 |   `-- sbin |   `-- sbin
-|       ​`-- ​lorafwd_foo ​-> /​usr/​sbin/​lorafwd+|       ​`-- ​lorafwd_second_instance ​-> /​usr/​sbin/​lorafwd
 `-- var `-- var
     `-- lib     `-- lib
-        `-- lorafwd_foo+        `-- lorafwd_second_instance
             `-- database.sqlite # Created at first start             `-- database.sqlite # Created at first start
 </​code>​ </​code>​
  
-<​note>​Configuration files, sqlite database and pid files are duplicated. That means all lorafwd instances are separated.</​note>​ 
  
 +
 +==== Configuration of the instance ====
 +Then, to configure the new instance, you will need to use the [[wiki:​keros_custo:​keros_applications_configuration|klk_apps_config]] as follow:
 +
 +<​code>​klk_apps_config --activate-lorafwd -i second_instance --lns-server second_instance.url --lns-dport 1700 --lns-uport 1700</​code>​
 +
 +<​note>​After //​--lns-server --lns-dport --lns-uport//​ enter your own informations according to [[wiki:​keros_custo:​keros_applications_configuration|klk_apps_config]] parameters</​note>​
  
 ===== Logs ===== ===== Logs =====
  
  
-All lorafwd instances write to the same log file ''/​var/​log/​lora.log'', ​but each lorafwd is suffixed, for example:+All lorafwd instances ​will write into the same log file ''/​var/​log/​lora.log'', ​and are distinguished by their names, for example:
  
 <​code>​ <​code>​
Line 84: Line 93:
 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.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.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.183471+00:​00 klk-wifc-03001D ​lorafwd_second_instance[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.183584+00:​00 klk-wifc-03001D ​lorafwd_second_instance[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.183651+00:​00 klk-wifc-03001D ​lorafwd_second_instance[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.183695+00:​00 klk-wifc-03001D ​lorafwd_second_instance[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.183786+00:​00 klk-wifc-03001D ​lorafwd_second_instance[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.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.186798+00:​00 klk-wifc-03001D ​lorafwd_second_instance[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.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+2021-05-20T14:​17:​14.189619+00:​00 klk-wifc-03001D ​lorafwd_second_instance[11880]: <6> Uplink message (FB49) acknowledged in 2.80792 ms
 </​code>​ </​code>​
wiki/lora/multiforwarder.1670497521.txt.gz · Last modified: 2022/12/08 12:05 by ehe