首页 > 其他分享 >4. imx8mmini新增USB网口

4. imx8mmini新增USB网口

时间:2024-09-11 17:15:16浏览次数:8  
标签:uninitialized ax88179 USB 1.2 网口 device 178a net imx8mmini

imx8mmini 本身只有一个物理网口,可以使用 usb 接口外接一个usb网口

我使用的是绿联的 USB3.0 HUB转换器:绿联USB3.0 HUB网卡转换器 (lulian.cn)

配置Linux,使用的内核是Linux5.15.114

在 .config 里加入 

CONFIG_USB_NET_AX88179_178A=y

重新编译烧录,可以识别到USB网卡,但是报错如下

Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    3.300177] usb 1-1.2.1: new high-speed USB device number 4 using ci_hdrc
[    3.728890] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    3.746122] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    3.971513] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.096640] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0006: -32
[    4.106749] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): invalid MAC address, using random
[    4.124172] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0006: -32
[    4.142739] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0005: -32
[    4.159994] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.177027] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.195642] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.212944] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.230024] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    4.248937] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.266327] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    4.283563] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -32
[    4.302112] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.319381] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x001f: -32
[    4.336624] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0019: -32
[    4.355136] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x001f: -32
[    4.372385] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    4.389615] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000e: -32
[    4.408113] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    4.425359] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x000e: -32
[    4.442641] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    4.461133] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000e: -32
[    4.478378] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    4.495615] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x000e: -32
[    4.514385] ax88179_178a 1-1.2.1:2.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32
[    4.524951] ax88179_178a 1-1.2.1:2.0 eth1: register 'ax88179_178a' at usb-ci_hdrc.1-1.2.1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 2a:5b:a6:ff:38:64
[    4.616970] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    4.634110] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    4.861005] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    4.983879] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to read reg index 0x0006: -32
[    4.993982] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): invalid MAC address, using random
[    5.011450] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0006: -32
[    5.028429] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0005: -32
[    5.047364] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    5.064488] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    5.081886] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    5.100490] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    5.117926] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    5.135135] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    5.153865] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0002: -32
[    5.171136] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -32
[    5.188263] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -32
[    5.206802] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x001f: -32
[    5.224254] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x0019: -32
[    5.241718] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x001f: -32
[    5.258320] loop0: detected capacity change from 0 to 213160
[    5.260541] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    5.280406] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000e: -32
[    5.297935] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    5.316575] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to read reg index 0x000e: -32
[    5.320401] loop0: detected capacity change from 213160 to 206248
[    5.333717] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    5.334298] mount_root: overlay filesystem in /dev/loop0 has not been formatted yet
[    5.350937] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000e: -32
[    5.369596] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000d: -32
[    5.386666] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to write reg index 0x000e: -32
[    5.404348] ax88179_178a 1-1.2.1:2.1 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32
[    5.415046] ax88179_178a 1-1.2.1:2.1 eth2: register 'ax88179_178a' at usb-ci_hdrc.1-1.2.1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 16:43:fe:ad:79:58
[    6.451641] usb 1-1.2.1: USB disconnect, device number 4
[    6.457120] ax88179_178a 1-1.2.1:2.0 eth1: unregister 'ax88179_178a' usb-ci_hdrc.1-1.2.1, ASIX AX88179 USB 3.0 Gigabit Ethernet
[    6.487819] ax88179_178a 1-1.2.1:2.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
[    6.496554] ax88179_178a 1-1.2.1:2.0 eth1 (unregistered): Failed to write reg index 0x0001: -19
[    6.505268] ax88179_178a 1-1.2.1:2.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
[    6.514187] ax88179_178a 1-1.2.1:2.1 eth2: unregister 'ax88179_178a' usb-ci_hdrc.1-1.2.1, ASIX AX88179 USB 3.0 Gigabit Ethernet
[    6.539813] ax88179_178a 1-1.2.1:2.1 eth2 (unregistered): Failed to write reg index 0x0002: -19
[    6.548541] ax88179_178a 1-1.2.1:2.1 eth2 (unregistered): Failed to write reg index 0x0001: -19
[    6.557255] ax88179_178a 1-1.2.1:2.1 eth2 (unregistered): Failed to write reg index 0x0002: -19
[    7.360153] usb 1-1.2.1: new high-speed USB device number 5 using ci_hdrc

 

参考网友的帖子:Ubuntu 22.04 安装使用绿联千兆网口 AX88179 - 九层台 (wj2015.com)

git地址:git clone https://github.com/nothingstopsme/AX88179_178A_Linux_Driver

更替 linux-5.15.114/drivers/net/usb/ax88179_178a.c 驱动文件

重新编译,不会报错了:

Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    3.236030] usb 1-1.2.1: new high-speed USB device number 4 using ci_hdrc
[    4.024823] ax88179_178a 1-1.2.1:1.0 (unnamed net_device) (uninitialized): Found invalid EEPROM MAC address value: [ff-ff-ff-ff-ff-ff]
[    4.203706] ax88179_178a 1-1.2.1:1.0 (unnamed net_device) (uninitialized): Found invalid EEPROM part or non-EEPROM
[    4.387176] ax88179_178a 1-1.2.1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0040: -32
[    4.593186] ax88179_178a 1-1.2.1:1.0 (unnamed net_device) (uninitialized): ASIX USB Ethernet Adapter:v1.20.0         http://www.asix.com.tw
[    4.605123] ax88179_178a 1-1.2.1:1.0 (unnamed net_device) (uninitialized): mtu 1500
[    4.613338] ax88179_178a 1-1.2.1:1.0 eth1: register 'ax88179_178a' at usb-ci_hdrc.1-1.2.1, , 00:0e:c6:8e:03:74
[    5.193878] loop0: detected capacity change from 0 to 213160
[    5.216335] loop0: detected capacity change from 213160 to 206248
[    5.224066] mount_root: overlay filesystem in /dev/loop0 has not been formatted yet
[    7.204680] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.212493] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

可以使用两个物理网卡了,eth0 和 eth1(usB网卡)

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr A6:F7:1A:73:9B:2D
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd4f:9478:947f::1/60 Scope:Global
          inet6 addr: fe80::a4f7:1aff:fe73:9b2d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:382 errors:0 dropped:0 overruns:0 frame:0
          TX packets:343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:36902 (36.0 KiB)  TX bytes:36756 (35.8 KiB)

eth0      Link encap:Ethernet  HWaddr A6:F7:1A:73:9B:2D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:382 errors:0 dropped:0 overruns:0 frame:0
          TX packets:344 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:44542 (43.4 KiB)  TX bytes:36846 (35.9 KiB)

eth1      Link encap:Ethernet  HWaddr 00:0E:C6:8E:03:74
          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)

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:32 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2496 (2.4 KiB)  TX bytes:2496 (2.4 KiB)

 

标签:uninitialized,ax88179,USB,1.2,网口,device,178a,net,imx8mmini
From: https://www.cnblogs.com/f1engmin11/p/18407617

相关文章

  • USB LPM状态
    USB的u0、u1、u2和u3代表不同的电源状态或低功耗状态,主要用于USB3.0及其更高版本,目的是在不活动时减少功耗,同时保证设备能够迅速恢复到工作状态。这些状态的具体作用如下:U0(ActiveState):这是USB设备的正常工作状态,数据可以正常传输,设备完全活跃。U1(LowPowerState1):这......
  • 苹果新品发布会将推出AirPods Max 2头戴式耳机:降噪功能提升 改用USB-C接口
    9月9日消息,古尔曼今日发文称,苹果将在明日的“It'sGlowtime”活动中推出新的AirPodsMax。这是自2020年12月该耳机亮相以来的首次更新,而新的AirPodsMax将在明天的活动中与新的AirPods4一起推出。不过,此前古尔曼预测苹果不会推出新款AirPodsMax,而此次的发布消息打破了这一预测......
  • linux系统usb设备的自动挂载、自动卸载(udev-media-automount)
    不推荐通过编辑/etc/fstab文件挂载方式,因为一旦拔掉硬盘或者更换硬盘后,系统就启动不起来了。这里推荐使用udev-media-automount开源网址: https://github.com/Ferk/udev-media-automount1、下载软件包:cd/目录,进入某个目录下,然后通过一下命令下载或者直接下载解压拷贝进去......
  • Openwrt每分钟检查并自动挂载NTFS格式中文内容USB硬盘
    上一篇文章后我发现这硬盘连接并不是十分稳定,三天两头掉挂载,每次掉了都要再ctrlCV一遍代码还是蛮麻烦的,干脆多敲点面条字一次完事。编写代码注意:取用时请您自己修改代码中的uuid#!/bin/sh#定义硬盘的UUID和挂载点UUID="你硬盘的uuid"MOUNT_POINT="/mnt/usb"#使用b......
  • 【QNX+Android虚拟化方案】121 - Android 侧 USB3.0 插拔过程
    【QNX+Android虚拟化方案】121-Android侧USB3.0插拔过程基于原生纯净代码,自学总结纯技术分享,不会也不敢涉项目、不泄密、不传播代码文档!!!本文禁止转载分享!!!汇总链接:《【QNX+Android虚拟化方案】00-系列文章链接汇总》本文链接:《【QNX+Android虚拟化方案】1......
  • 【零基础玩转树莓派】03-USB摄像头和CSI摄像头的使用
    摄像头USB摄像头的使用环境搭建FSWebcam是一个简洁明了的网络摄像头应用程序,软件安装命令如下:sudoaptinstallfswebcam添加用户权限:sudousermod-a-Gvideo示例:添加pi用户权限到群组中:sudousermod-a-Gvideopi检查用户是否已正确添加到群组中:groups查看USB......
  • r940 网卡有4个网口,是否可以配置其它网口另一台r940服务器直连
    是的,DellPowerEdgeR940的网卡拥有4个网口,可以通过网络配置将其中一些网口用于直连另一台R940服务器。你可以使用这些网口建立直连网络,以提高服务器间的通信效率或创建特定的网络拓扑。以下是你可以采取的步骤和配置方法:1.物理连接将一根以太网线直接连接两台R940服务......
  • FT232使用libusb控制GPIO
    FT232使用官方驱动控制GPIO很简单打开FT_OpenEx,FT_SetBitMode(FT_BITMODE_ASYNC_BITBANG)写FT_Write读FT_Read使用libusb方式打开// libusb-win32(v1.2.6.0)BOOL CHubGpio::InitLibusb(){ structusb_interface_descriptor*setting; structusb_bus *bus;......
  • USB configfs与USB functionfs的区别及关系
    configfs和functionfs是Linux内核中用于配置和管理USB设备行为的两种不同的文件系统,它们各自的用途和工作方式有所不同,但在USBGadget子系统中可以结合使用。以下是它们的区别和关系:1.configfs:用途:用于配置和管理USB设备的整体功能和配置。工作原理:config......
  • 监听USB设备插拔
    ///<summary>///监听USB设备插拔///</summary>publicclassUsbNotification{[DllImport("user32.dll")]publicstaticexternIntPtrRegisterDeviceNotification(IntPtrhRecipient,IntPtrNotificationFilt......