0% found this document useful (0 votes)
4 views17 pages

AN0004 Realtek Low Power Wi-Fi MP User Guide

AN0004 Realtek low power wi-fi mp user guide

Uploaded by

iguiymngiug
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views17 pages

AN0004 Realtek Low Power Wi-Fi MP User Guide

AN0004 Realtek low power wi-fi mp user guide

Uploaded by

iguiymngiug
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

MP User Guide

Realtek Wan driver supports Mass Production functions. Customers can utilize these
functions to do EMI test and other simple TX and RX test. Command APIs can be used to
get and set I/O control to WLAN driver. Be sure to enable Wlan interface before using MP

This MP tool is running on FreeROTS environment.


Document Number: AN0004

Table of Contents

1 Introduction................................................................................................................... 4
2 MP library ...................................................................................................................... 4
2.1 SDK revision v2.x series................................................................................................... 4
2.2 SDK revision v3.x series................................................................................................... 5
3 Command Usage ............................................................................................................ 7
3.1 Start MP mode ................................................................................................................ 7
3.2 Stop MP mode ................................................................................................................ 7
3.3 Set Tx rate ....................................................................................................................... 7
3.4 Set operational channel .................................................................................................. 7
3.5 Set operational bandwidth ............................................................................................. 8
3.6 Set Tx power ................................................................................................................... 8
3.7 Set antenna for Tx ........................................................................................................... 8
3.8 Set antenna for Rx........................................................................................................... 9
3.9 Start air Rx mode ............................................................................................................ 9
3.10 Start continuous Tx mode ............................................................................................... 9
3.11 Query air Rx statistics.................................................................................................... 10
3.12 Reset air Tx/Rx statistics ............................................................................................... 10
4 Example Command ...................................................................................................... 12
4.1 Continuous Tx testing ................................................................................................... 12
4.2 Continuous Packet Tx testing........................................................................................ 12
4.3 Count Packet Tx testing ................................................................................................ 12
4.4 Carrier suppression testing ........................................................................................... 13
4.5 Single Tone Tx testing ................................................................................................... 13
4.6 Air Rx testing ................................................................................................................. 14
5 Data read/write example ............................................................................................. 15
5.1 SDK revision v02.x series............................................................................................... 15
5.1.1 Get efuse ............................................................................................................... 15
5.1.2 Set efuse................................................................................................................ 15
5.2 SDK revision v03.x series............................................................................................... 16
5.2.1 Get config .............................................................................................................. 16

2017-01-20 2
Document Number: AN0004

5.2.2 Set config............................................................................................................... 16


6 Crystal Calibration ........................................................................................................ 17
6.1 Set Crystal Calibration ................................................................................................... 17

2017-01-20 3
Document Number: AN0004

1 Introduction
The RTL8195a driver supports driver based Mass Production functions. Customers can utilize
these functions to do EMI test and other simple TX and RX test. Under RTL8195a turnkey, we
command APIs can be used to get and set I/O control to WLAN driver. The MP functions will
only operate after the WLAN interface is opened.

This MP tool is running on FreeROTS environment.

2 MP library
2.1 SDK revision v2.x series

Normal driver and MP driver use separate libraries. WlanLib.a is for normal driver, and
WlanLib_mp.a is for MP mode driver. To initiate driver in MP mode, WlanLib_mp.a must be
used. To activate MP mode driver:

Step 1: Please Set CONFIG_INTERACTIVE_MODE to 1, CONFIG_START_STA and


CONFIG_START_AP to 0 in main.c file.

//Config in main.c
#define CONFIG_INIT_NET 1
#define CONFIG_START_STA 0
#define CONFIG_START_AP 0
#define CONFIG_INTERACTIVE_MODE 1

Step 2: Save WlanLib.a with another name such as WlanLib-normal.a for backup and rename
WlanLib-mp.a with WlanLib.a. Rebuild the code.

2017-01-20 4
Document Number: AN0004

2.2 SDK revision v3.x series


Normal driver and MP driver use separate libraries. lib_wlan.a is for normal driver, and
lib_wlan_mp.a is for MP mode driver. To initiate driver in MP mode, lib_wlan_mp.a must be
used. To activate MP mode driver:

For Ameba1

Step 1: back up normal driver in

component\soc\realtek\8195a\misc\bsp\lib\common\IAR\lib_wlan.a

Step 2:

Rename component\soc\realtek\8195a\misc\bsp\lib\common\IAR\lib_wlan_mp.a with


component\soc\realtek\8195a\misc\bsp\lib\common\IAR\lib_wlan.a

Step 3:

Rebuild project.

2017-01-20 5
Document Number: AN0004

For AmebaZ

Step 1: back up normal driver in

component\soc\realtek\8711b\misc\bsp\lib\common\IAR\lib_wlan.a

Step 2:

Rename component\soc\realtek\8711b\misc\bsp\lib\common\IAR\lib_wlan_mp.a with


component\soc\realtek\8711b\misc\bsp\lib\common\IAR\lib_wlan.a

Step 3:

Rebuild project.

2017-01-20 6
Document Number: AN0004

3 Command Usage
3.1 Start MP mode

iwpriv mp_start

After executing this command, WLAN driver enters MP mode and stops transmitting and
receiving any packets. All connection with other stations will be broken. Beacon
transmitting is also stopped. If the original state is client mode, the roaming will be stopped.

3.2 Stop MP mode

iwpriv mp_stop

After executing this command, WLAN driver will stops transmitting and receiving packets
initialized by other commands. It will not return to normal operation mode. System should
close the WLAN interface and open again to get WLAN work normally.

3.3 Set Tx rate

iwpriv mp_rate rate

rate: sets the rate of Tx packets (i.e., 2 for 1M, 4 for 2M, 11 for 5.5M, …, 108 for 54M,
128 for MCS0, 129 for MCS1, …, 142 for MCS15)

Set the data rate of continuous transmitting.

3.4 Set operational channel

iwpriv mp_channel channel

2017-01-20 7
Document Number: AN0004

channel: sets the channel to send and receive packets

Set the operational channel of transmitting and receiving packets.

3.5 Set operational bandwidth

iwpriv mp_bandwidth 40M=40m,shortGI=sgi

40m: sets the operational bandwidth, 1 for 40M mode, 0 for 20M mode

sgi: sets guard interval of transmitting MCS packet, 1 for short GI, 0 for long GI

Set the operational bandwidth for transmitting and receiving packets. Set the guard interval
for transmitting MCS packets. If the parameters are not given, the default action is set
bandwidth to 20M mode and long GI to transmitting packets.

3.6 Set Tx power

iwpriv mp_txpower patha=x,pathb=y

x: sets Tx power level for path A

y: sets Tx power level for path B

Set the transmitting power level of path A and path B. If the parameters are not given, the
driver will set Tx power according to the flash setting.

3.7 Set antenna for Tx

iwpriv mp_ant_tx ant

ant: sets the operational antenna for Tx, a for antenna A, b for antenna B, ab for
antenna A and B

Set the operational antenna for Tx on the target board.

2017-01-20 8
Document Number: AN0004

3.8 Set antenna for Rx

iwpriv mp_ant_rx ant

ant: sets the operational antenna for Rx, a for antenna A, b for antenna B, ab for
antenna A and B

Set the operational antenna for Rx on the target board.

3.9 Start air Rx mode

iwpriv mp_arx start/stop/phy

start: starts to accumulate Rx packets

stop: stops counts and show the statistics

phy: shows the count of RF physical received packets, CRC error, false alarm.

This command is for air receiving test. Use start command to accumulate the received
packets. Use stop command to stop counting and show the statistics of correct packets and
CRC-error packets. Use phy command to show the count of RF physical received packets,
CRC error and false alarm.

3.10Start continuous Tx mode

iwpriv mp_ctx count=n,background,stop,pkt,cs,stone

t: sets the number of seconds to send packets

2017-01-20 9
Document Number: AN0004

n: sets the number of packets to send

background: sends packets in background mode

stop: stops the background sending

pkt: sends packet tx, i.e., not sent by hardware

cs: sends carrier suppression

stone: sends single tone

This command is for continuous transmitting test. Use time command to assign the time to
send packets. Use count command to assign the number of packets to send. If both of time
and count are not specified, the sending function will continue infinitely. It can be stopped
when any key is pressed (should be specifically implemented in other platform) while
background command is not specified. If cs is specified, the sending signal will be a carrier
suppression signal. Use stone command to send single tone signal for frequency testing. If
stone is specified, the sending signal will be single tone and not a distinguishable packet any
more. Use background command to tell driver to send packets in background. The
command line control will return and packet sending is continuous. It can be stopped by
stop command. By default, packets will be sent by hardware for shorter duty cycle. If pkt is
specified, packets will be sent by software.

3.11Query air Rx statistics

iwpriv mp_query

This command is for packet counting. Under packet transmitting, use this command to get
the number of packets being transmitted. Under receiving, use this command to get the
statistics of correct packets and CRC-error packets.

3.12Reset air Tx/Rx statistics

iwpriv mp_reset_stats

2017-01-20 10
Document Number: AN0004

This command is for reset the packet counts. Under packet transmitting, use this command
to reset the number of packets after the transmitted or receiving, use this command to
reset the statistics of correct packets and CRC-error packets.

2017-01-20 11
Document Number: AN0004

4 Example Command
4.1 Continuous Tx testing
(Execute the following commands after WLAN interface is normally opened)

iwpriv mp_start enter MP mode


iwpriv mp_channel 1 set channel to 1 . 2, 3, 4~11 etc.
iwpriv mp_bandwidth 40M=0,shortGI=0 set 20M mode and long GI
iwpriv mp_ant_tx a select antenna A for operation
iwpriv mp_txpower patha=44,pathb=44 set path A and path B Tx power level
iwpriv mp_rate 108 set OFDM data rate to 54Mbps,ex:
CCK 1M = 2, CCK 5.5M = 11, KK, OFDM54M = 108 N Mode: MCS0 = 128, MCS1
= 129…..etc.
iwpriv mp_ctx background start continuous Tx
iwpriv mp_ctx stop stop continuous Tx
iwpriv mp_stop exit MP mode

4.2 Continuous Packet Tx testing


(Execute the following commands after WLAN interface is normally opened)

iwpriv mp_start enter MP mode


iwpriv mp_channel 1 set channel to 1 . 2, 3, 4~11 etc.
iwpriv mp_bandwidth 40M=0,shortGI=0 set 20M mode and long GI
iwpriv mp_ant_tx a select antenna A for operation
iwpriv mp_txpower patha=44,pathb=44 set path A and path B Tx power level
iwpriv mp_rate 108 set OFDM data rate to 54Mbps,ex:
CCK 1M = 2, CCK 5.5M = 11, KK, OFDM54M = 108 N Mode: MCS0 = 128, MCS1
= 129…..etc.
iwpriv mp_ctx background,pkt start packet continuous Tx
iwpriv mp_ctx stop stop continuous Tx

4.3 Count Packet Tx testing


(Execute the following commands after WLAN interface is normally opened)

2017-01-20 12
Document Number: AN0004

iwpriv mp_start enter MP mode


iwpriv mp_channel 1 set channel to 1 . 2, 3, 4~11 etc.
iwpriv mp_bandwidth 40M=0,shortGI=0 set 20M mode and long GI
iwpriv mp_ant_tx a select antenna A for operation
iwpriv mp_txpower patha=44,pathb=44 set path A and path B Tx power level
iwpriv mp_rate 108 set OFDM data rate to 54Mbps,ex:
CCK 1M = 2, CCK 5.5M = 11, KK, OFDM54M = 108 N Mode: MCS0 = 128, MCS1
= 129…..etc.
iwpriv mp_ctx count=%d,pkt Number of packets start packet Tx
iwpriv mp_ctx stop stop continuous Tx
iwpriv mp_stop exit MP mode

4.4 Carrier suppression testing


(Execute the following commands after WLAN interface is normally opened)

iwpriv mp_start enter MP mode


iwpriv mp_channel 1 set channel to 1 . 2, 3, 4~11 etc.
iwpriv mp_bandwidth 40M=0,shortGI=0 set 20M mode and long GI
iwpriv mp_ant_tx a select antenna A for operation
iwpriv mp_txpower patha=44,pathb=44 set path A and path B Tx power level
iwpriv mp_rate 108 set OFDM data rate to 54Mbps,ex:
CCK 1M = 2, CCK 5.5M = 11, KK, OFDM54M = 108 N Mode: MCS0 = 128, MCS1
= 129…..etc.
iwpriv mp_ctx background,cs start sending carrier suppression signal
iwpriv mp_ctx stop stop continuous Tx
iwpriv mp_stop exit MP mode

4.5 Single Tone Tx testing


(Execute the following commands after WLAN interface is normally opened)

iwpriv mp_start enter MP mode


iwpriv mp_channel 1 set channel to 1 . 2, 3, 4~11 etc.
iwpriv mp_bandwidth 40M=0,shortGI=0 set 20M mode and long GI
iwpriv mp_ant_tx a select antenna A for operation
iwpriv mp_txpower patha=44,pathb=44 set path A and path B Tx power level
iwpriv mp_rate 108 set OFDM data rate to 54Mbps,ex:
CCK 1M = 2, CCK 5.5M = 11, KK, OFDM54M = 108 N Mode: MCS0 = 128, MCS1
= 129…..etc.

2017-01-20 13
Document Number: AN0004

iwpriv mp_ctx background,stone start sending single tone signal


iwpriv mp_ctx stop stop sending single tone signal
iwpriv mp_stop exit MP mode

4.6 Air Rx testing


(Execute the following commands after WLAN interface is normally opened)

iwpriv mp_start enter MP mode


iwpriv mp_bandwidth 40M=1,shortGI=0 set 40M mode and long GI
iwpriv mp_channel 6 set channel to 6
iwpriv mp_ant_rx ab select all 2 antennas for operation
iwpriv mp_arx start start air Rx
iwpriv mp_query get the statistics
iwpriv mp_arx stop stop air Rx and show the statistics
iwpriv mp_stop exit MP mode

2017-01-20 14
Document Number: AN0004

5 Data read/write example


5.1 SDK revision v2.x series
5.1.1 Get efuse

iwpriv efuse_get rmap,0a,16

0a: sets the number of efuse offset (hex)

16: sets the number of byte counts (dec)

This command is for start of the efuse's logic address 0x0a offset and set the number of
bytes for read the efuse content.

5.1.2 Set efuse

iwpriv efuse_set wmap,0a,00e04c871234

0a: sets the number of efuse offset (hex)

00e04c871234: data bytes (hex) , Max: 16 bytes

This command is for a offset address for write 6 bytes data


"0x00,0xe0,0x4c,0x87,0x12,0x34" to the 0x0a start of the efuse logic address.

2017-01-20 15
Document Number: AN0004

5.2 SDK revision v3.x series


5.2.1 Get config

iwpriv config_get rmap,11a,16

11a: sets the number of config offset (hex)

16: sets the number of byte counts (dec)

This command is for start of the config's logic address 0x0a offset and set the number of
bytes for read the config content.

5.2.2 Set config

iwpriv config_set wmap,11a,00e04c871234

11a: sets the number of config offset (hex)

00e04c871234: data bytes (hex) , Max: 16 bytes

This command is for a offset address for write 6 bytes data


"0x00,0xe0,0x4c,0x87,0x12,0x34" to the 0x0a start of the config logic address.

2017-01-20 16
Document Number: AN0004

6 Crystal Calibration
6.1 Set Crystal Calibration

iwpriv mp_phypara xcap=26

26: sets the value of crystal calibration (dec)

This command is for crystal calibration.

Crystal Calibration Example

(Execute the following commands after WLAN interface is normally opened)

iwpriv mp_start enter MP mode


iwpriv mp_channel 1 set channel to 1 . 2, 3, 4~11 etc.
iwpriv mp_bandwidth 40M=0,shortGI=0 set 20M mode and long GI
iwpriv mp_ant_tx a select antenna A for operation
iwpriv mp_txpower patha=44 set path A Tx power level
iwpriv mp_phypara xcap=32 set crystal calibration value
iwpriv mp_ctx background,stone start sending single tone signal
iwpriv mp_phypara xcap=26 set crystal calibration value
iwpriv mp_phypara xcap=24 set crystal calibration value
( Crystal Calibration Success! Find Crystal Index = 24 ! )
iwpriv mp_ctx stop stop sending single tone signal
iwpriv mp_stop exit MP mode

2017-01-20 17

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy