Hi,
If quectel-CM directory is located in /home/pi/files change the /usr/src/qmi reconnect.sh
script to the following:
#!/bin/sh
while true; do
ping -I wwan0 -c 8.8.8.8
if [ $? -eq 0); then
echo "Connection up, reconnect not required..."
else
echo "Connection down, reconnecting..."
sudo /home/pi/files/quectel-CM/quectel-CM -s #your APN
fi
sleep 10
done
Check the WorkingDirectory path in the /etc/systemd/system/qmi_reconnect.service file.
then follow these:
-
systemctl daemon-reload
-
systemctl start qmi_reconnect.service
-
systemcrl enable qmi_reconnect.service