Ad hoc (IBSS) Node

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

WlanExpNodeIBSS.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 IBSS node 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)
  4. Beacon Interval: Interval (in TUs) for beacons

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, SSID, and Beacon Interval).

For an IBSS node, the BSSID must be locally administered. To create a locally administered BSSID, a utility method is provided in util.py:

bssid = util.create_locally_administered_bssid(node.wlan_mac_address)

See https://warpproject.org/trac/wiki/802.11/wlan_exp/bss for more documentation on BSS information / configuration.

Parameters:
  • 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'. The bssid must be a valid locally administered BSSID. Use wlan_exp.util.create_locally_administered_bssid() to generate a valid locally administered BSSID based on the node’s MAC address.
  • 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] (http://en.wikipedia.org/wiki/TU_(Time_Unit); 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)?
WlanExpNodeIBSS.get_txrx_counts(device_list=None)[source]

Get the counts from the node.

Note

This function has the same implementation as WlanExpNode but different default values.

Parameters:
  • device_list (list of WlanExpNode, WlanExpNode, WlanDevice, optional) – List of devices for which to get counts. See note below for more information.
  • return_zeroed_counts_if_none (bool, optional) – If no counts exist on the node for the specified device(s), return a zeroed counts dictionary with proper timestamps instead of None.
Returns:

Counts for the device(s) specified.

Return type:

counts_dictionary (list of dictionaries, dictionary)

The dictionaries returned by this method have the following fields:

Field Description
retrieval_timestamp Value of System Time in microseconds when structure retrieved from the node
mac_addr MAC address of remote node whose statics are recorded here
associated Boolean indicating whether remote node is currently associated with this node
data_num_rx_bytes Total number of bytes received in DATA packets from remote node
data_num_tx_bytes_success Total number of bytes successfully transmitted in DATA packets to remote node
data_num_tx_bytes_total Total number of bytes transmitted (successfully or not) in DATA packets to remote node
data_num_rx_packets Total number of DATA packets received from remote node
data_num_tx_packets_success Total number of DATA packets successfully transmitted to remote node
data_num_tx_packets_total Total number of DATA packets transmitted (successfully or not) to remote node
data_num_tx_attempts Total number of low-level attempts of DATA packets to remote node (includes re-transmissions)
mgmt_num_rx_bytes Total number of bytes received in management packets from remote node
mgmt_num_tx_bytes_success Total number of bytes successfully transmitted in management packets to remote node
mgmt_num_tx_bytes_total Total number of bytes transmitted (successfully or not) in management packets to remote node
mgmt_num_rx_packets Total number of management packets received from remote node
mgmt_num_tx_packets_success Total number of management packets successfully transmitted to remote node
mgmt_num_tx_packets_total Total number of management packets transmitted (successfully or not) to remote node
mgmt_num_tx_attempts Total number of low-level attempts of management packets to remote node (includes re-transmissions)
latest_txrx_timestamp System Time value of last transmission / reception

If the device_list is a single device, then a single dictionary or None is returned. If the device_list is a list of devices, then a list of dictionaries will be returned in the same order as the devices in the list. If any of the staistics are not there, None will be inserted in the list. If the device_list is not specified, then all the counts on the node will be returned.