Quectel EC21-A - unable to get a tethered internet connectivity to Ubuntu computer

I intend to get an internet connection to a computer using a Quectel module for internet connectivity. I have not been successful. Can you please guide me?

The Module is connected to the computer over a USB connection.

Module: Quectel EC21-A

SIM card: T-Mobile

Computer: raspberry pi compute module 4

Operating System: Ubuntu 20.04.4 LTS

Kernel: Linux 5.4.0-1065-raspi
Architecture: arm64

Setup - Quectel Module sits on a Sixfab HAT. HAT is connected to raspberry pi gpio pins for power supply.

Earlier I tried using Network Manager and QMI WWAN to achieve my goals. It used to work and Ubuntu computer would list the IP address assigned to a Quectel module. It does not work anymore.


root@rpic04:~# usb-devices

T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=0121 Rev=03.18
S: Manufacturer=Android
S: Product=Android
C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan


input command → nmcli connection add type gsm ifname ‘cdc-wdm0’ con-name ‘quectelnet’ apn ‘fast.t-mobile.com’ connection.autoconnect yes

input command → sudo reboot


  • ensure IP address on wwan interface

input command → ip a


  • nmcli command output shows that ‘quectelnet’ is stuck in ‘Connecting’ state.

  • ModemManager is getting stuck at state 5/8, register, as shown by journalctl command on Ubuntu

Jun 24 23:12:08 rpic04 NetworkManager[693]: [1656112328.1146] policy: auto-activating connection ‘quectelnet’ (3d10feb3-ae81-43dd-b73b-672585a25fec)

Jun 24 23:12:08 rpic04 NetworkManager[693]: [1656112328.1177] device (cdc-wdm0): Activation: starting connection ‘quectelnet’ (3d10feb3-ae81-43dd-b73b-672585a25fec)

Jun 24 23:12:08 rpic04 NetworkManager[693]: [1656112328.1187] device (cdc-wdm0): state change: disconnected → prepare (reason ‘none’, sys-iface-state: ‘managed’)

Jun 24 23:12:08 rpic04 NetworkManager[693]: [1656112328.1211] manager: NetworkManager state is now CONNECTING

Jun 24 23:12:08 rpic04 ModemManager[743]: [modem0] simple connect started…

Jun 24 23:12:08 rpic04 ModemManager[743]: [modem0] simple connect state (4/8): wait to get fully enabled

Jun 24 23:12:08 rpic04 ModemManager[743]: [modem0] simple connect state (5/8): register

Jun 24 23:14:08 rpic04 ModemManager[743]: transaction 0x10 aborted, but message is not abortable

Jun 24 23:14:08 rpic04 ModemManager[743]: [modem0] simple connect started…

Jun 24 23:14:08 rpic04 ModemManager[743]: [modem0] simple connect state (4/8): wait to get fully enabled

Jun 24 23:14:08 rpic04 ModemManager[743]: [modem0] simple connect state (5/8): register

Jun 24 23:16:08 rpic04 ModemManager[743]: transaction 0x11 aborted, but message is not abortable

Jun 24 23:16:08 rpic04 ModemManager[743]: [modem0] simple connect started…

Jun 24 23:16:08 rpic04 ModemManager[743]: [modem0] simple connect state (4/8): wait to get fully enabled

Jun 24 23:16:08 rpic04 ModemManager[743]: [modem0] simple connect state (5/8): register

Jun 24 23:17:01 rpic04 CRON[1274]: pam_unix(cron:session): session opened for user root by (uid=0)

Jun 24 23:17:01 rpic04 CRON[1275]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

Jun 24 23:17:01 rpic04 CRON[1274]: pam_unix(cron:session): session closed for user root

I also tried PPP to achieve my goals.

Reference: Quectel_BG95BG77BG600L_Series_PPP_Application_Note_V1.0.pdf


ttyUSB2 → For AT command communication
ttyUSB3 → For PPP connections or AT command communication


root@rpic04:~# socat - /dev/ttyUSB3,raw,echo=0,b115200,crnl

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
+CGDCONT: 5,“IPV4V6”,“H2g2”,“0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”,0,0,0,0

OK
at+cgpaddr

+CGPADDR: 1,“100.193.176.57,38.7.251.144.130.47.206.183.0.0.0.51.143.228.65.1”
+CGPADDR: 2,“38.7.252.32.130.68.226.93.0.0.0.7.76.19.205.1”
+CGPADDR: 3,“0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”
+CGPADDR: 4,“0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”
+CGPADDR: 5,“0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”

OK
ATD*99#

CONNECT 150000000


wwan0 still does not show a quectel IP address.

root@rpic04:~# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet [127.0.0.1/8] scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether e4:5f:01:90:04:a4 brd ff:ff:ff:ff:ff:ff
inet [10.111.218.29/21] brd 10.111.223.255 scope global dynamic eth0
valid_lft 85311sec preferred_lft 85311sec
inet6 fe80::e65f:1ff:fe90:4a4/64 scope link
valid_lft forever preferred_lft forever
4: wwan0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/none