移植环境:
PC:fedora 14
MINI2440
无线网卡型号:RTL8188CU
手头的无线网卡芯片的realteck的RTL8188CU芯片,从官网下载驱动移植好后成功驱动网卡,但在移植Hostapd是出现问题总是提示invalid/unknown driver'nl80211',后来多方查阅资料发现这款芯片得用驱动包里自带的专用hostapd。
现记录移植过程如下:
找到官方驱动包里的hostapd,进行如下操作
cp defconfig .config
对 .config进行如下修改:
去掉CONFIG_DRIVER_RTW=y前的注释
注释掉#CONFIG_DRIVER_NL80211=y
去掉CONFIG_WPS=y前注释
去除CONFIG_IEEE80211N=y前注释
修改Makefile
将
ifndef CC
CC=gcc
Endif
改为CC=arm-linux-gcc
保存后make
将生成的hostapd和hostapd_cli文件复制到开发版的/bin目录
编辑hostapd.conf文件内容如下
##### hostapd configuration file ##############################################
interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=mini2440
channel=6
wpa=2
wpa_passphrase=12345678
#bridge=br0
##### Wi-Fi Protected Setup (WPS) #############################################
eap_server=1
# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=2
uuid=12345678-9abc-def0-1234-56789abcdef0
# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU
# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek
# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_SOFTAP
# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=W