GPRSBee don't want to connect, stuck at AT+CGATT=1

Dear forum guys.
Recently I received my Mbili with a GPRSbee, and I stuck on a very beginning…
I tried a synchronization of RTC example, and my Bee just don’t wont to connect.
When I uncomment the debugging line I receive this outputs on a serial monitor :

on powerPin>> ATAT
OK>> ATE0ATE0
OK>> AT+CSQ
RDY
+CFUN: 1
+CSQ: 0,0
OK>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK
+CPIN: READY>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK
Call Ready>> AT
OK>> AT+CSQ
+CSQ: 0,0
OK
SMS Ready>> AT
OK>> AT+CSQ
+CSQ: 27,0
OK>> AT+CREG?
+CREG: 0,2
OK>> AT
OK>> AT+CREG?
+CREG: 0,2
OK>> AT
OK>> AT+CREG?
+CREG: 0,2
OK>> AT
OK>> AT+CREG?
+CREG: 0,1
OK>> AT+CGATT=1
ERROR

After this, I tried a code for SMS sending and the GPRSBee are sending a SMS correctly.
Of course, I did double check my APN parameters, and everything seems to be OK. I find on some forums that a delay should be used to let the GPRS modul to connect. I tried to insert a delay of 10000 after every command (power on, starting of a connection) but didn’t help :frowning:
Can you give me some clue?

Paolo

I believe you have an older version of the library. The older model based on the Sim900 required the CGATT command as part of the sequence. However, with the Sim800 it throws an error. The library was updated a while ago to support both modules.

Please can you try installing the latest version via the Arduino library manager.

If you are not yet familiar with it, there is a useful guide here:
https://www.arduino.cc/en/Guide/Libraries#toc3

Dear Gabriel,
thanks for the quick replay, and a solution. I didn’t knew for this feature, and in the past I added libraries by copying the .h file in the libraries sub folder of Arduino folder. For some other with similar problem, if you added a libraries like I did (copying the .h file in the Arduino folder), and you wont to add a libraries like Gabriel said, first you have to delete the libraries previously copied in Arduino folder, then add by “Manage Libraries”.

Best regard, Paolo