usb0网络接口起不来

usb0网络接口起不来

我已将嵌入式板连接到usb0Linux 机器的接口以ssh与其建立连接。

ifconfig告诉我:

usb0      Link encap:Ethernet  HWaddr 16:43:4D:AA:E8:5A
          inet addr:192.168.2.5  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)

但这不是“运行”。如何启动该界面?司机失踪了吗?lsusb找到设备。该设备本身运行 Yocto Linux。

答案1

当您启动内核时,您是否看到过类似如下的消息。如果是,假设您已经正确安装了 linux 驱动程序。

asix 3-3:1.0 eth0:在 usb-0000:00:14.0-3 处注册“asix”,ASIX AX88772B USB 2.0 以太网,00:0e:c6:c0:d0:5e

接下来,请使用以下命令检查链路状态,确保物理链路已启动且连接良好。请帮忙粘贴您的测试日志,我可以根据您的设置获取更多信息。

# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 16
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pg
        Wake-on: p
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0E:C6:C0:D0:5E
          inet addr:10.0.0.143  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17 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:1898 (1.8 KiB)  TX bytes:0 (0.0 B)

答案2

我认为他问的是如何调出usb0界面:

sudo ifconfig usb0 up

root 必须运行这个,sudo 是可选的,具体取决于你是谁。您可以通过 来了解whoami

相关内容