[Solved] Qualcome LTE 4G modem auto reboot (WE3826) socat or echosoc

I have a router WE3826 (releases/22.03.0/targets/ramips/mt7620/).
Finally i have found command for rebooting router but i cant make it work from cron
when i use socat from commnd line it works fine

socat - /dev/ttyUSB3,crnl
AT+CFUN=1,1
OK
root@OpenWrt:~#

But i cant get it working via cron
Ive tried using echo

how to make a command for cron ?

I can't test it but have you tried something like this?

echo "AT+CFUN=1,1" | socat - /dev/ttyUSB3,crnl

or

echo -e "AT+CFUN=1,1\r" > /dev/ttyUSB3
1 Like

Thanks all works now!
I actually tried this
echo -e AT+CFUN=1,1 | socat - /dev/ttyUSB3,crnl
but as u can see i didnt put in in "" :slight_smile:

Now it is
*/10 * * * * echo "AT+CFUN=1,1" | socat - /dev/ttyUSB3,crnl
in cron
`

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.