您尚未登录。

#1 2021-01-25 14:33:20 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

荔枝派nano插入合宙的4G模块,驱动识别出来了(这个模块在WIN10上面驱动可以正常使用)。

# [13676.718011] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[13676.901065] option 1-1:1.0: GSM modem (1-port) converter detected
[13676.909600] option 1-1:1.1: GSM modem (1-port) converter detected
[13676.916634] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[13676.926004] option 1-1:1.2: GSM modem (1-port) converter detected
[13676.933237] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[13676.943394] option 1-1:1.3: GSM modem (1-port) converter detected
[13676.950619] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[13676.960851] option 1-1:1.4: GSM modem (1-port) converter detected
[13676.968054] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4

# 
# ifconfig -a
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2632 (2.5 KiB)  TX bytes:2632 (2.5 KiB)

usb0      Link encap:Ethernet  HWaddr 22:05:2C:1B:73:F2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 
# ifconfig usb0 up
# 
# udhcpc -i usb0
udhcpc: started, v1.27.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
^C
# 

获取ip一直这样。。。
udhcpc: sending discover

检查了一下/usr/share/udhcpc/default.script这个文件也存在

# cat /usr/share/udhcpc/default.script
#!/bin/sh

# udhcpc script edited by Tim Riker <Tim@Rikers.org>

[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1

RESOLV_CONF="/etc/resolv.conf"
[ -e $RESOLV_CONF ] || touch $RESOLV_CONF
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"

case "$1" in
	deconfig)
		/sbin/ifconfig $interface up
		/sbin/ifconfig $interface 0.0.0.0

		# drop info from this interface
		# resolv.conf may be a symlink to /tmp/, so take care
		TMPFILE=$(mktemp)
		grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
		cat $TMPFILE > $RESOLV_CONF
		rm -f $TMPFILE

		if [ -x /usr/sbin/avahi-autoipd ]; then
			/usr/sbin/avahi-autoipd -k $interface
		fi
		;;

	leasefail|nak)
		if [ -x /usr/sbin/avahi-autoipd ]; then
			/usr/sbin/avahi-autoipd -wD $interface --no-chroot
		fi
		;;

	renew|bound)
		if [ -x /usr/sbin/avahi-autoipd ]; then
			/usr/sbin/avahi-autoipd -k $interface
		fi
		/sbin/ifconfig $interface $ip $BROADCAST $NETMASK

		if [ -n "$router" ] ; then
			echo "deleting routers"
			while route del default gw 0.0.0.0 dev $interface 2> /dev/null; do
				:
			done

			for i in $router ; do
				route add default gw $i dev $interface
			done
		fi

		# drop info from this interface
		# resolv.conf may be a symlink to /tmp/, so take care
		TMPFILE=$(mktemp)
		grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
		cat $TMPFILE > $RESOLV_CONF
		rm -f $TMPFILE

		# prefer rfc3359 domain search list (option 119) if available
		if [ -n "$search" ]; then
			search_list=$search
		elif [ -n "$domain" ]; then
			search_list=$domain
		fi

		[ -n "$search_list" ] &&
			echo "search $search_list # $interface" >> $RESOLV_CONF

		for i in $dns ; do
			echo adding dns $i
			echo "nameserver $i # $interface" >> $RESOLV_CONF
		done
		;;
esac

HOOK_DIR="$0.d"
for hook in "${HOOK_DIR}/"*; do
    [ -f "${hook}" -a -x "${hook}" ] || continue
    "${hook}" "${@}"
done

exit 0
# 
# 

使用AT命令都可以获取到模块ip

echo ATE0 > /dev/ttyUSB3

# cat /dev/ttyUSB3 &
# 
# echo ATE0 > /dev/ttyUSB3
ATE0
# 
# echo ATI > /dev/ttyUSB3
AirM2M_720SG_V290_LTE_AT
OK
# 
# echo AT+CSTT="CMNET" > /dev/ttyUSB3
OK
# echo AT+CIICR > /dev/ttyUSB3
# 
CONNECT
OK
# echo AT+CIFSR > /dev/ttyUSB3
# 
10.152.249.168
#

正确识别4G驱动!

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr AC:00:00:CE:B4:38  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:E6:A8:7C:97:DE  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 
# udhcpc -i eth0
udhcpc: started, v1.27.1
[ 1398.968142] musb-hdrc musb-hdrc.1.auto: int hwep alloc failed for 1x16
ifconfig: SIOCSIFFLAGS: No space left on device
udhcpc: sending discover
udhcpc: sending select for 192.168.0.100
udhcpc: lease of 192.168.0.100 obtained, lease time 86400
deleting routers
adding dns 192.168.0.1
# 
# 
# ping 123.149.232.30
PING 123.149.232.30 (123.149.232.30): 56 data bytes
64 bytes from 123.149.232.30: seq=0 ttl=118 time=1473.042 ms
64 bytes from 123.149.232.30: seq=2 ttl=118 time=847.767 ms
64 bytes from 123.149.232.30: seq=3 ttl=118 time=554.274 ms
^C
--- 123.149.232.30 ping statistics ---
4 packets transmitted, 3 packets received, 25% packet loss
round-trip min/avg/max = 554.274/958.361/1473.042 ms
# 

=================================================================

荔枝派TF卡支持合宙4G模块系统镜像(usb支持adb,rdins,串口等)
F1C100S_RNDIS_HOST_4G_Module.7z

最近编辑记录 大帅 (2021-01-26 11:35:13)

离线

#2 2021-01-25 14:41:19 分享评论

哇酷小二
管理员
注册时间: 2020-04-22
已发帖子: 2,127
积分: 1907

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

udhcpc -i usb0

离线

#3 2021-01-25 14:45:09 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

哇酷小二 说:

udhcpc -i usb0

不行,
# udhcpc -i usb0
udhcpc: started, v1.27.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
^C
#

离线

#4 2021-01-25 14:46:27 分享评论

哇酷小二
管理员
注册时间: 2020-04-22
已发帖子: 2,127
积分: 1907

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

检查天线,供电,和三个LED灯,确认是不是连接成功了。

离线

#5 2021-01-25 14:49:52 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

哇酷小二 说:

检查天线,供电,和三个LED灯,确认是不是连接成功了。

模块的三个灯正常,licheepi使用AT去查,模块联网也正常。

etc/network/interfaces
也增加了
auto usb0
iface usb0 inet dhcp

离线

#6 2021-01-25 14:50:49 分享评论

哇酷小二
管理员
注册时间: 2020-04-22
已发帖子: 2,127
积分: 1907

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

那插电脑Ubuntu试一试

离线

#7 2021-01-25 14:54:11 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

哇酷小二 说:

那插电脑Ubuntu试一试

在Ubuntu里面试了,经过测试需要在etc/network/interfaces里面增加
auto usb0
iface usb0 inet dhcp
然后重启网络
/etc/init.d/networking restart
Ubuntu里面就可以ping了,

但是在licheepi里面没有重启网络命令,使用
ifconfig usb0 down
ifconfig usb0 up
之后ping还是不行

离线

#8 2021-01-25 14:57:56 分享评论

拉轰的脚踏车
会员
注册时间: 2020-03-20
已发帖子: 224
积分: 188

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

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

离线

#9 2021-01-25 15:03:51 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

拉轰的脚踏车 说:

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

可惜不能用这个固件测试,我的是荔枝派nano

离线

#10 2021-01-25 17:19:11 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

发现个问题,usb0网卡一直没有running,不知道为什么。。。

离线

#11 2021-01-26 00:25:32 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr AC:00:00:CE:B4:38  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:E6:A8:7C:97:DE  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 
# udhcpc -i eth0
udhcpc: started, v1.27.1
[ 1398.968142] musb-hdrc musb-hdrc.1.auto: int hwep alloc failed for 1x16
ifconfig: SIOCSIFFLAGS: No space left on device
udhcpc: sending discover
udhcpc: sending select for 192.168.0.100
udhcpc: lease of 192.168.0.100 obtained, lease time 86400
deleting routers
adding dns 192.168.0.1
# 
# 
# ping 123.149.232.30
PING 123.149.232.30 (123.149.232.30): 56 data bytes
64 bytes from 123.149.232.30: seq=0 ttl=118 time=1473.042 ms
64 bytes from 123.149.232.30: seq=2 ttl=118 time=847.767 ms
64 bytes from 123.149.232.30: seq=3 ttl=118 time=554.274 ms
^C
--- 123.149.232.30 ping statistics ---
4 packets transmitted, 3 packets received, 25% packet loss
round-trip min/avg/max = 554.274/958.361/1473.042 ms
# 

搞定,搞定!!!

离线

#12 2021-01-26 00:28:37 分享评论

微凉VeiLiang
会员
所在地: 深圳
注册时间: 2018-10-28
已发帖子: 519
积分: 503
个人网站

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

Nice,感谢分享经验

离线

#13 2021-01-26 08:49:23 分享评论

春风吹又生
会员
注册时间: 2020-02-25
已发帖子: 59
积分: 59

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

请问是怎么解决的?

离线

#14 2021-01-26 09:26:38 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

总结一下挖坑经验,稍后贴上来

离线

#15 2021-01-26 11:33:36 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

1.内核usb相关配置
1_20210126-1127.jpg
2_20210126-1127.jpg
编译模块
  $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 modules
安装模块
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install INSTALL_MOD_PATH=/home/osboxes/rootfs/buildroot-2017.08/output/target/lib
把你的 ko 文件用上面的命令安装到你的根文件系统(根据具体情况调整参数),并删除安装目录下面的build和source目录,它软连接到源码。

2. 修改内核使之能驱动合宙模块
2.1 添加usb vid和pid
[内核]/drivers/usb/serial/option.c
3_20210126-1132.jpg
2.2 增加Zero Packet(上图3)

离线

#16 2021-01-26 11:34:44 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

2.3 使能CONFIG_USB_SERIAL_OPTION

4_20210126-1134.jpg

编译内核
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8

离线

#17 2021-01-26 11:38:58 分享评论

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 487
积分: 457

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

感谢分享宝贵经验

离线

#18 2021-01-26 11:45:28 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

# [13676.718011] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[13676.901065] option 1-1:1.0: GSM modem (1-port) converter detected
[13676.909600] option 1-1:1.1: GSM modem (1-port) converter detected
[13676.916634] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[13676.926004] option 1-1:1.2: GSM modem (1-port) converter detected
[13676.933237] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[13676.943394] option 1-1:1.3: GSM modem (1-port) converter detected
[13676.950619] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[13676.960851] option 1-1:1.4: GSM modem (1-port) converter detected
[13676.968054] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2632 (2.5 KiB)  TX bytes:2632 (2.5 KiB)

usb0      Link encap:Ethernet  HWaddr 22:05:2C:1B:73:F2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

合宙的手册说明usb0和usb1是网络网卡,在移植的过程中,发现usb1被识别成GSM串口,
ifconfig -a查看只有lo和usb0网卡,usb0网卡怎么都不能自动获取ip,发现usb0网卡移植
没有RUNNING,并且ping之后TX,RX数据还是零。
后来才知道usb0不是识别出来的4G模块,是RNDIS-DEVICE网卡。
知道问题所在,就好下手,检查下内核驱动,果然是驱动有问题。

离线

#19 2021-01-26 11:57:06 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

2.4
     

跳坑

发现是合宙官方驱动指导说明里有bug。
     

出坑

无意中在看移远的移植驱动时发现针对合宙驱动不能让usb0和usb1被识别为GSM串口驱动。

最近编辑记录 大帅 (2021-01-26 11:57:21)

离线

#20 2021-01-26 16:29:41 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

按上面步骤,移植大移远4G模块,测试!!!

#
#     拔掉模块
#
# [ 1059.077876] usb 1-1: USB disconnect, device number 3
[ 1059.083457] rndis_host 1-1:1.0 usb1: unregister 'rndis_host' usb-musb-hdrc.1.auto-1, RNDIS device
[ 1059.098645] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 1059.106833] option 1-1:1.2: device disconnected
[ 1059.116525] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 1059.124824] option 1-1:1.3: device disconnected
[ 1059.132794] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 1059.141145] option 1-1:1.4: device disconnected

[2]+  Done                       cat /dev/ttyUSB1
#
#
#  再次插入
#
#
# [ 1066.278029] usb 1-1: new high-speed USB device number 4 using musb-hdrc
[ 1066.463978] rndis_host 1-1:1.0 usb1: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, 82:06:9b:08:30:76
[ 1066.476685] option 1-1:1.2: GSM modem (1-port) converter detected
[ 1066.484978] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1066.493156] option 1-1:1.3: GSM modem (1-port) converter detected
[ 1066.501482] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1066.509829] option 1-1:1.4: GSM modem (1-port) converter detected
[ 1066.516747] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2

#
#
# ifconfig -a
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 7A:B3:77:BF:1D:BC 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb1      Link encap:Ethernet  HWaddr 82:06:9B:08:30:76 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#
#
#
# udhcpc -i usb1
udhcpc: started, v1.27.1
udhcpc: sending discover
udhcpc: sending select for 192.168.43.101
udhcpc: lease of 192.168.43.101 obtained, lease time 86400
deleting routers
adding dns 192.168.43.1
#
#
# ping p***.china***.com
PING p***.china***.com (1**.255.205.19): 56 data bytes
64 bytes from 1**.255.205.19: seq=0 ttl=115 time=60.075 ms
64 bytes from 1**.255.205.19: seq=1 ttl=115 time=59.394 ms
64 bytes from 1**.255.205.19: seq=2 ttl=115 time=57.790 ms
64 bytes from 1**.255.205.19: seq=3 ttl=115 time=67.194 ms
64 bytes from 1**.255.205.19: seq=4 ttl=115 time=66.751 ms
64 bytes from 1**.255.205.19: seq=5 ttl=115 time=66.210 ms
64 bytes from 1**.255.205.19: seq=6 ttl=115 time=65.574 ms
64 bytes from 1**.255.205.19: seq=7 ttl=115 time=65.002 ms
^Z[2]+  Stopped                    ping p***.china***.com
#

需要注意的是合宙的模块内置自动拨号,移远的需要AT拨号才可以获取IP。

离线

#21 2021-01-26 16:33:35 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

移远AT指令

# echo ATI > /dev/ttyUSB1
#

Quectel

EC200T

Revision: EC200TCNBAR02A04M16

OK

# echo AT+QCFG="usbnet" > /dev/ttyUSB1
#

+QCFG: "usbnet",3

OK

# echo AT+CGREG? > /dev/ttyUSB1
#

+CGREG: 0,1

OK

# echo AT+CSQ > /dev/ttyUSB1
#

+CSQ: 26,99

OK

离线

#22 2021-01-27 01:37:36 分享评论

卓林
会员
注册时间: 2021-01-10
已发帖子: 21
积分: 16

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

[ 1526.819255] usb 1-1: new high-speed USB device number 8 using musb-hdrc
[ 1527.779254] usb 1-1: new high-speed USB device number 9 using musb-hdrc
[ 1527.963969] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, ac:4b:b3:b9:eb:e5
[ 1527.976257] option 1-1:1.2: GSM modem (1-port) converter detected
[ 1527.984359] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1527.992359] option 1-1:1.3: GSM modem (1-port) converter detected
[ 1528.000486] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1528.008418] option 1-1:1.4: GSM modem (1-port) converter detected
[ 1528.016821] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
# ifconfig                                                                     
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:50:ED:2C:61:50  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 

为什么我按照你说的改完内核和配置还是找不到网卡呢,有ttyUSB1-3三个节点,

离线

#23 2021-01-27 10:21:47 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

卓林 说:
[ 1526.819255] usb 1-1: new high-speed USB device number 8 using musb-hdrc
[ 1527.779254] usb 1-1: new high-speed USB device number 9 using musb-hdrc
[ 1527.963969] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, ac:4b:b3:b9:eb:e5
[ 1527.976257] option 1-1:1.2: GSM modem (1-port) converter detected
[ 1527.984359] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1527.992359] option 1-1:1.3: GSM modem (1-port) converter detected
[ 1528.000486] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1528.008418] option 1-1:1.4: GSM modem (1-port) converter detected
[ 1528.016821] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
# ifconfig                                                                     
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:50:ED:2C:61:50  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 

为什么我按照你说的改完内核和配置还是找不到网卡呢,有ttyUSB1-3三个节点,

你的也是合宙模块么?
重点参考我的2.2章节,哦不好意思,我2.2里面的uid,pid截图时写的不对,你移植的时候修改下就可以了。

离线

#24 2021-01-27 10:22:52 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

@卓林 修改成1286和4e3d

离线

#25 2021-01-27 21:59:04 分享评论

卓林
会员
注册时间: 2021-01-10
已发帖子: 21
积分: 16

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

大帅 说:

@卓林 修改成1286和4e3d

我是根据插在windows上看到的usb设备的VDI和PID设置的
USB\VID_1782&PID_4E00&REV_0000&MI_03
我用的是air724
,可能和你的不一样吧

离线

#26 2021-01-27 22:38:48 分享评论

卓林
会员
注册时间: 2021-01-10
已发帖子: 21
积分: 16

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

非常感谢楼主的慷慨无私,我已经解决问题了。
记录一下:
1.按照楼主说的修改menuconfig和驱动,注意,我使用的板子是白嫖的air724,USB的vid和pid是0x1782和0x4e00;
2.menuconfig中,我直接将驱动编译进内核,没有使用模块加载,编译遇到报错,直接在menuconfig中搜多对应的模块,看不懂就全加上,编译通过。
3.注意到一点,在插上模块之后,看到注册的设备是eth0,楼主的是usb0,这可能更驱动有关系,小白不懂,以后再研究,反正又不是不能用,哈哈;
这个导致我一直在ifconfig中看到不到我的网卡,原因是在etc/network/interfaces中

auto usb0
iface usb0 inet dhcp

改为

auto eth0
iface eth0 inet dhcp

或者手动ifconfig eth0 up
再手动 udhcpc -i eth0
哈哈,没想到困扰我一晚上的事情是自己眼瞎了。

# ifconfig
eth0      Link encap:Ethernet  HWaddr AC:4B:B3:B9:EB:E5  
          inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:668 (668.0 B)  TX bytes:772 (772.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:50:ED:2C:61:50  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
# ping www.baidu.com                                                           
PING www.baidu.com (39.156.66.18): 56 data bytes
64 bytes from 39.156.66.18: seq=0 ttl=52 time=70.221 ms
64 bytes from 39.156.66.18: seq=1 ttl=52 time=39.622 ms
64 bytes from 39.156.66.18: seq=2 ttl=52 time=44.108 ms

最后感谢楼主大帅逼,无私奉献,无私分享,家和万事兴!@大帅

离线

#27 2021-01-28 00:20:02 分享评论

大帅
会员
注册时间: 2019-01-17
已发帖子: 161
积分: 147

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

卓林 说:

非常感谢楼主的慷慨无私,我已经解决问题了。

哈哈,没想到困扰我一晚上的事情是自己眼瞎了。

最后感谢楼主大帅逼,无私奉献,无私分享,家和万事兴!@大帅

大帅 说:

感谢 @卓林 解决问题回复  cool

离线

#28 2021-04-12 16:47:57 分享评论

mafei
会员
注册时间: 2021-04-07
已发帖子: 17
积分: 3.5

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

66666

离线

#29 2021-05-05 18:59:58 分享评论

abin
会员
注册时间: 2021-04-25
已发帖子: 4
积分: 13

Re: 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡

F1C100S你们的USB网口跟4G模块能同时使用吗

离线

页脚

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

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