Raspberry Pi image generator for LoRa Server

Using the script which you can find here: https://github.com/brocaar/loraserver-pi-gen, you can generate a Raspberry Pi image with the Semtech packet-forwarder and all LoRa Server components pre-installed (including dependencies) :slight_smile:

This could be useful when you have a Raspberry Pi based gateway, and want to run the full stack on the Pi.

Note: You don’t (have to) execute the script on a Raspberry Pi!

1 Like

I will like to know if this includes gateways built of Raspberry PI + Dragino Lora GPS HAT?
I know it is not a full gateway, but I am using in the context of school research. I would like to run the Lora Server Locally, but it is somehow difficult to install. Is it possible?
Thanks in advance.

I have to add that, I already have a packet forwarder adapted to my setup and the can connect to a TCP / UPD server and send and or receive data. I need this because I don’t want to implement all the security and node identification related functions myself.

Basically it installs the Semtech packet-forwarder + all LoRa Server components and requirements. You can always make modifications afterwards if needed or install additional software (e.g. if needed for your Dragino gateway) :slight_smile:

Hi @brocaar,

Thanks for the fantastic work done here!

I am getting the following when using docker to get the image installed on my Raspberry Pi.

[09:29:51] End /pi-gen/stage3/03-loraserver-deps/01-run.sh
[09:29:51] End /pi-gen/stage3/03-loraserver-deps
[09:29:51] Begin /pi-gen/stage3/04-loraserver
[09:29:51] Begin /pi-gen/stage3/04-loraserver/00-packages
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  lora-app-server lora-gateway-bridge loraserver
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 19.8 MB of archives.
After this operation, 47.2 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  lora-app-server lora-gateway-bridge loraserver
E: There were unauthenticated packages and -y was used without --allow-unauthenticated

I managed to get it installed using ./build.sh (without docker) yesterday and got the .zip image in /deploy. I had to format my SD and lost progress. I am trying again now both methods are not working. (I had previously installed TTN related stuff which maybe might have already installed those packages?)

Also when I get the .zip image how do I mount it? I am not too familiar with the technical steps… but from what I understand I should be able to copy it on my SD and use NOOBS to mount?

Any advice would be appreciated.

Hello again,

I successully get the .zip image when I install this:

$ git clone -b spi https://github.com/ttn-zh/ic880a-gateway.git ~/ic880a-gateway
$ cd ~/ic880a-gateway
$ sudo ./install.sh spi
[14:12:02] Begin /pi-gen/export-image/04-finalise/01-run.sh
Stopping fake hwclock: saving system time.
Mode:     real
Files:    2816
Linked:   436 files
Compared: 0 xattrs
Compared: 836 files
Saved:    15.56 MiB
Duration: 2.71 seconds
  adding: 2018-11-01-raspbian-LoRaPi.img

 (deflated 77%)
[14:20:03] End /pi-gen/export-image/04-finalise/01-run.sh
[14:20:03] End /pi-gen/export-image/04-finalise
[14:20:03] End /pi-gen/export-image
[14:20:03] End /pi-gen
sending incremental file list

sent 16,496 bytes  received 35 bytes  33,062.00 bytes/sec
total size is 16,402  speedup is 0.99

real	16m11.130s
user	0m1.193s
sys	0m0.461s
copying results from deploy/
total 400M
drwxr-xr-x  2 root root 4.0K Nov  1 15:20 .
drwxr-xr-x 11 root root 4.0K Nov  1 15:20 ..
-rw-r--r--  1 root root  56K Nov  1 15:20 2018-11-01-raspbian-LoRaPi.info
-rw-r--r--  1 root root  17K Nov  1 15:20 build.log
-rw-r--r--  1 root root 400M Nov  1 15:20 image_2018-11-01-raspbian-LoRaPi.zip
Done! Your image(s) should be in deploy/

I noticed the install creates a new user pi@ttn-gateway. In any case I am still confused as to what to do with that .zip image.

Please help. Thanks.

How do I do that? Can you please give some brief explanation? Does it work with RAK833