At + cgatt error

at + cgatt error

AT+CGATT AT command is used to attach or detach the device to packet domain service. Usage. Command, Possible Response(s). +CGATT=[] OK ERROR. +CGATT? Please find attached the code and the error from serial monitor. num=var.length(); le=String(num); for(int i = 0;i<7;i++) { mySerial.println("AT+CGATT? If I do a #CONNECTIONSTART too soon, I get a #CME ERROR. I would recommend using the unsolicited responses from the modem. You can set the following: AT+WIND=8. at + cgatt error

At + cgatt error - necessary words

In order to make my dialog with the modem bulletproof, I would like to query for the 'attached' state after I do a AT+CGATT=1 and before I do an AT#CONNECTIONSTART. If I do a #CONNECTIONSTART too soon, I get a #CME ERROR.

I would recommend using the unsolicited responses from the modem.

You can set the following:

AT+WIND=8
AT+CGREG=1
AT&W

When you turn the unit on you should receive a +WIND: 4 response. This response means that the modem is ready to process all AT commands.

Then after you get a +WIND: 4, you can do an AT+CGATT=1 to do an attach. You should get a response similar to the below:

OK
+CGREG: 2
+CGREG: 1 ( or 5 )


If you want to check and make sure that the attach went through, and you are registered on the GPRS network, send 'AT+CGATT?' and it should return "+CGATT: 1" if it is attached. If not, then it will return "+CGATT: 0". Then you can also send 'AT+CGREG?' to check the GPRS registration. You should receive "+CGREG: 1,1" or "+CGREG: 1,5" which should mean that you are registered.

Once the modem is attached and you know that the GPRS registration status is good, that normally means that the modem should be ready for the #CONNECTIONSTART command.



AT Command

Description

AT+CGATT AT command is used to attach or detach the device to packet domain service.

Usage
CommandPossible Response(s)
+CGATT=[]OK ERROR
+CGATT?+CGATT:
+CGATT=?+CGATT: (list of supporteds)

Examples

Check the status of Packet service attach. '0' implies device is not attached and '1' implies device is attached.
AT+CGATT?
+CGATT:0
OK

Perform a GPRS Attach. The device should be attached to the GPRS network before a PDP context can be established
AT+CGATT=1
OK

Perform a GPRS Detach. This is ensure that that the device doesn't lock up any netwrok resources.
AT+CGATT=0
OK

KeywordsAT+CGATT syntax, examples, parameters, error, input, response.

Once the device is registered with the network, the device attaches to it automatically in most cases. Only when the device is sucessfully attached to the network, data call successfully established.

With Online AT Command Tester tool, you can test the network attach with the AT+CGATT command in many ways. In the ‘diagostics’ tab get the device attach status,

Users can also test the AT+CGATT command under the ‘Command Mode’ tab of the AT Command Tester.
AT+CGATT?
+CGATT: 1
OK

AT+CGATT=0
OK

AT+CGATT=1
OK

AT+CGATT=?
+CGATT: (0,1)
OK

You can send batch of AT commands including the AT+CGATT command in the ‘Script Mode’ tab



Try this script included in AT Command Tester Tool.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Script-at_cgatt.at

//Test AT+CGATT AT command

//AT+CGATT command is used to attach or detach to packet domain service

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//List of supported responses

//Supported states are 0- Detached, 1 - Attached

AT+CGATT=?

//WAIT for 1 sec

WAIT=1

//Get the current state

AT+CGATT?

//WAIT for 1 sec

WAIT=1

//Detach from network

AT+CGATT=0

//WAIT for 1 sec

WAIT=2

//Check if detached from network

AT+CGATT?

//WAIT for 1 sec

WAIT=1

//Attach to network

AT+CGATT=1

//WAIT for 1 sec

WAIT=2

//Check if attached to network

AT+CGATT?

//WAIT for 1 sec

WAIT=1


Output of above script in AT Command Tester Tool.

AT+CGATT=?

+CGATT: (0,1)

OK

AT+CGATT?

+CGATT: 1

OK

Device is attached to the network

AT+CGATT=0

OK

AT+CGATT?

+CGATT: 0

OK

Device is NOT attached to the network

AT+CGATT=1

OK

AT+CGATT?

+CGATT: 1

OK

Device is attached to the network


ELS61-E +CME ERROR: 148 after CGATT=1

SODAQ Forum

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

Arduino Forum

Situation: SIM without data roaming.
Question: What is the most elegant way to check the data roaming status?
Log:
Modem is CREGed:
16:16:29.657 -> AT+CREG?
16:16:29.657 -> +CREG: 0,5
Modem is GPRS attached:
16:22:28.126 -> AT+CGATT?
16:22:28.126 -> +CGATT: 1
I can set the arguments:
16:15:55.148 -> AT+CGATT=1
16:15:55.148 -> OK
16:15:55.337 -> AT+UPSD=0,1,"gprs.swisscom.ch"
16:15:55.337 -> OK
16:15:55.554 -> AT+UPSD=0,6,3
16:15:55.554 -> OK
16:15:55.734 -> AT+UPSD=0,2,""
16:15:55.734 -> OK
16:15:55.939 -> AT+UPSD=0,3,""
16:15:55.939 -> OK
16:15:56.155 -> AT+UPSD=0,7,"0.0.0.0"
16:15:56.155 -> OK
I can not activate the context nor create a socket (as expected):
16:15:56.342 -> AT+UPSDA=0,3
16:16:02.142 -> ERROR
16:16:02.240 -> AT+USOCR=6
16:16:02.240 -> ERROR

Conclusion: I can register into the network, can attach gprs (due to the modems answer). I expected that the gprs attach attempt is rejected but it's not?!?

Is there a AT command to check the international data roaming status or do i have to try to open a socket or check for DNS like
16:21:18.330 -> AT+UDNS?
16:21:18.330 -> ERROR
and when the answer is ERROR then there is no roaming?
There must be a more elegant way?!?
Thx

SIM900 AT+CGATT=1 returns ERROR sometimes and keep giving continiously

Joined
Apr 17, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
Hi experts,
I'm using SIM900 with Atmega64 for communication at + cgatt error a server over GPRS.
My code was working fine for some time.
But I changed the SIM cme error 258 fix and run the code.

When attaching GPRS, (AT+CGATT=1) some times it returns error. sometimes it works fine. But when the ERROR started it remains giving "ERROR" even if I restart the modem, program or any thing.
After reprogram the micro controller sometimes it works fine.
And when I enter same commands to SIM900 using serial port of computer(from microIDE) it worked fine every time
I can't figure it out.
Pls help.
Thanks in advance
BR
SAM

Arduino Forum

Situation: SIM without data roaming.
Question: What is the most elegant way to check the data roaming status?
Log:
Modem is CREGed:
16:16:29.657 -> AT+CREG?
16:16:29.657 -> +CREG: 0,5
Modem is GPRS attached:
16:22:28.126 -> AT+CGATT?
16:22:28.126 -> +CGATT: 1
I can set the arguments:
at + cgatt error -> AT+CGATT=1
16:15:55.148 -> OK
16:15:55.337 -> AT+UPSD=0,1,"gprs.swisscom.ch"
16:15:55.337 -> OK
16:15:55.554 -> AT+UPSD=0,6,3
16:15:55.554 -> OK
16:15:55.734 -> AT+UPSD=0,2,""
16:15:55.734 -> OK
16:15:55.939 -> AT+UPSD=0,3,""
16:15:55.939 -> OK
16:15:56.155 -> AT+UPSD=0,7,"0.0.0.0"
16:15:56.155 -> OK
I can not activate the context nor create a socket (as expected):
16:15:56.342 -> At + cgatt error 16:16:02.142 -> ERROR
16:16:02.240 -> AT+USOCR=6
16:16:02.240 -> ERROR

Conclusion: I can register into the network, can attach gprs (due to the modems answer). I expected that the gprs attach attempt is rejected but it's not?!?

Is there a AT command to check the international data roaming status or do i have to try to open a socket or check for DNS like
16:21:18.330 -> AT+UDNS?
16:21:18.330 -> ERROR
and when the answer is ERROR then there is no roaming?
There must be a more elegant way?!?
Thx



AT Command

Description

AT+CGATT AT command is used to attach or detach the device to packet domain service.

Usage
CommandPossible Response(s)
+CGATT=[]OK ERROR
+CGATT?+CGATT:
+CGATT=?+CGATT: (list of supporteds)

Examples

Check the status of Packet service attach. '0' implies device is not attached and '1' implies device is attached.
AT+CGATT?
+CGATT:0
OK

Perform a GPRS Attach. The device should be attached to the GPRS network before a PDP context can be established
AT+CGATT=1
OK

Perform a GPRS Detach. This is ensure that that the device doesn't lock up any netwrok resources.
AT+CGATT=0
OK

KeywordsAT+CGATT syntax, at + cgatt error, examples, parameters, error, input, response.

Once the device is registered with the network, the device attaches to it automatically in most cases. Only when the device is sucessfully attached to the network, data call successfully established.

With Online AT Command Tester tool, you can test the network attach with the AT+CGATT command in many ways, at + cgatt error. In the ‘diagostics’ tab get the device attach status,

Users can also test the AT+CGATT command under the ‘Command Mode’ tab of the AT Command Tester.
AT+CGATT?
+CGATT: 1
OK

AT+CGATT=0
OK

AT+CGATT=1
OK

AT+CGATT=?
+CGATT: (0,1)
OK

You can send batch of AT commands including the AT+CGATT command in the ‘Script Mode’ tab



Try this script included in AT Command Tester Tool.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Script-at_cgatt.at

//Test AT+CGATT AT command

//AT+CGATT command is used to attach or detach to packet domain service

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//List of supported responses

//Supported states are 0- Detached, 1 - Attached

AT+CGATT=?

//WAIT for 1 sec

WAIT=1

//Get the current state

AT+CGATT?

//WAIT for 1 sec

WAIT=1

//Detach from network

AT+CGATT=0

//WAIT for 1 sec

WAIT=2

//Check if detached from network

AT+CGATT?

//WAIT for 1 sec

WAIT=1

//Attach to network

AT+CGATT=1

//WAIT for pg real estate server error sec

WAIT=2

//Check if attached to network

AT+CGATT?

//WAIT for 1 sec

WAIT=1


Output of above script in AT Command Tester Tool.

AT+CGATT=?

+CGATT: (0,1)

OK

AT+CGATT?

+CGATT: 1

OK

Device is attached to the network

AT+CGATT=0

OK

AT+CGATT?

+CGATT: 0

OK

Device is NOT attached to the network

AT+CGATT=1

OK

AT+CGATT?

+CGATT: 1

OK

Device is attached to the network


SODAQ Forum

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 enter char[1] packet error (power on, starting of a connection) but didn’t help :frowning:
Can you give me some clue?

Paolo

ELS61-E +CME ERROR: 148 after CGATT=1 Thales IoT Developer Community

Hi,

AT+CEREG? +CEREG: 0,0 means that you are not connected to a LTE network.
AT+CGREG? +CGREG: 0,4 means that you may be outside of packet network coverage.
AT+CREG?   +CREG: 0,1 means that you are connected to basic network.

If you write AT+CEREG=2, AT+CGREG=2, AT+CREG=2 in the initialisation, you will get more information like: AT+CEREG? +CEREG: 2,1,"0FBE","02307715",7 which shows the base station, cell and radio access technology. 7=LTE, at + cgatt error, 0=GSM.

What is the signal strength?, try AT+CSQ and AT^SMONI. The latter shows the network, too:
at^smoni ^SMONI: 4G,1300,3,20,20,FDD,244,91,0FBE,2307715,247,--,-87,-12.5,CONN.
If the "CONN" is "LIMSRV", your subscription may not support all services like GPRS.
at+cops? shows the operator and technology like +COPS: 0,0,"FI SONERA",7,*

If you want to see the error messages in text form, at + cgatt error, use AT+CMEE=2

+CME ERROR 148  will show +CME ERROR: unspecified GPRS error

Best regards,
Antero Markkula

Thematic video

不妙!芯片需求疲软,意味着什么?TSLA新动向!AMC怎么看?巴菲特减持比亚迪?SP500、原油、黄金、BYDDY、TSLA、SOXL、QCOM、TSM、NIO、MULN、AMC、NFLX

0 Comments

Leave a Comment