|
| 1 | +# Kerlink LoRa IoT Station |
| 2 | + |
| 3 | +This document describes how to setup the [packet_forwarder](https://github.com/Lora-net/packet_forwarder/) |
| 4 | +for the Kerlink LoRa IoT Station. |
| 5 | + |
| 6 | +## Requirements |
| 7 | + |
| 8 | +Since you can't compile the packet_forwarder on the gateway itself, the |
| 9 | +following steps describe how to cross-compile the packet_forwarder. The |
| 10 | +following commands have been tested on Ubuntu 16.04 LTS. When running them |
| 11 | +on a different distribution, you might need to change these commands. |
| 12 | + |
| 13 | +Install the requirements needed to compile the packet_forwarder: |
| 14 | + |
| 15 | +```bash |
| 16 | +sudo apt-get install gcc make git |
| 17 | +``` |
| 18 | + |
| 19 | +!!! note |
| 20 | + You also need the arm cross-compile toolchain from Kerlink in able to |
| 21 | + cross-compile the binaries for ARM. In the following examples it is assumed |
| 22 | + they are installed under /opt/toolchains/arm-2011.03-wirma2. |
| 23 | + |
| 24 | +## Get the source |
| 25 | + |
| 26 | +```bash |
| 27 | +# get the driver / hardware abstraction layer source |
| 28 | +git clone https://github.com/Lora-net/lora_gateway.git |
| 29 | + |
| 30 | +# get the packet_forwarder source |
| 31 | +git clone https://github.com/Lora-net/packet_forwarder.git |
| 32 | +``` |
| 33 | + |
| 34 | +## Configuration |
| 35 | + |
| 36 | +When compiling the packet_forwarder for a Kerlink, you need to set the |
| 37 | +`SPI_DEV_PATH` to `/dev/spidev32766.0`. This can be changed in |
| 38 | +`lora_gateway/libloragw/src/loragw_spi.native.c`. |
| 39 | +In addtion, `lora_gateway/libloragw/tst/test_loragw_gps.c` needs to be |
| 40 | +modified to point to the correct GPS device: |
| 41 | +`i = lgw_gps_enable("/dev/nmea", NULL, 0, &gps_tty_dev);` |
| 42 | + |
| 43 | + |
| 44 | +## Building |
| 45 | + |
| 46 | +``` bash |
| 47 | +# first build the driver / hal library |
| 48 | +cd lora_gateway |
| 49 | +ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi- make all |
| 50 | +cd .. |
| 51 | + |
| 52 | +# secondly, build the packet_forwarder (and tools) |
| 53 | +cd packet_forwarder |
| 54 | +ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi- make all |
| 55 | +``` |
| 56 | + |
| 57 | +## Configuration & usage |
| 58 | + |
| 59 | +From here on, please follow the instructions documented in: |
| 60 | + |
| 61 | +* [https://github.com/Lora-net/packet_forwarder/blob/master/lora_pkt_fwd/readme.md](https://github.com/Lora-net/packet_forwarder/blob/master/lora_pkt_fwd/readme.md#4-usage) |
| 62 | +* [github.com/Lora-net/packet_forwarder/](https://github.com/Lora-net/packet_forwarder/) |
| 63 | +* [Getting started](../getting-started.md) |
0 commit comments