Difference between revisions of "Using wlantools"
From rukapedia
Line 9: | Line 9: | ||
>>> import wlantools | >>> import wlantools | ||
>>> wlantools.scan() | >>> wlantools.scan() | ||
− | [{'Capability': 1025, 'BeaconInterval': 100, 'SecurityMode': 'Open', 'SSID': u'wificharlottetown.org', 'BSSID': u'00:06:25:A2:D4:06', 'ConnectionMode': 'Infrastructure', 'InformationElements': {42: u'04', 221: u'001018010200', 50: u'0C121860', 47: u'04'}, 'SupportedRates': u'82848B962430486C', 'Channel': 1, 'RxLevel': -110}, {'Capability': 1073, 'BeaconInterval': 100, 'SecurityMode': 'Wep', 'SSID': u'groveair-g', 'BSSID': u'00:12:17:9E:C8:2C', 'ConnectionMode': 'Infrastructure', 'InformationElements': {42: u'00', 221: u'0050F2020101000003A4000027A4000042435E0062322F00', 50: u'1224606C', 7: u'555320010B1B'}, 'SupportedRates': u'82848B960C183048', 'Channel': 4, 'RxLevel': -70}, {'Capability': 1041, 'BeaconInterval': 100, 'SecurityMode': 'WpaPsk', 'SSID': u'Reinvented', 'BSSID': u'00:14:BF:8F:53:2D', 'ConnectionMode': 'Infrastructure', 'InformationElements': {42: u'00', 221: u'0050F20101000050F20201000050F20201000050F2020000', 50: u'0C121860', 47: u'00'}, 'SupportedRates': u'82848B962430486C', 'Channel': 6, 'RxLevel': -50}] | + | [{'Capability': 1025, 'BeaconInterval': 100, 'SecurityMode': 'Open', 'SSID': u'wificharlottetown.org', |
+ | 'BSSID': u'00:06:25:A2:D4:06', 'ConnectionMode': 'Infrastructure', 'InformationElements': | ||
+ | {42: u'04', 221: u'001018010200', 50: u'0C121860', 47: u'04'}, 'SupportedRates': u'82848B962430486C', | ||
+ | 'Channel': 1, 'RxLevel': -110}, {'Capability': 1073, 'BeaconInterval': 100, 'SecurityMode': 'Wep', | ||
+ | 'SSID': u'groveair-g', 'BSSID': u'00:12:17:9E:C8:2C', 'ConnectionMode': 'Infrastructure', | ||
+ | 'InformationElements': {42: u'00', 221: u'0050F2020101000003A4000027A4000042435E0062322F00', | ||
+ | 50: u'1224606C', 7: u'555320010B1B'}, 'SupportedRates': u'82848B960C183048', 'Channel': 4, | ||
+ | 'RxLevel': -70}, {'Capability': 1041, 'BeaconInterval': 100, 'SecurityMode': 'WpaPsk', | ||
+ | 'SSID': u'Reinvented', 'BSSID': u'00:14:BF:8F:53:2D', 'ConnectionMode': 'Infrastructure', | ||
+ | 'InformationElements': {42: u'00', 221: u'0050F20101000050F20201000050F20201000050F2020000', | ||
+ | 50: u'0C121860', 47: u'00'}, 'SupportedRates': u'82848B962430486C', 'Channel': 6, 'RxLevel': -50}] | ||
</pre> | </pre> | ||
Using [http://chris.berger.cx/PyS60/PyS60 the documentation] to parse this apart, I find three wifi access points in range: | Using [http://chris.berger.cx/PyS60/PyS60 the documentation] to parse this apart, I find three wifi access points in range: |
Revision as of 16:23, 8 April 2008
The Wlan Scanning module, aka "wlantools," is a module for S60 Python.
Here's what it returns when I run it in my office:
Python 2.2.2 (#0, Oct 11 2007, 20:32:16) [C] on symbian_s60 Type "copyright", "credits" or "license" for more information. Type "commands" to see the commands available in this simple line editor. >>> import wlantools >>> wlantools.scan() [{'Capability': 1025, 'BeaconInterval': 100, 'SecurityMode': 'Open', 'SSID': u'wificharlottetown.org', 'BSSID': u'00:06:25:A2:D4:06', 'ConnectionMode': 'Infrastructure', 'InformationElements': {42: u'04', 221: u'001018010200', 50: u'0C121860', 47: u'04'}, 'SupportedRates': u'82848B962430486C', 'Channel': 1, 'RxLevel': -110}, {'Capability': 1073, 'BeaconInterval': 100, 'SecurityMode': 'Wep', 'SSID': u'groveair-g', 'BSSID': u'00:12:17:9E:C8:2C', 'ConnectionMode': 'Infrastructure', 'InformationElements': {42: u'00', 221: u'0050F2020101000003A4000027A4000042435E0062322F00', 50: u'1224606C', 7: u'555320010B1B'}, 'SupportedRates': u'82848B960C183048', 'Channel': 4, 'RxLevel': -70}, {'Capability': 1041, 'BeaconInterval': 100, 'SecurityMode': 'WpaPsk', 'SSID': u'Reinvented', 'BSSID': u'00:14:BF:8F:53:2D', 'ConnectionMode': 'Infrastructure', 'InformationElements': {42: u'00', 221: u'0050F20101000050F20201000050F20201000050F2020000', 50: u'0C121860', 47: u'00'}, 'SupportedRates': u'82848B962430486C', 'Channel': 6, 'RxLevel': -50}]
Using the documentation to parse this apart, I find three wifi access points in range: