With some providers a socket open fails the first time after GPRS is started. It shows as error 559 and a subsequent attempt to open the socket will succeed. It doesn’t happen at all on some units and some providers.
==> Error 559
Repeat the process and it will work fine the second time.
Does anyone have any ideas how I can make this more reliable first time? Do I need to enforce delay before attempting to open the socket? Do I need to check something before opening socket? Is there some config I need to set?
Indeed it might be related with network resources not being yet allocated, and the solutions as you say, try with delays and/or consecutive connection attempts until success or fail. If you don’t want to “touch” the connection until the netowk is ready you can use for example DNS queries to test the state, or connections to public sites like google etc.
I was finally able to duplicate it today with my logging turned on. It looks like the #SD fails in under 0.2 seconds with 559 ‘timeout error’. This seems to only appear if the target socket is an IP number, not a DNS name. It also seems to only occur when it is first activity when using the network (ie. after SIM remove then insert).
[661.652] MDM_CMD: “AT+CFUN=4,0” (t=5s)[661.775] MDM_IN: “OK”[661.781] MDM_CMD: “AT#SIMDET=0” (t=5s)[661.847] MDM_IN: “OK”[667.86] MDM_CMD: “AT+CFUN=1,0” (t=5s)[667.93] MDM_IN: “OK”[668.94] MDM_CMD: “AT#SIMDET=1” (t=5s)[669.003] MDM_IN: “OK”
Then SD fails:
[684.91] MDM_CMD: “AT#SGACT=1,1,””,””” (t=64s)[687.769] MDM_IN: “#SGACT: 100.92.154.32”[687.776] MDM_IN: “OK”[687.784] MDM_CMD: “AT#SD=1,0,859,”18.104.22.168″” (t=65s)[687.9] MDM_IN: “+CME ERROR: 559”
Repeating the SD or closing SGACT and reopening will stop the error occurring. I do wonder if this is a firmware bug in the HE910 because instant timeout errors shouldn’t occur.
Workarounds I will test are:
Anyone have any further ideas? Thanks.
Hit enter to search or ESC to close
Knowledge Base & Download Zone