Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.45 KB

File metadata and controls

76 lines (49 loc) · 2.45 KB

Install the TTN Packet Forwarder on a Raspberry Pi with an IMST ic880a board

To follow this manual, you must have a Raspberry Pi with an IMST ic880a board, connected through SPI.

Download and run

  1. Download the Raspberry Pi + IMST build of the packet forwarder.

  2. Configure the packet forwarder:

$ <packet-forwarder-binary> configure
[...]
  INFO New configuration file saved             ConfigFilePath=/root/.pktfwd.yml
  1. Run the packet forwarder:
$ <packet-forwarder-binary> start

Permanent installation with systemd

If you want a permanent installation of the packet forwarder on your Raspberry Pi, with systemd managing the packet forwarder on the background, we provide a basic systemd installation script, install-systemd.sh.

  1. Select the build, and copy it in a permanent location - such as /usr/bin.

  2. Create a configuration file in a permanent location, such as in a /usr/config directory:

$ touch /usr/config/ttn-pkt-fwd.yml
  1. Set up this configuration file:
$ <packet-forwarder-binary> configure /usr/config/ttn-pkt-fwd.yml
  1. Use the install-systemd.sh script, with the binary as a first argument and the config file as a second argument:
$ ./install-systemd.sh <packet-forwarder-binary-path> <configuration-file-path>
./install-systemd.sh: Installation of the systemd service complete.
  1. Reload the systemd daemon, and start the service:
sudo systemctl daemon-reload
sudo systemctl enable ttn-pkt-fwd
sudo systemctl start ttn-pkt-fwd

Build

If want to contribute to the development of the packet forwarder, you might want to build the TTN Packet Forwarder. You will need to use a Linux environment to run the toolchain necessary for the build.

Getting the toolchain

If you want to build the packet forwarder for a Raspberry Pi, you will need a Raspberry Pi cross-compiler. On some Linux distributions, such as Ubuntu, a toolchain is available as a package: sudo apt install gcc-arm-linux-gnueabi -y.

Building the binary

Make sure you have installed and configured your Go environment.

Follow these commands:

$ make dev-deps
$ make deps
$ GOOS=linux GOARCH=arm GOARM=7 CC=gcc-arm-linux-gnueabi make build

The binary will then be available in the release/ folder.