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(十九)的更多相关文章

  1. am335x system upgrade kernel f-ram fm25l16b(十六)

    1      Scope of Document This document describes SPI F-RAM hardware design 2      Requiremen 2.1     ...

  2. am335x system upgrade kernel usb stroage(十)

    1      Scope of Document This document describes USB hardware design, support stardard usb2.0 port o ...

  3. am335x system upgrade rootfs using yocto make rootfs(十二)

    1      Scope of Document This document describes how to make am335x arago rootfs using ycoto project ...

  4. am335x system upgrade kernel gpio(九)

    1      Hardware Overview gpio interface,pin map: AM335X_I2C0_W_C----------------------MCASP0_AXR1 /* ...

  5. am335x system upgrade rootfs for bridge-utils cross compile (十四)

    bridge-utils移植 [目的] 移植bridge-utils的目是在AM335X开发板上使用bridge功能. [环境] 1.  Ubuntu 16.04发行版 2.  MC183平台 3.  ...

  6. am335x system upgrade kernel emmc(十八)

    1      Scope of Document This document describes EMMC hardware design 2      Requiremen 2.1     Func ...

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

    1      Scope of Document This document describes am335x cpufreq technology insider. 2      Requireme ...

  8. am335x system upgrade kernel tf(五)

    1      Scope of Document This document describes TF hardware design 2      Requiremen 2.1     Functi ...

  9. am335x system upgrade kernel can(八)

    1      Scope of Document This document describes can bus hardware design and can bus driver developm ...

随机推荐

  1. 剑指offer42:数组和一个数字S,输出两个数的乘积最小的

    1 题目描述 输入一个递增排序的数组和一个数字S,在数组中查找两个数,使得他们的和正好是S,如果有多对数字的和等于S,输出两个数的乘积最小的. 输出描述: 对应每个测试案例,输出两个数,小的先输出. ...

  2. LC 1. Two Sum

    题目介绍 Given an array of integers, return indices of the two numbers such that they add up to a specif ...

  3. 数据结构与算法之排序算法(python实现)

    1.冒泡排序 冒泡排序的原理是依次比较相邻的两个数,如果前一个数比后一个数大则交换位置,这样一组比较下来会得到该组最大的那个数,并且已经放置在最后,下一轮用同样的方法可以得到次大的数,并且被放置在正确 ...

  4. 利用Python进行数据分析_Numpy_基础_1

    ndarray:多维数组 ndarray 每个数组元素必须是相同类型,每个数组都有shape和dtype对象. shape 表示数组大小 dtype 表示数组数据类型 array 如何创建一个数组? ...

  5. python — mysql基础知识

    目录 1 . 数据库的介绍 2. mysql 1 . 数据库的介绍 1.为什么要用数据库? 很多功能如果只是通过操作文件来改变数据是非常繁琐的,程序员需要做很多事情 对于多台机器或者多个进程操作用一份 ...

  6. 17.tmux相关

    Linux终端复用神器-Tmux使用梳理 Tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权.使用它最直观的好处就是,通过一个终端登录远程主机并运行tm ...

  7. 作业10:String类

    一.基本案例 1.new String("helloworld") 与 "helloworld" public static void main(String[ ...

  8. 基于create-react-app脚手架,按需加载antd组件以及less样式

    摘要 为了更好的书写css样式,在react中引入less,在网上查询了许多关于react引入less样式文件的资料,大多数都是需要在react项目中npm run eject暴露出底层文件,然后在底 ...

  9. 【坑】new一个对象时,tostring报空指针异常

    错误环境 java1.8.0_111 错误描述 对某vo进行了修改,属性类型由long修改为了Long,getter.setter没有修改类型 调用该对象的new方法时抛出npe 错误原因 没深究.. ...

  10. 第一章、接口规范之Restful规范

    阅读目录 2.1 数据的安全保障 2.2 接口特征表现 2.3 多数据版本共存 2.4 数据即是资源 2.5 资源操作由请求方式决定 3.1 正常响应 3.2 重定向响应 3.3 客户端异常 3.4 ...