Xinyuan-LilyGO / T-SIM7600X

126 stars 41 forks source link

SIM7600G-H registered to network but unable to connect #90

Open agilly opened 6 months ago

agilly commented 6 months ago

I couldn't get the example code to work, so I use the SIM7600G-H as a USB modem (using USB port 2 and changing the jumper), and sending AT commands via COM to try and connect. Unfortunately, AT+NETOPEN always fails. This is what I am getting:

+CPIN: READY

SMS DONE

PB DONE

+CMTI: "SM",4

at+csq
+CSQ: 31,99

OK
at
at+creg?
+CREG: 0,1

OK
at+cereg?
+CEREG: 0,1

OK
at+cops?
+COPS: 0,0,"Mint",7

OK
at+cgatt?
+CGATT: 1

OK
at+cgdcont?
+CGDCONT: 1,"IPV4V6","fast.t-mobile.com","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1
+CGDCONT: 4,"IPV4V6","tmus","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

OK
at+cgact?
+CGACT: 1,1
+CGACT: 2,1
+CGACT: 3,0
+CGACT: 4,0

OK
at+cgact=?
+CGACT: (0,1)

at+cnmp?
+CNMP: 38

OK
at+netopen
ERROR
at+cping="8.8.8.8",1
OK

+CPING: 3,0,0,0,0,0,0
at+cdnsgip="google.com"
+CDNSGIP: 0,10

ERROR
AT+CIPSENDMODE=0
OK
AT+CIPCCFG=10,0,0,0,1,0,75000
OK
AT+CIPTIMEOUT=75000,15000,15000
OK
at+netopen
ERROR

The provider is correctly set and the SIM seems to register to the network.

The APN at +CGDCONT: 1 is the correct one.AT+NETOPEN always fails. It seems there are two contexts active, 1 and 2. After reading this bug report, I tried disabling context 2 as it looks to be a VoLTE one:

at+cgdcont=2
OK
at+cgdcont?
+CGDCONT: 1,"IPV4V6","fast.t-mobile.com","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1
+CGDCONT: 4,"IPV4V6","tmus","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

OK
at+cgact?
+CGACT: 1,1
+CGACT: 3,0
+CGACT: 4,0

at+netopen
ERROR
at+netopen?
+NETOPEN: 0

as evidenced by the last couple of commands, NETOPEN still fails. Any help greatly appreciated

felmue commented 6 months ago

Hello @agilly

what does at+csocksetpn? return? This command is used to set the default PDP context for netopen. In your case it should be 1 I guess. If it is not 1, try to set it with at+csocksetpn=1.

Thanks Felix