标签:linux 内核 wifi usb 8188cus驱动
平台参数: 内核: Linux 3.6 文件系统:Busybox-1.20.2 硬件参数:S3C2416在ARM-Linux支持并自动挂载U盘中已经验证好,USB接口是完全正常的,所以不用担心硬件上的故障。
一、引子
BZ使用的是“迅捷”(FAST)的一个USB接口无线网卡,型号FAST FW150US,关于这个网卡的故事、、、
实物如图:
通过Linux的lsusb命令可以查看它内部使用的是Realtek 8188CUS芯片:
二、正式开场
1、首先在Realtek官网下载对应的驱动源码包:
通过阅读document\Quick_Start_Guide_for_Driver_Compilation_and_Installation.pdf文档我们知道,驱动源码在driver目录下,根据硬件平台,修改Makefile:
a、平台选择:CONFIG_PLATFORM_I386_PC = n CONFIG_PLATFORM_ARM_S3C2K4 = y
b、修改使用的编译工具、对应的内核目录:
ifeq ($(CONFIG_PLATFORM_ARM_S3C2K4), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux- # KVER := 2.6.24.7_$(ARCH) KSRC := /home/uni/workspace/20141107_yisuo/linux_3_6/linux-3.6 endifc、PS:先把节能功能取消了CONFIG_POWER_SAVING = n
配置好上述选项,make后就得到驱动模块:8192cu.ko
2、模块加载:
上传该文件到文件系统,为了自动加载该模块,把它添加到Linux的启动脚本里:
/etc/init.d/rcS: insmod /lib/modules/8192cu.ko这样,在系统启动的过程中,就可以看到无线网卡识别情况:
[ 9.040000] rtl8192cu driver version=v4.0.2_9000.20130911 [ 9.040000] build time: Apr 7 2015 10:42:16 [ 9.050000] [ 9.050000] usb_endpoint_descriptor(0): [ 9.050000] bLength=7 [ 9.060000] bDescriptorType=5 [ 9.060000] bEndpointAddress=81 [ 9.060000] wMaxPacketSize=40 [ 9.070000] bInterval=0 [ 9.070000] RT_usb_endpoint_is_bulk_in = 1 [ 9.070000] [ 9.070000] usb_endpoint_descriptor(1): [ 9.080000] bLength=7 [ 9.080000] bDescriptorType=5 [ 9.080000] bEndpointAddress=2 [ 9.090000] wMaxPacketSize=40 [ 9.090000] bInterval=0 [ 9.090000] RT_usb_endpoint_is_bulk_out = 2 [ 9.100000] [ 9.100000] usb_endpoint_descriptor(2): [ 9.100000] bLength=7 [ 9.100000] bDescriptorType=5 [ 9.110000] bEndpointAddress=3 [ 9.110000] wMaxPacketSize=40 [ 9.110000] bInterval=0 [ 9.110000] RT_usb_endpoint_is_bulk_out = 3 [ 9.120000] [ 9.120000] usb_endpoint_descriptor(3): [ 9.120000] bLength=7 [ 9.130000] bDescriptorType=5 [ 9.130000] bEndpointAddress=84 [ 9.130000] wMaxPacketSize=40 [ 9.130000] bInterval=1 [ 9.135000] RT_usb_endpoint_is_int_in = 4, Interval = 1 [ 9.140000] nr_endpoint=4, in_num=2, out_num=2 [ 9.140000] [ 9.145000] NON USB_SPEED_HIGH [ 9.150000] CHIP TYPE: RTL8188C_8192C [ 9.150000] register rtw_netdev_ops to netdev_ops [ 9.160000] Chip Version ID: VERSION_NORMAL_TSMC_CHIP_88C. [ 9.165000] RF_Type is 3!! [ 9.170000] EEPROM type is E-FUSE [ 9.170000] ====> ReadAdapterInfo8192C [ 9.175000] Boot from EFUSE, Autoload OK ! [ 11.320000] EEPROMVID = 0x0bda [ 11.320000] EEPROMPID = 0x8176 [ 11.320000] EEPROMCustomerID : 0x00 [ 11.325000] EEPROMSubCustomerID: 0x00 [ 11.325000] RT_CustomerID: 0x00 [ 11.330000] _ReadMACAddress MAC Address from EFUSE = 6c:e8:73:c7:6f:92 [ 11.335000] EEPROMRegulatory = 0x0 [ 11.340000] _ReadBoardType(0) [ 11.340000] BT Coexistance = disable [ 11.345000] mlmepriv.ChannelPlan = 0x02 [ 11.350000] _ReadPSSetting...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemoteWakeup(0) [ 11.355000] ### PS params=> power_mgnt(0),usbss_enable(0) ### [ 11.360000] ### AntDivCfg(0) [ 11.360000] readAdapterInfo_8192CU(): REPLACEMENT = 1 [ 11.365000] <==== ReadAdapterInfo8192C in 2195 ms [ 11.380000] rtw_macaddr_cfg MAC Address = 6c:e8:73:c7:6f:92 [ 11.380000] bDriverStopped:1, bSurpriseRemoved:0, bup:0, hw_init_completed:0 [ 11.430000] _rtw_drv_register_netdev, MAC Address (if1) = 6c:e8:73:c7:6f:92 [ 11.460000] usbcore: registered new interface driver rtl8192cu
ARM开发板加载Realtek-8188CUS USB无线网卡(一)
标签:linux 内核 wifi usb 8188cus驱动
原文地址:http://blog.csdn.net/u013686019/article/details/44944493