#将模块配置为 RNDIS 状态
AT+QCFG="usbnet",3
#拨号
AT+qnetdevctl=1,1
#查询设置是否生效:AT+QCFG=”usbnet” 返回是 3 即可
AT+QCFG="usbnet"
#断开拨号
AT+qnetdevctl=0,1
离线
EC200s 接 Ubuntu, 居然只有rndis设备, 确没有串口设备, 折腾半天了.
有没有折腾过的大佬, 请教一下.
离线
[404376.840754] usb 1-3: new high-speed USB device number 22 using ehci-pci
[404377.107138] usb 1-3: New USB device found, idVendor=2c7c, idProduct=6002, bcdDevice= 3.18
[404377.107140] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[404377.107142] usb 1-3: Product: Android
[404377.107143] usb 1-3: Manufacturer: Android
[404377.107144] usb 1-3: SerialNumber: 0000
[404377.128274] rndis_host 1-3:1.0 usb0: register 'rndis_host' at usb-0000:02:03.0-3, RNDIS device, 9e:5b:dd:bc:2c:28
[404377.236577] rndis_host 1-3:1.0 ens35u3: renamed from usb0
只有RNDSI, 并没有出现串口
离线
$ lsusb
Bus 001 Device 022: ID 2c7c:6002
...
这是lsusb的结果.
离线
网上找到几行命令:
sudo modprobe option
sudo chmod 777 /sys/bus/usb-serial/drivers/option1/new_id
sudo echo 2c7c 6002 > /sys/bus/usb-serial/drivers/option1/new_id
终于搞定:
[404674.221604] usbcore: registered new interface driver option
[404674.223089] usbserial: USB Serial support registered for GSM modem (1-port)
[404727.747542] option 1-3:1.2: GSM modem (1-port) converter detected
[404727.754413] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
[404727.754493] option 1-3:1.3: GSM modem (1-port) converter detected
[404727.757533] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB1
[404727.757583] option 1-3:1.4: GSM modem (1-port) converter detected
[404727.770387] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB2
离线
# lsusb
Bus 001 Device 005: ID 2c7c:6002
...
#
# dmesg
[ 410.496186] usb 1-1.3: new high-speed USB device number 5 using ehci-platform
[ 410.752369] rndis_host 1-1.3:1.0 usb0: register 'rndis_host' at usb-1c1a000.usb-1.3, RNDIS device, 56:8b:c9:8b:ca:37
#
# echo 2c7c 6002 > /sys/bus/usb-serial/drivers/option1/new_id
[ 438.245239] option 1-1.3:1.2: GSM modem (1-port) converter detected
[ 438.255804] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[ 438.263604] option 1-1.3:1.3: GSM modem (1-port) converter detected
[ 438.274965] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[ 438.282845] option 1-1.3:1.4: GSM modem (1-port) converter detected
[ 438.293149] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
#
# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2
A64 驱动EC200s成功.
离线
通过echo命令行发送AT拨号命令:
echo 2c7c 6002 > /sys/bus/usb-serial/drivers/option1/new_id
echo -e "AT+QCFG=\"usbnet\",3\n\n" > /dev/ttyUSB1
echo -e "AT+qnetdevctl=1,1\n\n" > /dev/ttyUSB1
自动获取IP地址,
# udhcpc -i usb0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.43.100
udhcpc: lease of 192.168.43.100 obtained, lease time 86400
deleting routers
adding dns 192.168.43.1
# ping www.163.com
PING www.163.com (122.70.142.37): 56 data bytes
64 bytes from 122.70.142.37: seq=0 ttl=54 time=62.715 ms
64 bytes from 122.70.142.37: seq=1 ttl=54 time=116.957 ms
64 bytes from 122.70.142.37: seq=2 ttl=54 time=126.108 ms
64 bytes from 122.70.142.37: seq=3 ttl=54 time=76.104 ms
64 bytes from 122.70.142.37: seq=4 ttl=54 time=86.103 ms
64 bytes from 122.70.142.37: seq=5 ttl=54 time=76.104 ms
64 bytes from 122.70.142.37: seq=6 ttl=54 time=86.248 ms
64 bytes from 122.70.142.37: seq=7 ttl=54 time=76.230 ms
64 bytes from 122.70.142.37: seq=8 ttl=54 time=76.357 ms
然后就可以上网了.
离线
也发一个荔枝派zero 全志V3s 32M spi flash 固件,800x480 LCD, 开机自动运行 Qt analogclock
http://whycan.cn/t_3400.html#p47841
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)
正在学习这个帖子, 准备做一个简易的 WIFI 4G路由器
离线