the packet forwarder service doesn't connect to lora server on OS startup
King-anderson opened this issue · 2 comments
Hi there,
I have implemented packet forwarder on RPi. when I execute the code, all things are OK and the gateway works fine. but when I create a systemd service to start the packet forwarder on OS startup, the code will be started but can't open socket. (I can't see INFO: [down] PULL_ACK received
in journalctl log) but when I manually make the service systemctl stop myservicename
then systemctl start myservicename
the connection with lora-gateway-bridge is stablished. but when I reboot the OS the problem still exists.
my .service file contents is like as below:
[Unit]
Description=lora gateway
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/bin/lgw.sh
[Install]
WantedBy=multi-user.target
and the lgw.sh file contents is like below:
#!/bin/sh
echo "31" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio31/directionwhile true
do
sleep 1
echo "1" > /sys/class/gpio/gpio31/value
sleep 3
echo "0" > /sys/class/gpio/gpio31/value
sleep 1
cd /thePass
sudo ./lora_pkt_fwd
cd
done
what's the problem?
I have investigated the code. it doesn't related to opening the socket. the server acknowledges don't transmitted to the gateway. the socket opening is working fine. but the lora-server supposes the gateway un-valid. but when I restart the service, all things are ok.
Thank you for your inquiry.
Customers are encouraged to submit technical questions via our dedicated support portal at https://semtech.force.com/ldp/ldp_support.
We invite all users to visit the LoRa Developer Portal Forum at https://forum.lora-developers.semtech.com and to join the thriving LoRa development community!