cisco-ixm

Introduction

This document describes the steps to configure a Cisco IXM LoRaWAN receiver in standalone mode, and configure the Semtech packet forwarder. For use with xDP. This is not currently a Cisco supported configuration.

This guide is based on the following:

Other useful information:

The hardware installation guide can be found here: https://www.cisco.com/c/en/us/td/docs/routers/interface-module-lorawan/hardware/installation/guide/b_lora_hig/b_install.html?referring_site=RE&pos=1&page=https://www.cisco.com/c/en/us/products/collateral/se/internet-of-things/datasheet-c78-737307.html

High level steps

  1. Set IXM to “standalone mode”
  2. Configure IXM authentication
  3. Configure network settings
  4. Configure Radio + GPS
  5. Configure the packet forwarder

1. Set the IXM to “standalone mode”

We first need to set the IXM into standalone mode so that we can provide it with a static IP, disable tunnelling and disable DHCP. Removing DHCP for critical network elements behind an unreliable network eliminates a layer of complexity when troubleshooting.

We can check to see if the IXM is in ‘virtual-lpwa’ mode or ‘standalone’ by plugging in your serial console cable to the console port and observing what prompt the IXM returns. If the IXM returns Gateway> then the IXM is already in standalone mode and you can skip to step 2. If the IXM returns a standard linux terminal prompt then login to the IOS router that the IXM to be connected with via ssh or the console port (the IR829 is an example of such a router).

Warning, after the IXM switches to standalone mode you will not have ssh access into the IXM. Ensure you have access to the console of the IXM.

Enter the following commands:

IR829> enable
IR829# virtual-lpwa 1 modem standalone mode enable
IR829# exit

2. Configure IXM Authentication

When in standalone mode, the IXM requires its own credentials.

Connect the console cable to the IXM and use a serial comms program to connect at 115,200 baud e.g. screen ala screen /dev/cu.usbserial 115200 (depending on the device).

<you may need to hit return>
Gateway> enable
Gateway# configure terminal
Gateway(config)# enable secret <password>
Gateway(config)# username <username> password <password>
Gateway# exit
Gateway# copy running-config startup-config

3. Configure Network settings

While remaining connected to the IXM via the console, we now declare the addresses on the network to connect with.

Set a static IP default Gateway, and DNS

Enter the following (use interface ? to list the available interfaces - you’ll typically want interface FastEthernet 0/1):

Gateway# configure terminal 
Gateway(config)# interface <interface>
Gateway(config-if)# ip address <ipaddress> <subnetmask>
Gateway(config-if)# exit
Gateway# ip default-gateway <gateway-ipaddress>
Gateway# ip name-server <dns-ipaddress>
Gateway# exit
Gateway# copy running-config startup-config

Test IP Connectivity:

Ping Default Gateway:

Gateway# ping ip <gateway-ipaddress>

Ping outside network:

Gateway# ping ip <dns-ipaddress>

Set hostname, and domain name

Gateway# configure terminal
Gateway(config)# hostname <hostname>
Gateway(config)# ip domain name <domain name>
Gateway(config)# exit

Configure ssh

Gateway# configure terminal
Gateway(config)# crypto key generate rsa
Gateway(config)# ip ssh session 5
Gateway(config)# ip ssh admin-access
Gateway(config)# exit

Enable Radio and GPS

Enable Radio:

Gateway# configure terminal
Gateway(config)# no radio off
Gateway(config)# exit

Enable GPS (if connected):

Gateway# configure terminal
Gateway(config)# gps ubx enable
Gateway(config)# exit

Save config:

Gateway# copy running-config startup-config

To observe Radio:

Gateway# show radio

To observe GPS:

Gateway# show gps log
Gateway# show gps status
Gateway# show gps history

Configure Packet forwarder

Enter the linux shell:

Gateway# request shell container-console

Make a directory where the pktfwd configuration will be located and then move into it:

$ mkdir /etc/pktfwd
$ cd /etc/pktfwd

Write, or move your pktfwd configuration file to this directory.

You can run the pktfwd with the following command for testing:

$ /usr/sbin/pkt_forwarder -c config.json -g/dev/ttyS1

Upload a script to start pktfwd on startup. Save the following script to /etc/init.d/S90_pkt_forwarder.sh (taken from The Things Network guide):

#!/bin/sh

SCRIPT_DIR=/etc/pktfwd
SCRIPT=pkt_forwarder
RUNAS=root

PIDFILE=$SCRIPT_DIR/pkt_forwarder.pid

start() {
  if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then
    echo 'Service already running' >&2
    return 1
  fi
  echo 'Starting service…' >&2
  cd $SCRIPT_DIR
  start-stop-daemon -S -q -b -p "$PIDFILE" --exec "$SCRIPT" -- -c config.json -g/dev/ttyS1
  echo 'Service started' >&2
}

stop() {
  if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then
    echo 'Service not running' >&2
    return 1
  fi
  echo 'Stopping service…' >&2
  kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
  echo 'Service stopped' >&2
}

uninstall() {
  echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
  local SURE
  read SURE
  if [ "$SURE" = "yes" ]; then
    stop
    rm -f "$PIDFILE"
    echo "Notice: log file is not be removed: '$LOGFILE'" >&2
    update-rc.d -f <NAME> remove
    rm -fv "$0"
  fi
}

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

Make it executable:

chmod +x /etc/init.d/S90_pkt_forwarder.sh

Then type reboot. Verify that your Network Server is being connected to by the packet forwarder.