HE910 GPRS Error 559 (timeout socket open)

3 thoughts on “HE910 GPRS Error 559 (timeout socket open)

  1. 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?



  2. 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.

    1. 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:”
      [687.776] MDM_IN: “OK”
      [687.784] MDM_CMD: “AT#SD=1,0,859,”″” (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:

      1. Adding delay (say 500ms) between context activation and attempting SD
      2. Trapping the 559 error and repeating only if was faster than actual timeout should be.

      Anyone have any further ideas?  Thanks.