wlanDeviceConfig
Description
The wlanDeviceConfig
object contains properties that configure a WLAN
node. The DeviceConfig
property of a wlanNode
object is a
wlanDeviceConfig
object or a vector of such objects.
Creation
Description
creates a
default WLAN device configuration object.deviceCfg
= wlanDeviceConfig
sets properties of the WLAN device
configuration object using one or more optional name-value arguments. deviceCfg
= wlanDeviceConfig(Name=Value
)
Properties
Mode
— Operating mode of device
"STA"
(default) | "AP"
| "mesh"
Operating mode of the device, specified as "STA"
,
"AP"
, or "mesh"
. These mean that the device is a
station, access point, or mesh point, respectively.
Data Types: char
| string
BandAndChannel
— Operating frequency band and channel number
[5 36]
(default) | vector of length 2
Operating frequency band and channel number, specified as a vector of length 2. The
vector's first entry specifies the frequency band in GHz. It must be
2.4
, 5
, or 6
. The second
entry specifies the channel number. It takes the following values:
An integer in the range [1, 14] if the frequency band is 2.4 GHz
An integer in the range [1, 200] if the frequency band is 5 GHz
An integer in the range [1, 233] if the frequency band is 6 GHz
Data Types: double
TransmissionFormat
— Physical layer transmission format
"HE-SU"
(default) | "Non-HT"
| "HT-Mixed"
| "VHT"
| "HE-EXT-SU"
| "HE-MU-OFDMA"
Physical layer transmission format, specified as "HE-SU"
,
"Non-HT"
, "HT-Mixed"
, "VHT"
,
"HE-EXT-SU"
, or "HE-MU-OFDMA"
. This property
determines the transmission format that the device uses for the unicast data frame
transmissions. Broadcast data frames always use the non-HT format, regardless of the
value to which you set this property.
Data Types: char
| string
ChannelBandwidth
— Channel bandwidth in Hz
20e6
(default) | 40e6
| 80e6
| 160e6
Channel bandwidth in Hz, specified as 20e6
,
40e6
, 80e6
, or 160e6
.
Data Types: single
| double
MCS
— Modulation and coding scheme
0
(default) | integer in the range [0, 11]
Modulation and coding scheme, specified as an integer in the range [0, 11]. The set
of values that this property can take depends on the TransmissionFormat
property:
When
TransmissionFormat
is"Non-HT"
or"HT-Mixed"
, the range of values is [0, 7]. The given value in the range [0, 7] maps to a value in the range [0, 31] using the calculation MCS+(NSTS–1)*8, where NSTS is the value of theNumSpaceTimeStreams
property.When
TransmissionFormat
is"VHT"
, the range of values is [0, 9]. The set of possible values additionally depends on theChannelBandwidth
andNumSpaceTimeStreams
properties:When
ChannelBandwidth
is20e6
, you can set theMCS
value to9
only whenNumSpaceTimeStreams
is set to3
or6
.When
ChannelBandwidth
is80e6
, theMCS
value6
is not supported whenNumSpaceTimeStreams
is set to3
or7
. TheMCS
value9
is not supported whenNumSpaceTimeStreams
is set to6
.When
ChannelBandwidth
is160e6
, theMCS
value9
is not supported whenNumSpaceTimeStreams
is set to3
.
When
TransmissionFormat
is"HE-EXT-SU"
, the range of values is [0, 2].When
TransmissionFormat
is"HE-SU
or"HE-MU-OFDMA"
, the range of values is [0, 11].
Data Types: single
| double
NumTransmitAntennas
— Number of transmit antennas
1
(default) | integer in the range [1, 8]
Number of transmit antennas, specified as an integer in the range [1, 8].
Data Types: single
| double
NumSpaceTimeStreams
— Number of space-time streams
1
(default) | integer in the range [1, 8]
Number of space-time streams, specified as an integer in the range [1, 8]. The value
of this property must be less than or equal to the value of the
NumTransmitAntennas
property.
Data Types: single
| double
AggregateHTMPDU
— HT MPDU aggregation selection
1
or true
(default) | 0
or false
HT MAC protocol data unit (MPDU) aggregation selection, specified as
1
(true
) or 0
(false
). Set this property to true
to create an
aggregated MPDU (A-MPDU) by concatenating multiple MPDUs. This property applies only
when the TransmissionFormat
property is set to
"HT-Mixed"
.
Data Types: logical
MPDUAggregationLimit
— Maximum number of MPDUs in A-MPDU
64
(default) | integer in the range [1, 256]
Maximum number of MPDUs in an A-MPDU, specified as an integer in the range [1, 256].
The set of values that this property can take depends on the TransmissionFormat
property:
When
TransmissionFormat
is"HT-Mixed"
and the AggregateHTMPDU property is set totrue
, the range of values is [0, 64].When
TransmissionFormat
is"VHT"
, the range of values is [0, 64].When
TransmissionFormat
is"HE-SU"
,"HE-EXT-SU"
, or"HE-MU-OFDMA"
, the range of values is [0, 256].
This property does not apply when TransmissionFormat
is
"Non-HT"
, or when TransmissionFormat
is
"HT-Mixed"
and AggregateHTMPDU
is set to
false
.
Data Types: single
| double
ShortRetryLimit
— Maximum number of transmission attempts for a frame
7
(default) | integer in the range [1, 65535]
Maximum number of transmission attempts for a frame, specified as an integer in the range [1, 65535].
Data Types: single
| double
RTSThreshold
— Frame length below which RTS is not transmitted
0
(default) | integer in the range [0, 6500631]
Frame length below which RTS is not transmitted, specified as an integer in the
range [0, 6500631]. If the size of a MAC frame exceeds the value of this property, the
Request To Send/Clear To Send (RTS/CTS) protection mechanism is used. This property
applies only when the DisableRTS
property is set to false
and the TransmissionFormat
property is not set to
"HE-MU-OFDMA"
.
Data Types: single
| double
DisableRTS
— RTS transmission selection
0
or false
(default) | 1
or true
RTS transmission selection, specified as 0
(false
) or 1
(true
). Set this
property to true to disable the RTS/CTS protection mechanism in the simulation.
Data Types: logical
DisableACK
— Disable acknowledgements selection
0
or false
(default) | 1
or true
Disable acknowledgements selection, specified as 0
(false
) or 1
(true
). Set this
property to true to disable the transmission of acknowledgements in response to data
frames.
Data Types: logical
CWMin
— Minimum range of contention window for access categories
[15 15 7 3]
(default) | vector of four integers in the range [1, 1023]
Minimum range of contention window for the four access categories (ACs), specified as a vector of four integers in the range [1, 1023]. The four entries are the minimum ranges for the Best Effort, Background, Video, and Voice ACs, respectively.
Data Types: single
| double
CWMax
— Maximum range of contention window for access categories
[1023 1023 15 7]
(default) | vector of four integers in the range [1, 1023]
Maximum range of contention window for the four ACs, specified as a vector of four integers in the range [1, 1023]. The four entries are the maximum ranges for the Best Effort, Background, Video, and Voice ACs, respectively.
Data Types: single
| double
AIFS
— Arbitrary interframe space values for access categories
[3 7 2 2]
(default) | vector of four integers in the range [1, 15]
Arbitrary interframe space values for the four ACs, specified as a vector of four
integers in the range [1, 15]. The entries of the vector represent the AIFS values, in
slots, for the Best Effort, Background, Video, and Voice ACs, respectively. You can set
the AIFS value for an AC to 1
only if the Mode
property
is "AP"
.
Data Types: single
| double
Use6MbpsForControlFrames
— 6 Mb/s for control frames selection
0
or false
(default) | 1
or true
6 Mb/s for control frames selection, specified as 0
(false
) or 1
(true
). Set this
property to true to use a data rate of 6 Mb/s for control frames.
Data Types: logical
BasicRates
— Non-HT data rates supported in basic service set
[6 12 24]
(default) | vector which is a subset of [6 9 12 18 24 36 48 54]
Non-HT data rates supported in the basic service set (BSS), specified as a vector
that is a subset of [6 9 12 18 24 36 48 54]
. This property applies
only when the Mode
property
is set to "AP"
. The stations associated to an AP use the same basic
rates as the AP.
Data Types: single
| double
MeshTTL
— Mesh time-to-live
31
(default) | integer in the range [1, 255]
Mesh time-to-live, specified as an integer in the range [1, 255]. The value of this
property is the maximum number of hops that a packet can traverse in a mesh network
before being dropped. This property applies only when the Mode
property
is set to "mesh"
.
Data Types: single
| double
TransmitPower
— Transmit power in dBm
10
(default) | real scalar
Transmit power in dBm, specified as a real scalar. If you enable spatial reuse by
setting the BSSColor
property to a nonzero value, the object may not use this value. Instead, the object
compares the value of this property with the adjusted transmit power and uses the
smallest of the two. The adjusted transmit power is defined in Section 26.10.2.4 of
IEEE® Std 802.11ax™-2021 [1].
Data Types: single
| double
TransmitGain
— Transmit gain in dB
0
(default) | real scalar
Transmit gain in dB, specified as a real scalar.
Data Types: single
| double
ReceiveGain
— Receive gain in dB
0
(default) | real scalar
Receive gain in dB, specified as a real scalar.
Data Types: single
| double
NoiseFigure
— Receiver noise figure in dB
0
(default) | nonnegative scalar
Receiver noise figure in dB, specified as a nonnegative scalar.
Data Types: single
| double
BSSColor
— Color of basic service set
0
(default) | integer in the range [0, 63]
Color of the basic service set (BSS), specified as an integer in the range [0, 63]. Specifying a nonzero value for this property enables you to use the spatial reuse operation.
This property applies only when the Mode
property
is set to "AP"
. The stations associated to an AP use the same BSS
color as the AP.
Data Types: single
| double
OBSSPDThreshold
— Overlapping basic service set packet detect threshold in dBm
-82
(default) | integer scalar
Overlapping basic service set packet detect (OBSS PD) threshold in dBm, specified as an integer scalar. If the device detects a frame whose BSS color differs from its own, it uses this value to decide whether to ignore the received frame or proceed with inter-BSS frame transmissions.
Data Types: single
| double
Examples
Create, Configure, and Simulate Wireless Local Area Network
This example shows how to simulate a wireless local area network (WLAN) by using WLAN Toolbox™ with the Communications Toolbox™ Wireless Network Simulation Library.
Using this example, you:
Create and configure a WLAN with an access point (AP) node and a station (STA) node.
Add application traffic from the AP node to the STA node.
Simulate the WLAN and retrieve the statistics of the AP node and the STA node.
Check if the Communications Toolbox™ Wireless Network Simulation Library support package is installed. If the support package is not installed, MATLAB® returns an error with a link to download and install the support package.
wirelessnetworkSupportPackageCheck;
Create a wireless network simulator.
networksimulator = wirelessNetworkSimulator.init();
Create a wlanDeviceConfig
object, setting the mode to "AP"
. Use this configuration to create a WLAN node, specifying its name and position.
deviceCfg = wlanDeviceConfig(Mode="AP"); apNode = wlanNode(Name="AP",Position=[0 10 0],DeviceConfig=deviceCfg);
Create a WLAN node with the default device configuration. Confirm that the default mode is STA
.
staNode = wlanNode(Name="STA",Position=[5 0 0]);
disp(staNode.DeviceConfig.Mode)
STA
Associate the STA node with the AP node.
associateStations(apNode,staNode);
Create a networkTrafficOnOff
object to generate an On-Off application traffic pattern. Specify the data rate in kilobits per second and the packet size in bytes. Enable packet generation to generate an application packet with a payload.
traffic = networkTrafficOnOff(DataRate=100,PacketSize=10,GeneratePacket=true);
Add application traffic from the AP node to the STA node.
addTrafficSource(apNode,traffic,DestinationNode=staNode);
Add the AP node and STA node to the wireless network simulator.
addNodes(networksimulator,{apNode,staNode});
Set the simulation time in seconds and run the simulation.
simulationTime = 0.05; run(networksimulator,simulationTime);
Custom channel model is not added. Using free space path loss (fspl) model as the default channel model.
Get and display the physical layer (PHY) statistics that correspond to the AP node and STA node.
apStats = statistics(apNode); staStats = statistics(staNode); disp(apStats.PHY)
TransmittedPackets: 126 TransmittedPayloadBytes: 4095 ReceivedPackets: 125 ReceivedPayloadBytes: 1750 DroppedPackets: 0
disp(staStats.PHY)
TransmittedPackets: 125 TransmittedPayloadBytes: 1750 ReceivedPackets: 126 ReceivedPayloadBytes: 4095 DroppedPackets: 0
References
[1] IEEE Std 802.11ax-2021 (Amendment to IEEE Std 802.11™-2020). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.
Version History
Introduced in R2023a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)