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

Kerlink Basic Station Packet Forwarder

Similarly to legacy (GWMP) packet forwarder, the Basic Station Packet Forwarder is a program running on a LoRa gateway. It forwards the LoRa packets emitted by end-devices and received by the gateway to a LoRa Network Server (LNS) and vice-versa, hence its name.

The Kerlink Basic Station Packet Forwarder (BSPF) is based on “lorad” daemon from Common Packet Forwarder.

Once installed and configured, it is able to connect to a “LNS” or a “CUPS” server and handle all associated services (Radio configuration, Forward uplink packets, schedule downlink packets, etc.).

It implements the same protocols and authentication methods than Semtech LoRa Basics™ Station reference implementation.

What are the differences with Semtech LoRa Basics™ Station ?

The Semtech LoRa Basics™ Station is a nice reference implementation. But, as the original packet forwarder, it has the same drawbacks: It's a monolithic approach, designed to be hardly linked to the gateway radio architecture and to be used on one Network Server.

In other words, Kerlink Basic Station Packet Forwarder is the same package for all Kerlink iSeries gateways and can be configured while another previously-configured LNS is still functional.

Main features of reference implementation are implemented in Kerlink Basic Station Packet Forwarder, including:

  • CUPS and LNS protocols support
  • TLS and Token-based Authentication
  • Support for Class A and C on all gateways
  • Support for main radio regions: EU868, US915, AS923, AU915 and IN865

The features not supported are listed below:

  • timesync message: A ntpd daemon is embedded in all kerlink gateways and is much more precise than this time synchronization.
  • Remote shell / remote command

The additional features:

  • Packet buffering: Kerlink Basic Station Forwarder embeds a database to store uplink packets in case of LNS/Network disconnections.
  • Multiple LNS connection: Kerlink Basic Station Forwarder can be used in same time than legacy (GWMP) forwarder allowing multiple LNS connections (see multiforwarder for further details)

Installation and configuration

Kerlink Basic Station Packet Forwarder application requires KerOS version 5.x.

If the software version of your gateway is not compatible, refer to resources section to upgrade to 5.x

For gateways configured with version 4.4.1 for AWS, it's necessary to install Liveburner IPK 5.X and Basic Station Packet Forwarder.
Please see on AWS IoT Core for LoRaWAN - Kerlink documentation for more information

Installation

  1. Download last version of Kerlink Basic Station Packet Forwarder from the Basic Station resources page.
  2. Install the basicstation_X.Y.Z_klkgw.ipk file using the instructions of the software updates page.

The installation of the “basicstation” package adds the following content on the file system:

Content

Configuration

Once installed, Kerlink Basic Station Packet Forwarder is disabled by default. It should first be configured for the wanted server (CUPS and/or LNS).

As explained by Semtech documentation, the procedure to connect to server may differ depending on authentication mode used by server.

No authentication on LNS server

  1. URI of LNS server should be written in /user/basic_station/etc/tc.uri config file.
  2. Activate basicstation forwarder.

A tool named klk_bs_config is used to handle these steps.

Example:

TLS Server Authentication

Additionally to previous mode, a *.trust file should be provided to check server authenticity. (excepting for “Publicly known”/“Globally signed” certificates like “let's encrypt”, AWS, etc…)

Examples:

TLS Server and Client Authentication

Additionally to previous mode, *.key and *.crt files should be provided to authenticate client (gateway) on server.

Example with an AWS CUPS server:

If the main server needs to be modified, all credentials must be removed first to avoid confusion (like using key and certificate on a non-TLS connection):

klk_bs_config --disable
rm -f /user/basic_station/etc/*.key /user/basic_station/etc/*.trust /user/basic_station/etc/*.crt
# Then, follow procedure depending on your LNS type

LNS Connection Status

Since version 2.5.0, the backhaul LEDs (Wirnet iFemtocell/iZeptocell) indicate the status of the LNS connection :

  • a green LED indicates that connection to the LNS has been established
  • a red LED indicates that connection has been either lost or not yet established

When WMC is used at the same time than Basic Station Packet Forwarder, the backhaul LED's behavior is unreliable.

Advanced configuration

LBT/CCA specific case

Only available since version 2.4 ( for “Land Mobile Station” use cases, please contact Kerlink support)

For LNS which doesn't embed AS923-1 with LBT, it needs to be activated manually by using following commands:

# Disable current config
klk_bs_config --disable
 
# Use "Japan" lorad configuration explicitly and prevent from reconfiguration from LNS 
klk_bs_config --enable --loradconf AS923-1-JP.json --ignore-reconf

By default, Kerlink Basic Station Packet Forwarder doesn't need any configuration files excepting those described above.

However, for advanced configuration, default settings can be modified by creating a configuration file named /user/basic_station/etc/station.conf.

It allows to:

  • Change log level (for whole application or component by component)
  • Set router EUI
  • Change CUPS request interval
  • Activate packet buffering (database)
  • Activate or disable websockets ping functionality (and set the ping interval)

An example of this configuration file is provided in /user/basic_station/etc/station.conf.example.

Router EUI (for debug/test purpose)

Default Router EUI is the gateway EUI64 (printed on box and available in /tmp/board_info.json).

However, it can be overridden by setting it in this configuration file:

  1. Copy /user/basic_station/etc/station.conf.example to /user/basic_station/etc/station.conf
  2. Edit /user/basic_station/etc/station.conf and locate [router] section
  3. In this section, enter the line id = <WANTED_EUI>
  4. Save file
  5. Restart application /etc/init.d/station restart

Packet buffering

Packet buffering allows to store uplink packets not transmitted to the LNS server when the link between gateway and server is broken.

The application will then retry periodically to re-connect to the LNS Server and as soon as the connection is back, all stored packets will be pushed in FIFO mode (First In, First Out) to respect packets chronology.

In order to activate it:

  1. Copy /user/basic_station/etc/station.conf.example to /user/basic_station/etc/station.conf
  2. Edit /user/basic_station/etc/station.conf and locate the [database] section
  3. Un-comment enable = True line
  4. Save file
  5. Restart application /etc/init.d/station restart

Local DevAddr Filtering

In the case the LNS does not provide any NetID filter in the router_config message, it is possible to set local filters in order to only forward LoRa uplinks provided by a subset of devices.

To configure this feature, use the '-f' option of the klk_bs_config tool, and provide inclusive and/or exclusive filters to indicate the sets of DevAddr to be kept and/or rejected.

( see https://wikikerlink.fr/wirnet-productline/doku.php?id=wiki:lora:advanced_features#lorawan_frame_filtering for more details about filters values )

Example:

The lead “0x” is not required before the base address of the filter.

TTN LNS configuration tool

To ease declaration of a gateway on the TTN (thethings.network), TTI (thethings.industries) or TTS (The Things Stack Enterprise / Open Source) LNS, use the klk_ttn_config tool.
This tool adds the gateway on the server and creates its associated CUPS and LNS keys.

To use this tool, you need:

  • an API token
  • the API server URL
  • the chose frequency plan

klk_bs_config is still required after this to complete the Basic Station configuration.

  • On TTN klk_ttn_config can only be used one time per gateway due to certain TTN restrictions (even after removing the gateway from TTN)
  • On TTI the gateway needs to be remove and purged in order to reuse klk_ttn_config

Example:

The klk_ttn_config tool has been designed to be called from a Zero Touch Provisioning job.

How to generate an TTI API key?

Loriot LNS configuration tool

To ease declaration of a gateway on the Loriot LNS, use the klk_loriot_config tool. This tool creates the gateway on the server and installs the resulting LNS credentials on the gateway.

To use this tool, you need:

  • an API key
  • the API server URL
  • a network ID
  • LoRaWAN region
  • Channel plans (1 to 8) comma separated (optional)

klk_bs_config is still required after this to complete the Basic Station configuration.

Example:

The klk_loriot_config tool has been designed to be called from a Zero Touch Provisioning job.

How to generate an LORIOT API key?

AWS LNS configuration tool

To ease declaration of a gateway on the AWS LNS, use the klk_aws_config tool. This tool creates the gateway on the server and installs the resulting LNS credentials on the gateway.

To use this tool, you need:

  • an API user ID
  • an API key ID
  • an API key secret
  • the region of the AWS server the gateway will be declared on
  • the LoRaWan region of the gateway
  • the Frequency Sub Band(s) to use (required for US915 and AU915)

klk_bs_config is still required after this to complete the Basic Station configuration.

Example:

The klk_aws_config tool has been designed to be called from a Zero Touch Provisioning job.

How to generate an AWS API key?

Actility LNS configuration tool

To ease declaration of a gateway on the Actility LNS, use the klk_actility_config tool. This tool creates the gateway on the server and installs the resulting LNS credentials on the gateway.

To use this tool, you need:

klk_bs_config is still required after this to complete the Basic Station configuration.

Example:

The klk_actility_config tool has been designed to be called from a Zero Touch Provisioning job.

How to generate an ACTILITY API key?

Gateway name customization option

This option can be used to customize the gateway name displayed on LNS.

Optional parameters:
--naming         Set gateway naming strategy
                 prefix[/scheme]
                   schemes:
                     "knet"   : prefix-EUI[:-6] (default)
                     "eui"    : prefix-EUI
                     "serial" : prefix-board serial
                     "model"  : model-EUI[:-6]

Examples:

wiki/lora/basic_station_forwarder.txt · Last modified: 2024/04/11 12:09 by ehe