ZTE ME3630 4G模块在Hi3559AV100平台上拨号指令流程

    技术2023-04-02  86

    ZTE ME3630 4G模块在Hi3559AV100平台上拨号指令流程

    驱动配置

    内核版本linux-4.9.37

        CONFIG_USB_SERIAL=y     CONFIG_USB_SERIAL_OPTION=y     CONFIG_USB_SERIAL_WWAN=y    

        CONFIG_USB_USBNET=y     CONFIG_NETDEVICES=y     CONFIG_USB_NET_CDCETHER=y

    驱动打印

    ~ # usb 1-1: new high-speed USB device number 2 using xhci-hcd cdc_ether 1-1:1.3 usb0: register 'cdc_ether' at usb-12310000.xhci_1-1, ZTE CDC Ethernet Device, 32:fb:ea:3b:4a:81 ~ # lsusb Bus 001 Device 001: ID 1d6b:0002 Bus 001 Device 002: ID 19d2:1476 Bus 002 Device 001: ID 1d6b:0003

    由于没有把id加入到option.c缘故,所以需要手动设置id到option里面

    ~ # echo 19d2 1476 > /sys/bus/usb-serial/drivers/option1/new_id option 1-1:1.0: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 option 1-1:1.1: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 option 1-1:1.2: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2

    拨号流程

    ~ # microcom -s 115200 /dev/ttyUSB1 AT+CPIN? +CPIN: READY OK AT+CSQ +CSQ: 31,99【插了天线】 OK AT+CGDCONT=1,"IP","ctnet"【电信ctnet】 OK AT+ZECMCALL=1 +ZECMCALL: CONNECT OK

    网络测试

    ~ # ifconfig usb0 up cdc_ether 1-1:1.3 usb0: kevent 12 may have been dropped ~ # udhcpc -i usb0 udhcpc: started, v1.26.2 Setting IP address 0.0.0.0 on usb0 udhcpc: sending discover udhcpc: sending select for 100.111.224.65 udhcpc: lease of 100.111.224.65 obtained, lease time 43200 Setting IP address 100.111.224.65 on usb0 Deleting routers route: SIOCDELRT: No such process Adding router 100.111.224.66 Recreating /etc/resolv.conf Adding DNS server 61.139.2.69 Adding DNS server 218.6.200.139 ~ # ping 114.114.114.114 PING 114.114.114.114 (114.114.114.114): 56 data bytes 64 bytes from 114.114.114.114: seq=0 ttl=79 time=204.184 ms 64 bytes from 114.114.114.114: seq=1 ttl=76 time=60.876 ms 64 bytes from 114.114.114.114: seq=2 ttl=69 time=67.376 ms 64 bytes from 114.114.114.114: seq=3 ttl=65 time=57.374 ms ^C --- 114.114.114.114 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 57.374/97.452/204.184 ms ~ # ~ # ping www.baidu.com PING www.baidu.com (14.215.177.38): 56 data bytes 64 bytes from 14.215.177.38: seq=0 ttl=53 time=65.695 ms 64 bytes from 14.215.177.38: seq=1 ttl=53 time=63.874 ms 64 bytes from 14.215.177.38: seq=2 ttl=53 time=54.522 ms 64 bytes from 14.215.177.38: seq=3 ttl=53 time=57.249 ms ^C --- www.baidu.com ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 54.522/60.335/65.695 ms

     

    Processed: 0.015, SQL: 9