ME3760

From BananaPro/Pi
Jump to: navigation, search
This page is a translated version of the page ME3760 and the translation is 100% complete.

Other languages:
English • ‎中文(简体)‎

LeMaker Guitar支持多块4G模块,在这里,我们以ZTE ME3760作为例子。

加入驱动

在你使用ME3760 4G设备的时候,你要编译内核去支持4G模块。 请参考相关网站: http://wiki.lemaker.org/LeMaker_Guitar:How_to_use_LeMaker_Guitar_BSP 去加载驱动源码.
输入以下命令去编译Linux内核驱动:

cd linux-actions-bsp/linux-actions
sudo make menuconfig

按以下方式加载驱动:
USB to Serial dirver

 Device Drivers  --->
   USB support  --->
     USB Serial Converter support  ---> 
       USB driver for GSM and CDMA modems

ndis driver

 Device Drivers  --->
   Network device support  --->
     USB Network Adapters  ---> 
       Multi-purpose USB Networking Framework

你必须参考相关网站:http://wiki.lemaker.org/LeMaker_Guitar:How_to_update_Linux_platform_firmware 去更新内核驱动,之后重启系统
你可以查看系统启动日志,出现以下信息4G模块驱动加载成功:

[   23.139985] usb 1-1: not running at top speed; connect to a high speed hub
[   23.141024] usb 1-1: default language 0x0409
[   23.141904] usb 1-1: udev 2, busnum 1, minor = 1
[   23.141931] usb 1-1: New USB device found, idVendor=19d2, idProduct=0199
[   23.141953] usb 1-1: New USB device strings: Mfr=23, Product=24, SerialNumber=25
[   23.141972] usb 1-1: Product: ZTE-Modem
[   23.141989] usb 1-1: Manufacturer: ZTE
[   23.142006] usb 1-1: SerialNumber: ZTE-Modem
[   23.142786] usb 1-1: usb_probe_device
[   23.142819] usb 1-1: configuration #1 chosen from 1 choice
[   23.144397] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[   23.145546] option 1-1:1.0: usb_probe_interface
[   23.145628] option 1-1:1.0: usb_probe_interface - got id
[   23.145786] option 1-1:1.0: GSM modem (1-port) converter detected
[   23.146448] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[   23.146850] usb 1-1: adding 1-1:1.1 (config #1, interface 1)
[   23.147577] option 1-1:1.1: usb_probe_interface
[   23.147657] option 1-1:1.1: usb_probe_interface - got id
[   23.148266] usb 1-1: adding 1-1:1.2 (config #1, interface 2)
[   23.149032] option 1-1:1.2: usb_probe_interface
[   23.149110] option 1-1:1.2: usb_probe_interface - got id
[   23.149416] option 1-1:1.2: GSM modem (1-port) converter detected
[   23.150340] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[   23.150917] usb 1-1: adding 1-1:1.3 (config #1, interface 3)
[   23.151941] option 1-1:1.3: usb_probe_interface
[   23.152026] option 1-1:1.3: usb_probe_interface - got id
[   23.152168] option 1-1:1.3: GSM modem (1-port) converter detected
[   23.152873] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[   23.195234] cdc_ether 1-1:1.1: usb_probe_interface
[   23.195282] cdc_ether 1-1:1.1: usb_probe_interface - got id
[   23.195320] cdc_ether 1-1:1.1: ZTE Ethernet Device: claiming interface 1
[   23.195396] usb 1-1: bad CDC descriptors
[   23.198888] cdc_ether 1-1:1.1 eth1: register 'cdc_ether' at usb-aotg_hcd.0-1, ZTE Ethernet Device, 26:76:4e:c9:89:fa
[   23.200238] usbcore: registered new interface driver cdc_ether

如果驱动启动正确,我们运用下面命令可以得到以下结果:

lsmod
Module                  Size  Used by
cdc_ether               8844  0 
usbnet                 30162  1 cdc_ether
cdc_encap               4880  1 cdc_ether
 
ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2

我们可以使用"ifconfig -a"命令去罗列所有网路设备

使用4G模块

输入以下命令去打开ttyUSB0

minicom –D /dev/ttyUSB0

使用4G设备上网

Input:AT+CFUN=1

 Return:OK
         +CREG: 2
         ……
 Input:AT+CPIN? 
 Return:+CPIN: READY
          OK
 Input:AT+CGDCONT=1,"IP"
 Return:+CME ERROR: 3
 Input:AT+CGACT=1,1
 Return:OK
         +ZGIPDNS: 1,1,"IP","10.50.113.31","0.0.0.0","221.179.38.7","120.196.165.7"
 Input:AT+ZGACT=1,1
 Return:OK

输入以下命令获得IP地址:

dhclient ethx

使用4G模块打电话

输入:AT+CFUN=1

 Return:OK
      +CREG: 2
       ……
 Input:AT+CPIN?
 Return:+CPIN: READY
       OK
 Input:ATD15815822222;
 Return:……


另请参阅

[[1]]