Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with completing the AT+CIICR command in SIM340Z GPRS

Status
Not open for further replies.

Derek_Fairbairn

Newbie level 3
Joined
Sep 2, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Perth Australia
Activity points
1,324
Hi,

I've been having a problem with the SimCom modem taking a long time to complete the AT+CIICR command.

This only appears to happen when the GSM signal level is marginal. (The AT+CSQ value is around 10). If the signal goes higher then it succeeds and if the signal goes lower it fails. However at this level it appears to take forever to complete.


These are the commands that were sent:

>AT+CSQ

+CSQ: 10,2

OK

>AT+CIPSTATUS
STATE: IP CLOSE

OK

>AT+CIPSHUT

SHUT OK

>AT+CIPSTATUS

OK

STATE: IP INITIAL

>AT+CIPSPRT=1

OK

>AT+CDNSORIP=0

OK

>AT+CIPSRIP=1

OK

>AT+CIPHEAD=1

OK

>AT+CGDCONT=1,"IP","internet"

OK

>AT+CSTT="internet","",""]

OK

>AT+CDNSCFG="208.67.222.222",""

OK

>AT+CIICR
+PDP: DEACT

+PDP: DEACT

+CREG: 0

+CGREG: 0

+CREG: 2

+CREG: 1

+CGREG: 1

+CREG: 0

+CGREG: 0

+CREG: 2

+CREG: 1

+CGREG: 1

+CREG: 0

+CGREG: 0

+CREG: 2

+CREG: 0

+CREG: 2

+CREG: 0

+CREG: 2

+CREG: 0

+CREG: 2

+CREG: 0

After 10 minutes there is still no OK or ERROR response for the AT+CIICR so my application times out.

I don't know how to deal with this situation. If it returns an ERROR then I could attempt a new connection. However it doesn't return anything apart from the +CREG and +CGREG URC events. I'm not sure if I should continue sending more AT commands when the AT+CIICR command hasn't finished.
Is there some way to interrupt the AT+CIICR command and start again?

Is there anything wrong with the commands that I am using?
Or is this a SIM340 or hardware fault?

99% of the time I can send/receive GPRS data normally, its just every now and again this happens.
 

sim340 startup problem

As you've discovered, GPRS communications requires that you have a good signal level. I've seen it take a couple of minutes for the CIICR to return a status, but 10 minutes seems excessive. You can't abort the command once it's started. The best you can do is turn off the module and restart.
 
at+ciicr

Hi,

CREG: 2 means that the module is searching for the network
CREG:0 its not registered with the network and also it's not searching
CREG:1 means that the module is registered with the operator network


One thing u could always do is check AT+CREG? before sending the AT+CIICR and if CREG: 1 then only fire the AT+CIICR command

Also, when ur modem is hangged with AT+CIICR, u can fire AT+CIPSHUT to interrupt it and to close the gprs context and bring back the modem to normal working condition. I've checked it , it works on my side.. i hope u can check it and it works to u as well..


Surya
 
sim340z send data ip

Thanks for your responses.

I've modified the way my application works so that it will check that CREG: 1 before it attempts to send any data. This stops it attempting AT+CIICR when the GSM isn't good enough, and prevents it from locking up.

Also if it takes longer than 1 minute to respond I reboot the modem using the power key. I figured it was safer to reboot the GSM to get it back to a known state, instead of trying to interrupt it using AT commands.

As a side note, I found a fault in some of my hardware that was either causing this problem or making it worse.
I have one batch of hardware that can send GPRS at low signal levels - when RSSI is 4 or 5 - and another batch that must be over 12 to send.
It was the batch that needs a signal level over 12 that was having this problem.

I'm not sure exactly what the hardware problem is. The manufacturer is looking into it.
 

simcom at+cgreg

Derek_Fairbairn said:
Also if it takes longer than 1 minute to respond I reboot the modem using the power key. I figured it was safer to reboot the GSM to get it back to a known state, instead of trying to interrupt it using AT commands.
You may experience problems doing it this way. When you shut down the module using the 'PWRKEY', it doesn't disconnect from the network as it does when you use the AT commands. So when you reconnect, the network thinks you are still connected and you may be denied a connection. I've seen this on a few occasions with devices that have experienced a power failure.
 

SIM340Z GPRS Problem

Hi I need the data sheet of sim340cz

Added after 49 seconds:

HI

I need datasheet for sim340z
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top