20240105移远的4G模块EC20在Ubuntu 20.04.6 LTS下使用联通5G卡上网的步骤
2024/1/5 10:11
缘起:需要在Firefly的AIO-3399J开发板上调试移远的4G模块EC20(Android10/11/12),需要现在先测试EC20的好坏!
陶老板告诉我找一个USB2.0转mini PCIE的转接板接上去,这样就可以直接测试了。



4G模块转接板开发板迷你minipcie转USB移远EC20华为域格SIM/UIM
已售 2000+
¥23

CY辰阳 MINI PCIE转USB 3G 4G模块 测试开发板NGFF 含SIM UIM卡座
已售 400+
¥32

请【严重注意】注意SIM卡的方向!
【需要2G的大卡,也就是卡套外面还有卡套!】


昨晚WIN10上通过USB延长线接上去明显需要驱动程序。
今天在Ubuntu20.04.6下的USB3.0接口【蓝色口】插入【装上底板】EC20。

rootroot@rootroot-X99-Turbo:~$
rootroot@rootroot-X99-Turbo:~$ cat /etc/issue
Ubuntu 20.04.6 LTS \n \l
rootroot@rootroot-X99-Turbo:~
rootroot@rootroot-X99-Turbo:\~ uname -r
5.15.0-91-generic
rootroot@rootroot-X99-Turbo:~$ uname -a
Linux rootroot-X99-Turbo 5.15.0-91-generic #101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
rootroot@rootroot-X99-Turbo:~$
rootroot@rootroot-X99-Turbo:~$
通过lsusb命令,很容易发现已经找到了EC20了。
插入EC20之前:
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 173d:0500 QSENN
Bus 003 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

插入EC20之后:
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 173d:0500 QSENN
Bus 003 Device 004: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 003 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

拔掉EC20之后:
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 173d:0500 QSENN
Bus 003 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg内核信息:
插入EC20之前:
10.146990\] rfkill: input handler disabled
\[ 319.666131\] loop12: detected capacity change from 0 to 82800
\[ 319.965153\] audit: type=1400 audit(1704417854.208:40): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=2597 comm="apparmor_parser"
\[ 319.966389\] audit: type=1400 audit(1704417854.212:41): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=2597 comm="apparmor_parser"
\[ 320.513136\] audit: type=1400 audit(1704417854.756:42): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.snap-store" pid=2599 comm="apparmor_parser"
\[ 320.537680\] audit: type=1400 audit(1704417854.784:43): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.hook.configure" pid=2601 comm="apparmor_parser"
\[ 320.546954\] audit: type=1400 audit(1704417854.792:44): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.snap-store" pid=2602 comm="apparmor_parser"
\[ 320.547870\] audit: type=1400 audit(1704417854.792:45): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software-local-file" pid=2604 comm="apparmor_parser"
\[ 320.561320\] audit: type=1400 audit(1704417854.804:46): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=2603 comm="apparmor_parser"
\[ 321.844676\] loop13: detected capacity change from 0 to 8
\[ 322.196156\] audit: type=1400 audit(1704417856.440:47): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=2708 comm="apparmor_parser"
\[ 322.225387\] audit: type=1400 audit(1704417856.472:48): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=2708 comm="apparmor_parser"
\[ 322.466790\] audit: type=1400 audit(1704417856.712:49): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.hook.configure" pid=2711 comm="apparmor_parser"

插入EC20之后:
\[ 10.146990\] rfkill: input handler disabled
\[ 319.666131\] loop12: detected capacity change from 0 to 82800
\[ 319.965153\] audit: type=1400 audit(1704417854.208:40): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=2597 comm="apparmor_parser"
\[ 319.966389\] audit: type=1400 audit(1704417854.212:41): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=2597 comm="apparmor_parser"
\[ 320.513136\] audit: type=1400 audit(1704417854.756:42): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.snap-store" pid=2599 comm="apparmor_parser"
\[ 320.537680\] audit: type=1400 audit(1704417854.784:43): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.hook.configure" pid=2601 comm="apparmor_parser"
\[ 320.546954\] audit: type=1400 audit(1704417854.792:44): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.snap-store" pid=2602 comm="apparmor_parser"
\[ 320.547870\] audit: type=1400 audit(1704417854.792:45): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software-local-file" pid=2604 comm="apparmor_parser"
\[ 320.561320\] audit: type=1400 audit(1704417854.804:46): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=2603 comm="apparmor_parser"
\[ 321.844676\] loop13: detected capacity change from 0 to 8
\[ 322.196156\] audit: type=1400 audit(1704417856.440:47): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=2708 comm="apparmor_parser"
\[ 322.225387\] audit: type=1400 audit(1704417856.472:48): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=2708 comm="apparmor_parser"
\[ 322.466790\] audit: type=1400 audit(1704417856.712:49): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.hook.configure" pid=2711 comm="apparmor_parser"
\[ 490.241995\] usb 3-2: new high-speed USB device number 4 using xhci_hcd
\[ 490.399983\] usb 3-2: New USB device found, idVendor=2c7c, idProduct=0125, bcdDevice= 3.18
\[ 490.399992\] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
\[ 490.399996\] usb 3-2: Product: Android
\[ 490.399999\] usb 3-2: Manufacturer: Android
\[ 490.441771\] usbcore: registered new interface driver usbserial_generic
\[ 490.441804\] usbserial: USB Serial support registered for generic
\[ 490.444564\] usbcore: registered new interface driver cdc_wdm
\[ 490.447789\] usbcore: registered new interface driver option
\[ 490.447801\] usbserial: USB Serial support registered for GSM modem (1-port)
\[ 490.447909\] option 3-2:1.0: GSM modem (1-port) converter detected
\[ 490.448022\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB0
\[ 490.448074\] option 3-2:1.1: GSM modem (1-port) converter detected
\[ 490.448166\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB1
\[ 490.448208\] option 3-2:1.2: GSM modem (1-port) converter detected
\[ 490.448282\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB2
\[ 490.448315\] option 3-2:1.3: GSM modem (1-port) converter detected
\[ 490.448406\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB3
\[ 490.448810\] qmi_wwan 3-2:1.4: cdc-wdm0: USB WDM device
\[ 490.449917\] qmi_wwan 3-2:1.4 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-2, WWAN/QMI device, d6:49:5d:75:15:67
\[ 490.449948\] usbcore: registered new interface driver qmi_wwan

拔掉EC20之后:
\[ 10.146990\] rfkill: input handler disabled
\[ 319.666131\] loop12: detected capacity change from 0 to 82800
\[ 319.965153\] audit: type=1400 audit(1704417854.208:40): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=2597 comm="apparmor_parser"
\[ 319.966389\] audit: type=1400 audit(1704417854.212:41): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=2597 comm="apparmor_parser"
\[ 320.513136\] audit: type=1400 audit(1704417854.756:42): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.snap-store" pid=2599 comm="apparmor_parser"
\[ 320.537680\] audit: type=1400 audit(1704417854.784:43): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.hook.configure" pid=2601 comm="apparmor_parser"
\[ 320.546954\] audit: type=1400 audit(1704417854.792:44): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.snap-store" pid=2602 comm="apparmor_parser"
\[ 320.547870\] audit: type=1400 audit(1704417854.792:45): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software-local-file" pid=2604 comm="apparmor_parser"
\[ 320.561320\] audit: type=1400 audit(1704417854.804:46): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=2603 comm="apparmor_parser"
\[ 321.844676\] loop13: detected capacity change from 0 to 8
\[ 322.196156\] audit: type=1400 audit(1704417856.440:47): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=2708 comm="apparmor_parser"
\[ 322.225387\] audit: type=1400 audit(1704417856.472:48): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/20671/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=2708 comm="apparmor_parser"
\[ 322.466790\] audit: type=1400 audit(1704417856.712:49): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.hook.configure" pid=2711 comm="apparmor_parser"
\[ 490.241995\] usb 3-2: new high-speed USB device number 4 using xhci_hcd
\[ 490.399983\] usb 3-2: New USB device found, idVendor=2c7c, idProduct=0125, bcdDevice= 3.18
\[ 490.399992\] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
\[ 490.399996\] usb 3-2: Product: Android
\[ 490.399999\] usb 3-2: Manufacturer: Android
\[ 490.441771\] usbcore: registered new interface driver usbserial_generic
\[ 490.441804\] usbserial: USB Serial support registered for generic
\[ 490.444564\] usbcore: registered new interface driver cdc_wdm
\[ 490.447789\] usbcore: registered new interface driver option
\[ 490.447801\] usbserial: USB Serial support registered for GSM modem (1-port)
\[ 490.447909\] option 3-2:1.0: GSM modem (1-port) converter detected
\[ 490.448022\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB0
\[ 490.448074\] option 3-2:1.1: GSM modem (1-port) converter detected
\[ 490.448166\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB1
\[ 490.448208\] option 3-2:1.2: GSM modem (1-port) converter detected
\[ 490.448282\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB2
\[ 490.448315\] option 3-2:1.3: GSM modem (1-port) converter detected
\[ 490.448406\] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB3
\[ 490.448810\] qmi_wwan 3-2:1.4: cdc-wdm0: USB WDM device
\[ 490.449917\] qmi_wwan 3-2:1.4 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-2, WWAN/QMI device, d6:49:5d:75:15:67
\[ 490.449948\] usbcore: registered new interface driver qmi_wwan
\[ 588.322914\] r8169 0000:07:00.0 enp7s0: Link is Down
\[ 882.885532\] r8169 0000:07:00.0 enp7s0: Link is Up - 1Gbps/Full - flow control rx/tx
\[ 1547.093014\] r8169 0000:07:00.0 enp7s0: Link is Down
\[ 2378.489893\] usb 3-2: USB disconnect, device number 4
\[ 2378.490192\] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
\[ 2378.490223\] option 3-2:1.0: device disconnected
\[ 2378.490445\] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
\[ 2378.490467\] option 3-2:1.1: device disconnected
\[ 2378.490760\] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
\[ 2378.490783\] option 3-2:1.2: device disconnected
\[ 2378.491122\] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
\[ 2378.491145\] option 3-2:1.3: device disconnected
\[ 2378.491534\] qmi_wwan 3-2:1.4 wwan0: unregister 'qmi_wwan' usb-0000:00:14.0-2, WWAN/QMI device

ifconfig1【插入EC20之前】
enp7s0: flags=4099\