# FX30S not reconnecting to the network after removing and re-attaching antenna

**URL:** <https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174>\
**Category:** Legato Application Framework\
**Created:** [April 11, 2022, 9:31am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174 "2022-04-11T09:31:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 11, 2022, 9:31am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/1 "2022-04-11T09:31:12Z")

</div>

Hi all,

We have a customer in New Zeland that when he removes and attach the antenna on the modem, the modem wont reconnect to the network, the modem need to be rebooted to reconnect otherwise he has to wait a lot , we estimated like 10 to 15 minutes sometimes even more.

While debugging i’ve found that when removing the antenna the data connection state handler wont be notified real time.

Also when before the antenna get removed the signal quality is high , after removing and attaching the antenna we get very weak signal the radio state goes to LE\_MRC\_REG\_SEARCHING  
and, as i said before, we have to wait like 10 to 15 minutes or even more to get the modem reconnected to network.

I think this is an odd behavior for the modem and its a problem for us , because if i restart the modem it will reconnect right away, and we need the modem to be able to reconnect when we remove the antenna and attach it again.

We are on R14.1.1 , we updated from R11 which had the same problem and we thougth that R14.1.1 would resolve the issue

Do you have any suggestion?

---

<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:** [April 11, 2022, 11:39am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/2 "2022-04-11T11:39:53Z")

</div>

To isolate if this is legato problem, you can try at+cgreg=2 to see if there is any +cgreg unsolicited message after 15 mins  
Also to totally remove signal, you need to put module into shielding box

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 11, 2022, 3:18pm UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/3 "2022-04-11T15:18:14Z")

</div>

But at+cgreg=2 is for GPRS network registration status as the FX30S AT command manual states…  
Shouldn’t i use CREG instead?

Also if i need to put the modem into a shielding boxt to completely remove signal, this means that the signal quality is not real?

Thanks

---

<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:** [April 11, 2022, 4:19pm UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/4 "2022-04-11T16:19:47Z")

</div>

you can use both +CREG or +CGREG

if you don’t put in shielding box, it might still register network

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 11, 2022, 4:32pm UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/5 "2022-04-11T16:32:05Z")

</div>

Ok, what should output the at+cgreg=2 command if the problem is not related to legato?

---

<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:** [April 11, 2022, 4:33pm UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/6 "2022-04-11T16:33:22Z")

</div>

you will see unsolicited message +CGREG:2 together with the data connection state handler saying disconnect

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 11, 2022, 7:37pm UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/7 "2022-04-11T19:37:48Z")

</div>

we did some testing , removing and plugging the antenna a few times  
this is the result , in the end the modem hang up in LE\_MRC\_REG\_SEARCHING and the last report from +crreg is :  
+CREG: 3

+CGREG: 3

Does this mean this is a legato problem?

below the full log

at+cgreg=2  
OK

+CREG: 1,“FFFE”,“4949579”,7

+CGREG: 1,“FFFE”,“4949579”,7

+CREG: 2

+CGREG: 2

+CREG: 1,“FFFE”,“494216F”,7

+CGREG: 1,“FFFE”,“494216F”,7

+CREG: 2

+CGREG: 2

+CREG: 0

+CGREG: 0

+CREG: 2

+CGREG: 2

+CREG: 1,“FFFE”,“494216F”,7

+CGREG: 1,“FFFE”,“494216F”,7

+CREG: 2

+CGREG: 2

+CREG: 0

+CGREG: 0

+CREG: 2

+CGREG: 2

+CREG: 3

+CGREG: 3

thanks

---

<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:** [April 12, 2022, 1:06am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/8 "2022-04-12T01:06:15Z")

</div>

When +CGREG: 2 comes, does it show LE\_MRC\_REG\_SEARCHING?

---

<div class="post-metadata">

**Author:** ![billzhou](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@billzhou](https://forum.legato.io/u/billzhou)\
**Post date:** [April 12, 2022, 1:17am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/9 "2022-04-12T01:17:08Z")

</div>

I feel this is a radio firmware issue - I have attached a test build of Release 14 which has fixed a similar issue for me. It’s too big to attach, and you can download from [here](https://m2mconnectivity-my.sharepoint.com/:u:/g/personal/bill_zhou_m2mconnectivity_com_au/EcsJlfh0dstFk7PlYS4lZlcBAxPSCTjILbofuaqQ1Ocnng?e=EprHMV).

You can still reuse your application built for R14 which should be compatible.

If you have more concern about managing the network attachment, there is an off the shelf free connManager comes with [PyRTE](https://m2mconnectivity.com.au/m2m-fx30-pyrte-python-solution/)

connManager Config Usage:  
_e.g.: config set /apps/connManager/app/noRxDataTimeout_  
_noRegTimeout Specify timeout in seconds before reset radio for no registration, default 60_  
_maxRadioRetry Specify max times of retry of reset of radio without registration, default 3_  
_noRxDataTimeout Specify timeout in seconds before reboot for no receiveing traffic, default 900_

Hope it helps.

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 12, 2022, 7:01am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/10 "2022-04-12T07:01:32Z")

</div>

Hi @billzhou may i ask what did you modify on this firmware?

@jyijyi im going to test and report back

thanks

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 12, 2022, 8:16am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/11 "2022-04-12T08:16:23Z")

</div>

@jyijyi yes when cgreg: 2 comes it shows LE\_MRC\_REG\_SEARCHING

---

<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:** [April 12, 2022, 8:24am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/12 "2022-04-12T08:24:13Z")

</div>

then legato is in sync with the AT command response, probably not the legato issue, and when you receive +CGREG:2 , that means the module is still trying to reconnect to the network

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 12, 2022, 8:32am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/13 "2022-04-12T08:32:43Z")

</div>

Ok, but why does the modem connect almost instantly if rebooted? Why this does not happen when the modem lose the connection?

Is there any way of menaging the network more efficiently? Like @billzhou wrote about a connManeger that menages noRegTimeout, maxRadioRetry, noRxDataTimeout. I would like to menages this options myself in my app

Thanks

---

<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:** [April 12, 2022, 8:55am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/14 "2022-04-12T08:55:35Z")

</div>

how about restarting the modem by AT+CFUN=0 and AT+CFUN=1?  
Can it register network immediately?

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 12, 2022, 9:35am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/15 "2022-04-12T09:35:13Z")

</div>

the modem by default has cfun=1 , setting to cfun=0 the modem disconnect and reconnect to network , rebooting made the cfun go back to 1

---

<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:** [April 12, 2022, 9:40am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/16 "2022-04-12T09:40:02Z")

</div>

can it be a workaround for you by restarting the telecom stack by AT+CFUN?

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 12, 2022, 9:43am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/17 "2022-04-12T09:43:06Z")

</div>

> [@jyijyi](#):
>
> AT+CFUN?

Do you mean that the at command “at+cfun?” should restart the telecom stack?

---

<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:** [April 12, 2022, 9:45am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/18 "2022-04-12T09:45:32Z")

</div>

yes, that is the function of AT+CFUN

---

<div class="post-metadata">

**Author:** ![billzhou](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@billzhou](https://forum.legato.io/u/billzhou)\
**Post date:** [April 12, 2022, 11:31pm UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/19 "2022-04-12T23:31:05Z")

</div>

The firmware includes a fix of dropping out from CAT M1 network. It can be the direct trigger of _LE\_MRC\_REG\_SEARCHING_ which is trying to register to the network option next to CAT M1. For FX30S with WP7702, the next option is 2G, and if you are using a SIM which doesn’t support 2G(e.g. Spark in NZ), it will take some time to timeout before switch back to CAT M1.

Well, this is all theory - your testing result shall verify it!

---

<div class="post-metadata">

**Author:** ![gianpaolo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/gianpaolo/32/1482_2.png) [@gianpaolo](https://forum.legato.io/u/gianpaolo)\
**Post date:** [April 13, 2022, 9:40am UTC](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174/20 "2022-04-13T09:40:45Z")

</div>

@billzhou  
If its not a problem for you i would like to have the source code of this fix and acually know if you modified the framework or the kernel

[Next page](https://forum.legato.io/t/fx30s-not-reconnecting-to-the-network-after-removing-and-re-attaching-antenna/6174.md?page=2)
