Station (STA) Node

Subclass of WlanExpNode that interfaces to an 802.11 Reference Design node running the station (STA) application in CPU High. A STA node supports all the common node methods plus the STA-specific methods described below.

WlanExpNodeSta.configure_bss(bssid=False, ssid=None, channel=None, beacon_interval=False, ht_capable=None)[source]

Configure the BSS information of the node

Each node is either a member of no BSS (colloquially “unassociated”) or a member of one BSS. A node requires a minimum valid set of BSS information to be a member of a BSS. The minimum valid set of BSS information for an STA is:

  1. BSSID: 48-bit MAC address
  2. Channel: Logical channel for Tx/Rx by BSS members
  3. SSID: Variable length string (ie the name of the network)

If a node is not a member of a BSS (i.e. n.get_network_info() returns None), then the node requires all parameters of a minimum valid set of BSS information be specified (i.e. BSSID, Channel, and SSID).

See for more documentation on BSS information / configuration.

  • bssid (int, str) – 48-bit ID of the BSS either as a integer or colon delimited string of the form '01:23:45:67:89:ab'
  • ssid (str) – SSID string (Must be 32 characters or less)
  • channel (int) – Channel number on which the BSS operates
  • beacon_interval (int) – Integer number of beacon Time Units in [10, 65534] (; a TU is 1024 microseconds); A value of None will disable beacons; A value of False will not update the current beacon interval.
  • ht_capable (bool) – Is the PHY mode HTMF (True) or NONHT (False)?

Is the AP in the STA’s association table?

Parameters:ap (WlanDevice) – WLAN Device
Returns:associated – Boolean describing whether the STA is associated with the AP
Return type:bool

Causes the STA node to transmit a de-authenticate packet and to reset its BSS status to null. After this method the STA will be disassociated from its former BSS.


Set the Association ID (AID) of the STA.

Normally the AID is assigned by the AP during the probe/authentication/association handshake. However if the BSS configuration of the STA is set via the configure_bss() method there is no AP-assigned AID. Thankfully this is only a cosmetic problem. The reference code does not use the AID for any MAC processing. By default the AID is only used to set the hex display at the STA node. This method will have the same affect.

Parameters:aid (int) – Association ID (must be in [1, 255])
WlanExpNodeSta.join_network(ssid, bssid=None, channel=None, timeout=5.0)[source]

Join the specified network (BSS).

By specifying the SSID, the STA will try to join the given network. If the bssid and channel of the network are also known, they can be provided. Otherwise, the STA will scan for the given SSID to find the corresponding bssid and channel. If the SSID is None, then any on-going join process will be halted.

If the node is currently associated with the given BSS, then the node state is not changed and this method will return “success” immediately.

By default, the join process has a timeout that will automatically halt the join process once the timeout is exceeded. Depending on the scan parameters, this timeout value may need to be adjusted to allow the STA to scan all channels before the timeout period is exceeded. If the timeout is None, then the method will return immediately and the methods is_joining() and get_network_info() can be used to determine if the STA has joined the BSS.

If this method starts an active scan, the scan will use the parameters previously configured with node.set_scan_parameters().

  • ssid (str) – SSID string (Must be 32 characters or less); a value of None will stop any current join process.
  • bssid (int, str) – 48-bit ID of the BSS either as a integer or colon delimited string of the form: XX:XX:XX:XX:XX:XX
  • channel (int) – Channel number on which the BSS operates
  • timeout (float) – Time to complete the join process; a value of None will cause the method to return immediately and allow the join process to continue forever until the node has joined the network or the join has failed.

Queries if the STA is currently attempting to join a network. The join state machine runs until the target network is successfully joined or the joing process is terminated by the user. This method tests whether the join process is still running. To check success or failure of the join process, use node.get_network_info().

  • True – Inidcates node is currently in the join process
  • False – Indicates node is not currently in the join process
Return type:bool