一个接插件的玩笑
上次开机后,发现一个问题想看背面标识翻起时发现板卡就掉电了,测试了一下12V电源的插头发现无论如何弯折都没有问题,然后查看《MYC-YG2LX 硬件设计指南-1.0.pdf》中的电源接口
果断找来一个DC公头将VCC接到1,GND接到6.然后随意翻动板卡,板卡再也不和开玩笑了。
说回正题
硬件连接
硬件连接上板卡,USB设备简单直接上就行。
驱动加载
查看VID和PID
其中: 2c7c:0125 EC20的VID和PID
dmesg查看kernel加载模块情况
AT指令初步测试
查询信号强度
28是信号质量,范围在0~31之间(99表示无信号),数值越大,信号越大
查询卡是否识别
READY代表就绪
查询运营商
移动卡
root@myir-yg2lx:~# quectel-CM -s cmnet &
[1] 12218
root@myir-yg2lx:~# [01-01_00:23:02:255] Quectel_QConnectManager_Linux_V1.6.0.16
[01-01_00:23:02:257] Find /sys/bus/usb/devices/1-1.1 idVendor=0x2c7c idProduct=0x125, bus=0x001, dev=0x005
[01-01_00:23:02:257] Auto find qmichannel = /dev/cdc-wdm0
[01-01_00:23:02:258] Auto find usbnet_adapter = wwan0
[01-01_00:23:02:258] netcard driver = qmi_wwan, driver version = 5.10.83-cip1-yocto-standard
[01-01_00:23:02:258] ioctl(0x89f3, qmap_settings) failed: No such file or directory, rc=-1
[01-01_00:23:02:259] Modem works in QMI mode
[01-01_00:23:02:271] cdc_wdm_fd = 7
[01-01_00:23:02:360] Get clientWDS = 7
[01-01_00:23:02:393] Get clientDMS = 1
[01-01_00:23:02:424] Get clientNAS = 2
[01-01_00:23:02:457] Get clientUIM = 1
[01-01_00:23:02:488] Get clientWDA = 1
[01-01_00:23:02:521] requestBaseBandVersion EC20CEHDLGR06A09M1G
[01-01_00:23:02:649] requestGetSIMStatus SIMStatus: SIM_READY
[01-01_00:23:02:649] requestSetProfile[1] cmnet///0
[01-01_00:23:02:713] requestGetProfile[1] cmnet///0
[01-01_00:23:02:744] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: LTE
[01-01_00:23:02:777] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[01-01_00:23:02:777] ifconfig wwan0 0.0.0.0
[01-01_00:23:02:792] ifconfig wwan0 down
[01-01_00:23:03:129] requestSetupDataCall WdsConnectionIPv4Handle: 0x87071740
[01-01_00:23:03:257] ifconfig wwan0 up
[01-01_00:23:03:270] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
[01-01_00:23:18:619] File:ql_raw_ip_mode_check Line:127 udhcpc fail to get ip address, try next:
[01-01_00:23:18:620] ifconfig wwan0 down
[01-01_00:23:18:635] echo Y > /sys/class/net/wwan0/qmi/raw_ip
[01-01_00:23:18:635] ifconfig wwan0 up
[01-01_00:23:18:646] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 10.140.144.114
udhcpc: lease of 10.140.144.114 obtained, lease time 7200
RTNETLINK answers: File exists
查看一下ip地址,
轻松4g上网。