Staging:CC3120 Transceiver Mode

Overview
Transceiver Mode is a powerful feature that allows the applications to send and receive raw data by accessubg the 802.11 MAC and PHY layers directly. The feature bypasses the IP and MAC layers altogether, thereby allowing application developers define their proprietary protocols over WLAN PHY.

Application Details
In Transceiver Mode, almost the entire frame space, starting from the legacy 802.11 MAC headers, can be used for transmitting proprietary information. Since the higher layers are not used in this mode, it’s not guaranteed that the frame will reach the destination. Also, there are no acknowledgments or retries at MAC level.

Beaware that only disconnected-mode is supported in Transceiver Mode, meaning that the device cannot be connected to an AP.

Perhaps the most common usage for Transceiver mode is RF evaluation, which is a requirement for certification purposes (FCC, ETSI, Telec etc.). To see these RF signal, you'll need a spectrum analyzer and run the application inside an RF chamber.

This application is essentially the same as the Radio Tool. Supporting the following features:
 * Acquires MAC address
 * Acquires FW information
 * TX
 * Continuous
 * Packetized
 * Carrier Wave (CW)
 * RX
 * Statistics
 * RSSI Histogram
 * Rate Histogram

For guideline on how to generate a customized packet, please refer to the CC31xx & CC32xx Transceiver Mode page.

Prerequisite

 * 1x CC3120BOOST
 * 1x CC31XXEMUBOOST
 * 1x Micro-USB cable
 * 1x Windows PC with:
 * Visaul Studio Community 2015 (minimum)

Optional:
 * 1x Spectrum Analyzer

Source Files Details

 * main.c - Initializes the device in default configuration and creates two task 'mainTask' and 'CmdTask'
 * cmd_tranceiver_mode.c - Implementation to handle all user inputs from the console window
 * tranceiver_mode.c - Implementation to exercise all transceiver mode commands
 * radiotool.c - core implementation of the transceiver mode/radio tool application. The same code can be found in the Radio Tool.

Key Simplink API used

 * sl_Socket - creates the transceiver mode socket
 * sl_Send - sends transceiver mode packets in TX mode
 * sl_Recv - recevies transceiver mode packets in RX mode
 * sl_Close - closes socket
 * sl_SetSockOpt - defines the socket options
 * sl_WlanRxStatStart - Start collecting wlan RX statistics, for unlimited time.
 * sl_WlanRxStatStop - Stop collecting wlan RX statistics, (if previous called sl_WlanRxStatStart)
 * sl_WlanRxStatGet - Retrieves the RX statistics

Raidio Tool Library Details
Please refer to Radio Tool API Appendix

Example Use Cases and Outputs
Connect the boards, compile, and run the application. Please refer to CC31xx SimpleLink Studio for setup details.

command>>:radiotool -t 10 -c 1 -T -z 2 -m 13 TX Testing Started. The program will last 10 second(s) as specified in the duration field. TX Finished: SUCCESS
 * Using transceiver mode to generate TX packetized signal with the following settings:
 * 10 seconds testing duration
 * Transmission on channel 1
 * Testing with TX Packetized
 * Data rate 54Mbps

command>>:radiotool -t 10 -c 1 -R RX Testing Started. The program will last 10 second(s) and report after time's up. Please refer to the help page for output format. 2754, 216, 0 -69, -76 47, 47, 260, 3, 6, 1838, 600 255, 255, 6, 3, 9, 2021, 305, 85, 6, 49, 0, 0, 0, 1, 1, 9, 3, 0, 1, 0, 0 RX Finished: SUCCESS
 * Using transceiver mode to acquire RX statistics with the following settings:
 * 10 seconds testing duration
 * Gettings statistics on channel 1

Please refer to Radio Tool for detailed usage and testing setups.

Commands
A full list of all available commands for this application is listed below.

Usage: help [command name]
 * help

Description: To know more about the command name.

Available commands:

help               radiotool

Due to the large amount options available, all options are listed here instead of inside the application code. Device Information: -M,                       Returns the MAC address -F,                       Returns the firmware version and CC3200 application version (if applicable) in the following order: Chip ID, ROM version, Firmware version, CC3200 App version, MAC address.
 * radiotool

Common for TX and RX: -t,                       RX/TX Testing DURATION in seconds for -T and -R options. Range: [1, 65535]. Default: 1 -c,                       RX/TX Testing CHANNEL  for -T and -R options. Range: [1, 13]. Default: 1

TX (Transmission): -T,                       TX testing for Continuous or Packetized. -z,               TX Testing TX_TYPE. 1:Continuous, 2:Packetized, 3:CW. 'tone_offset' option can be used if                              and only if CW is chosen. Range: [1, 3]. Default: 1. -m,               TX Testing rate (with the corresponding MODULATION). Range: [1, 20]. Default: 1 (1Mbps DSSS). 1: 1 Mbps (DSSS) 2: 2 Mbps (DSSS) 3: 5.5 Mbps (CCK) 4: 11 Mbps (CCK) 5: NOT SUPPORTED 6: 6 Mbps (OFDM) 7: 9 Mbps (OFDM) 8: 12 Mbps (OFDM) 9: 18 Mbps (OFDM) 10: 24 Mbps (OFDM) 11: 36 Mbps (OFDM) 12: 48 Mbps (OFDM) 13: 54 Mbps (OFDM) 14: MCS 0 15: MCS 1 16: MCS 2 17: MCS 3 18: MCS 4 19: MCS 5 20: MCS 6 21: MCS 7 -w,               TX POWER attenuation for Continuous and Packetized testing. 0 being the maximum power and 15 being the minimum power.Range: [0, 15]. Default: 0 -f,               TX TONE_OFFSET for CW testing only. A value of N means tone at offset N*312.5kHz. Range: [-25, 25]. Default: 0 -l,               TX Testing packet SIZE. Range: [24, 1400]. Default: 1400 -o,                       TX CCA override enable. Default: non-overriding. -a,               TX destination MAC address WITHOUT colons. For example, if the MAC address is 01:23:45:67:89:AB, enter 0123456789AB instead. Case insensitive. Default: 01:23:45:67:89:AB -n,               TX maximum number of packets. Continuous TX only. Range:[0, 4,294,967,290]. 0 for infinite amount. Default: 0 -g,               TX delay in between packets in milliseconds. Packetized TX only. Range:[100, 1,000,000]. Default: 100 -e,               TX preamble. Long:0, Short:1. Default: Long -r,               TX data pattern. See the following for the complete list. Default: 0 (All 0) 0: All 0 1: All 1 2: Incremental 3: Decremental

RX (Reception): -R,                       RX testing and retrieves statistics. The statistics will be shown as: 1st line: <# valid packets>, <# FCS error packets>, <# address mismatch packets> 2nd line: ,  3rd line: RSSI historgram. , <-48dBm to -55dBm>, <-56dBm to -63dBm>, <-64dBm to -71dBm>, <-72dBm to -79dBm>,  4th line: Rate historgram, lowest to highest. The list order is identical to the rate/ modulation option. -d,               RX statistics reporting period, every N seconds. If set to 0, RX statistics will only report at the end. Range: [0, 65535]. Default: 0 -p,                       Report RX histogram in percentage format. If not set, default is in amount of packets.

Limitations/Known Issues
None