Hello.
I managed to get a Waveshare sx1302 Hat running as a LoRaWAN gateway on a Raspi.
My problem now is that the packet forwarder always has to be started manually. I would like to automate this by booting the Raspi. Unfortunately I can’t find the right documentation that describes this.
Can anyone of you help here?
Thanks
That would depend on your pi’s Linux install.
Most recent debian/raspbian type ones would probably need a systemd service.
Here’s an example of the service - notice it’s running a script that toggles the reset, not directly starting the packet forwarder
as root create /lib/systemd/system/ttn-gateway.service
[Unit]
Description=The Things Network Gateway[Service]
WorkingDirectory=/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/
ExecStart=/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/start.sh
SyslogIdentifier=ttn-gateway
Restart=always
RestartSec=5[Install]
WantedBy=multi-user.target
And then you need to activate it
sudo systemctl enable ttn-gateway.service
sudo systemctl restart ttn-gateway.service
Hi cslorabox,
Your advice has helped
Thanks for the quick help