如果是使用网友分享的 .dd 文件直接烧录,是可以直接联网的,但自己烧录的内核则有点问题。
根据官方提示查询是否存在 usb0
# 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 0E:AA:27:FC:E3:CF
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 192.168.2.140
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 0e:aa:27:fc:e3:cf brd ff:ff:ff:ff:ff:ff
inet 192.168.2.140/24 brd 192.168.2.255 scope global usb0
valid_lft forever preferred_lft forever
# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
^C
--- 192.168.2.1 ping statistics ---
69 packets transmitted, 0 packets received, 100% packet loss
但是经过以上操作,并不能ping通,已经确保OTG链接到路由器,能上网
离线
@linux-xc
first get ip address from dhcp server,then ping ip could fine
离线
@linux-xc
first get ip address from dhcp server,then ping ip could fine
并不能使用dhcp获取ip,但路由器已经开启dhcp
离线