EC21 : QIOPEN as server result in a error

I have a EC21 and i could use it as a client. It works perfect.

If i do it as server comes there a error.

AT+QIOPEN=2,1,“TCP LISTENER”,“127.0.0.1”,0,4444,1

OK

+QIOPEN: 1,561
AT+QISTATE=0,2

OK
+QIOPEN is an error and in the datasheet are there follow errors “Open PDP context failed”

What should i change before it works.

Dear Bjarne,
It is better to provide your whole test AT log, then we can confirm the root reason. Thanks!
For your issue, you can change another context ID to have a try, or deactivate the context then active it again. Thanks!

Here are the whole communication.

RDY
AT

OK
AT+CPIN?

+CPIN: SIM PIN

OK
AT+CPIN=1234

OK
AT+CMGF=1

OK
AT+CGATT=0

OK
AT+QCFG = “diversity”,0

OK
AT+CTZU=3

OK
AT+CTZR=2

OK
AT+QLTS=2

OK
AT+CSMP=17,170,0,0

OK
AT+CGMR

EC21EUGAR06A03M4G

OK
AT+IPR=9600

OK
AT+IFC=0,0

OK
AT+CFUN=1

OK
AT+VTD=1

OK
AT+CLVL=2

OK
AT+QTONEDET=1

OK
AT+CSCS=“IRA”

OK
AT+CMEE=1

OK
ATE1V1&D1

OK
AT+CNMI=2,0,0,0,0

OK
AT+CSAS

OK
AT+CGATT=1

OK
AT+QICSGP=1,1,“internet”

OK
AT+CGDCONT?

+CGDCONT: 1,“IP”,“internet”,“0.0.0.0”,0,0,0,0

OK
AT+QIACT=1

OK
AT+QIACT?

+QIACT: 1,1,1,“10.208.39.177”

OK
AT+CGPADDR =1

+CGPADDR: 1,“10.208.39.177”

OK
AT&W

OK
AT&d1

AT+CCLK?

+CCLK: “19/11/07,12:05:12+04”

OK
AT+CPIN?

+CPIN: READY

OK
AT+CLCC

+CLCC: 1,0,0,1,0,"*98#",129

OK
AT+CMGL=“ALL”

OK
AT+QICLOSE=2

OK
AT+QIOPEN=2,1,“TCP LISTENER”,“127.0.0.1”,0,4444,1

OK

+QIOPEN: 1,561
AT+QISTATE=0,2

OK

Dear Bjane,
Please check your setting, you active the context 1, but you open a different context 2. I think that is the root reason. Please make sure they are the same. Thanks!

hello,i have a question ,when you use EC21 as tcp server mode,how can you select the local port as “4444”,ir someone has already used the port? wariting for your answer thanks!!

Dear Idmona,
When the module as TCP server, you must to specified, and it should in the range of 0-65535. Thanks! If the port 4444 already occupied by other application, you can not use it as TCP server mode again. Thanks!