FX30 4g connection problem

I made an application that read modbus RS485(using RENFELL RS485 2W) and send to server by MQTT. Everything work fine and after running continuously about 3 or 4 weeks(sometime over a month), it disconnected and found my application was try to reconnect but it fail. And stop my application and try to use cm data connect in terminal. but didn’t work at all.

But after restart device, everything work fine as normal.
But at develop time, I had tested that took off antenna and put it back to reconnect 4g LTE and didn’t have a problem. It was work as expected. And this is fourth time happen. Any suggestion to cover that problem?

how about doing radio software reset?

Thanks for your suggest. I try it next time happen. But how can I automate to reset radio software by AT command in my c program?

You can send AT command inside legato app

I’d tried
system("echo -ne \"AT+CFUN=0\" > /dev/ttyAT ");
but doesn’t happen expected to down radio software.
In terminal, i use
microcom /dev/ttyAT
the above work as expected network was down.

how about using this?

system("echo -ne \"AT+CFUN=0\\\\xd\\\\xa\" > /dev/ttyAT ");

yep, it’s working. Thank you very much