# Cisco IXM - LoRa Packet forwarder

# Background

The Cisco IXM is a LoRaWAN Gateway. It listens for LoRa radio traffic and forwards it to a LoRa Server.

This is a quick installation guide. The full documentation can be found here (opens new window).

# Configuration of gateway

# Network connection

By default, the gateway uses DHCP. The following commands can be run to set a static IP.

enable

configure terminal
interface FastEthernet 0/1
ip address 192.168.123.101 255.255.255.0
exit

ip default-gateway 192.168.123.100
exit

# Activate Radios

Run the following commands.

configure terminal
no radio off
exit

Verify that the radio is on in the status message.

show radio

Activate the GPS

configure terminal
gps ubx enable
exit

# Save changes for boot

copy running-config startup-config

# Package forwarder

The package-forwarder is configured to send the LoRa data as UDP to the backend. More info about this application can be found here (opens new window).

All configuration is done inside the applications' container. To exit the terminal use Ctrl-a q. The default password is admin.

Open the container terminal

request shell container-console

# Configure application

Copy the regional config file to the config location with the following command. Replace the template file as necessary.

mkdir /etc/lora-packet-forwarder

cp /tools/templates/config_loc_single_antenna_16ch_EU868.json /etc/lora-packet-forwarder/config.json

Edit the file with vi and set the following parameters. Remember to set the server_address to your installation of IoT Open.

vi /etc/lora-packet-forwarder/config.json
server_address: "domain.tld"
serv_port_up: 1700
serv_port_down: 1700

Test run the application, exit with Ctrl-c.

/tools/pkt_forwarder -c /etc/lora-packet-forwarder/config.json -g /dev/ttyS1

# Auto start on boot

vi /etc/init.d/S60lora-packet-forwarder

Paste the following configuration in the file.

#!/bin/sh

start() {
  echo "Starting lora-packet-forwarder"
  /sbin/start-stop-daemon \
  	--start \
	--background \
	--make-pidfile \
	--pidfile /var/run/lora-packet-forwarder.pid \
	--exec /tools/pkt_forwarder -- -c /etc/lora-packet-forwarder/config.json -g /dev/ttyS1
}

stop() {
  echo "Stopping lora-packet-forwarder"
  /sbin/start-stop-daemon \
  	--stop \
	--oknodo \
	--quiet \
	--pidfile /var/run/lora-packet-forwarder.pid
}

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 $?

Make the file executable.

chmod +x /etc/init.d/S60lora-packet-forwarder

Start the forwarder, it should automatically start at reboot.

/etc/init.d/S60lora-packet-forwarder start