Executing a userscript in the io juggler is not possible with RUT956

The following script worked on the RUT955:

#!/bin/ash

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?

Thank you

Hello,

Thank you for your message,

It seems that this question was raised in the Telematics Category.

Please raise this question in the Networking Solutions category to get assistance regarding this matter.

Thank you,

Greetings,

The script appears to be functioning correctly on my end.

Could you please confirm which firmware version is currently running on the device?

Also, have you ensured that the script file has the appropriate write permissions? You can set the permissions using the chmod 777 command.

Best Regards,
Justinas

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’.

Greetings

Hi, does nobody have any idea how to get ‘uci set’ working with the current firmware in the I/O Juggler?