OpenWRT添加无线USB网卡
2017-02-04 22:20
423 查看
说明
要完成网线网卡的驱动需要在内核中添加驱动,同时还需要将固件放入rootfs中正确的位置,如果需要固件的话。内核驱动添加
因为内核中对常规的USB网卡均支持,所以直接添加即可, 例如下面是对9170的支持:Firmware添加
在menuconfig中直接添加:启动确认
启动后,我们需要等待rootfs完成后再插入, 这样子可以比较容易看到log, 对于TPLink的其中一款,对应的log如下:[ 1015.718981] usb 1-1.2.4: new high-speed USB device number 9 using ci_hdrc [ 1015.978998] usb 1-1.2.4: reset high-speed USB device number 9 using ci_hdrc [ 1016.136841] usb 1-1.2.4: driver API: 1.9.7 2012-12-15 [1-1] [ 1016.145314] usb 1-1.2.4: firmware API: 1.9.6 2012-07-07 [ 1016.497852] ath: EEPROM regdomain: 0x809c [ 1016.497905] ath: EEPROM indicates we should expect a country code [ 1016.497942] ath: doing EEPROM country->regdmn map search [ 1016.497976] ath: country maps to regdmn code: 0x52 [ 1016.498010] ath: Country alpha2 being used: CN [ 1016.498040] ath: Regpair used: 0x52 [ 1016.500103] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' [ 1016.510419] input: phy3 WPS Button as /devices/soc0/soc.0/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/ieee80211/phy3/input4 [ 1016.526387] evbug: Connected device: input4 (phy3 WPS Button at ieee80211/phy3/input0) [ 1016.526430] usb 1-1.2.4: Atheros AR9170 is registered as 'phy3'
从log看,加载了对应的固件。配置country code。这个FW位于:
root@(none):/# ls /lib/firmware/carl9170-1.fw -lu
-rw-r--r-- 1 root root 13388 Feb 1 02:53 /lib/firmware/carl9170-1.fw
root@(none):/#
因为这个网卡具备WPS功能,有一个按键,所以有一个input设备。
对于另外一个USB网卡:
[ 1022.368886] usb 1-1.2.1: new high-speed USB device number 10 using ci_hdrc [ 1022.608872] usb 1-1.2.1: reset high-speed USB device number 10 using ci_hdrc [ 1022.740356] ieee80211 phy4: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected [ 1022.804614] ieee80211 phy4: rt2x00_set_rf: Info - RF chipset 0005 detected [ 1022.813948] ieee80211 phy4: Selected rate control algorithm 'minstrel_ht'
然后就可以看到对应的网卡设备了:
wlan0 Link encap:Ethernet HWaddr 7c:dd:90:b2:73:b1
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)
wlan1 Link encap:Ethernet HWaddr 94:0c:6d:7c:12:f6
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)
网卡功能查询
使用USB网卡来做AP那么就需要确定时候具备AP功能使用iw list命令, 然后找到对应的modes:
Supported interface modes: * IBSS * managed * AP * AP/VLAN * monitor * P2P-client * P2P-GO
另外一个网卡具备的modes:
Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor因此可以确定两个网卡均具备AP模式, 还有一个具备monitor模式。生成了Network Interface后,接下来我们将完成AP功能。
相关文章推荐
- imx6ul之OpenWRT添加无线USB网卡
- 安卓2.2以上可以用手机做计算机无线网卡的(用USB比便携式热点要快)
- 使用usb tplink无线网卡搭建无线热点AP
- Linux WiFi AP Master Mode USB Chips|使用Linux做AP如何选择无线网卡?
- 华硕WL-167G USB 无线网卡ARM移植 (4:配置:版本RT.1104)
- OpenWrt下TL-WN722N无线网卡驱动安装
- IMX6添加PCI接口的AR9580无线网卡驱动支持
- wind10系统 Atheros AR9271 Wireless Network Adapter USBwifi无线网卡的驱动安装解决无法搜索wifi信号,连接wifi信号无法上网的问题
- Linux C程序如何检测WIFI无线USB网卡是否可用?
- win7共享usb无线网卡
- 借鉴mini2440的usb-wifi工具集在Beagleboard上移植无线网卡
- 在Sigma8634上使用USB口的ZD1211b无线网卡
- USB wifi zd1211无线网卡在loongson上的移植教程
- Ubuntu 15.10下使用FAST迅捷 FW150UM Mini无线USB网卡接收wifi
- xp添加外置无线网卡
- 华硕WL-167G USB 无线网卡ARM移植 (2:配置: 版本RT.1036 )
- TP-LINK WR703N 刷OpenWrt并设置pppoe联网、安装LUCI、添加新用户、挂载USB设备、配置ftp服务、借由transmission实现脱机下载
- ubuntu下安装无线USB网卡驱动 (磊科 NW336)
- OpenWrt 网件WNA1100 无线网卡配置
- 解决部分使用RT280USB驱动的无线网卡在backtrack5中