To follow this manual, you must have a Raspberry Pi with an IMST ic880a board, connected through SPI.
-
Download the Raspberry Pi + IMST build of the packet forwarder.
-
Configure the packet forwarder:
$ <packet-forwarder-binary> configure
[...]
INFO New configuration file saved ConfigFilePath=/root/.pktfwd.yml
- Run the packet forwarder:
$ <packet-forwarder-binary> start
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
.
-
Select the build, and copy it in a permanent location - such as
/usr/bin
. -
Create a configuration file in a permanent location, such as in a
/usr/config
directory:
$ touch /usr/config/ttn-pkt-fwd.yml
- Set up this configuration file:
$ <packet-forwarder-binary> configure /usr/config/ttn-pkt-fwd.yml
- 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.
- Reload the systemd daemon, and start the service:
sudo systemctl daemon-reload
sudo systemctl enable ttn-pkt-fwd
sudo systemctl start ttn-pkt-fwd
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.
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
.
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.