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
Support 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 kernel version, 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)
am335x system upgrade usb wifi rtl8188eus(十九)的更多相关文章
- am335x system upgrade kernel f-ram fm25l16b(十六)
1 Scope of Document This document describes SPI F-RAM hardware design 2 Requiremen 2.1 ...
- am335x system upgrade kernel usb stroage(十)
1 Scope of Document This document describes USB hardware design, support stardard usb2.0 port o ...
- am335x system upgrade rootfs using yocto make rootfs(十二)
1 Scope of Document This document describes how to make am335x arago rootfs using ycoto project ...
- am335x system upgrade kernel gpio(九)
1 Hardware Overview gpio interface,pin map: AM335X_I2C0_W_C----------------------MCASP0_AXR1 /* ...
- am335x system upgrade rootfs for bridge-utils cross compile (十四)
bridge-utils移植 [目的] 移植bridge-utils的目是在AM335X开发板上使用bridge功能. [环境] 1. Ubuntu 16.04发行版 2. MC183平台 3. ...
- am335x system upgrade kernel emmc(十八)
1 Scope of Document This document describes EMMC hardware design 2 Requiremen 2.1 Func ...
- am335x system upgrade set/get current cpufreq(二十一)
1 Scope of Document This document describes am335x cpufreq technology insider. 2 Requireme ...
- am335x system upgrade kernel tf(五)
1 Scope of Document This document describes TF hardware design 2 Requiremen 2.1 Functi ...
- am335x system upgrade kernel can(八)
1 Scope of Document This document describes can bus hardware design and can bus driver developm ...
随机推荐
- Windows32位或64位下载安装配置Scala
[学习笔记] Windows 32位或64位下载安装配置Scala: 1)下载地址:http://www.scala-lang.org/download/,看我的spark那节,要求scala是2.1 ...
- 剑指offer35:数组中的逆序对
1 题目描述 在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对.输入一个数组,求出这个数组中的逆序对的总数P.并将P对1000000007取模的结果输出. 即输出P%10 ...
- Philosopher’s Walk --DFS
题意: Philosopher’s Walk 图,告诉你step返回位置. 思路: 按四个块DFS #define IOS ios_base::sync_with_stdio(0); cin.tie( ...
- 【AC自动机】最短母串
[题目链接] https://loj.ac/problem/10061 [题意] 给定 n 个字符串 S1-Sn,要求找到一个最短的字符串 T,使得这 n 个字符串都是 T 的子串. [题解] 类似于 ...
- ReLeQ:一种自动强化学习的神经网络深度量化方法
ReLeQ:一种自动强化学习的神经网络深度量化方法 ReLeQ:一种自动强化学习的神经网络深度量化方法ReLeQ: An Automatic Reinforcement Learning Ap ...
- idea中创建的go项目,添加project sdk时没有go sdk选项的解决方式
同样是后端开发,年薪50万和年薪20万的差距在哪里>>> 更新: 为了防止你被我这个流水账气到,先看这个结论吧:这个问题的结局方法:忽略,没有什么影响. -------------- ...
- 使用NPOI导出Excel文件
使用NPOI导出Excel文件,本实例使用了ASP.NET MVC. 1.使用NPOI导出Excel文件 实例:导出商品列表. 要求:1.通过NPOI导出导出商品列表信息: 2.使用Excel函数计算 ...
- VBA学习资料分享-3
VBA创建/发送OUTLOOK邮件时怎么加上默认签名呢?用过OUTLOOK写邮件的人都知道,如果你设置了默认签名,那么在创建空白邮件的时候就会自动加上你设置的签名.根据这一特性,我们可以在用VBA创建 ...
- 5.1 Request 获取请求数据的几种方法
//获取请求头和请求数据 //请求数据(1.通过超链接 2.通过表单) //获取请求数据的时候一般来说 都要先检查 再使用 public class RequestDemo2 extends Http ...
- jumperver源码理解以及部分修改
一 admin后台处理以及展示修改 jumpserver 默认不开放admin后台(获取是我没用使用正确的打开方式,) 打开方式 找到程序的入口 urls.py 修改,另外主要看下settin ...