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

相關內容