cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8203
Views
6
Helpful
19
Replies

About the native Semtech Packet Forwarder v5.1.0 binary pre-installed inside the LXC of IXM 2.0.30 Release

jwen2
Cisco Employee
Cisco Employee

************************************************************************

IMPORTANT NOTE:

This pre-installed native Semtech Packet Forwarder is strictly used for the lab validation only, not for any production or commercial purpose. Cisco did not execute any functionalities, scale, robustness and interoperability test on it. Cisco does not provide any support neither if there has any issues of it. If you need source code or support, please open ticket from Semtech LoRa Community

 

This native Semtech Packet Forwarder CANNOT be installed/uninstalled/configured through Cisco CLI like the approach of Actility LRR. You need to access the LXC to create your own channel profile.

************************************************************************

 

1. Action executions before running the Packet Forwarder binary

 

Before running the binary, make sure the radio is turned on. You can check the radio status using "show radio". If the radio is off, please use CLI "no radio off"  to turn it on.

 

Example

Gateway#show radio

LORA_SN: FOC20522TVB

LORA_PN: 95.1602T01

LORA_SKU: 915

LORA_CALC: <NA,NA,NA,54,37,109,100,92,83,75,67,57,48,38,29,20-NA,NA,NA,52,34,107,98,90,81,73,65,55,46,37,28,19>

CAL_TEMP_CELSIUS: 34

CAL_TEMP_CODE_AD9361: 91

RSSI_OFFSET: -204.20,-204.00

LORA_REVISION_NUM: B0

RSSI_OFFSET_AUS: -202.00,-202.00

 

radio status:

off

 

Gateway#configure terminal

Gateway(config)#no radio off

Gateway(config)#exit

 

Gateway#show radio

LORA_SN: FOC20522TVB

LORA_PN: 95.1602T01

LORA_SKU: 915

LORA_CALC: <NA,NA,NA,54,37,109,100,92,83,75,67,57,48,38,29,20-NA,NA,NA,52,34,107,98,90,81,73,65,55,46,37,28,19>

CAL_TEMP_CELSIUS: 34

CAL_TEMP_CODE_AD9361: 91

RSSI_OFFSET: -204.20,-204.00

LORA_REVISION_NUM: B0

RSSI_OFFSET_AUS: -202.00,-202.00

 

radio status:

on

 

Gateway#copy running-config startup-config

!

 

Important !

Please to use CLI "request shell container-console" to access the LXC bash before runing the following steps. The default password when prompting "Enter System Password: " is "admin".

 

2. Location and usage of pkt_forwarder

The binary file is located in "/tools" in the LXC. Before running it please check the parameters description with -help:

"pkt_forwarder -help

~~ Library version string~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

5.1.0

~~ Available options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-h  print this help

-d <path>  use Linux SPI device driver

            => default path: /dev/spidev1.0

-g <optional path>  use GPS receiver for synchronization

            => default path: /dev/ttyS1

            warning: NO SPACE between -g and gps path!!

-c <filename>  use config file other than 'config.json'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

 

3.Create your own config.json

Custonmized configuration is needed before running the software. Please use the config example(/tools/config_example.json) as a template if necessary. All other config templates are provide in /tools/templates/

 

Please create your config.json file under /tmp

 

4. Run pkt_forwarder

The software can be run in the LXC with "./pkt_forwarder" with all logs printed in console. If there is no parameters specified, the config file should be guaranteed to be named as "config.json", and the GPS device is "/dev/ttyS1" and SPI device is "/dev/spidev1.0" by default. Customized file name and device are supported through running with parameters.

 

example: ./pkt_forwarder -c /tmp/config.json -g/dev/ttyS1

 

5. Auto-run pkt_forwarder when LXC start:

Please edit the sample init scrip file "/tools/S60pkt_forwarder_example":

1. Add your code in start() function to start pkt_forwarder when the LXC boots up

2. Add your code in stop() function to stop pkt_forwarder gracefully when the LXC shuts down

3. Move this file to "/etc/init.d/"

4. Rename the file for your requirement. The two-digit number represents the sequence when it starts, please guarantee this number is larger then the dependencies if any.

 

6. Clean

If this pkt_forwarder is no longer needed to be running in LXC or it should be replaced by another one. Please do a factory upgrade in the host for fully removal.

 

7. Permission in LXC:

If you want to create files (e.g. customized config file) in LXC, please create in /tmp. It's not allowed to do it in /tools directory.

 

8. GPS

If the gateway does not well receive GPS signal, a GPS warning might be thrown when running the binary: "WARNING: GPS time reference is invalid. Check GPS configuration (UBX: NAV-TIMEGPS)".

 

Please run the following CLI to check the GPS status and make sure to well receive GPS signal on the IXM.

 

example

Gateway#show gps info

...................

Gateway#show gps status

INFO: SPI speed set to 2000000 Hz

reading GPS data...

total data length: 0

reading GPS data...

total data length: 304

$GNRMC,212800.00,V,,,,,,,160418,

##PASS: GPS I2C interface check OK

 

Gateway#show gps log

 

19 Replies 19

I can check my config.  If I remember right the device doesn't even support the 16 channel template.  I had to use the 8 channel template, then I had to swap out the frequencies, because the one that was in the template on the device did not match the standard frequencies that were recommended by the TTN network.

jwen2
Cisco Employee
Cisco Employee

The error below is not about the config template content but the improper config file directory or radio off status.

 

[BRD1] FPGA version = 255
ERROR: sx1301ar_start failed ; Invalid version number for the top FPGA

lgrynfeltt
Level 1
Level 1

@Robert Placenciaspot on! I have using the 64 channel template, moved onto 16 and it's working :)

 

@jwen2Thanks for your support!

 

Thanks a lot guys! Really appreciate the assist!

paduffy
Cisco Employee
Cisco Employee

Hi Jun

I followed section 5 to auto-start the packet forwarder on IXM start.  Works great.

However,when I subsequently log into the container shell console, all I get is echo of characters I type ... shell seems broken.  How do I regain shell access, see the packet_forwarder log output, change the init.d details, etc.?

kapslock
Level 1
Level 1

Our client currently has 10 of these IXM-LPWA-800-16-K9 installed.

 

Problem is the packet forwarder script is not run on reboot. It is placed under /etc/init.d/ 

 

Any solution?

/K.