MC7455 - Connection sequence to LTE network

Hello there,
To begin, i know there are severals topics dealing with what i’m going to ask but from the (maybe?) hundred of website i have visited and after reading many times the official AT documentation for my modem, i could not solve my problem so let me explain it and maybe this will help others in the future !

First, here are some informations about my modem and its configuration :

AT!ENTERCND=“A710”
OK

ATI3
Manufacturer: Sierra Wireless, Incorporated
Model: MC7455
Revision: SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 0

AT+CPIN?
+CPIN: READY
OK

AT+CGDCONT?
+CGDCONT: 1,"IP","mobiledata","0.0.0.0",0,0,0,0
OK

AT!GSTATUS?
!GSTATUS: 
Current Time:  83664            Temperature: 41
Reset Counter: 7                Mode:        ONLINE         
System mode:   LTE

AT+COPS?
+COPS: 0,0,"Transatel Transatel",7
OK

AT+COPS=?
+COPS: (2,"Transatel","Transate","20801",7),(1,"Orange F","Orange","20801",2),(1,"F SFR","SFR"2

AT!IMPREF?
!IMPREF: 
 preferred fw version:    02.24.05.06
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_002.02

AT!IMAGE?
TYPE SLOT STATUS LRU FAILURES UNIQUE_ID   BUILD_ID
FW   1    GOOD   130 0 0      ?_?         02.24.05.06_?
FW   2    GOOD   1   0 0      ?_?         02.24.03.00_?
FW   3    GOOD   129 0 0      ?_?         02.33.03.00_?
FW   4    EMPTY  0   0 0

AT!CUSTOM?
AT!CUSTOM: 
             GPSENABLE      0x01
             GPSLPM             0x01
             UIM2ENABLE   0x01
             SIMLPM             0x01

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
LPM persistenc

AT!GETBAND?
!GETBAND: B7
OK

AT!RXDEN?
!RXDEN: 
01
OK

AT!LTEINFO?
!LTEINFO: 
Serving:   EARFCN MCC MNC   TAC      CID Bd D U SNR PCI  RSRQ   RSRP   RSSI RXLV
             3000 208  01 52647

AT!USBCOMP?
Config Index: 1
Config Type:  1 (Generic)
Interface bitmask: 00001009 (diag,modem,mbim) 
OK

Connection sequence

AT+CREG=1
OK
AT+CGATT=1
OK
AT+CGDCONT=1,"ip","mobiledata"
OK
AT+CGACT=1
OK

Connection status

AT+CGATT?
+CGATT: 1
OK

AT+CGACT?
+CGACT: 1,1
OK

AT+CREG?
+CREG: 1,1
OK

AT+CGCONTRDP
+CGCONTRDP: 1,5,mobiledata,10.141.37.59,,176.241.248.113,176.241.248.114
OK

So, as you can see, my modem seems to be connected to the operator network. Yet, the gateway is never given running +CGCONTRDP AT command which i don’t know why. (Also how am i supposed to get the subnet mask?)

From there, i have my modem interface wwp0s20f0u2i12 which i configure with the IP adress, an arbitrary subnet mask of /30 and a gateway (also arbitrary). I also set the DNS, etc but when i try to ping from the modem interface, it does not work obviously.

Network setup

ip link set wwp0s20f0u2i12 down
ip addr flush dev wwp0s20f0u2i12
ip link set wwp0s20f0u2i12 up
ip addr add 10.141.37.59/30 dev wwp0s20f0u2i12 broadcast +
ip link set mtu 1460 dev wwp0s20f0u2i12

ping -I wwp0s20f0u2i12 1.1.1.1
# not working

So i wanted to know what am i missing so i cannot have internet through my modem interface ?

NB: I’m able to reach internet from the modem interface when i use mbim-network command and then configure my network as above but my goal is to use AT commands instead of mbim-network program !

Have you tried latest firmware?
Have you tried at!scact=1,1 ?

You can see here:

Hello Jyijyi,

I haven’t tried latest firmware and i don’t think it will be very usefull since everythink works fine with mbim-network command (which i don’t want to use).

Here is the result of the command you asked me to try (this command is not defined in the official AT documentation for this the MC7455 modem ?)

AT!SCACT?
!SCACT: 1,0
OK

And when i try to start the data connection i get :

AT!SCACT=1,1
+CME ERROR: no network service

Do you know where this error might come from ?

NB: My apn has no password nor username that need to be set

What driver are you using?
Did you follow the document to install mbpl driver?

Btw, your fw seems to be a bit old

Sorry for the late reply, i’m currently upgrading everything i’ll tell you when all is ready.

My driver is actually ModemManager, i’m going to install mbpl instead as you said and come back to you as soon as possible ! (At the moment i’m upgrading the fw to the last version)

For using at!scact, you also need to use rmnet in at!usbcomp

So far I’ve successfully upgraded my fw version to the latest version :

ati3
Manufacturer: Sierra Wireless, Incorporated
Model: MC7455
Revision: SWI9X30C_02.38.00.00 rE3F3E55C03AE94 jenkins 2022/01/13 05:16:00
MEID: 35907206211218
IMEI: 359072062112186
IMEI SV: 22
FSN: LQ817273680410
+GCAP: +CGSM

I also update usbcomp to use rmnet :

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

I was trying to install mbpl but i can’t find a version matching my linux kernel 4.16.18+

Yet, why do use recommand to install this driver since i am directly sending at commands to the serial port so if i understand well, we don’t need an external software to help the communication between the OS and the modem ?

I really thank you for your help !

By the way, after updating the fw version, my at serial port changed from ttyUSB3 to ttyUSB4. Do you know why this appended ? Is it possible to change the serial port used to communicate with at commands with the modem (if i wanted to use ttyUSB3 again) ?

will it enumerate /dev/ttyUSB3 after reboot?

You can try the old GOBI driver which should supports your kernel:
https://source.sierrawireless.com/resources/airprime/software/usb-drivers-linux-qmi-software-s2,-d-,42n2,-d-,64/#sthash.P1pqZyA7.dpbs

But you need to black list the qcserial and qmi_wwan driver if you use the Gobi driver.
e.g.
add the following to the “/etc/modprobe.d/blacklist-modem.conf” file in Ubuntu PC and restart the host :
blacklist qcserial
blacklist qmi_wwan

To answer your question,

here is the output of dmesg command regarding ttyUSB serial ports enumeration

[    5.304644] usb 2-2: Qualcomm USB modem converter now attached to ttyUSB2
[    5.305834] usb 2-2: Qualcomm USB modem converter now attached to ttyUSB3
[    5.307015] usb 2-2: Qualcomm USB modem converter now attached to ttyUSB4

/dev/ttyUSB3 port is enumerated (so i don’t know why at command are not supported by ttyUSB3 instead)

About the mbpl driver, I built it from source on my kernel so i don’t use GOBI
I mooved the kernel files generated :

  • qcserial.ko
  • qmi_wwan.ko
  • usb_wwan.ko

to /lib/modules/4.16.18+/kernel/drivers/net/usb/ and ran the following commands :

depmod 4.16.18+
update-initramfs -c -k 4.16.18+
reboot

I tried to follow the next steps on your thread here Example on establishing data connection by AT!SCACT via MBPL R20 driver

qmicli --device=/dev/cdc-wdm0 --wds-noop --client-no-release-cid

But i have no cdc interface so the command fails

Yet, dmesg tells me a cdc-wdm interface has been registered :

[    5.323756] usbcore: registered new interface driver cdc_wdm

You can try to disable the nmea port in at!usbcomp and see of ttyusb3 is the AT port

By the way here is a little update of information after all this changes :

at+cgdcont?

+CGDCONT: 1,"IP","mobiledata","0.0.0.0",0,0,0,0

OK
at!gstatus?

!GSTATUS: 
Current Time:  5693             Temperature: 44
Reset Counter: 26               Mode:        ONLINE         
System mode:   WCDMA            PS state:    Not attached 
WCDMA band:    WCDMA 2100 
WCDMA channel: 10762
GMM (PS) state:NULL             ---            
MM (CS) state: IDLE             NORMAL SERVICE 

WCDMA L1 state:L1M_PCH_SLEEP    LAC:           0EA6 (3750)
RRC state:   DISCONNECTED       UTRAN Cell ID: 04721433 (74585139)
RxM RSSI C0:   -94              RxD RSSI C0:  --- 
RxM RSSI C1:    ---             RxD RSSI C1:  --- 

at+cops=?

+cops: (1,"005400300035003400300030","00540030","20815",7),(2,"005400300035003400300030","00540030","20815",2),(1,"004600300034003600300030","00420030","20820",)

OK

OK
at+cops?

+cops: 0,0,"005400300",2

OK
at!impref?

!IMPREF: 
 preferred fw version:    02.38.00.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_002.082_000
 preferred subpri index:  000
 current fw version:      02.38.00.00
 current carrier name:    GENERIC
 current config name:     GENERIC_002.082_000
 current subpri index:    000

OK

Your solution of disabling nmea worked to change from usage of ttyUSB4 to ttyUSB3 regarding AT commands :smiley:

Still what should i do next about the disappearance of /dev/cdc-wdm0 interface ?

Again I deeply thank you for your support

Little edit,
Rigth after the resgitered interface driver cdc_wdm message i encounter an error with qmi_wwan version :

[    4.708399] usbcore: registered new interface driver cdc_wdm
[    4.720879] qmi_wwan: version magic '4.16.18 SMP preempt mod_unload ' should be '4.16.18+ SMP preempt mod_unload 

Seems you don’t use the same kernel version to compile qmi_wwan

Yup i just removed it and recompiled from source (maybe i had duplicate from a previous action?).

Not sure that works. There is no way to specify the MBIM Session ID using AT commands. OK, it might default to session 0, so that it works for connecting one APN.

You failed to configure any routes in your setup. Does it work if you do?:

ip route add default dev wwp0s20f0u2i12

Netmask and gateway addresses are just artificial anyway. The network assigned address is a /32. And there is no ARP with MBIM, so faking a gateway address is pointless.

FWIW, I believe the default qmi_wwan and cdc_mbim drivers in 4.16.18 should work just fine wth the MC7455 modem. Ruuning around replacing drivers is not likely to change the AT command interface behaviour of the modem firmware. But what do I know…

you should see something like this in dmesg:



[ 1294.123026] usb 4-1: New USB device found, idVendor=1199, idProduct=9091
[ 1294.123027] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1294.123029] usb 4-1: Product: Sierra Wireless EM7511 Qualcomm® Snapdragon™ X16 LTE-A
[ 1294.123030] usb 4-1: Manufacturer: Sierra Wireless, Incorporated
[ 1294.123031] usb 4-1: SerialNumber: YT22174335011234
[ 1294.272992] usbcore: registered new interface driver usbserial
[ 1294.273007] usbcore: registered new interface driver usbserial_generic
[ 1294.273016] usbserial: USB Serial support registered for generic
[ 1294.312564] usbcore: registered new interface driver cdc_wdm
[ 1294.314167] qmi_wwan: loading out-of-tree module taints kernel.
[ 1294.314239] qmi_wwan: module verification failed: signature and/or required key missing - tainting kernel
[ 1294.318354] qmi_wwan 4-1:1.8: cdc-wdm0: USB WDM device
[ 1294.319261] qmi_wwan 4-1:1.8 wwan0: register 'qmi_wwan' at usb-0000:03:00.0-1, WWAN/QMI device, 76:26:57:5f:8c:0b
[ 1294.321894] usbcore: registered new interface driver qmi_wwan
[ 1294.327436] usbcore: registered new interface driver qcserial
[ 1294.327445] usbserial: USB Serial support registered for Qualcomm USB modem
[ 1294.327453] usbserial: USB Serial support registered for Qualcomm USB modem
[ 1294.331511] qcserial 4-1:1.0: Qualcomm USB modem converter detected
[ 1294.331671] usb 4-1: Qualcomm USB modem converter now attached to ttyUSB0
[ 1294.333676] qcserial 4-1:1.2: Qualcomm USB modem converter detected
[ 1294.333945] usb 4-1: Qualcomm USB modem converter now attached to ttyUSB1
[ 1294.351996] qcserial 4-1:1.3: Qualcomm USB modem converter detected
[ 1294.352243] usb 4-1: Qualcomm USB modem converter now attached to ttyUSB2
owner@ubuntu:~$ owner@ubuntu:~$ ls /dev/cdc-wdm0
/dev/cdc-wdm0

Hello jyijyi !

Sorry for answering so lately (i was out for the weekend and also tried to figure out the solution myself)

After a lot of problems regarding system configuration, kernel, understanding, etc… i finally got the modem interface reaching Internet using qmicli and AT!SCACT command.

So here is my actual setup :

at+creg?

+CREG: 1,1

OK
at+cgatt?

+CGATT: 1

OK
at+cgact?

+CGACT: 1,1

OK
at!scact?

!SCACT: 1,0

OK
at+cgcontrdp

+CGCONTRDP: 1,5,mobiledata,10.138.217.108,,176.241.248.113,176.241.248.114

OK

I installed last version of mbpl (R28), libqmi-utils and udhcpc according to one of your post

I had to run the following command to connect the mobile network :

qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='mobiledata',',ip-type=4" --client-no-release-cid

Else udhcpc discover was sending request over and over

Yet all this brings me back to my initial state when i was using mbim-network.

So what do qmcli or mbim-network that i can’t do with AT commands only ?

And also, what is the purpose of using qmicli instead of mbim-network since i could make it works with mbim ?

The reason why i didn’t want to use mbim-network anymore is that with some operators, i encountered several problems setting up LTE connections. That’s why i wanted to rely on AT commands only so i would control each steps to setup the connection and be able to know where my configuration fails rather than relying on a software that i don’t understand all the features.

Hello dl5162,

Thank you very much for your feedback ! I really appreciate it !

I agree with you but i succeed in setuping my system with jyijyi’s requirements so it’s ok :wink: