WL18xx Testing Misc Commands

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

This section will review the calibrator configuration commands that may be useful for wl18xx configuration.
Before using any of the WLAN commands listed below, you should enter the WL18xx device into PLT mode using the following command:

root
cd /usr/share/wl18xx/
calibrator wlan0 plt power_mode on 


Set Antenna Mode

Purpose

The purpose of the set antenna mode command is to configure the WL18xx chip to operate in a specific Wifi band.

Method

The set antenna mode command for 2.4G can be called using the following format:

 calibrator wlan0 wl18xx_plt set_antenna_mode_24G <mac_prim_rx_chain> <mac_prim_tx_chain> <mac_rx_chain1_en> <mac_rx_chain2_en> <mac_tx_chain1_en> <mac_tx_chain2_en>

where:

Field Name Possible Inputs Description Comments
mac_prim_rx_chain 1 or 2 Primary RX chain to use In MIMO mode it has no meaning and in SISO mode only BG2 RX is allowed. See supported configurations table
mac_prim_tx_chain 1 or 2 Primary TX chain to use Always set according to the tx_chain1_en and tx_chain2_en fields. See supported configurations table
mac_rx_chain1_en 0 or 1 Chain Enable (1) or Disable (0)
mac_rx_chain2_en 0 or 1 Chain Enable (1) or Disable (0)
mac_tx_chain1_en 0 or 1 Chain Enable (1) or Disable (0)
mac_tx_chain2_en 0 or 1 Chain Enable (1) or Disable (0)

Supported Modes:

Mode mac_prim_rx_chain mac_prim_tx_chain mac_rx_chain1_en mac_rx_chain2_en mac_tx_chain1_en mac_tx_chain2_en
2.4GHz SISO 2 2 0 1 0 1
MIMO BG2 TX Primary 2 2 1 1 1 1
MIMO BG1 TX Primary (PLT Only) DC (Set 1 for consistence with TX) 1 1 1 1 1


The set antenna mode command for 5G can be called using the following format:

 calibrator wlan0 wl18xx_plt set_antenna_mode_5G <mac_prim_rx_chain> <mac_rx_chain1_en> <mac_rx_chain2_en> <mac_tx_chain1_en>

where:

Field Name Possible Inputs Description Comments
mac_prim_rx_chain 1 or 2 Primary RX chain to use
mac_rx_chain1_en 0 or 1 Chain Enable (1) or Disable (0)
mac_rx_chain2_en 0 or 1 Chain Enable (1) or Disable (0)
mac_tx_chain1_en 0 or 1 Chain Enable (1) or Disable (0)

Supported Modes:

Mode mac_prim_rx_chain mac_rx_chain1_en mac_rx_chain2_en mac_tx_chain1_en
5GHz SISO 1 1 0 1

Examples

The following set antenna command configures the chip to operate in the 2.4GHz band (SISO).

 calibrator wlan0 wl18xx_plt set_antenna_mode_24G 2 2 0 1 0 1

The following set antenna command configures the chip to operate in the 5GHz band (SISO).

 calibrator wlan0 wl18xx_plt set_antenna_mode_5G 1 1 0 1

Set Antenna Diversity 5GHz

Purpose

The purpose of the set antenna diversity command is to select on which one of the 5GHz antennas to work on.

Method

The set antenna diversity command can be called using the following format:

 calibrator wlan0 wl18xx_plt set_antenna_diversity_5G <mode>
Where:
  • <mode> is the required antenna to work on.

Examples

The following set antenna diversity example set to work on the main antenna:

calibrator wlan0 wl18xx_plt set_antenna_diversity_5G 1

The following set antenna diversity example set to work on the secondary antenna:

calibrator wlan0 wl18xx_plt set_antenna_diversity_5G 0

The following transmit data on the main antenna and the secondary antenna alternatively:

# Tuning the radio to channel 44 (5220MHz)
calibrator wlan0 plt power_mode on
calibrator wlan0 wl18xx_plt set_antenna_mode_5G 1 1 0 1
calibrator wlan0 wl18xx_plt tune_channel 44 1 1

# Transmit from main antenna
calibrator wlan0 wl18xx_plt set_tx_power 20000 0 1 44 0 0 0 1 0 0 0 0 
calibrator wlan0 wl18xx_plt start_tx 400 19 3000 0 0 0 0 0 00:11:22:33:44:55 01:02:03:04:05:06 0 

# Stop Tx
calibrator wlan0 wl18xx_plt stop_tx

# Transmit from secondary antenna
calibrator wlan0 wl18xx_plt set_antenna_diversity_5G 0
calibrator wlan0 wl18xx_plt start_tx 400 19 3000 0 0 0 0 0 00:11:22:33:44:55 01:02:03:04:05:06 0

# Stop Tx
calibrator wlan0 wl18xx_plt stop_tx

# Transmit back from main antenna
calibrator wlan0 wl18xx_plt set_antenna_diversity_5G 1
calibrator wlan0 wl18xx_plt start_tx 400 19 3000 0 0 0 0 0 00:11:22:33:44:55 01:02:03:04:05:06 0



Read Registers

Purpose

The purpose of the read registers command is to read a specific address content.

Method

The read register command can be called using the following format:

 wl18xx_plt phy_reg_read <addr>
Where:
  • <addr> is the required address to read from.

Examples

The following read registers example reads the content of address 0x30600:

calibrator wlan0 wl18xx_plt phy_reg_read 0x30600
Register Address:       0x30600 is:     0x0



Write Registers

Purpose

The purpose of the write registers command is to write a content to a specific address.

Method

The write register command can be called using the following format:

 calibrator wlan0 wl18xx_plt phy_reg_write <addr> <data>
Where:
  • <addr> is the required address to write to.
  • <data is the required content to write.

Examples

The following write registers example writes 0x1 to address 0x30600.

calibrator wlan0 wl18xx_plt phy_reg_write 0x30600 0x1


Read MAC Address

Purpose

The purpose of the read MAC address command is to read the BD_ADDR from fuse and each interface address.

Method

The read MAC address command can be called using the following format:

 calibrator wlan0 plt get_mac

Examples

calibrator wlan0 plt get_mac      
BD_ADDR from fuse:      0x34:0xb1:0xf7:0xe1:0xee:0x9b
First WLAN MAC:         0x34:0xb1:0xf7:0xe1:0xee:0x9c
Second WLAN MAC:        0x34:0xb1:0xf7:0xe1:0xee:0x9d