Introduction
195
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Transceiver
13.1 Introduction
The transceiver mode is a powerful tool that gives the ability to send and receive any raw data in Layer 2.
The user can use the entire frame, including the 802.11 header (excluding duration field), to receive and
transmit its own data. Transceiver mode is only enabled when the SimpleLink Wi-Fi device is not
connected to an AP. Receiving packets in transceiver mode is enabled only after the first call to the
sl_Recv API. Before this call, no packets can be received. By default, there is no frame
acknowledgements or retries; therefore, there are no promises that the frames reach their destination
(when working in L1 mode, it is also not ensured that there will be no collision with other frames or with
other interference).
One common use case for transceiver mode applications is for transmitting the same packet in continues.
This is used mostly for tagging and for measuring loss, using the RX statistics feature. Another use case
can be promiscuous mode, such as with as a sniffer.
13.2 Key Features
lists the key features of the transceiver.
Table 13-1. Key Features
Key Features
Description
TX\RX Layer 1 raw data
Send and receive any L1 raw data
TX\RX Layer 2 raw data
Send and receive any L2 raw data
Internal Packer Generator
The device can auto-generate packet internally with infinite
transmission.
CW
Carrier-wave signal transmission
13.3 Configurations and Setting
Host driver commands are used to start and operate the transceiver mode.
NOTE:
To use transceiver mode, the device must be set in STA role, be disconnected, and have
disabled previous connection policies that might try to automatically connect to an AP.
Example:
_i16 Status;
Status = sl_WlanPolicySet(SL_POLICY_CONNECTION,SL_CONNECTION_POLICY(0,0,0,0,0),NULL,0);
if
( Status )
{
/* error */
}
Status = sl_WlanDisconnect();
if
( Status )
{
/* error */
}
13.3.1 Open Transceiver Socket
Only a single transceiver socket is supported. To start the transceiver mode, use the sl_Socket API with
the following arguments:
•
Domain – Set to SL_AF_RF; indicates transceiver mode socket. Configure this value as the family
parameter.
•
Type – Set to one of the following options:
–
SL_SOCK_RAW – Indicates an L1 mode raw socket (no respect for 802.11 medium access policy -
CCA)
–
SL_SOCK_DGRAM – Indicates an L2 mode raw socket (respecting 802.11 medium access
policies)