cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

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

3277
Views
6
Helpful
18
Comments
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

 

18 Comments
Beginner

hi, Jun Wen

when will you release SDK for v2.0.30?

Kind regards

Tamás Király

Cisco Employee

How do you get the EUI of the Lora WAN radio?

Cisco Employee

You can use CLI (show inventory) to read the gateway MAC or chip ID.

Cisco Employee

Does the unit support SSH access at this time? 

#show ip ssh

SSH Enabled - version 2.0

Authentication timeout: 120 secs;  Authentication retries: 3 Service port: 22  Max Session : 5

Admin Access : yes

Limit Access to Local Address : no

Allowed local users : admin@container admin@localhost

Can you SSH to the container, the IOS environment, both or neither at this point?

Cisco Employee

When the IXM is working on the virtual interface mode, you can SSH from 8x9 to IXM host and then SSH from IXM host to container.

When the IXM is working on the standalone mode, you can SSH to IXM host and use CLI "request shell container-console" to access the container shell.

Beginner

Is there a quick way to nat custom ports from the IXM to the container so I can run a custom web server in the container and access it from the cloud?

Cisco Employee

There has no such way at 2.0.30 release based on the security concerns from existing customers. If you can share us more details about your use case, we may suggest alternative approach.

Cisco Employee

Is there a way to start the semtech packetforwarder while in virtual-lpwa mode? At the moment it appears that I can't start the radio without using the Thingpark LRR. Is the radio-on script in a directory somewhere?

Cisco Employee

Run the CLI "no lpwa modem radio off" from IR809/829.

Cisco Employee

Thanks for the response Jun,

Unforunatly I am still getting an error after entering that command and restarting the IXM. When i start the packet forwarder it says "Error Invalid FPGA number". Once I start the Thingpark LRR and then the packet forwarder that error goes away and it start successfully. However I suspect that the packet forwarder does not work correctly when the LRR is also on. Do you have any advice on this? Thank you in advance

Hi,

 

I've recently picked up a gateway and have completed most of these steps.  However, when I try to start the packet forwarder, I get an error about an invalid FPGA.  How do I resolve this?  I've opened a TAC case, but they just pointed me to this article, even though I've already done the steps from this article.

HERE'S THE ISSUE I WAS HAVING:

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

-----------------------------------------

UofA-LoRaWAN#show inventory
Name : <removed>
ImageVer : 2.0.32
BootloaderVer : 20180130_cisco
SerialNumber : FOC22053N0F
PID : IXM-LPWA-900-16-K9
UTCTime : 16:09:16.460 UTC Mon Nov 26 2018
FPGAVersion : 61
FPGAStatus : Ready
ChipID : LSB = 0x286c0417 MSB = 0x00f14392
TimeZone : UTC
LocalTime : Mon Nov 26 16:09:16 UTC 2018
ACT2 Authentication: PASS

 

UofA-LoRaWAN#show radio
LORA_SN: FOC21427Q5A
LORA_PN: 95.1602T01
LORA_SKU: 915
LORA_CALC: <NA,NA,NA,53,34,107,98,90,81,73,65,55,46,37,28,19-NA,NA,NA,53,34,108,99,90,82,73,65,56,47,38,29,20>
CAL_TEMP_CELSIUS: 34
CAL_TEMP_CODE_AD9361: 90
RSSI_OFFSET: -204.00,-204.00
LORA_REVISION_NUM: E0
RSSI_OFFSET_AUS: -203.00,-203.20

radio status:
on

Beginner

Hi there,

 

Reviving that thread! I'm having that exact same issue! Anyone managed to fix it?

Beginner

First of all a disclaimer. My experience on this device is measured in hours and I'm high on speculation but here goes...

This is the issue:

INFO: [BRD0] enabling chip 0
INFO: [BRD0] enabling chip 1
INFO: [BRD0] channel diversity table: { 0 0 0 0 0 0 0 0 0 0 }
[BRD1] FPGA version = 255
ERROR: sx1301ar_start failed ; Invalid version number for the top FPGA
bash-3.2#

sx1301 is a reference to the Semtech chip used in the Cisco LoRaWAN gateway.

https://www.semtech.com/uploads/documents/sx1301.pdf

The Cisco LoRaWAN gateway uses two sx1301's to provide a total of 16 channels (8ch per chip).

The first line shows chip 0 on BRD0 (Board 0?) starting.

The second line shows chip 1 on BRD0 starting.

The fourth line shows BRD1 (Board 1?) FPGA version number.
The 255 (all 1's) is not a real version number but presumably what the OS sees when it queries a non-existent board/FPGA.

The reason the packet-forwarder tries to start a non-existent chip/board is that the config.json file you are using specifies more than 16 channels.  Avoid the 56 and 64 channel JSON files and you should get past this point.  The 16 channel files would be the most appropriate.

config_loc_dual_antenna_8ch_full_diversity_EU868.json
config_loc_dual_antenna_8ch_full_diversity_JP920.json
config_loc_dual_antenna_8ch_partial_diversity_EU868.json
config_loc_single_antenna_16ch_EU868.json
config_loc_single_antenna_16ch_US915.json
config_loc_single_antenna_64ch_US915.json
config_loc_single_antenna_full_duplex_64ch_US915.json
config_test_dual_antenna_56ch_partial_diversity_EU868.json
config_test_single_antenna_64ch_64x1_EU868.json
config_test_single_antenna_64ch_8x8_EU868.json

Semtech probably have a range of reference designs for which each of those configuration files is appropriate.

I'm guessing Cisco has stuck closely to one of these to avoid having to maintain radio software. When it comes to bundling up the Semtech software, they leave it untouched, as provided, without tailoring it to their own platform.  The disclaimers do say they don't support it so the fact that they don't delete config files that aren't supportable by their own hardware probably shouldn't surprise us.

 

Cisco Employee

Please make sure to follow step 3 and 4

 

3.Create your own config.json

Customized 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.

 

Please also see the post of guidance from TTN and Senet.

https://www.thethingsnetwork.org/docs/gateways/cisco/setup.html

https://docs.senetco.io/rp/gw/Cisco/

 

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.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.