您尚未登录。

楼主 #1 2020-08-12 22:07:19

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

#将模块配置为 RNDIS 状态
AT+QCFG="usbnet",3

#拨号
AT+qnetdevctl=1,1
#查询设置是否生效:AT+QCFG=”usbnet” 返回是 3 即可
AT+QCFG="usbnet"

#断开拨号
AT+qnetdevctl=0,1

离线

楼主 #2 2020-08-17 22:13:23

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

EC200s 接 Ubuntu, 居然只有rndis设备, 确没有串口设备, 折腾半天了.

有没有折腾过的大佬, 请教一下.

离线

楼主 #3 2020-08-17 22:23:24

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

[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, 并没有出现串口

离线

楼主 #4 2020-08-17 22:24:22

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

$ lsusb
Bus 001 Device 022: ID 2c7c:6002 
...

这是lsusb的结果.

离线

楼主 #5 2020-08-17 22:31:12

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

网上找到几行命令:

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

离线

楼主 #6 2020-08-17 22:41:59

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

# 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成功.

离线

楼主 #7 2020-08-17 23:05:21

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 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

然后就可以上网了.

离线

楼主 #8 2020-08-17 23:10:08

马前卒
会员
注册时间: 2020-08-08
已发帖子: 56
积分: 54

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

也发一个荔枝派zero 全志V3s 32M spi flash 固件,800x480 LCD, 开机自动运行 Qt analogclock
http://whycan.cn/t_3400.html#p47841
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)


正在学习这个帖子, 准备做一个简易的 WIFI 4G路由器

离线

#9 2020-08-19 14:24:35

1847123212
会员
注册时间: 2019-11-21
已发帖子: 34
积分: 30.5

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

这个要记录一下,省的下次出坑

离线

#10 2021-05-29 23:07:55

microxp
会员
注册时间: 2021-04-27
已发帖子: 30
积分: 16

Re: 移远 EC200s 居然不能自动联网, 还得串口敲命令才行.

是啊好大一个坑,你买的什么版本的200s,我拿了一个试连发命令都不会联网,只能用ppp拨号,200s-CN的

最近编辑记录 microxp (2021-05-30 15:48:03)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn