USB网卡需要相关的驱动才能使用
2. 解压 编译 安装
tar xjvf AX88772C_772B_772A_760_772_178_Linux_Driver_v4.23.0_Source.tar.bz2 #解压
cd AX88772C_772B_772A_760_772_178_Linux_Driver_v4.23.0_Source
make
sudo make install # 安装到 /lib/modules/4.4.0-112-generic/kernel/drivers/net/usb/asix.ko
3. 动态加载模块 insmod
sudo insmod/lib/modules/4.4.0-112-generic/kernel/drivers/net/usb/asix.ko
报错:
Unknown symbol in module
查看错误信息:
dmesg |tail
[1494771.981543] asix: Unknown symbol generic_mii_ioctl (err 0)
[1494771.981562] asix: Unknown symbol mii_ethtool_gset (err 0)
[1494944.261810] asix: Unknown symbol mii_ethtool_sset (err 0)
[1494944.261829] asix: Unknown symbol mii_link_ok (err 0)
[1494944.261881] asix: Unknown symbol mii_nway_restart (err 0)
[1494944.261906] asix: Unknown symbol generic_mii_ioctl (err 0)
[1494944.261926] asix: Unknown symbol mii_ethtool_gset (err 0)
查看模块asix.ko的依赖信息:
modinfo asix|grep depends
depends: mii # 依赖模块mii
4.加载内核模块mii
modprob mii
然后 在insmod axis 模块
lsmod 列出已经加载的模块,
lsmod | grep asix
asix61440 0
mii16384 2 asix
最后 ifconfig 查看已有的网卡:
enx000ec6b493bf Link encap:Ethernet HWaddr 00:0e:c6:b4:93:bf
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::1525:8b8b:d3b4:a1c3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:572 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:53267 (53.2 KB) TX bytes:9396 (9.3 KB)