Cisco Wireless Gateway for LoRaWAN

Semtech Packet Forwarder for Developers

Registration

If you have not done so already you will need to register your gateway through your Developer or RAN Provider account as a Semtech Packet Forwarder.

Note

Serial Number is marked on the back of the unit and also available on the console with the command 'show version'. For 16 channel Cisco Semtech Packet Forwarder gateways please ensure that the gateway is registered as a Gateway Type of Semtech Packet Forwarder 16.

Installation

Using the console port of the gateway, log in and turn on privileged commands.

    Gateway>enable
    Gateway#

Display the radio status to verify the radio is enabled.

    Gateway#show radio

If the radio status is set to "off", enable the radio, and save the configuration.

    Gateway#configure terminal
    Gateway(config)#no radio off
    Gateway(config)#exit
    Gateway#copy running-config startup-config

Configure the packet forwarder by entering the Container Console. (To exit this console later: ctrl+a q)

    Gateway#request shell container-console
    bash-3.2#cd /tools
    bash-3.2#vi config.json

In config.json, modify the following parameters to connect to the Senet network. (An appropriate configuration file can be found in the templates folder and copied to /tools/config.json)

        /* change gateway_ID to the EUI provided by Senet */
        "gateway_ID": "0000000000001234",
        "server_address": "collector.senetco.io",
        "serv_port_up": 1700,
        "serv_port_down": 1700,

Semtech Packet Forwarder gateways typically default to the EU channel plan. Please ensure that the configuration file is representative of the region in which the gateway will be deployed.

Start the Semtech Packet Forwarder.

    bash-3.2# ./pkt_forwarder -c config.json -g /dev/ttyS1

Create a script to auto start the Semtech Packet Forwarder.

    bash-3.2#vi /tools/S60pkt_forwarder 

Copy, paste, then save the file.

    #!/bin/sh

    pktDir="/tools"
    pktFwd="pkt_forwarder"
    pktOpt="-c config.json -g /dev/ttyS1"
    pktPid="${pktDir}/${pktFwd}.pid"

    start() {
      if [ -f /var/run/$PIDNAME ] ; then
        echo "$0 is already running"
        exit 1
      fi

      echo -n "Starting pkt_forwarder: "
      cd $pktDir
      start-stop-daemon --background --make-pidfile --pidfile $pktPid --start --exec $pktFwd -- $pktOpt
      echo "Started"

    }

    stop() {
      if [ ! -f $pktPid ] ; then
        echo "$0 is not running"
        exit 1
      fi

      echo -n "Stopping ptk_forwarder: "
      kill -9 $(cat $pktPid) && rm -f $pktPid
      echo "Stopped"

    }

    restart() {
      stop
      sleep 1
      start
    }

    case "$1" in
      start)
        start
        ;;
      stop)
        stop
        ;;
      restart|reload)
        restart
        ;;
      *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
    esac

    exit $?

Configure the Semtech Packet Forwarder to auto-start.

    bash-3.2#cp /tools/S60pkt_forwarder /etc/init.d/.