ape.parts.wifi.iwconfig.IwconfigQuery

class ape.parts.wifi.iwconfig.IwconfigQuery(connection, interface='wlan0', interval=0.5, missing_data='NA')

Queries iwconfig for information

IwconfigQuery constructor

Param:
  • interface: name of the interface to query
  • connection: connection to the device to query
  • interval: seconds to wait before refreshing output
  • missing_data: symbol to use if the expression fails to match
__init__(connection, interface='wlan0', interval=0.5, missing_data='NA')

IwconfigQuery constructor

Param:
  • interface: name of the interface to query
  • connection: connection to the device to query
  • interval: seconds to wait before refreshing output
  • missing_data: symbol to use if the expression fails to match

Methods

__init__(connection[, interface, interval, ...]) IwconfigQuery constructor
check_errors(stderr) Checks for known errors
close() Closes the event timer
log_error(error[, message]) Logs the error in bold red

Attributes

command
return:command to send to connection to query iwconfig
event_timer An EventTimer to track intervals between calling iwconfig
logger
return:A logging object.
output Output of the iwconfig command, refreshed after self.interval second intervals
check_errors(stderr)

Checks for known errors

Param:
  • stderr: file-like object for standard error
Raise:

ApeError if an error is found

close()

Closes the event timer

log_error(error, message='')

Logs the error in bold red

Param:
  • error: error type (prefix in red and bold)
  • message: descriptive message (red but not bold)
access_point
Returns:MAC address of associated AP
bit_rate
Returns:bit-rate
command
Returns:command to send to connection to query iwconfig
essid
Returns:the essid from the iwconfig command
event_timer

An EventTimer to track intervals between calling iwconfig

expressions
Returns:IwconfigExpressions to parse output
frequency
Returns:current frequency
invalid_misc
Returns:count of invalid packets (received only?)
Returns:link-quality perceived by driver
logger
Returns:A logging object.
mac_protocol
Returns:the MAC protocol
missed_beacons
Returns:count of beacons not received
mode
Returns:the mode
output

Output of the iwconfig command, refreshed after self.interval second intervals

rx_invalid_crypt
Returns:count of packets not unencryptable
rx_invalid_frag
Returns:count of packets whose fragments couldn’t be re-assembled
rx_invalid_nwid
Returns:count of packets with SSID’s not matching current cell
signal_level
Returns:signal level (RSSI)
tx_excessive_retries
Returns:count of packets not successfully transmitted
tx_power
Returns:the TX-power for the node

Navigation