1=============================================================================== 2 [ Table of Contents ] 3=============================================================================== 41. [ Features.] 52. [Software Package.] 63. [Quick Start Guide.] 7---3.1 [ Build MP Driver module.(Select card type) ] 8---3.2 [ Build Android wireless tools ] 9---3.3 [ MP Use Example. ] Chinese translation: 10------3.3.1 [ Continuous Tx testing ] ( 无间断调制讯号发送测试 ) 11------3.3.2 [ Continuous Packet Tx testing ] ( 不限封包数量调制讯号发送测试 ) 12------3.3.3 [ Count Packet Tx testing ] ( 有限封包数量调制讯号发送测试 ) 13------3.3.4 [ Carrier suppression testing ] ( 载波抑制发送测试 ) 14------3.3.5 [ Single Tone Tx testing ] ( 无调制讯号单频载波发送测试 ) 15------3.3.6 [ Air Rx testing ] ( 接收封包测试 ) 164. [ Phy Efuse Read/Write Use Example ]. 17------4.1 [ efuse_get ] 18------4.2 [ efuse_get ] 19------4.3 [ Efuse's spec.] 20 215. [Calibration Crystal Cap adjust] 22 236. [ Normal /MP Mode switch.] 24 257. [ Android MP UI ] : refer the RtkMpTool-ReadMe.txt 26 278. [ Read Efuse From the File ] -refer the EfuseReadfromFile.ppt 28 29=============================================================================== 30 [1. Features]---Reminded required reading................... 31=============================================================================== 32 33The new driver had support the Normal Mode switch to MP Mode function,please frist to confirm the driver version was "v4.1.3.5xxx". 34 35 The following steps demonstrate Realtek Wireless Adapter Mass Production Linux Tool. 36This is a simple install guide, we use Linux utility “iwpriv”or "rtwpriv" to get and set I/O control to WLAN driver. 37 38iwpriv and rtwpriv are private wireless ioctls/requests allow a device to export the control of those device specific features. 39iwpriv need the kernel config define "CONFIG_WIRELESS_EXT" ,or use the "rtwpriv" with no Wireless extensions. 40 41if need more detail or example command information, Please refer to UserGuide.doc . 42 43=============================================================================== 44 [2. Software Package] - To check have the Component .tar.gz files. 45=============================================================================== 461. Driver source - rtXXX_linux_MP_vX.X.X.tar.gz 472. Wireless tool Source -If want to use for Android system - Android_wireless_tools.tar 48 -If Android kernel not support the "CONFIG_WIRELESS_EXT": Wireless extensions , Please use the Realtek tools "rtwpriv.zip" 49 503. Documents 51 - LinuxDriver_MP_Iwpriv_UserGuide.doc 52 53=============================================================================== 54 [3. Quick Start Guide] 55=============================================================================== 56 57=========================================================== 58 [3.1. Build Driver module] 59=========================================================== 60Note: Use su/sudo su for root authentication with following command. 61 621. Unzip Driver source folder - 63 # tar -xvzf rtlXXX_linux_MP_linux_vx.x.x.tar.gz 64 652. Change to driver source code directory - 66 # cd rtlXXX_linux_MP__linux_vx.x.x 67 683. Config compile Setting- 69 70 Confirm the "Makefile", and modify the line 21 "CONFIG_MP_INCLUDED = n" to "CONFIG_MP_INCLUDED = y" 71 72 If your target platform is the platform you're compiling driver, 73 maybe you don't need to change any setting. 74 Otherwise you need to do some configuration manually, 75 like cross compiler and kernel source tree directory. 76 ex. 77 ARCH := arm 78 CROSS_COMPILE := arm-none-linux-gnueabi- 79 KSRC := /usr/src/linux-2.6.34.1 80 814. Make to choose card type for 8188eus or 8189es 82 83#chmod 777 make_drv 84#./make_drv 85Please Select card type(1/2): 861)RTL8188eus 872)RTL8189es 88#?input 1 or 2 & enter. 89 904. Compile and build the driver source code - 91# make 92 93If nothing goes wrong, the driver "/81xx.ko" will be generated. 94 95If there're still some problems or need more detail compile driver guide, 96please check normal driver package for more reference. 97 98P.S. If you want default load driver to enable the MP function.use the command "insmod 8xxx.ko rtw_mp_mode=1". 99 100============================================================================================================ 101 102=========================================================== 103 3.2 Build Android wireless tools 104=========================================================== 105 106If want to use for Android system, we need to Build iwpriv(wireless tools) for android. 107 108#tar zxvf Android_wireless_tools-iwpriv.tar.gz 109 110#cp wireless_tools froyo-x86/external/ 111 112root@realtek-desktop:~/Desktop/froyo-x86/external/wireless_tools# . ../../build/envsetup.sh 113root@realtek-desktop:~/Desktop/froyo-x86/external/wireless_tools# mm 114 115..... 116 117target Non-prelinked: iwpriv (out/target/product/eeepc/symbols/system/bin/iwpriv) 118target Unstripped: iwpriv (out/target/product/eeepc/obj/EXECUTABLES/iwpriv_intermediates/iwpriv) 119Install: out/target/product/eeepc/system/xbin/iwpriv 120 121#cp " out/target/product/eeepc/system/xbin/iwpriv " to target platform file system " system/xbin/iwpriv ". 122 123========================================================== 124 3.2 Build Realtek MP tools 125=========================================================== 126If Android kernel not support the "CONFIG_WIRELESS_EXT": Wireless extensions 127,change to use the realtek mp tool(rtwpriv) for android system. 128 129How to build rtwpriv ,please refer the readme.txt in the rtwpriv.zip package. 130 131#cp " rtwpriv" to target platform file system " system/xbin/rtwpriv ". 132 133=========================================================== 134 [3.3 MP Use Example] 135=========================================================== 136(Execute the following commands after WLAN interface is normally opened) 137If you want to change the input parameter(rate、channel、txpower、bandwidth),please must input advance the command "iwpriv wlan0 mp_ctx stop". 138Please refer the doc "iwpriv_mp_settings_for_different_data_rate.xls " for set data rate. 139 140 141##Before the MP test,please disable the WLAN UI and use command to wlan up for MP Test##. 142------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1433.3.1 [ Continuous Tx testing ] : "iwpriv wlan0 mp_ctx background" 144------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 145ifconfig wlan0 up # Enable Device for MP operation 146iwpriv wlan0 mp_start # enter MP mode 147iwpriv wlan0 mp_channel 1 # set channel to 1 . 2, 3, 4~13 etc. 148iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 # set 20M mode and long GI,set 40M is 40M=1. 149iwpriv wlan0 mp_ant_tx a # Select antenna A for operation,if device have 2x2 antennam select antenna "a" or "b" and "ab" for operation. 150iwpriv wlan0 mp_txpower patha=44,pathb=44 # set path A and path B Tx power level,the Range is 0~63. 151iwpriv wlan0 mp_rate 108 # set OFDM data rate to 54Mbps,ex: CCK 1M = 2, CCK 5.5M = 11 ;OFDM 6M=12、54M = 108;N Rate: MCS0 = 128,MCS1 = 129,MCS 2=130....MCS15 = 143 etc. 152iwpriv wlan0 mp_ctx background # start continuous Tx 153iwpriv wlan0 mp_ctx stop # stop continuous Tx 154iwpriv wlan0 mp_stop # exit MP mode 155ifconfig wlan0 down # close WLAN interface 156 157------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1583.3.2 [ Continuous Packet Tx testing] : "iwpriv wlan0 mp_ctx background,pkt" 159------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 160 161ifconfig wlan0 up # Enable Device for MP operation 162iwpriv wlan0 mp_start # enter MP mode 163iwpriv wlan0 mp_channel 1 # set channel to 1 . 2, 3, 4~13 etc. 164iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 # set 20M mode and long GI,set 40M is 40M=1. 165iwpriv wlan0 mp_ant_tx a # Select antenna A for operation,if device have 2x2 antennam select antenna "a" or "b" and "ab" for operation. 166iwpriv wlan0 mp_txpower patha=44,pathb=44 # set path A and path B Tx power level , the Range is 0~63. 167iwpriv wlan0 mp_rate 108 # set OFDM data rate to 54Mbps,ex: CCK 1M = 2, CCK 5.5M = 11 ;OFDM 6M=12、54M = 108 ; N Rate: MCS0 = 128, MCS1 = 129 MCS 2=130....MCS15 = 143 etc. 168iwpriv wlan0 mp_ctx background,pkt # start continuous Packet Tx 169iwpriv wlan0 mp_ctx stop # stop continuous Tx 170iwpriv wlan0 mp_stop # exit MP mode 171ifconfig wlan0 down # close WLAN interface 172 173ifconfig wlan0 up 174rtwpriv wlan0 mp_start 175rtwpriv wlan0 mp_channel 1 176rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 177rtwpriv wlan0 mp_ant_tx b 178rtwpriv wlan0 mp_txpower patha=44,pathb=44 179rtwpriv wlan0 mp_rate 108 180rtwpriv wlan0 mp_ctx background,pkt 181 182rtwpriv wlan0 mp_ctx stop 183rtwpriv wlan0 mp_stop 184ifconfig wlan0 down 185 186--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1873.3.3 [ Count Packet Tx testing ]: "iwpriv wlan0 mp_ctx count=%d,pkt" 188--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 189ifconfig wlan0 up # Enable Device for MP operation 190iwpriv wlan0 mp_start # Enter MP mode 191iwpriv wlan0 mp_channel 1 # Set channel to 1 . 2, 3, 4~13 etc. 192iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 # Set 20M mode and long GI,set 40M is 40M=1. 193iwpriv wlan0 mp_ant_tx a # Select antenna A for operation,if device have 2x2 antennam select antenna "a" or "b" and "ab" for operation. 194iwpriv wlan0 mp_txpower patha=44,pathb=44 # Set path A and path B Tx power level , the Range is 0~63. 195iwpriv wlan0 mp_rate 108 # Set OFDM data rate to 54Mbps,ex: CCK 1M = 2, CCK 5.5M = 11 ;OFDM 6M=12、54M = 108 ; N Rate: MCS0 = 128, MCS1 = 129 MCS 2=130....MCS15 = 143 etc. 196iwpriv wlan0 mp_ctx count=%d,pkt # "%d" Number of packets start packet Tx 197iwpriv wlan0 mp_ctx stop # stop continuous Tx 198iwpriv wlan0 mp_stop # exit MP mode 199ifconfig wlan0 down # close WLAN interface 200 201--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2023.3.4 [ Carrier suppression testing ]: "iwpriv wlan0 mp_ctx cs,background" 203--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 204ifconfig wlan0 up # Enable Device for MP operation 205iwpriv wlan0 mp_start # enter MP mode 206iwpriv wlan0 mp_channel 1 # set channel to 1 . 2, 3, 4~13 etc. 207iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 # set 20M mode and long GI,set 40M is 40M=1. 208iwpriv wlan0 mp_ant_tx a # Select antenna A for operation,if device have 2x2 antennam select antenna "a" or "b" and "ab" for operation. 209iwpriv wlan0 mp_txpower patha=44,pathb=44 # set path A and path B Tx power level , the Range is 0~63. 210iwpriv wlan0 mp_rate 108 # set OFDM data rate to 54Mbps,ex: CCK 1M = 2, CCK 5.5M = 11 ;OFDM 6M=12、54M = 108 ; N Rate: MCS0 = 128, MCS1 = 129 MCS 2=130....MCS15 = 143 etc. 211iwpriv wlan0 mp_ctx background,cs # start sending carrier suppression signal 212iwpriv wlan0 mp_ctx stop # stop continuous Tx 213iwpriv wlan0 mp_stop # exit MP mode 214ifconfig wlan0 down # close WLAN interface 215 216 217--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2183.3.5 [ Single Tone Tx testing ]: "iwpriv wlan0 mp_ctx background,stone" 219--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 220ifconfig wlan0 up # Enable Device for MP operation 221iwpriv wlan0 mp_start # enter MP mode 222iwpriv wlan0 mp_channel 1 # set channel to 1 . 2, 3, 4~13 etc. 223iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 # set 20M mode and long GI,set 40M is 40M=1. 224iwpriv wlan0 mp_ant_tx a # Select antenna A for operation,if device have 2x2 antennam select antenna "a" or "b" and "ab" for operation. 225iwpriv wlan0 mp_txpower patha=44,pathb=44 # set path A and path B Tx power level , the Range is 0~63. 226iwpriv wlan0 mp_rate 108 # set OFDM data rate to 54Mbps,ex: CCK 1M = 2, CCK 5.5M = 11 ;OFDM 6M=12、54M = 108 ; N Rate: MCS0 = 128, MCS1 = 129 MCS 2=130....MCS15 = 143 etc. 227iwpriv wlan0 mp_ctx background,stone # start sending single tone signal 228iwpriv wlan0 mp_ctx stop # stop continuous Tx 229iwpriv wlan0 mp_stop # exit MP mode 230ifconfig wlan0 down # close WLAN interface 231 232--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2333.3.6 [ Air Rx testing ]: "iwpriv wlan0 mp_arx start" 234--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 235ifconfig wlan0 up # Enable Device for MP operation 236iwpriv wlan0 mp_start # Enter MP mode 237iwpriv wlan0 mp_channel 1 # Set channel to 1 . 2, 3, 4~13 etc. 238iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 # Set 20M mode and long GI or set to 40M is 40M=1. 239iwpriv wlan0 mp_ant_rx a # Select antenna A for operation,if device have 2x2 antennam select antenna "a" or "b" and "ab" for operation. 240iwpriv wlan0 mp_arx start # start air Rx teseting. 241iwpriv wlan0 mp_arx phy # get the statistics. 242iwpriv wlan0 mp_arx stop or iwpriv wlan0 mp_reset_stats # Stop air Rx test and show the Statistics / Reset Counter. 243iwpriv wlan0 mp_stop # exit MP mode 244ifconfig wlan0 down # close WLAN interface 245 246ifconfig wlan0 up 247rtwpriv wlan0 mp_start 248rtwpriv wlan0 mp_channel 1 249rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 250rtwpriv wlan0 mp_ant_rx b 251rtwpriv wlan0 mp_arx start 252rtwpriv wlan0 mp_arx phy 253rtwpriv wlan0 mp_arx stop or rtwpriv wlan0 mp_reset_stats 254rtwpriv wlan0 mp_stop 255ifconfig wlan0 down 256 2573. Detail manual command and more example please refer the "LinuxDriver_MP_Iwpriv_UserGuide.doc". 258 259============================================================================================================= 260 [4. Efuse Read/Write Use Example] 261=============================================================================================================== 262use example: 263[4.1 efuse_get] 264iwpriv wlan0 efuse_get realmap # read form driver for all efuse logic map. 265iwpriv wlan0 efuse_get realraw # read form all phy efuse map. 266iwpriv wlan0 efuse_get mac # read mac address ( Direct to use the cmd for raed mac address from the efuse content ) 267iwpriv wlan0 efuse_get rmap,16,6 # fix offset :cmd,offset,byteCounts ( Specified a start of the efuse's address and set the number of bytes for raed from the efuse content) 268------------------------------------------------------------------------------------------------------ 269[4.2 efuse_set] 270iwpriv wlan0 efuse_set wmap,16,00e04c871234 # cmd,offset,Data bytes[hex] ( Specified a offset address for write 6 bytes data "0x00,0xe0,0x4c,0x87,0x12,0x34" to the 0x16 start of the efuse content address ) 271iwpriv wlan0 efuse_set mac,00e04c871234 # cmd,Data bytes[hex] (Use set mac cmd to write 6 bytes data "0x00,0xe0,0x4c,0x87,0x12,0x34" to the efuse content) 272 273------------------------------------------------------------------------------------------------------ 274[4.3 Efuse's spec]. 275If you want a clearer definition of reference, you can refer to the Efuse's spec "RTLXXX_EEPROM_SPEC_V1.1_2012xxxx.pdf" 276 277============================================================================================================= 278 5. [Calibration Crystal Cap Adjust] 279============================================================================================================= 280 281MP use cmd to fine tuning the Crystal Cap val, and CMD is " iwpriv wlan0 mp_phypara xcap=%d". 282We can continue to adjust for get target vaule, then use the efuse cmd write to HW efuse, "iwpriv wlan0 efuse_set wmap,b9,20" 283 2848188EU example: 285The "B9" is Crystal Calibration efuse offset,please refer the efuse spec document. 286 287B9h Crystal Calibration XTAL_K Value 288 Bit[5:0], Xi=Xo Range 0~3F h. 289 Bit[7:6]: reserved 290 FF h = 00 h 291 292Default 20h 293 294 295============================================================================================================= 296 [6. Normal /MP Mode switch.] 297============================================================================================================= 298The new driver version v4.1 default support the normal/mp mode switch function. Please refer the following usage example. 299 300use example: 3011.Normal mode use. 302 303ifconfig wlan0 up #Enable the wifi, the current mode is normal. scan 、connection、packet tx/rx ..... 304 3052.change to MP mode. 306 307ifconfig wlan0 down 308ifconfig wlan0 up 309iwpriv wlan0 mp_start # MP packet Tx/Packet Rx test..... 310 3113.change to Normal Mode 312iwpriv wlan0 mp_stop # Disable MP Mode..... 313ifconfig wlan0 down 314ifconfig wlan0 up #Enable the wifi, the current mode is normal. scan 、connection、packet tx/rx ..... 315