Hi Andzej,
Apologies but I am so rusty at Unix (1987) so long ago!
Crontab entry didn't work fully, sim 1 switch to sim 2 but did not switch back.
How to process/edit/implement your suggestions below?
#!/bin/sh
SIM1='1'
SIM2='0'
# Check if SIM1 is currently the primary SIM
IS_SIM1=$(uci get simcard.@sim[0].primary)
if [ "$IS_SIM1" = "$SIM1" ]; then
# SIM1 is currently primary, switch to SIM2
uci set simcard.@sim[0].primary="$SIM2"
uci set simcard.@sim[1].primary="$SIM1"
else
# SIM2 is currently primary, switch to SIM1
uci set simcard.@sim[0].primary="$SIM1"
uci set simcard.@sim[1].primary="$SIM2"
fi
uci commit
logger 'SIM swap triggered.'
ubus call sim change
/etc/init.d/mobifd reload