0

FONA 808 AT+CREG 0,0
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

FONA 808 AT+CREG 0,0

by jpuigdef on Sat Jan 19, 2019 7:37 pm

Hi, I have a Fona 808 breakout with which I want to post data to a web via GPRS. It is connected to an arduino pro mini that switches the fona on and off to save power with the Key pin. It commonly works fine but I have sometimes foud that, when searching for registration and checking this with fona.getNetworkStatus(), the answer to AT+CREG is 0,0, When this happens the fona keeps answering 0,0 unless it is restarted by disconnecting the battery. What may be the reason for this 0,0? It never noticed it with fonas on Arduino uno with the same SIMS (Things mobile). Is there a way to restart the fona from the arduino like disconnecting the battery? I tried with RST, but I'm not shure if it solves hte problem...

thanks
joan

jpuigdef
 
Posts: 26
Joined: Thu May 18, 2017 2:35 pm

Re: FONA 808 AT+CREG 0,0

by adafruit_support_mike on Sun Jan 20, 2019 1:40 am

The 0,0 result code meanss the FONA doesn't have a connection and isn't trying to make a new connection.

Are you using the ATZ commend when you do a reset?

adafruit_support_mike
 
Posts: 57856
Joined: Thu Feb 11, 2010 2:51 pm

Re: FONA 808 AT+CREG 0,0

by jpuigdef on Sun Jan 20, 2019 11:51 am

Thanks Mike! No, I was trying only with the fona rst pin. I now will try with this (is it ok, are'nt they redundant?):

digitalWrite(FONA_RST,LOW);
delay(100);
digitalWrite(FONA_RST,HIGH);
delay(1000);

fona.println("ATZ");
delay(10000);

The fact is that I do not fully understand the differences between

-switching te fona on/off with the key pin
-resetting the fona with the rst pin
-sending ATZ
-unplugging and plugging again the battery (the arduino pro mini is fed by the bat pin of the fona)
-unplugging and plugging again the USB cable to the arduino

jpuigdef
 
Posts: 26
Joined: Thu May 18, 2017 2:35 pm

Re: FONA 808 AT+CREG 0,0

by adafruit_support_mike on Mon Jan 21, 2019 4:24 am

Pulling the reset pin low forces the FONA to return to stop whatever it's doing and return to a known default state. That doesn't necessarily change its settings though.

Sending the FONA an ATZ command forces it to drop back to a known configuration. That doesn't necessarily work if the FONA is hung up in a way that keeps it from reading new commands though, so doing a reset and then sending ATZ is a reasonable thing to do. The reset make sure the FONA is ready to accept input, the ATZ takes the FONA back to the default configuration.

Shutting the FONA off with the KEY pin is more drastic. It should make the FONA stop whatever it's doing and reboot into a known state, but it does leave power connected while the FONA is shut off. There are some pieces of memory that save information so the FONA can reboot faster, and if those are holding a wrong value, a problem can persist across shutting off and turning on again.

Disconnecting power completely is the most drastic version. That gets rid of any information that was stored in the FONA, and the only prior information that should still exist is data stored on the SIM card. The distinction between battery and USB cable is kind of unclear, because either one can provide some power while the other is disconnected. Disconnecting both is the only way to be really sure.

adafruit_support_mike
 
Posts: 57856
Joined: Thu Feb 11, 2010 2:51 pm

Re: FONA 808 AT+CREG 0,0

by jpuigdef on Mon Jan 21, 2019 5:45 am

Thanks Mike, your explanations are very helpful. I have tested the sequence RST pin + ATZ and it seems to work. The failure was apparently caused by a failed HTTP_POST, which I suspect left wrong information somewhere in the fona. The sequence RST+ATZ sets the fona ready to successfully send the next message.

thanks

jpuigdef
 
Posts: 26
Joined: Thu May 18, 2017 2:35 pm

Re: FONA 808 AT+CREG 0,0

by adafruit_support_mike on Tue Jan 22, 2019 5:17 am

Glad to hear you got things working. Happy hacking!

adafruit_support_mike
 
Posts: 57856
Joined: Thu Feb 11, 2010 2:51 pm

Re: FONA 808 AT+CREG 0,0

by jpuigdef on Wed Jul 03, 2019 1:34 pm

Hi, Again I have some issues with the AT+CREG 0,0.

It means that the fona is not connected to a network and it is not searching for a connection. How can this happen? in the following log the fona starts searching and then stops without an apparent reason. Is this a SIM -network operator related failure?

thanks

comprovant xarxa

---> AT+CREG?

<--- +CREG: 0,2

cerco xarxa CREG / num :2/1

---> AT+CREG?

<--- +CREG: 0,2

cerco xarxa CREG / num :2/2

---> AT+CREG?

<--- +CREG: 0,0

jpuigdef
 
Posts: 26
Joined: Thu May 18, 2017 2:35 pm

Re: FONA 808 AT+CREG 0,0

by adafruit_support_mike on Thu Jul 04, 2019 1:32 am

The return code +CREG: 0,2 means the FONA is looking for a network but hasn't registered yet. Your output shows a couple of those before dropping to +CREG: 0,0, which probably means the FONA can't find a signal from a cell tower.

Double-check your antenna connection and the signal strength in your area.

adafruit_support_mike
 
Posts: 57856
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.