Skip to content

Add support of Quectel EC21/EC25

Dmitry Petrov requested to merge linux-5.15.29-guf-quectel-ec21 into linux-5.15.29-guf

Tested on SantVend V1.2

Reset modem:

gpioset 1 19=0 # modem_reset
gpioset 5 31=0 # modem_ignition
sleep 0.5
gpioset 5 31=1 # modem_ignition
sleep 1
gpioset 5 31=0 # modem_ignition

dmesg output:

[ 1383.372224] usb 2-1: new high-speed USB device number 2 using ci_hdrc
[ 1383.603477] usb 2-1: New USB device found, idVendor=2c7c, idProduct=0121, bcdDevice= 3.18
[ 1383.603577] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1383.603596] usb 2-1: Product: Android
[ 1383.603610] usb 2-1: Manufacturer: Android
[ 1383.827130] usbcore: registered new interface driver usbserial_generic
[ 1383.828433] usbserial: USB Serial support registered for generic
[ 1383.906037] usbcore: registered new interface driver option
[ 1383.913039] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1383.925253] option 2-1:1.0: GSM modem (1-port) converter detected
[ 1383.934291] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1383.935611] option 2-1:1.1: GSM modem (1-port) converter detected
[ 1383.942050] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1383.942625] option 2-1:1.2: GSM modem (1-port) converter detected
[ 1383.948771] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 1383.949370] option 2-1:1.3: GSM modem (1-port) converter detected
[ 1383.950643] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 1384.018067] usbcore: registered new interface driver cdc_wdm
[ 1384.073179] qmi_wwan 2-1:1.4: cdc-wdm0: USB WDM device
[ 1384.082344] qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-ci_hdrc.1-1, WWAN/QMI device, 3e:6c:f2:b7:26:57
[ 1384.098607] usbcore: registered new interface driver qmi_wwan

List of loaded modules:

root@localhost:~# lsmod
Module                  Size  Used by
qmi_wwan               28672  0
cdc_wdm                20480  2 qmi_wwan
option                 45056  1
usb_wwan               16384  1 option
usbserial              36864  4 option,usb_wwan
snd_soc_simple_amplifier    16384  1
snd_soc_sgtl5000       28672  1
imx_sdma               24576  6
coda_vpu              106496  0
v4l2_jpeg              16384  1 coda_vpu
imx_vdoa               16384  1 coda_vpu
videobuf2_vmalloc      16384  1 coda_vpu
dw_hdmi_ahb_audio      16384  0
snd_soc_simple_card    16384  0
configfs               40960  1
root@localhost:~#

Query modem info:

root@localhost:~# echo -ne "AT+CGMI\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
Quectel
root@localhost:~# echo -ne "AT+CGMM\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
EC21
root@localhost:~# echo -ne "AT+CGMR\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
EC21EFAR02A08M4G
root@localhost:~#

Retrieve info from SIM card:

root@localhost:~# echo -ne "AT+CFUN=1\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
OK
root@localhost:~# echo -ne "AT+CPIN?\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
+CPIN: READY
root@localhost:~# echo -ne "AT+CSQ\\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
+CSQ: 19,99
root@localhost:~# echo -ne "AT+COPS?\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
+COPS: 0,0,"A1 SRB DATA ONLY",7
root@localhost:~# echo -ne "AT+CNUM\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4 | sed -n "2p"
OK
root@localhost:~# echo -ne "AT+QECCNUM=0,1\r\n" | microcom  -t 100 -s 115200 /dev/ttymxc4
AT+QECCNUM=0,1
+QECCNUM: 1,"911","112"

Merge request reports

Loading