Q2501B reboot after CGATT


Hi all !

The behaviour of my Q2501B is strange according to the information i’ve read about it. And this lead all my work to be unusable !!!

Here is the problem :

After a ADL_SIM_STATE_FULL_INIT, i launch a timer with a 2 seconds cycle. This timer send the AT+CGATT=1 command, to attach to the GPRS network. My problem is that the modem quite always reboot after this command !!
I dont receive any error and as the reboot append very quickly after the CGATT command (1, max 2 secondes), it cant be the watchdog timer. It is not the GPRS signal level, because i test it before sending CGATT command. And this problem seems to be worst on target application than in remote application as in remote mode reboots happends sometimes, but not too often…

This problem happend sometimes too, right after the OK response of ed_DialupConnectionStart function or the OK response of the ed_SendDataExt function.

So, as the first thing that my modem have to do is to connect to TCP server and then to transmit data to it, my application become unusable… it’s always rebooting !!! The best i can hope is to send 4 or 5 TCP frames before a reboot…

It is strange to me cause there arent any errors that lead to this and my application works quite well in remote mode.

Have you any idea about why this append or how i can find the reason of this behaviour ???

My modem firmware is 6.52 and i use OpenAt 3.04 with adl and ed librairies.

Thanks a lot !!


Hello colin-tfe,

I don’t know the exact cause of the reboots, i think practically your solution should be good but you must think a little bit in Open AT style. :slight_smile:
Maybe the OS is still processing your attach command and you issue it again in 2 seconds, and the OS is not prepared for that. And you should not waste your resources running the 2 second timer all the time.
It is recommended to wait and evaluate the command answer!

Do this way:

  1. After ADL_SIM_STATE_FULL_INIT launch a non-cyclic timer with x (5) seconds.
  2. When the timer expired issue the AT+CGATT
  3. Check the answer for attach if OK start your GPRS session (no more attach command), if error go to step 1.

Best Regards,



Thank you tom !

But what u propose to me is the first solution i had… I used a non cycle 10 secondes timer after ADL_SIM_FULL_INIT_STATE to launch AT+CGATT command, but the result is exactly the same… sometimes it attaches sometimes it reboot. And i have absolutly no clue about what the problem is, as there is no error…

I tried to launch the AT+WAC command too with a timer if AT+CGATT doesnt attach within 2 or 3 secondes (i even tried less) but without result.

I tried quite all kind of temporisation for the different connection states, but there is no change. I noticed only one thing , after ADL_GPRS_EVENT_ME_ATTACH (when the attachment works) if i use a timer to call ed_Init() function (i tried with a very short 100 ms timer), it will lead the ed_DialupConnectionStart() function to a ED_ERR_NETWORK_KO… but without timer it works perfectly…

Well, any others ideas ? Am i the only one who have/had this problem ? And if it was the watchdog timer, even if i dont think it is, what could i do to avoid it (i mean, i cant modify the time that the CGATT command takes…) ?


Hello colin,

It could be power supply problem, but i presume you already checked that. Did you?

Yuo can use ed_init() function when your modul start and you can evaulate the return value instantly. (is IP enabled?, …)

You shoudn’t use WAC command after CGATT, just wait for the command answer, the CGATT must not cause a reboot…

And if you post your code, maybe somebody could give you more advice.

Best Regards,



Hi tom !

I think it was power supply problem ! The current limit of my power supply was too low… Hope it really was only that…

Well, thank you for your support and have a nice day !