无法 ping google.com - 在英特尔 Edison 上启用 3g 调制解调器支持

无法 ping google.com - 在英特尔 Edison 上启用 3g 调制解调器支持

我正在尝试在英特尔爱迪生上启动 USB 3g 调制解调器(华为 E8231)。

关于爱迪生:

通过 yocto build 启用 cdc_ether 驱动程序后,我发现插入加密狗时创建了一个以太网设备。

内核日志:

[ 2562.441551] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 2562.442638] scsi1 : usb-storage 1-1:1.0
[ 2563.169095] usb 1-1: USB disconnect, device number 4
[ 2563.537339] usb 1-1: new high-speed USB device number 5 using dwc3-host
[ 2563.559524] usb 1-1: New USB device found, idVendor=12d1, idProduct=14db
[ 2563.559554] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2563.559576] usb 1-1: Product: HUAWEI Mobile
[ 2563.559595] usb 1-1: Manufacturer: HUAWEI
[ 2563.645936] cdc_ether 1-1:1.0 eth0: register 'cdc_ether' at usb-dwc3-host.2-1, CDC Ethernet Device, 00:1e:10:1f:00:00
[ 2563.730525] systemd-udevd[330]: renamed network interface eth0 to enp0s17u1

然后我打开了 enp0s17u1

ifconfig enp0s17u1 up

# ifconfig
enp0s17u1 Link encap:Ethernet  HWaddr 00:1e:10:1f:00:00  
          inet6 addr: fe80::21e:10ff:fe1f:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:277 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:129344 (126.3 KiB)  TX bytes:378 (378.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:12160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:923616 (901.9 KiB)  TX bytes:923616 (901.9 KiB)

usb0      Link encap:Ethernet  HWaddr 02:00:86:07:72:b2  
          inet addr:192.168.2.15  Bcast:192.168.2.255  Mask:255.255.255.0
          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)

界面看起来是,up但是我无法 ping 任何网站。

# ping google.com
ping: bad address 'google.com'

我尝试 ping 该 IP 地址。同样没有成功。

~# ping 216.58.200.174
PING 216.58.200.174 (216.58.200.174): 56 data bytes
ping: sendto: Network is unreachable

基本上我该如何调试它?这是 DNS 服务器的问题吗?我不知道。我正在尝试弄清楚。

在我的笔记本电脑(Ubuntu)上:

我在我的 Ubuntu PC 上尝试了同样的步骤。这是我插入调制解调器并执行 usb_modemswitch 后的内核日志

[95623.780650] usb 1-3: SerialNumber: FFFFFFFFFFFFFFFF
[95623.782995] usb-storage 1-3:1.0: USB Mass Storage device detected
[95623.783738] scsi host8: usb-storage 1-3:1.0
[95624.792497] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[95624.862764] sr 8:0:0:0: [sr0] scsi-1 drive
[95624.863611] sr 8:0:0:0: Attached scsi CD-ROM sr0
[95624.863997] sr 8:0:0:0: Attached scsi generic sg1 type 5
[95631.737629] usb 1-3: USB disconnect, device number 43
[95632.103018] usb 1-3: new high-speed USB device number 44 using xhci_hcd
[95632.260716] usb 1-3: New USB device found, idVendor=12d1, idProduct=14db
[95632.260729] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[95632.260737] usb 1-3: Product: HUAWEI Mobile
[95632.260743] usb 1-3: Manufacturer: HUAWEI
[95632.345186] cdc_ether 1-3:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-3, CDC Ethernet Device, 00:1e:10:1f:00:00
[95632.383256] cdc_ether 1-3:1.0 enx001e101f0000: renamed from eth0
[95632.412058] IPv6: ADDRCONF(NETDEV_UP): enx001e101f0000: link is not ready
[95632.412172] cdc_ether 1-3:1.0 enx001e101f0000: kevent 12 may have been dropped
[95632.412177] cdc_ether 1-3:1.0 enx001e101f0000: kevent 12 may have been dropped
[95632.433168] IPv6: ADDRCONF(NETDEV_UP): enx001e101f0000: link is not ready
[95634.671760] IPv6: ADDRCONF(NETDEV_CHANGE): enx001e101f0000: link becomes ready

以太网链路已准备就绪。我不需要再做ifconfig enx001e101f0000 up任何事情。一切都按默认方式进行,我可以毫无问题地使用互联网。

因此,我怀疑是某些缺失的内核配置或缺失的配置导致了该问题。

我正在寻找提示/线索来调试这个问题。

答案1

好吧,我必须启动 dhcp 客户端,然后一切就开始在 edison 上工作了。

udhcpc -i enp0s17u1

相关内容