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:cpf

This is an old revision of the document!


Kerlink Common Packet forwarder

What is the Common Packet Forwarder

A packet forwarder is a program running on a LoRa gateway. It forwards the LoRa packets from end-devices received by the gateway to a LoRa Network Server (LNS) and vice-versa, hence its name.

In other words, the packet forwarder is the bridge between the LoRa technology and the IP technology. This is the main program of a LoRa gateway, it has to be installed to implement a LoRaWAN network.

The Common Packet Forwarder (CPF) is an open source packet forwarder developed by Kerlink. It is a set of two daemons (working together) : “lorad” and “lorafwd”.

“lorad” is responsible for the LoRa hardware. It initializes it, configures it (channel frequencies, LBT, diversity, …), and uses it to send/receive LoRa packets or to achieve frequency scans.

“lorafwd” is responsible for the communication to the LNS. It handles the connexion to the server. In case the connexion to the server is lost (for example if there is a network issue), it will automatically try to reconnect to it. To prevent the loss of packets when the LNS cannot be reached, the “lorafwd” embeds a database. Once the connexion is back, the packets stored in the database are forwarded to the LNS (by default this feature is disabled). “lorafwd” uses the GWMP protocol developed by Semtech over UDP to communicate with the LNS.

How to install the Common Packet Forwarder?

  1. Choose the packet forwarder to install from the Wirnet iBTS resource page or Wirnet iFemtoCell resource page. Choosing the latest version of the packet forwarder is recommended.
  2. Download the “lorad” and “lorafwd” .ipk packages files.
  3. Install the .ipk files using the instructions of the software updates page. Packages can be installed simultaneously.

The CPF installation on an iBTS takes some time since the FPGA is updated during this process. Expect approximately 15 to 30 minutes, depending on the number of connected modems.

The installation of the “lorad” and “lorafwd” packages adds the following files on the system:

├── etc
│   ├── default
│   │   ├── lorad   # overall lorad configuration
│   │   └── lorafwd # overall lorafwd configuration
│   ├── init.d
│   │   ├── lorad   # script to start/stop lorad
│   │   └── lorafwd # script to start/stop lorafwd
│   ├── monit.d
│   │   ├── lorad   # configuration of the lorad monitoring 
│   │   └── lorafwd # configuration of the lorafwd monitoring
│   ├── rcK.d
│   │   ├── K50lorad
│   │   └── K51lorafwd
│   ├── rcU.d
│   │   ├── S50lorad   # autostart of lorad
│   │   └── S51lorafwd # autostart of lorafwd
│   └── sysupgrade.d
│       ├── lorad.conf 
│       └── lorafwd.conf
└── user
    ├── etc
    │   ├── lorad
    │   │   ├── AS923-JP_16CH.json   # Frequency plan template
    │   │   ├── AU915-AU_16CH.json   # ...
    │   │   ├── EU868-FR_16CH.json   # ...
    │   │   ├── EU868-FR_2x8CH.json  # ...
    │   │   ├── IN865-IN_8CH.json    # ...
    │   │   ├── misc
    │   │   │   └── remote-api.json
    │   │   ├── RU864-RU_16CH.json   # ...
    │   │   ├── US915-US_16CH.json   # ...
    │   │   └── US915-US_64CH.json   # ...
    │   └── lorafwd
    │       └── lorafwd.toml         # LNS configuration
    ├── sbin
    │   ├── lorad                    # lorad binary
    │   ├── lorafwd                  # lorafwd binary 
    │   ├── lorafwdctl               
    │   └── loramodem         # Only for iBTS
    └── share                 
        └── lorad             
            └── fpga_v61.bin  # Only for iBTS

How to configure and monitor the packet forwarder?

The configuration is achieved in 3 steps:

  • lorad configuration
  • lorafwd configuration
  • monitoring and auto-start configuration

lorad configuration

The goal of the lorad configuration is to define the frequency plan that will be used to receive packets from the end-devices, to enable the LBT feature and configure the class B beacons.

  • A few frequency plan templates are pre-installed on the gateway (under /user/etc/lorad): choose the one that suits the most your requirement.
  • Edit /etc/default/lorad:
    • Make sure that the CONFIGURATION_FILE field links to the template you previously chose.
    • Choose the verbosity of the daemon: NOTICE = -v; INFO = -vv, DEBUG = -vvv
  • Edit the template you chose to adapt it to your needs. Since the hardware of iBTS and iFemtoCell gateways is different, the configuration on each gateway differs (although it is quite similar).

iBTS

iFemtoCell

lorafwd configuration

  • Edit /etc/default/lorad to choose the verbosity of the daemon: NOTICE = -v; INFO = -vv, DEBUG = -vvv
  • Edit /user/etc/lorafwd. This configuration file is formatted using the TOML v0.5.0 language:
    • Most keys are pre-configured with correct values.
    • The description of each key is directly written in the configuration file.
    • Hereunder are the keys that are changed by most users:
      • node = “localhost”: The adress of the LNS
      • #service.uplink = 20000: The uplink port of the LNS
      • #service.downlink = 20000 : The downlink port of the LNS

monitoring and auto-start configuration

wiki/cpf.1549907359.txt.gz · Last modified: 2019/02/11 18:49 by mpe