Crontab cell lock command not running - TRB500

Can anyone spot an issue in this crontab file please? The cell lock command works fine posted t the modem (in toubleshooting):
AT+QNWLOCK=“common/4g”,3,1617,271,3350,271,3179,271

or through ssh but it doesn’t seem to run from the crontab.
gsmctl -A AT+QNWLOCK=“common/4g”,3,1617,271,3350,271,3179,271

It should run every 5 mins to re-send the modem to the 3 cells instructed on TRB500.

Thanks.

Hello,

Could you try using /usr/sbin/gsmctl instead of just gsmctl ?

Regards,

Good point. Doesnt seem to have worked. I have rebooted too, not sure if thats needed for it to run.

Check with:

logread | grep crond

What is the output ?

root@Teltonika-RUTX09:~# logread | grep crond
Thu Nov 14 11:11:57 2024 cron.err crond[25818]: crond (busybox 1.34.1) started, log level 5
Thu Nov 14 11:15:00 2024 cron.err crond[25818]: USER root pid 26066 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:20:00 2024 cron.err crond[25818]: USER root pid 26263 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:25:00 2024 cron.err crond[25818]: USER root pid 32084 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:30:00 2024 cron.err crond[25818]: USER root pid 3296 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:35:00 2024 cron.err crond[25818]: USER root pid 5866 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:40:00 2024 cron.err crond[25818]: USER root pid 6625 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:45:00 2024 cron.err crond[25818]: USER root pid 6860 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:50:00 2024 cron.err crond[25818]: USER root pid 7023 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 11:55:00 2024 cron.err crond[25818]: USER root pid 7305 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:00:00 2024 cron.err crond[25818]: USER root pid 9002 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:05:00 2024 cron.err crond[25818]: USER root pid 9179 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:10:00 2024 cron.err crond[25818]: USER root pid 9345 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:15:00 2024 cron.err crond[25818]: USER root pid 9519 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:20:00 2024 cron.err crond[25818]: USER root pid 9693 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:25:00 2024 cron.err crond[25818]: USER root pid 9867 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:30:00 2024 cron.err crond[25818]: USER root pid 10038 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:35:00 2024 cron.err crond[25818]: USER root pid 10208 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:40:00 2024 cron.err crond[25818]: USER root pid 10378 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:45:00 2024 cron.err crond[25818]: USER root pid 10547 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:50:00 2024 cron.err crond[25818]: USER root pid 10718 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 12:55:00 2024 cron.err crond[25818]: USER root pid 10888 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:00:00 2024 cron.err crond[25818]: USER root pid 11051 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:05:00 2024 cron.err crond[25818]: USER root pid 11220 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:10:00 2024 cron.err crond[25818]: USER root pid 11391 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:15:00 2024 cron.err crond[25818]: USER root pid 11560 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:20:00 2024 cron.err crond[25818]: USER root pid 11724 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:25:00 2024 cron.err crond[25818]: USER root pid 11894 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:30:00 2024 cron.err crond[25818]: USER root pid 12065 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:35:00 2024 cron.err crond[25818]: USER root pid 12243 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:40:00 2024 cron.err crond[25818]: USER root pid 12414 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:45:00 2024 cron.err crond[25818]: USER root pid 12575 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:50:00 2024 cron.err crond[25818]: USER root pid 12746 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 13:55:00 2024 cron.err crond[25818]: USER root pid 12916 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:00:00 2024 cron.err crond[25818]: USER root pid 13087 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:05:00 2024 cron.err crond[25818]: USER root pid 13255 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:10:00 2024 cron.err crond[25818]: USER root pid 13421 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:15:00 2024 cron.err crond[25818]: USER root pid 13590 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:20:00 2024 cron.err crond[25818]: USER root pid 13762 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:25:01 2024 cron.err crond[25818]: USER root pid 13930 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:30:00 2024 cron.err crond[25818]: USER root pid 14092 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:35:00 2024 cron.err crond[25818]: USER root pid 14270 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:40:00 2024 cron.err crond[25818]: USER root pid 14442 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:45:00 2024 cron.err crond[25818]: USER root pid 14611 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:50:00 2024 cron.err crond[25818]: USER root pid 14780 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 14:55:00 2024 cron.err crond[25818]: USER root pid 14943 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:00:00 2024 cron.err crond[25818]: USER root pid 15111 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:05:00 2024 cron.err crond[25818]: USER root pid 15282 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:10:00 2024 cron.err crond[25818]: USER root pid 15451 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:15:00 2024 cron.err crond[25818]: USER root pid 15621 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:20:00 2024 cron.err crond[25818]: USER root pid 15784 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:25:00 2024 cron.err crond[25818]: USER root pid 15952 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:30:00 2024 cron.err crond[25818]: USER root pid 16122 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:35:00 2024 cron.err crond[25818]: USER root pid 16301 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:40:00 2024 cron.err crond[25818]: USER root pid 16463 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:45:00 2024 cron.err crond[25818]: USER root pid 16634 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:50:00 2024 cron.err crond[25818]: USER root pid 16804 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 15:55:00 2024 cron.err crond[25818]: USER root pid 16973 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:00:00 2024 cron.err crond[25818]: USER root pid 17143 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:05:00 2024 cron.err crond[25818]: USER root pid 17307 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:10:00 2024 cron.err crond[25818]: USER root pid 17478 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:15:00 2024 cron.err crond[25818]: USER root pid 17646 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:20:00 2024 cron.err crond[25818]: USER root pid 17816 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:25:00 2024 cron.err crond[25818]: USER root pid 17986 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:30:00 2024 cron.err crond[25818]: USER root pid 18146 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:35:00 2024 cron.err crond[25818]: USER root pid 18324 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:40:00 2024 cron.err crond[25818]: USER root pid 18496 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:45:00 2024 cron.err crond[25818]: USER root pid 18665 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:50:00 2024 cron.err crond[25818]: USER root pid 18832 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 16:55:00 2024 cron.err crond[25818]: USER root pid 18998 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:00:00 2024 cron.err crond[25818]: USER root pid 19168 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:05:00 2024 cron.err crond[25818]: USER root pid 19340 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:10:00 2024 cron.err crond[25818]: USER root pid 19510 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:15:00 2024 cron.err crond[25818]: USER root pid 19673 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:20:00 2024 cron.err crond[25818]: USER root pid 19843 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:25:00 2024 cron.err crond[25818]: USER root pid 20010 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:30:00 2024 cron.err crond[25818]: USER root pid 20179 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:35:00 2024 cron.err crond[25818]: USER root pid 20357 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:40:00 2024 cron.err crond[25818]: USER root pid 20518 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:45:00 2024 cron.err crond[25818]: USER root pid 20687 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:50:00 2024 cron.err crond[25818]: USER root pid 20857 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 17:55:00 2024 cron.err crond[25818]: USER root pid 21026 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:00:00 2024 cron.err crond[25818]: USER root pid 21198 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:05:00 2024 cron.err crond[25818]: USER root pid 21360 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:10:00 2024 cron.err crond[25818]: USER root pid 21529 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:15:00 2024 cron.err crond[25818]: USER root pid 21699 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:20:00 2024 cron.err crond[25818]: USER root pid 21867 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:25:00 2024 cron.err crond[25818]: USER root pid 22031 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:30:00 2024 cron.err crond[25818]: USER root pid 22199 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:35:00 2024 cron.err crond[25818]: USER root pid 22377 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:40:00 2024 cron.err crond[25818]: USER root pid 22549 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:45:00 2024 cron.err crond[25818]: USER root pid 22719 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:50:00 2024 cron.err crond[25818]: USER root pid 22880 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 18:55:00 2024 cron.err crond[25818]: USER root pid 23050 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:00:00 2024 cron.err crond[25818]: USER root pid 23220 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:05:00 2024 cron.err crond[25818]: USER root pid 23389 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:10:00 2024 cron.err crond[25818]: USER root pid 23560 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:15:00 2024 cron.err crond[25818]: USER root pid 23721 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:20:00 2024 cron.err crond[25818]: USER root pid 23890 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:25:00 2024 cron.err crond[25818]: USER root pid 24058 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:30:00 2024 cron.err crond[25818]: USER root pid 24228 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:35:00 2024 cron.err crond[25818]: USER root pid 24400 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:40:00 2024 cron.err crond[25818]: USER root pid 24569 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:45:00 2024 cron.err crond[25818]: USER root pid 24738 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:50:00 2024 cron.err crond[25818]: USER root pid 24908 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 19:55:00 2024 cron.err crond[25818]: USER root pid 25079 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:00:00 2024 cron.err crond[25818]: USER root pid 25241 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:05:00 2024 cron.err crond[25818]: USER root pid 25411 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:10:00 2024 cron.err crond[25818]: USER root pid 25580 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:15:00 2024 cron.err crond[25818]: USER root pid 25750 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:20:00 2024 cron.err crond[25818]: USER root pid 25919 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:25:00 2024 cron.err crond[25818]: USER root pid 26081 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 20:30:00 2024 cron.err crond[25818]: USER root pid 26263 cmd /usr/sbin/ping_reboot.sh cfg01c21d
root@Teltonika-RUTX09:~# ```

So the log shows that crond only executes the ping_reboot commands not the gsmctl ones.
Try a gsmctl -c >> /tmp/temp.txt instead of gsmctl -A … and check the log and the /tmp/temp.txt file as the command is simple syntax errors aren’t possible.

Will try this, I hope I have understood correctly. Thank you.

root@TRB500:~# logread | grep crond
Thu Nov 14 21:11:01 2024 cron.err crond[2499]: crond (busybox 1.34.1) started, log level 5
Thu Nov 14 21:11:02 2024 cron.err crond[2701]: crond (busybox 1.34.1) started, log level 5
Thu Nov 14 21:11:05 2024 cron.err crond[3192]: crond (busybox 1.34.1) started, log level 5
Thu Nov 14 21:15:00 2024 cron.err crond[3192]: USER root pid 5645 cmd /usr/sbin/gsmctl -A ‘AT+QNWLOCK=common/4g,3,1617,271,3350,271,3179,271’
Thu Nov 14 21:15:00 2024 cron.err crond[3192]: USER root pid 5646 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 21:15:00 2024 cron.err crond[3192]: USER root pid 5647 cmd /usr/sbin/ping_reboot.sh cfg02c21d
root@TRB500:~#

A vast amount of text comes back for the temp.txt file. Seems to show a whole boot up cycle - too much to post even within code brackets. Seems to show the same auto connected cells and not the 3 expected/desired.
Thanks.

After waiting a 5 minute period and this shows:


Thu Nov 14 21:20:00 2024 cron.err crond[3192]: USER root pid 6141 cmd /usr/sbin/gsmctl -A 'AT+QNWLOCK=common/4g,3,1617,271,3350,271,3179,271'
Thu Nov 14 21:20:00 2024 cron.err crond[3192]: USER root pid 6142 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 21:20:00 2024 cron.err crond[3192]: USER root pid 6143 cmd /usr/sbin/ping_reboot.sh cfg02c21d
Thu Nov 14 21:20:00 2024 user.notice ping_reboot.sh: Ping 151.101.128.81 successful.
Thu Nov 14 21:20:00 2024 user.notice ping_reboot.sh: Ping 8.8.8.8 successful.
Thu Nov 14 21:20:00 2024 user.notice ping_reboot.sh: Pings successful.
Thu Nov 14 21:20:00 2024 user.notice ping_reboot.sh: Pings successful.
Thu Nov 14 21:20:02 2024 daemon.info dnsmasq-dhcp[4674]: DHCPREQUEST(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:20:02 2024 daemon.info dnsmasq-dhcp[4674]: DHCPACK(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:21:02 2024 daemon.info dnsmasq-dhcp[4674]: DHCPREQUEST(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:21:02 2024 daemon.info dnsmasq-dhcp[4674]: DHCPACK(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:22:02 2024 daemon.info dnsmasq-dhcp[4674]: DHCPREQUEST(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:22:02 2024 daemon.info dnsmasq-dhcp[4674]: DHCPACK(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:23:03 2024 daemon.info dnsmasq-dhcp[4674]: DHCPREQUEST(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:23:03 2024 daemon.info dnsmasq-dhcp[4674]: DHCPACK(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:24:03 2024 daemon.info dnsmasq-dhcp[4674]: DHCPREQUEST(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:24:03 2024 daemon.info dnsmasq-dhcp[4674]: DHCPACK(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:25:00 2024 cron.err crond[3192]: USER root pid 6507 cmd /usr/sbin/gsmctl -A 'AT+QNWLOCK=common/4g,3,1617,271,3350,271,3179,271'
Thu Nov 14 21:25:00 2024 cron.err crond[3192]: USER root pid 6508 cmd /usr/sbin/ping_reboot.sh cfg01c21d
Thu Nov 14 21:25:00 2024 cron.err crond[3192]: USER root pid 6509 cmd /usr/sbin/ping_reboot.sh cfg02c21d
Thu Nov 14 21:25:00 2024 user.notice ping_reboot.sh: Ping 151.101.128.81 successful.
Thu Nov 14 21:25:00 2024 user.notice ping_reboot.sh: Ping 8.8.8.8 successful.
Thu Nov 14 21:25:00 2024 user.notice ping_reboot.sh: Pings successful.
Thu Nov 14 21:25:00 2024 user.notice ping_reboot.sh: Pings successful.
Thu Nov 14 21:25:03 2024 daemon.info dnsmasq-dhcp[4674]: DHCPREQUEST(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1
Thu Nov 14 21:25:03 2024 daemon.info dnsmasq-dhcp[4674]: DHCPACK(br-lan) 10.26.194.196 68:d7:9a:2f:4a:c1

Both gsmctl -c and gsmctl -A … work for me:

* * * * * /usr/sbin/gsmctl -A 'AT+QNWLOCK="common/4g",3,1617,271,3350,271,3179,271'

From the text log, I presume this means there was an error:
Thu Nov 14 22:36:00 2024 cron.err crond[3195]: USER root pid 5962 cmd /usr/sbin/gsmctl -A ‘AT+QNWLOCK=common/4g,3,1617,271,3350,271,3179,271’
I’m using a TRB500 with R00_07_10_2 firmware.
Thanks.

The log is misleading, the gsmctl command has been run successfully.

I noticed your command had the double quotes as did my original working commands outside of crontab (“common/4g”). The command now works but left the modem connection disconnected. Odd, I’l need to see how this goes. I had changed the time to 10 mins which will give the modem time to auto connect to the unwanted cells if there’s a problem.
Thank you so. much for your help (and patience).

So the modem connected to the desired cells so the command was working fine. 10 mins later the command was issued again which has caused the modem to disconnect then reconnect to the same cells. So I’m going to need a different plan that ideally would check which cells are connected first then change if not.

Hi JackEdward,

The command from @flebourse above worked and you’re right I had used the wrong quotes during trials. The issue I have now is trying to stop the modem going through a disconnect and reconnect process each time it’s issued which causes a 3 min outage of internet.

If I leave the TRB500 to auto it will pick up poor internet with the nearest stronger masts, if I lock it to this cell it could stay there for an hour or 10 but at some point it will revert to the nearby masts and I need to re-issue the commands.

I’m getting close to monitoring the cell now using MQTT following which I’ll send an ssh command to a script on the TRB to execute this command. It would be so much better if the TRB had the option to set a mast ‘priority order’ following a scan of neighbour cells.