if [ $(gpsctl -s) -eq 1 ]; then # Wenn GPS Signal vorhanden
latitude=$(gpsctl -i)
longitude=$(gpsctl -x)
uci set gps.aktuelleposition.longitude=$longitude
uci set gps.aktuelleposition.latitude=$latitude
uci commit gps
/etc/init.d/gpsd reload
else
gsmctl -S -s “+49xxxxxxxxxxx Kein GPS Empfang Geozaun nicht gesetzt”
fi
On the RUT956, this only works via the console CLI. The script doesn’t set the geofence values in the I/O Juggler. How do I get the necessary permissions for usi set gps.longitude/latitude?
I have now updated the firmware to RUT9M_R_00.07.21.1. The script is located in /usr/local/home/user. I’ve applied chmod +x and chmod 777. It is also running.
#!/bin/ash
# setzt die Koordinaten für den Geofence standort auf den aktuellen Standort
# wenn kein GPS Signal vorhanden ist SMS an Übergabewert1(Telefonnummer)
if [ $(gpsctl -s) -eq 1 ]; then # Wenn GPS Signal vorhanden
latitude=$(gpsctl -i)
longitude=$(gpsctl -x)
# setze latitude und longitude als geofence ZuHause
uci set gps.standort.longitude=$longitude
uci set gps.standort.latitude=$latitude
uci commit gps
/etc/init.d/gpsd reload
gsmctl -S -s “+4915175xx Geozaun gesetzt”
*else*
gsmctl -S -s “+4915175xx Kein GPS Empfang Geozaun nicht gesetzt”
fi
I receive the SMS from gsmctl -S -s “+4915175xx Geozaun gesetzt”.
The previous commands:
uci set gps.standort.longitude=$longitude
uci set gps.standort.latitude=$latitude
uci commit gps
/etc/init.d/gpsd reload
are not successfully executed by the I/O Juggler.
The coordinates aren’t changing. The coordinates are being changed via the command line (cli) as the root user. The I/O Juggler apparently lacks the necessary permissions to write them. When I install firmware RUT9M_R_00.07.13.4, the I/O Juggler changes the coordinates using the same script. So, it works with RUT9M_R_00.07.13.4, but it doesn’t work with RUT9M_R_00.07.21.1 and RUT9M_R_00.07.20.3.
Apparently, the uci set no longer works since version RUT9M_R_00.07.14 because of ‘RutOS: enabled a read-only root filesystem to ensure system integrity and security’.