您尚未登录。

楼主 # 2022-06-30 23:13:11

linux-xc
会员
注册时间: 2022-06-28
已发帖子: 29
积分: 51

荔枝派zero 如何使用OTG联网

如果是使用网友分享的 .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链接到路由器,能上网

离线

#2 2022-07-01 09:30:01

varzhou
会员
注册时间: 2020-07-14
已发帖子: 104
积分: 3

Re: 荔枝派zero 如何使用OTG联网

@linux-xc

first get ip address from dhcp server,then ping ip could fine

离线

楼主 #3 2022-07-01 13:44:26

linux-xc
会员
注册时间: 2022-06-28
已发帖子: 29
积分: 51

Re: 荔枝派zero 如何使用OTG联网

varzhou 说:

@linux-xc

first get ip address from dhcp server,then ping ip could fine

并不能使用dhcp获取ip,但路由器已经开启dhcp

离线

页脚

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

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