Realtek RF MP Tool Guidelines V14 20150605
Realtek RF MP Tool Guidelines V14 20150605
Realtek RF MP Tool Guidelines V14 20150605
Table of Contents
1. Features.
2. Software Package.
6. Read/Write Thermometer
=====================================================================
[2. Software Package] - To check have the Component .tar.gz files.
=====================================================================
1. Driver source - rtXXX_linux_MP_vX.X.X.tar.gz
2. Wireless tool Source -(If want to use for Android system) -
Android_wireless_tools.tar
3. Documents
- LinuxDriver_MP_Iwpriv_UserGuide.doc
=====================================================================
[3. Quick Start Guide]
=====================================================================
===========================================================
[3.1. Build Driver module]
===========================================================
Note: Use su/sudo su for root authentication with following command.
If there're still some problems or need more detail to compile driver guide,
Please check normal driver package for more reference.
===========================================================
3.2 Build Android wireless tools
===========================================================
3.2.1 rtwpriv for MP APK GUI Tool
The Realtek Android MP apk tool need to use the proprietary rtwpriv tool, please
first to execute the adb push the rtwpriv to the android system.
In the RtkWiFiTest_Package_For_Customer package more detailed information on
readme.txt.
If you want to use “iwpriv” for Android system, we need to Build iwpriv (wireless
tools) for android.
And iwpriv use the “wireless-extensions” to ioctrl with wlan driver, If your Android
kernel disable the wireless extensions,
Please rebuild kernel and enable the kernel config “wireless-extensions”
If you are using Linux kernel 3. x, maybe you can’t to select and enable items on
make menuconfig, you can refer the following procedures:
Changed the followings in \linux-3.0.20\net\wireless\Kconfig:
Before:
Config WIRELESS_EXT
bool
...
Config WEXT_PRIV
boll
To:
config WIRELESS_EXT
bool "WIRELESS_EXT"
...
config WEXT_PRIV
bool "WEXT_PRIV"
With these steps, kernel and WLAN driver seem to be compiled successfully.
root@realtek-desktop:~/Desktop/froyo-x86/external/wireless_tools# . ../../build/env
setup.sh
root@realtek-desktop:~/Desktop/froyo-x86/external/wireless_tools# mm
.....
target Non-prelinked: iwpriv (out/target/product/eeepc/symbols/system/bin/iwpriv)
target Unstripped: iwpriv
(out/target/product/eeepc/obj/EXECUTABLES/iwpriv_intermediates/iwpriv)
Install: out/target/product/eeepc/system/xbin/iwpriv
rtw_RFE_type =
P.S. Another approach is to use the command all the way to complete
the test.
===========================================================
[3.4 Manual for MP Use Example]
===========================================================
(Execute the following commands after the WLAN interface is normally open)
If you want to change the input parameter (rate、channel、txpower、bandwidth) or
to continue the other MP test, please must first to input the command "iwpriv wlan0
mp_ctx stop". And doesn’t need to do the “mp_stop” command.
About Data Rate of input mapping range, please refer the doc
"iwpriv_mp_settings_for_different_data_rate.xls" for setting data rate.
6.
#iwpriv 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;
VHT Rate: MCS0 = 160, MCS 1=161, MCS 2=162 ~ MCS9 =169.
7.
#iwpriv wlan0 mp_txpower patha=44,pathb=44
//Set path A and path B TX power level, and the Range is 0~63.
If you want to get and use Efuse TX power index, please input advance the
command "iwpriv wlan0 mp_get_txpower ", then use the return a value and fill in
following orange field (patha=44, pathb=44).
This CMD is according to the before parameters (rate、channel、bandwidth).
9.
#iwpriv wlan0 mp_ctx stop //stop continuous Packet TX
If you want to change the input parameter (rate、channel、txpower 、
bandwidth),
please must input advance the command "iwpriv wlan0 mp_ctx stop".
10.
#iwpriv wlan0 mp_stop // exit MP mode
If you want to continue the MP test, don’t do this command.
#ifconfig wlan0 down // close WLAN interface
3.5 Rx Test Mode:
-----------------------------------------------------------------------------------------------------------------
a. [Air Rx testing]: "iwpriv wlan0 mp_arx start"
-----------------------------------------------------------------------------------------------------------------
#ifconfig wlan0 up // Enable Device for MP operation
#iwpriv wlan0 mp_start // Enter MP mode
#iwpriv wlan0 mp_channel 1 // Set channel to 1, 2, 3, 4~13 etc.
#iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 // set 20M mode and long GI,set 40M
is 40M=1 , set 80M= 2.
#iwpriv wlan0 mp_ant_rx a // Select antenna A for the operation, if
device has 2x2 antenna select antenna "a" or "b" and "ab" for operation.
#iwpriv wlan0 mp_arx start // start air Rx testing.
#iwpriv wlan0 mp_query // get the statistics.
#iwpriv wlan0 mp_arx stop or #iwpriv wlan0 mp_reset_stats // Stop air Rx test and show
the Statistics / Reset TX and Rx Counter.
#iwpriv wlan0 mp_stop // exit MP mode
#ifconfig wlan0 down // close WLAN interface
number : 14317.
1. TX Test:
a.iwpriv wlan0 mp_tx ch=6,bw=0,rate=108,pwr=40,ant=0,tx=1
This instruction requires an input format is correct and there is in the
order, will be able to successfully execute instructions, if you input
error format, this CMD will return below MSG.
2. Rx Test:
a.iwpriv wlan0 mp_rx ch=1,bw=0,ant=0
This instruction requires an input format is correct and there is in the
order, will be able to successfully execute instructions, if you input
error format, this CMD will return below MSG.
[ ch : BGN = <1~14> , A or AC = <36~165> ]
[ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]
[ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12
Use example:
[4.1 WiFi efuse_get]
#iwpriv wlan0 efuse_get realmap // read from the driver for all efuse logic map.
#iwpriv wlan0 efuse_get realraw // read from the HW of Efuse all PHY map.
#iwpriv wlan0 efuse_get mac // read mac Address (Direct to use the cmd for
raed mac address from the efuse content)
#iwpriv wlan0 efuse_get rmap,16,6 // fix offset: CMD, offset, byteCounts (Specified
a start of the efuse's logic address 0x16 offset and set the number of bytes for
reading the efuse content)
#iwpriv wlan0 efuse_get wlrfkmap // read form WiFi fake for all Efuse logic map.
------------------------------------------------------------------------------------------------------
[4.2 WiFi efuse_set]
#iwpriv wlan0 efuse_set wmap,16,00e04c871234 // CMD, offset, Data bytes [hex]
(Specified an offset address for write 6 byte data "0x00,0xe0,0x4c,0x87,0x12,0x34"
to the 0x16 start of the Efuse logic address)
If config the Driver to use the file Map, you can use the following CMD to read the
current driver of logic map.
#iwpriv wlan0 efuse_get drvmap // Read form current driver of efuse logic map.
a. Example CMD for writing to fake efuse Map and write fake to the HW efuse
Map:
Write efuse data to fake map.
1. #iwpriv wlan0 efuse_set wlwfake,00,00112233445566778899aabbccddeeff
2. #iwpriv wlan0 efuse_set wlwfake,10,00112233445566778899aabbccddeeff
3. #iwpriv wlan0 efuse_set wlwfake,20,00112233445566778899aabbccddeeff
4. #iwpriv wlan0 efuse_set wlwfake,20,00112233445566778899aabbccddeeff
……
5. #iwpriv wlan0 efuse_set wlwfake,c0,00112233445566778899aabbccddeeff
Read the fake map for verifying.
6. #iwpriv wlan0 efuse_get wlrfkmap
Write the Fake logic efuse Map to HW efuse.
7. #iwpriv wlan0 efuse_set wlfk2map
Read from the HW logic efuse Map for verifying.
8. #iwpriv wlan0 efuse_get realmap
b. Another way to read Linux EFUSE file MAP load to driver CMD.
Attention:
This function had a limited with the driver version number, “rtl8xxx_WiFi_linux_ v4.X.X_12561”,
Must to exceed the “12561” driver serial number.
Usage:
1. #iwpriv wlan0 efuse_file /../../efuse.map
#iwpriv wlan0 efuse_get btfmap // read from HW BT of the front efuse logic map.
#iwpriv wlan0 efuse_get btbmap // read from HW BT of the back efuse logic map.
#iwpriv wlan0 efuse_get btrmap,16,6 // fix offset :cmd,offset,byteCounts
(Specified BT start of the efuse's address and set the number of bytes for raed from
the BT efuse content)
#iwpriv wlan0 efuse_get btffake // read from fake BT of the front efuse logic map.
#iwpriv wlan0 efuse_get btbfake // read from fake BT of the back efuse logic map.
--------------------------------------------------------------------------------------------------------------
5. Crystal Calibration: iwpriv wlan0 mp_phypara xcap=26
MP uses CMD to fine tuning the Crystal Cap value, and CMD is " iwpriv wlan0
mp_phypara xcap=%d".
We can continue to adjust for getting targeted value, then use the Efuse CMD write
to HW efuse, "iwpriv wlan0 efuse_set wmap, b9, 20"
#insmod wlan.ko
#ifconfig wlan0 up
#iwpriv wlan0 mp_start
#iwpriv wlan0 mp_setrfpath 0
#iwpriv wlan0 mp_ant_tx a
#iwpriv wlan0 mp_channel 7
#iwpriv wlan0 mp_txpower patha=42
#iwpriv wlan0 mp_phypara xcap=32 //init a adjust Crystal
#iwpriv wlan0 mp_ctx background,stone
#iwpriv wlan0 mp_phypara xcap=26 //to adjust Crystal and measure
#iwpriv wlan0 mp_phypara xcap=24 //to adjust Crystal and measure
3. Use read Efuse CMD for verifying the value from thermal offset.
#iwpriv wlan0 efuse_get rmap,(Efuse offset),1
-----------------------------------------------------------------------------------------------------------------
7. [Verify Efuse TX power index]:
----------------------------------------------------------------------------------------------------------------
IF you completed the calibration and write the power index to the EFUSE.
We provide the CMD “iwpriv wlan0 mp_get_txpower 0/1(path)” for verifying
EFUSE of power index.
You can refer the below CMD flow to verify the power index form the EFUSE.
You can reboot your system, or remove and then insert the wlan of driver module.
rmmod wlan.ko
insmod wlan.ko
#ifconfig wlan0 up // Enable Device for MP operation
#iwpriv wlan0 mp_start // enter MP mode
#iwpriv wlan0 mp_channel 1 // set the channel to 1. 2, 3, 4~13 etc.
#iwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 // set 20M mode and long GI,set 40M
is 40M=1 , set 80M= 2.
#iwpriv wlan0 mp_ant_tx a //Select Antenna A for the operation, if
the device have 2x2 antenna select antenna "a" or "b" and "ab" for operation.
#iwpriv 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;
VHT Rate: MCS0 = 160, MCS 1=161, MCS 2=162 ~ MCS9 =169.
If you want to get and use Efuse TX power index, please input advance the command
"iwpriv wlan0 mp_get_txpower 0/1", and use the return value to fill in following
orange field.
#iwpriv wlan0 mp_txpower patha=44, pathb=44 //set path A and path B TX power
level, the Range is 0~63.