# FX30 4g connection problem

**URL:** <https://forum.legato.io/t/fx30-4g-connection-problem/5986>\
**Category:** Uncategorized\
**Created:** [October 4, 2021, 7:59am UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986 "2021-10-04T07:59:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![angus.chao](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@angus.chao](https://forum.legato.io/u/angus.chao)\
**Post date:** [October 4, 2021, 7:59am UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/1 "2021-10-04T07:59:00Z")

</div>

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.

 ![connect fail](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/0/016435816fa91716fdc8bac1ec1eeef34a337fe7.png)  
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?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 4, 2021, 8:29am UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/2 "2021-10-04T08:29:36Z")

</div>

how about doing radio software reset?  
AT+CFUN=0  
AT+CFUN=1

---

<div class="post-metadata">

**Author:** ![angus.chao](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@angus.chao](https://forum.legato.io/u/angus.chao)\
**Post date:** [October 4, 2021, 12:32pm UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/3 "2021-10-04T12:32:17Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 4, 2021, 2:40pm UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/5 "2021-10-04T14:40:48Z")

</div>

You can send AT command inside legato app

> **[How to run shell script after boot](https://mangoh.discourse.group/t/how-to-run-shell-script-after-boot/9278/14)**
>
> you can see this document on how to send AT command in unsandboxed legato application: Sending AT command in Legato application.docx (215.2 KB)

---

<div class="post-metadata">

**Author:** ![angus.chao](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@angus.chao](https://forum.legato.io/u/angus.chao)\
**Post date:** [October 13, 2021, 8:37am UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/6 "2021-10-13T08:37:46Z")

</div>

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  
AT+CFUN=0  
the above work as expected network was down.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 13, 2021, 8:55am UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/7 "2021-10-13T08:55:54Z")

</div>

how about using this?

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

---

<div class="post-metadata">

**Author:** ![angus.chao](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@angus.chao](https://forum.legato.io/u/angus.chao)\
**Post date:** [October 13, 2021, 9:04am UTC](https://forum.legato.io/t/fx30-4g-connection-problem/5986/8 "2021-10-13T09:04:59Z")

</div>

yep, it’s working. Thank you very much
