40 lines
769 B
Markdown
40 lines
769 B
Markdown
# Packet Forwarder
|
|
|
|
Download `lora_pkt_fwd` from <https://github.com/Lora-net/sx1302_hal>
|
|
|
|
Run `make`
|
|
|
|
Setup config
|
|
|
|
Make pf user + give permissions
|
|
|
|
Copy files to pf user's home:
|
|
|
|
- `global_conf.json.sx1250.US915`
|
|
- `lora_pkt_fwd`
|
|
- `reset_lgw.sh`
|
|
|
|
(Make sure execute permission is set on `lora_pkt_fwd` and `reset_lgw.sh`.)
|
|
|
|
Create SystemD unit file at `/etc/systemd/system/packet-forwarder.service`:
|
|
|
|
```systemd
|
|
[Unit]
|
|
Description=SX1302 Packet Forwarder
|
|
After=network.target
|
|
StartLimitIntervalSec=0
|
|
|
|
[Service]
|
|
Type=simple
|
|
Restart=always
|
|
RestartSec=1
|
|
User=pf
|
|
WorkingDirectory=/home/pf
|
|
ExecStart=/home/pf/lora_pkt_fwd -c global_conf.json.sx1250.US915
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
Start and enable `sudo systemctl enable --now packet-forwarder.service`.
|