BeagleBone Black安装小米随身WiFi驱动方法
以下操作直接在beaglebone black上执行
-
下载驱动源码
git clone https://github.com/rcn-ee/mt7601u.git
-
下载linux-headers,这是编译模块驱动所必须的内核头文件
apt-get install linux-headers-$(uname -r)
-
修改build.sh
make_options="CROSS_COMPILE= LINUX_SRC=/lib/modules/$(uname -r)/build"
-
修改驱动源码,添加小米随时wifi的硬件id
src/common/rtusb_dev_id.c
/* module table */ USB_DEVICE_ID rtusb_dev_id[] = { #ifdef RT6570 {USB_DEVICE(0x148f,0x6570)}, /* Ralink 6570 */ #endif /* RT6570 */ {USB_DEVICE(0x148f, 0x7650)}, /* MT7650 */ #ifdef MT7601U {USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */ {USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */ {USB_DEVICE(0x148f,0x760b)}, /* 360 wifi */ {USB_DEVICE(0x2a5f,0x1000)}, /* Tencent wifi QQ */ {USB_DEVICE(0x2955,0x0001)}, /* XiaoDu Wifi */ {USB_DEVICE(0x2955,0x1001)}, /* XiaoDu Wifi */ {USB_DEVICE(0x2955,0x1003)}, /* nuomi wifi */ {USB_DEVICE(0x2717,0x4106)}, /* Xiaomi Wifi ×××添加了这一行×××*/ #endif /* MT7601U */ { }/* Terminating entry */ };
-
内核日志
- 修改前:
[ 196.892520] usbcore: deregistering interface driver rt2870 [ 206.829814] usbcore: registered new interface driver rt2870 [ 215.138186] usbcore: deregistering interface driver rt2870
- 修改后
[ 253.173380] rt2870 1-1:1.0: usb_probe_interface [ 253.178406] rt2870 1-1:1.0: usb_probe_interface - got id [ 253.215195] usbcore: registered new interface driver rt2870 [ 274.802182] usb 1-1: ifconfig timed out on ep0in len=0/4
-
发现原来的ralink公司被联发科收购了,英文名就叫mediatek,在linux 4.0的版本中已经有(小米)这个网卡的驱动了,在drivers/net/wireless目录中