Kompressor

Helium Secure Concentrator

Kompressor is a reference implementation of a Helium HIP 72 LoRaWAN Secure Concentrator card designed by NLighten Systems with help from Helium Foundation Grant. This card is designed to be used in new Helium Hotspots, retrofitted in existing hotspots, or used in DIY Helium Hotspot.

License: CERN-OHW-W

Source Repository: https://gitlab.com/nlighten-systems/kompressor

Firmware Repository: https://gitlab.com/nlighten-systems/firmware

Kompressor Demo

We will demonstrate building a Helium Hotspot using a Kompressor Secure Concentrator card, Raspberry Pi 4, and RAK 2287 Pi HAT. You will also need a JLINK debug probe (note: the education/non-commercial one works just fine).

Build Kompressor Firmware

$ git clone https://gitlab.com/nlighten-systems/firmware
$ cd firmware
$ make fullimage.bin

Plug in the jlink and connect tag-connect to the Kompressor board. Then flash the full image firmware:

$ make flash_full_image

Build pkt-forwarder

Secure Concentrators Cards use an extended version of the Semtech GWMP protocol. Therefor you must use Nlighten’s fork of the pkt-forwarder project:

$ git clone https://gitlab.com/nlighten-systems/pkt-forwarder
$ cd pkt-forwarder
$ git submodule init
$ git submodule update
$ cargo build

Now copy the pktfwd binary and config file to the raspberry pi.

$ scp target/armv7-unknown-linux-gnueabihf/debug/pktfwd <user>@<rasp_pi_ip_address>:/home/<user>/
$ scp conf.json.kompressor.US915.SPI <user>@<rasp_pi_ip_address>:/home/<user>/

SSH into the raspberry pi and start the pktfwd app.

$ RUST_LOG="info" ./pktfwd --config conf.json.kompressor.US915.SPI
paul@raspberrypi:~ $ RUST_LOG="info" ./pktfwd --config conf.json.kompressor.US915.SPI 
[2022-11-17T00:26:08Z INFO  pktfwd] Starting pktfwd
[2022-11-17T00:26:08Z INFO  pktfwd] resetting concentrator micro...
[2022-11-17T00:26:09Z INFO  pktfwd] waiting for micro to boot...
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 0 freq: 903.9MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 1 freq: 904.1MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 2 freq: 904.3MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 3 freq: 904.5MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 4 freq: 904.7MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 5 freq: 904.9MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 6 freq: 905.1MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 7 freq: 905.3MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::hardware::sx130x] Channel 8 freq: 904.6MHz
[2022-11-17T00:26:29Z INFO  loragw_hw::secure_concentrator] SX130x: v1.2
[2022-11-17T00:26:31Z INFO  loragw_hw::hardware::sx130x] SX130x model: SX1303
[2022-11-17T00:26:31Z INFO  loragw_hw::hardware::sx130x] using precision timestamp
[2022-11-17T00:26:32Z INFO  loragw_hw::hardware::sx130x] LoRa Service modem: configuring preamble size to 8 symbols
[2022-11-17T00:26:33Z INFO  loragw_hw::secure_concentrator] Loading AGC firmware for SX1250
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] ARB fw loaded
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] ARB: dual demodulation enabled for all SF
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] ARB: dual demodulation disabled for all SF
[2022-11-17T00:26:49Z INFO  loragw_hw::secure_concentrator] gateway eui: 00:16:C0:01:FF:1E:40:3C
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 0 freq: 903.9MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 1 freq: 904.1MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 2 freq: 904.3MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 3 freq: 904.5MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 4 freq: 904.7MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 5 freq: 904.9MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 6 freq: 905.1MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 7 freq: 905.3MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::hardware::sx130x] Channel 8 freq: 904.6MHz
[2022-11-17T00:26:49Z INFO  loragw_hw::secure_concentrator] gateway eui: 00:16:C0:01:FF:1E:40:3C
[2022-11-17T00:26:49Z INFO  pktfwd::gwmp::client] GWMP Client bind: 0.0.0.0:9000
[2022-11-17T00:26:49Z INFO  pktfwd::gwmp::client] GWMP Client connect: 127.0.0.1:1680

toyserver

toyserver is a test binary used to connect to pkt-forwarder and print out incoming packets. You can copy toyserver from target/armv7-unknown-linux-gnueabihf/debug/toyserver onto raspberry pi. Run the toyserver from the raspberry pi and it will automatically connect to pkt-forwarder on port 1680. If you press the s key it will transmit a packet on 920.6 Mhz using SF12BW500 modulation. see src/toyserver/src/main.rs for more info.

Build gateway-rs

$ git clone https://github.com/dinocore1/gateway-rs
$ cd gateway-rs
$ git checkout secure_concentrator
$ cross build --target=armv7-unknown-linux-gnueabihf --no-default-features
$ scp target/armv7-unknown-linux-gnueabihf/debug/helium_gateway <user>@<rasp_pi_ip_address>:/home/<user>/
$ scp config/default.toml <user>@<rasp_pi_ip>:/etc/helium_gateway/
$ cat <<EOF > config/settings.toml
keypair = "/home/paul/helium_gateway_key.bin"

[log]
level = "debug"
timestamp = false

[update]
enabled = false
platform = "nlighten_zen"
EOF
$ scp config/settings.toml <user>@<rasp_pi_ip>:/etc/helium_gateway/

Now you can ssh into the raspberry pi and run the helium_gateway. Follow the instructions to setup a Helium Data Only Hotspot.

Run the helium gateway service with:

$ ./helium_gateway server