EM7565 trouble connecting wit AT SCACT: no internet connection, although attached to mobile network. NetworkManager/ModemManager works fine though?

Hi,

I have some issues with my EM7565 control via AT commands. Everything works flawlessly with ModemManager/NetworkManager combination on linux, but I want to run some custom scripts, and thus control it the old-school way.

I’m currently trying to connect to the LTE network of Deutsche Telekom (MCC/MNC 262/01), SIM does not have a PIN. The correct APN is “internet.telekom”, works fine in NetworkManager without username or password.

Here is what my AT commands and their respones currently look like:

at!selrat=06
OK

at+cgdcont?
+CGDCONT: 1,"IP","internet.telekom","0.0.0.0",0,0,0,0

OK


at+cgdcont=1,"IP","internet.telekom"
OK

at!scact?
!SCACT: 1,0

OK


at+cops?
+cops: 1,2,"26201",7

OK

at+cops=?
+cops: (2," "," ","26201",7),(1,"Vodafone.de","Vodafone","26202",7),(1,"o2 - de","o2 - de","26203",7),,(0,1,2,3,4),(0,1,2)

OK

at+cops=1,2,26201,7
OK

at+cereg=1
OK

at+cereg?
+CEREG: 1,1

OK

at&v
&C: 2; &D: 2; &E: 0; &F: 0; &S: 0; &W: 0; E: 1; L: 0; M: 0; Q: 0; V: 1;
X: 1; Z: 0; \Q: 3; \S: 0; \V: 0; O: 0; S0: 0; S2: 43; S3: 13; S4: 10;
S5: 8; S6: 2; S7: 0; S8: 2; S9: 6; S10: 14; S11: 95; S30: 0; S103: 1;
S104: 1; +FCLASS: 0; +ICF: 3,3; +IFC: 2,2; +IPR: 115200; +DR: 0;
+DS: 0,0,2048,6; +CMEE: 2; +WS46: 12; +CFUN:; +CBST: 0,0,1;
+CRLP: (61,61,48,6,0),(61,61,48,6,1),(240,240,52,6,2);
+CV120: 1,1,1,0,0,0; +CHSN: 0,0,0,0; +CSSN: 0,0; +CREG: 0; +CGREG: 0;
+CEREG: 1; +CSCS: "IRA"; +CSTA: 129; +CR: 0; +CRC: 0; 
+CGDCONT: (1,"IP","internet.telekom","0.0.0.0",0,0,0,0); +CGDSCONT: ;
+CGTFT: ; +CGEQREQ: ; +CGEQMIN: ; +CGEQOS: ; +CGQREQ: ; +CGQMIN: ;
+CGEREP: 0,0; +CGDATA: "PPP"; +CGCLASS: "A"; +CGPIAF: 0,0,0,0; +CGSMS: 3;
+CSMS: 0; +CMGF: 0; +CSAS: 0; +CRES: 0; +CSCA: "+491710760000",145;
+CSMP: ,,0,0; +CSDH: 0; +CSCB: 0,"",""; +ES: ,,; +ESA: 0,,,,0,0,255,;
+CMOD: 0; +CEMODE: 2; +CVHU: 1; ; ; ; ; ; ; +CPIN: ��������,��������;
+CMEC: 0,0,0,0; +CIND: 0,4,1,1,0,0,1,0; +CMER: 0,0,0,0,0; +CGATT: 1; 
; +CPBS: "SM"; +CPMS: "SM","SM","SM"; +CNMI: 1,1,0,2,0; +CMMS: 0;
+CCUG: 0,0,0; +COPS: 1,2,""; +CUSD: 0; +CAOC: 1; +CCWA: 0;
+CPOL: 0,2,"",0,0,0,0; +CPLS: 0; +CTZR: 0; +CTZU: 1; +CLIP: 0; +COLP: 0;
+CDIP: 0; +CLIR: 0; +CSDF: 1; +CEN: 0; ; ^DSCI: 0; ^MODE: 0;
^HSMSSS: 0,0,1,0

OK

at!gstatus?
!GSTATUS: 
Current Time:  879		Temperature: 31
Reset Counter: 2		Mode:        ONLINE         
System mode:   LTE        	PS state:    Attached     
LTE band:      B3     		LTE bw:      20 MHz  
LTE Rx chan:   1300		LTE Tx chan: 19300
LTE SCC1 state:NOT ASSIGNED
LTE SCC2 state:NOT ASSIGNED
LTE SCC3 state:NOT ASSIGNED
LTE SCC4 state:NOT ASSIGNED
EMM state:     Registered     	Normal Service 
RRC state:     RRC Idle       
IMS reg state: No Srv  		

PCC RxM RSSI:  -57		PCC RxM RSRP:  -88
PCC RxD RSSI:  -58		PCC RxD RSRP:  -90
Tx Power:      --		TAC:         5815 (22549)
RSRQ (dB):     -10.3		Cell ID:     02a5b601 (44414465)
SINR (dB):     21.4


OK

at!lteinfo?
!LTEINFO: 
Serving:   EARFCN MCC MNC   TAC      CID Bd D U SNR PCI  RSRQ   RSRP   RSSI RXLV
             1300 262  01 22549 02A5B601  3 5 5  21  79  -7.9  -88.5  -61.7  33

IntraFreq:                                          PCI  RSRQ   RSRP   RSSI RXLV
                                                     79  -7.9  -88.5  -61.7  33

InterFreq: EARFCN ThresholdLow ThresholdHi Priority PCI  RSRQ   RSRP   RSSI RXLV
              500           10           8        2 218  -9.4 -103.5  -84.8   0
             3749           10          14        2  95  -7.9  -81.2  -64.8   0

WCDMA:     UARFCN ThreshL ThreshH Prio PSC   RSCP  ECN0 RXLV


OK

at!pcinfo?
State: Online
LPM voters - Temp:0, Volt:0, User:0, W_DISABLE:0, IMSWITCH:0, BIOS:0, LWM2M:0, OMADM:0, FOTA:0, RFCAL:0
LPM persistence - None

OK

at+cpin?
+CPIN: READY

OK

at!usbcomp?
Config Index: 1
Config Type:  3 (Generic)
Interface bitmask: 0000010D (diag,nmea,modem,rmnet0) 


at!scact=1,1
+CME ERROR: no network service

To me, it seems I’m connected to the cell, but enabling my data connection seems to fail somehow?

Let me know if any further information is required from my side. Thanks for your help!

Best regards

are you using MBPL USB driver?
If yes, you can follow this:

Another option is to use MBIM interface by AT!USBCOMP=1,3,1009

No, I’m basically using the USB serial interface directly. No specific driver, just opening /dev/ttyUSB2 and controlling it from there.

I had the MBIM interface enabled previously with the correspinding USBCOMP, would it help in my case? It didn’t make a difference regarding the connection…

if using MBIM interface, you don’t use AT!SCACT command.
you can see below on how to use MBIM interface:


owner@ubuntu:~$ sudo mbim-network /dev/cdc-wdm0 start
Loading profile at /etc/mbim-network.conf...
    APN: CMHK
    APN auth protocol: unset
    APN user: unset
    APN password: unset
    mbim-proxy: yes
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close --device-open-proxy'...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '454120639576426' SIM ICCID: '89852122111085764260' Ready info: 'none' Telephone numbers: (0) 'unknown' [/dev/cdc-wdm0] Session not closed: TRID: '4'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=4 --no-close --device-open-proxy'...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'home' Register mode: 'manual' Available data classes: 'lte, custom' Current cellular class: 'gsm' Provider ID: '45412' Provider name: 'CMHK' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '6'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 6)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=6 --no-close --device-open-proxy'...
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 8)
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='CMHK' --no-open=8 --no-close --device-open-proxy'...
Network started successfully
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 11)
owner@ubuntu:~$ sudo qmicli --device=/dev/cdc-wdm0 --device-open-proxy --device-open-mbim --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
           IP Family: IPv4
        IPv4 address: 10.21.119.34
    IPv4 subnet mask: 255.255.255.252
IPv4 gateway address: 10.21.119.33
    IPv4 primary DNS: 10.13.168.140
  IPv4 secondary DNS: 10.13.200.140
                 MTU: 1500
             Domains: none

I’m not really sure how that is helping me to be honest. I’m trying to track network changes and monitor LTE connection parameters, and set up connections accordingly. Thus, I’m using the AT commands.

Mobile broadband works well with NetworkManager and ModemManager. According to dmesg, either the cdc_mbim driver or the qmi_wwan driver is used, depending on the USBCOMP setting. This works well, and I have mobile broadband access.

Nevertheless, I would like to connect using the AT commands, and script those. But I can’t connect using those :-/ Any idea why?

then are you following this?

Perfect, thanks a lot! I can get a connection after following this guide!
Still need to figure some things out, but thank you so far!