am335x system upgrade usb wifi rtl8188eus(十九)

1      Scope of Document

This document describes how to port rtl8188eus driver to linux 4.14.y design.

2      Requiremen

2.1     Function Requirement

Suport usb wifi rtl8188eus working in sta mode under linux 4.14.y kernel version

2.2     Performance Requirement

NA

3      Hardware Overview

usb interface,pin map:

USB0_N

USB0_P

 

Figure 1 usb wifi rtl8188eus interface block diagram

4      Functional Description

4.1     Functional Block Diagram

It combines CMOSMAC,Baseband PHYand RF in a single chip for IEEE802.11/b/g/n compatible. It supports IEEE802.11i safety protocol, along with IEEE802.11e standard service quality. It supports the new data encryption on 64/128 bit WEP and safety mechanism on WPA-PSK/WPA2-PSK, WPA/WPA2.It can implement the wireless network function on the laptop/desktop/MID and other wireless devices easily

Figure 2 usb wifi rtl8188eus interface block diagram

4.2     RTL8188EUS

4.2.1 Overview

 

5      Porting

5.1     Kernel porting

+CONFIG_WIRELESS_EXT=y

+CONFIG_WEXT_PRIV=y

+CONFIG_WLAN_VENDOR_RSI=y

+CONFIG_CLKDEV_LOOKUP=y

+++ drivers/net/wireless/realtek/Kconfig

+source "drivers/net/wireless/realtek/rtl8188eus/Kconfig"

+++ drivers/net/wireless/realtek/Makefile

+obj-$(CONFIG_RTL8188EU)      += rtl8188eus/

get driver from : https://github.com/quickreflex/rtl8188eus

add include/autoconf.h for support ap+sta ,but ap driver is not compatible with linux.4.14.y kernversion, beause of manufacturer no longer maintain rtl8188eus drivers. So ap mode not work properly….

+109 #define CONFIG_CONCURRENT_MODE

5.2     Application Interface

After the usb wifi rtl8188eus driver was loaded , we can find wlan0 wlan1 network devices

Kernel message:

[  304.654082] 8188eu: loading out-of-tree module taints kernel.

[  304.690852] RTL871X: module init start

[  304.690875] RTL871X: rtl8188eu v4.3.0.8_13968.20150417

[  304.691129] RTL871X:

usb_endpoint_descriptor(0):

[  304.691139] RTL871X: bLength=7

[  304.691145] RTL871X: bDescriptorType=5

[  304.691152] RTL871X: bEndpointAddress=81

[  304.691159] RTL871X: wMaxPacketSize=512

[  304.691166] RTL871X: bInterval=0

[  304.691173] RTL871X: RT_usb_endpoint_is_bulk_in = 1

[  304.691179] RTL871X:

usb_endpoint_descriptor(1):

[  304.691184] RTL871X: bLength=7

[  304.691190] RTL871X: bDescriptorType=5

[  304.691195] RTL871X: bEndpointAddress=2

[  304.691201] RTL871X: wMaxPacketSize=512

[  304.691206] RTL871X: bInterval=0

[  304.691213] RTL871X: RT_usb_endpoint_is_bulk_out = 2

[  304.691219] RTL871X:

usb_endpoint_descriptor(2):

[  304.691224] RTL871X: bLength=7

[  304.691230] RTL871X: bDescriptorType=5

[  304.691235] RTL871X: bEndpointAddress=3

[  304.691241] RTL871X: wMaxPacketSize=512

[  304.691246] RTL871X: bInterval=0

[  304.691252] RTL871X: RT_usb_endpoint_is_bulk_out = 3

[  304.691260] RTL871X: nr_endpoint=3, in_num=1, out_num=2

[  304.691266] RTL871X: USB_SPEED_HIGH

[  304.691397] RTL871X: CHIP TYPE: RTL8188E

[  304.691445] RTL871X: register rtw_netdev_ops to netdev_ops

[  304.691465] RTL871X: rtw_wdev_alloc(padapter=d0ee9000)

[  304.720692] RTL871X: Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_A_CUT_1T1R_RomVer(0)

[  304.720711] RTL871X: RF_Type is 3!!

[  304.720726] RTL871X: _ConfigNormalChipOutEP_8188E OutEpQueueSel(0x05), OutEpNumber(2)

[  304.720926] RTL871X: EEPROM type is E-FUSE

[  304.720936] RTL871X: ====> _ReadAdapterInfo8188EU

[  304.721015] RTL871X: Boot from EFUSE, Autoload OK !

[  304.723461] RTL871X: SetHwReg8188EU: bMacPwrCtrlOn=1

[  304.723693] bFWReady == _FALSE call reset 8051...

[  304.724300] RTL871X: =====> _8051Reset88E(): 8051 reset success .

[  304.739727] RTL871X: efuse_read_phymap_from_txpktbuf bcnhead:0

[  304.740293] RTL871X: efuse_read_phymap_from_txpktbuf len:118, lenbak:118, aaa:118, aaabak:118

[  304.754846] RTL871X: efuse_read_phymap_from_txpktbuf read count:116

[  304.755152] RTL871X: EEPROM ID=0x8129

[  304.755165] RTL871X: VID = 0x0BDA, PID = 0x8179

[  304.755173] RTL871X: Customer ID: 0x00, SubCustomer ID: 0xCD

[  304.755185] RTL871X: Hal_ReadPowerSavingMode88E...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemoteWakeup(1)

[  304.755192] RTL871X: ### PS params=>  power_mgnt(0),usbss_enable(0) ###

[  304.755202] RTL871X: ======= Path 0, Channel 1 =======

[  304.755208] RTL871X: Index24G_CCK_Base[0][1] = 0x21

[  304.755214] RTL871X: Index24G_BW40_Base[0][1] = 0x25

[  304.755219] RTL871X: ======= Path 0, Channel 2 =======

[  304.755225] RTL871X: Index24G_CCK_Base[0][2] = 0x21

[  304.755230] RTL871X: Index24G_BW40_Base[0][2] = 0x25

[  304.755236] RTL871X: ======= Path 0, Channel 3 =======

[  304.755242] RTL871X: Index24G_CCK_Base[0][3] = 0x21

[  304.755247] RTL871X: Index24G_BW40_Base[0][3] = 0x25

[  304.755252] RTL871X: ======= Path 0, Channel 4 =======

[  304.755258] RTL871X: Index24G_CCK_Base[0][4] = 0x21

[  304.755263] RTL871X: Index24G_BW40_Base[0][4] = 0x25

[  304.755269] RTL871X: ======= Path 0, Channel 5 =======

[  304.755274] RTL871X: Index24G_CCK_Base[0][5] = 0x21

[  304.755279] RTL871X: Index24G_BW40_Base[0][5] = 0x25

[  304.755285] RTL871X: ======= Path 0, Channel 6 =======

[  304.755290] RTL871X: Index24G_CCK_Base[0][6] = 0x21

[  304.755296] RTL871X: Index24G_BW40_Base[0][6] = 0x25

[  304.755301] RTL871X: ======= Path 0, Channel 7 =======

[  304.755307] RTL871X: Index24G_CCK_Base[0][7] = 0x21

[  304.755312] RTL871X: Index24G_BW40_Base[0][7] = 0x25

[  304.755317] RTL871X: ======= Path 0, Channel 8 =======

[  304.755323] RTL871X: Index24G_CCK_Base[0][8] = 0x21

[  304.755328] RTL871X: Index24G_BW40_Base[0][8] = 0x25

[  304.755333] RTL871X: ======= Path 0, Channel 9 =======

[  304.755339] RTL871X: Index24G_CCK_Base[0][9] = 0x21

[  304.755345] RTL871X: Index24G_BW40_Base[0][9] = 0x25

[  304.755350] RTL871X: ======= Path 0, Channel 10 =======

[  304.755356] RTL871X: Index24G_CCK_Base[0][10] = 0x21

[  304.755362] RTL871X: Index24G_BW40_Base[0][10] = 0x25

[  304.755367] RTL871X: ======= Path 0, Channel 11 =======

[  304.755373] RTL871X: Index24G_CCK_Base[0][11] = 0x21

[  304.755378] RTL871X: Index24G_BW40_Base[0][11] = 0x25

[  304.755383] RTL871X: ======= Path 0, Channel 12 =======

[  304.755389] RTL871X: Index24G_CCK_Base[0][12] = 0x1f

[  304.755395] RTL871X: Index24G_BW40_Base[0][12] = 0x23

[  304.755400] RTL871X: ======= Path 0, Channel 13 =======

[  304.755405] RTL871X: Index24G_CCK_Base[0][13] = 0x1f

[  304.755411] RTL871X: Index24G_BW40_Base[0][13] = 0x23

[  304.755417] RTL871X: ======= Path 0, Channel 14 =======

[  304.755422] RTL871X: Index24G_CCK_Base[0][14] = 0x1f

[  304.755428] RTL871X: Index24G_BW40_Base[0][14] = 0x23

[  304.755434] RTL871X: ======= TxCount 0 =======

[  304.755440] RTL871X: CCK_24G_Diff[0][0]= 0

[  304.755445] RTL871X: OFDM_24G_Diff[0][0]= 2

[  304.755451] RTL871X: BW20_24G_Diff[0][0]= 0

[  304.755457] RTL871X: BW40_24G_Diff[0][0]= 0

[  304.755461] RTL871X: EEPROMRegulatory = 0x0

[  304.755470] RTL871X: mlmepriv.ChannelPlan = 0x20

[  304.755476] RTL871X: CrystalCap: 0x10

[  304.755482] RTL871X: EEPROM Customer ID: 0x 0

[  304.755490] RTL871X: EEPROM : AntDivCfg = 0, TRxAntDivType = 3

[  304.755495] RTL871X: Board Type: 0x 0

[  304.755500] RTL871X: ThermalMeter = 0x1a

[  304.755508] RTL871X: <==== _ReadAdapterInfo8188EU in 30 ms

[  304.755746] RTL871X: init_channel_set ChannelPlan ID 20 Chan num:13

[  304.756621] RTL871X: pwrctrlpriv.bSupportRemoteWakeup~~~~~~

[  304.756633] RTL871X: pwrctrlpriv.bSupportRemoteWakeup~~~[1]~~~

[  304.756645] RTL871X: can‘t get autopm:

[  304.756658] RTL871X: rtw_macaddr_cfg MAC Address  = 00:11:7f:36:05:51

[  304.756668] RTL871X: bDriverStopped:1, bSurpriseRemoved:0, bup:0, hw_init_completed:0

[  304.756749] RTL871X: register rtw_netdev_ops to netdev_ops

[  304.756763] RTL871X: register rtw_netdev_if2_ops to netdev_ops

[  304.756848] RTL871X: rtw_wdev_alloc(padapter=d0f52000)

[  304.787825] RTL871X: Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_A_CUT_1T1R_RomVer(0)

[  304.787844] RTL871X: RF_Type is 3!!

[  304.787860] RTL871X: _ConfigNormalChipOutEP_8188E OutEpQueueSel(0x05), OutEpNumber(2)

[  304.799518] RTL871X: init_channel_set ChannelPlan ID 20 Chan num:13

[  304.800371] RTL871X: rtw_ndev_init(wlan0)

[  304.822284] RTL871X: cfg80211_rtw_get_txpower

[  304.835936] RTL871X: cfg80211_rtw_get_txpower

[  304.844868] RTL871X: cfg80211_rtw_get_txpower

[  304.845345] RTL871X: cfg80211_rtw_get_txpower

[  304.845571] RTL871X: _rtw_drv_register_netdev, MAC Address (if1) = 00:11:7f:36:05:51

[  304.845630] RTL871X: rtw_ndev_init(wlan1)

[  304.846650] RTL871X: cfg80211_rtw_get_txpower

[  304.853231] RTL871X: cfg80211_rtw_get_txpower

[  304.853920] RTL871X: cfg80211_rtw_get_txpower

[  304.854138] RTL871X: _rtw_drv_register_netdev, MAC Address (if2) = 02:11:7f:36:05:51

[  304.854977] pwm-backlight backlight: GPIO lookup for consumer enable

[  304.854990] pwm-backlight backlight: using device tree for GPIO lookup

[  304.855016] of_get_named_gpiod_flags: can‘t parse ‘enable-gpios‘ property of node ‘/backlight[0]‘

[  304.855029] of_get_named_gpiod_flags: can‘t parse ‘enable-gpio‘ property of node ‘/backlight[0]‘

[  304.855038] pwm-backlight backlight: using lookup tables for GPIO lookup

[  304.855049] pwm-backlight backlight: lookup for GPIO enable failed

[  304.855077] pwm-backlight backlight: backlight supply power not found, using dummy regulator

[  304.856092] usbcore: registered new interface driver rtl8188eu

[  304.856103] RTL871X: module init ret=0

[  305.247860] RTL871X: cfg80211_rtw_get_txpower

6    Follow-up

Sta mode test method:

root@IoTP:~# /etc/init.d/8188euSta connect panzidong 12345678

Starting 8188eu sta connectAPDRIVER = 8188eu

connect to  AP_SSID : panzidong, AP_PASSWORD : 12345678

Successfully initialized wpa_supplicant

.

root@IoTP:~# script_runreason: /usr/libexec/dhcpcd-run-hooks: WEXITSTATUS 127

script_runreason: /usr/libexec/dhcpcd-run-hooks: WEXITSTATUS 127

wlan1: waiting for carrier

wlan1: carrier acquired

wlan1: adding address fe80::bede:af04:e62a:30c8

script_runreason: /usr/libexec/dhcpcd-run-hooks: WEXITSTATUS 127

DUID 00:01:00:01:1e:4f:73:1f:f8:36:9b:0b:cc:1b

wlan1: IAID 7f:36:05:51

wlan1: soliciting an IPv6 router

wlan1: soliciting a DHCP lease

root@IoTP:~# wlan1: offered 172.20.10.14 from 172.20.10.1 `panzidong‘

wlan1: probing address 172.20.10.14/28

root@IoTP:~# wlan1: leased 172.20.10.14 for 85536 seconds

wlan1: adding route to 172.20.10.0/28

wlan1: adding default route via 172.20.10.1

script_runreason: /usr/libexec/dhcpcd-run-hooks: WEXITSTATUS 127

forked to background, child pid 1568

root@IoTP:~# ifconfig wlan1

wlan1     Link encap:Ethernet  HWaddr 02:11:7f:36:05:51

inet addr:172.20.10.14  Bcast:172.20.10.15  Mask:255.255.255.240

inet6 addr: fe80::bede:af04:e62a:30c8/64 Scope:Link

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:4 errors:0 dropped:53 overruns:0 frame:0

TX packets:19 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:1078 (1.0 KB)  TX bytes:2950 (2.9 KB)

原文地址:https://www.cnblogs.com/lianghong881018/p/10430830.html

时间: 2024-11-09 20:23:56

am335x system upgrade usb wifi rtl8188eus(十九)的相关文章

am335x system upgrade rootfs for dhcpcd cross compile(十三)

dhcpcd移植 [目的] 移植dhcpcd的目是在AM335X开发板上使用dhcp功能,获取WAN口设备的IP,并且可以通过参数指定其matric,matric值越小,其优先级越高.如设备可以以太网,WIFI,4G上网时,可定制外网功能,以太网优先级最高,WIFI次之,4G优先级最低. [环境] 1.  Ubuntu 16.04发行版 2.  MC183平台 3.  交叉编译器arm-linux-gnueabihf-gcc-4.7.3 [步骤] 1.下载dhcpcd-6.7.1.tar.gz源

am335x system upgrade set/get current cpufreq(二十一)

1      Scope of Document This document describes am335x cpufreq technology insider. 2      Requiremen 2.1     Function Requirement How to get current cpufreq, and to change cpufreq. Learning Processor Clocking Control(PPC) Interface Specification, le

第十九篇:USB Audio/Video Class设备协议

在Spring 3 中,对表单提交的校验方式比较常见的有两种 (1)基于注解:对于简单的属性校验,例如,长度,非空等,可以使用Spring,或是Hibernate自带的校验注解 (2)自定义校验类:对于复杂的业务校验可以自定义校验类,该类继承自org.springframework.validation.Validator (3)前台JS校验 增加表单校验功能大概分一下几个步骤 定义校验规则 基于注解的验证 只需要在相关的实体字段上添加校验注解即可,下面的例子基于hibernate的校验标签 i

Java Web总结十九Filter过滤器

一.Filter简介 Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,Web开发人员通过Filter技术,对Web服务器管理的所有Web资源:例如Jsp,Servlet,静态图片文件或静态HTML文件等进行拦截,从而实现一些特殊的功能.例如实现URL级别的权限访问控制.过滤敏感词汇.自动登录.压缩响应信息等一些高级功能. Servlet API中提供了一个Filter接口,开发Web应用时,如果编写的Java类实现了这个接口,则把这个Java类称之为过滤器Filter.通过

[翻译]NUnit---SetUp and SetUpFixture and Suite Attributes(十九)

SetUpAttribute (NUnit 2.0 / 2.5) 本特性用于TestFixture提供一个公共的功能集合,在呼叫每个测试方法之前执行.同时也用在SetUpFixture中,SetUpFixture在相同命名空间或者程序集也实现相同的作用. 在NUnit2.5之前,类必须只能有一个SetUp方法且必须是一个实例方法. 从NUnit2.5开始,SetUp方法可以使一个静态或者实例方法,而且在一个Fixture可以多次使用.通常多个Setup方法定义在不同层级的继承. 如果一个Setu

USB wifi调试笔记

本文以realtek 8192CU WiFi模块为例,介绍USB wifi在Jelly Bean 4.1的调试笔记. 1.WIFI打不开现象概述 WiFi打不开是指您在UI的settings下选中WiFi选项,将其置为on(打开),但最终结果是自动变成off(关闭).正在打开Wi-Fi.正在扫描等一系列不能正常打开WiFi的提示. 2.问题分析流程 WiFi打不开从硬件和软件两方面进行定位,一般是先硬件,然后软件.总体分析流程如图: 3.确认硬件可以识别 8192CU WiFi模块是基于usb接

微软云计算介绍与实践(实践之十九)

以下板块的实践着重于如何通过自动化来提升效率,通过自助服务和授权控制,并对基础设施提供统一的管理,这些实践中使用的重要组件为Service Manager.Orchestrator.App Controller 以及 Virtual Machine Manager. 一.微软私有云中的自动化自助服务 关于微软私有云中的自动化自助服务,相关背景知识和产品功能介绍,我就不多说了,贴上几张图,大家看了明白个大概就行. (IT需求和System Center功能) (租户和应用程序所有者的场景) 二.O

爪哇国新游记之十九----使用Stack检查数字表达式中括号的匹配性

/** * 辅助类 * 用于记载字符和位置 * */ class CharPos{ char c; int pos; public CharPos(char c,int pos){ this.c=c; this.pos=pos; } } /** * 括号检查类 * */ public class BracketChecker{ /** * 检查函数 * @param str * @return * @throws Exception */ public static boolean check(

【Unity 3D】学习笔记二十九:游戏实例——简单小地图制作

任何的学习,光看不练是学不好的.所以这次就总结回顾下怎么制作MMROPG类游戏中的小地图.在MMROPG类游戏里,主角在游戏世界里走动时,一般在屏幕右上角都会有一个区域来显示当前游戏场景的小地图.主角在游戏世界里走动,小地图里代表着主角的小标记也会随之移动.那怎么实现咧? 首先需要确定两个贴图,第一个是右上角的小地图背景贴图,应该是从Y轴俯视向下截取主角所在的位置大地图.第二个就是主角的位置大贴图.在本例中,因为没有学习unity地图制作,所以地图用一个面对象代替,主角用立方体代替,使用GUI来