Public Member Functions | |
def | __init__ |
def | commit |
def | getAPaddr |
def | getBitrate |
def | getBitrates |
def | getChannelInfo |
def | getEncryption |
def | getEssid |
def | getFragmentation |
def | getFrequency |
def | getKey |
def | getKeys |
def | getMode |
def | getPowermanagement |
def | getQualityAvg |
def | getQualityMax |
def | getRetrylimit |
def | getRTS |
def | getSensitivity |
def | getStatistics |
def | getTXPower |
def | getWirelessName |
def | scan |
def | setAPaddr |
def | setEncryption |
def | setEssid |
def | setFrequency |
def | setKey |
def | setMode |
Public Attributes | |
ifname | |
iwstruct | |
sockfd | |
wireless_info | |
Private Member Functions | |
def | _formatBitrate |
def | _formatFrequency |
Provides high-level access to wireless interfaces. This class uses WirelessInfo for most access.
def multi_interface_roam.pythonwifi.iwlibs.Wireless.__init__ | ( | self, | |
ifname | |||
) |
def multi_interface_roam.pythonwifi.iwlibs.Wireless._formatBitrate | ( | self, | |
raw_bitrate | |||
) | [private] |
def multi_interface_roam.pythonwifi.iwlibs.Wireless._formatFrequency | ( | self, | |
raw_frequency | |||
) | [private] |
Returns the access point MAC address. >>> from iwlibs import Wireless, getNICnames >>> ifnames = getNICnames() >>> ifnames ['eth1', 'wifi0'] >>> wifi = Wireless(ifnames[0]) >>> wifi.getAPaddr() '00:0D:88:8E:4E:93' Test with non-wifi card: >>> wifi = Wireless('eth0') >>> wifi.getAPaddr() (95, 'Operation not supported') Test with non-existant card: >>> wifi = Wireless('eth2') >>> wifi.getAPaddr() (19, 'No such device')
Get the association mode, which is probably a string of '*', 'open', 'private', 'off'. As a normal user, you will get an 'Operation not permitted' error: >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> wifi.getEncryption() (1, 'Operation not permitted')
Returns the fragmentation threshold. It depends on what the driver says. If you have fragmentation threshold turned on, you'll get an int. If it's turned off you'll get a string: 'off'. >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> wifi.getFragmentation() 'off'
def multi_interface_roam.pythonwifi.iwlibs.Wireless.getKey | ( | self, | |
key = 0 , |
|||
formatted = True |
|||
) |
Get all encryption keys. Returns a list of tuples. As a normal user, you will get a 'Operation not permitted' error: >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> wifi.getKeys() [(1, '1234-5678-91'), (2, None), (3, 'ABCD-EFAB-CD'), (4, None)]
Returns an Iwquality object with average quality information. >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> aq = wifi.getQualityAvg() >>> print "quality:", aq.quality, "signal:", aq.siglevel, "noise:", aq.nlevel quality: 38 signal: 13 noise: 0
Returns an Iwquality object with maximum quality information. >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> mq = wifi.getQualityMax() >>> print "quality:", mq.quality, "signal:", mq.siglevel, "noise:", mq.nlevel quality: 38 signal: 13 noise: 0
Returns the RTS threshold, likely to be int, 'auto', 'fixed', 'off' man iwconfig: "RTS/CTS adds a handshake before each packet transmission to make sure that the channel is clear. This adds overhead, but increases performance in case of hidden nodes or a large number of active nodes. This parameter sets the size of the smallest packet for which the node sends RTS; a value equal to the maximum packet size disable the mechanism." >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> wifi.getRTS() 'off'
Returns sensitivity information. man iwconfig: "This is the lowest signal level for which the hardware attempt packet reception, signals weaker than this are ignored. This is used to avoid receiving background noise, so you should set it according to the average noise level. Positive values are assumed to be the raw value used by the hardware or a percentage, negative values are assumed to be dBm." >>> from iwlibs import Wireless >>> wifi = Wireless('eth1') >>> wifi.getSensitivity() 'off'
def multi_interface_roam.pythonwifi.iwlibs.Wireless.setAPaddr | ( | self, | |
addr | |||
) |
def multi_interface_roam.pythonwifi.iwlibs.Wireless.setEncryption | ( | self, | |
mode | |||
) |
def multi_interface_roam.pythonwifi.iwlibs.Wireless.setEssid | ( | self, | |
essid | |||
) |
def multi_interface_roam.pythonwifi.iwlibs.Wireless.setFrequency | ( | self, | |
freq | |||
) |
def multi_interface_roam.pythonwifi.iwlibs.Wireless.setKey | ( | self, | |
key, | |||
index = 0 |
|||
) |
def multi_interface_roam.pythonwifi.iwlibs.Wireless.setMode | ( | self, | |
mode | |||
) |