GithubHelp home page GithubHelp logo

rockymeza / wifi Goto Github PK

View Code? Open in Web Editor NEW
302.0 31.0 153.0 197 KB

[unmaintained] WiFi tools for linux

Home Page: http://pypi.python.org/pypi/wifi

License: BSD 2-Clause "Simplified" License

Makefile 0.48% Python 98.92% Shell 0.60%
unmaintained python wifi linux

wifi's Introduction

Note: This project is unmaintained. While I would love to keep up the development on this project, it is difficult for me for several reasons:

  1. I don't have enough time.
  2. I switched to Fedora and the corresponding scripts to manage WiFi are completely different. I was looking into re-writing the library in order to support more than just Debian based architectures, but it was too involved.

If anybody wants to take over the development of WiFi, please contact me. You can find my email in the commit message.


wifi

Wifi provides a command line wrapper for iwlist and /etc/network/interfaces that makes it easier to connect the WiFi networks from the command line. The wifi command is also implemented as a library that can be used from Python.

# pip install wifi
# wifi --help
https://travis-ci.org/rockymeza/wifi.png?branch=master

The documentation for wifi lives at https://wifi.readthedocs.org/en/latest/.

wifi's People

Contributors

alexykot avatar enjoecn avatar evanito avatar foosel avatar gavinwahl avatar kiok46 avatar ramnes avatar rockymeza avatar stvad avatar zgoda-mobica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifi's Issues

Setting the 'cell' without Cell.all(interface)[x]

This is not a bug, but I didn't know where to ask.

Is it possible to set the 'cell' without actually searching for the available APNs?

cell = Cell(ssid=APN) obviously doesn't work, so I'm looking for a solution.

Doing Cell.all(interface)[x] is fine, as long as the index of the access point doesn't change, but if does, scheme.activate() will fail.

Thanks

wifi disconnect?

wifi now can only connect to a wifi, how about disconnecting from a wifi?

How to get a hold of you Rocky

Rocky,
My apologies for putting this in the issues. Ive tried to find a way to reach your contact information but have been unable to. I have a small python project to use your wifi package Id like to hire you for. Please contact me at your earliest convenience.
Thanks
Mike
[email protected]

Install libraries only

Thanks for the work. Is it possible to change the setup.py so that there is an option to only install the libraries?

No Cell object

the library from pip does not appear to have the Cell object included. I get an error whenever I try and run a script with WiFi.Cell saying that Cell is not in the module. help?

WPA version 1 is recognized as WEP

I have some networks that are WPA version1
For example:

Cell 01 - Address: 
                    ESSID:
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Frequency:2.457 GHz (Channel 10)
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    Extra:wpa_ie=dd160050f20101000050f20201000050f20201000050f202
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=74/100  

Since this output has Encryption key:on but does not have WPA2 the network is recognized as WEP.

I solved this by adding these lines to scan.py

if 'WPA2' in value:
                    cell.encryption_type = 'wpa2'
elif 'WPA' in value:
                    cell.encryption_type = 'wpa'

In scheme I replaced:

if cell.encryption_type == 'wpa2':
if cell.encryption_type == 'wpa2' or cell.encryption_type == 'wpa' :

The process of connecting to wpa network (the scheme) is the same as connecting to a wpa2 network.

Lior

Scheme self.name - what is it?

in scheme.py:

class Scheme(object):
...
    def __init__(self, interface, name, options=None):
        self.interface = interface
        self.name = name  #notice this parameter, assigned string 'home' as per manual
...
    def activate(self):
        ...
        ifup_output = subprocess.check_output(['/sbin/ifup'] + self.as_args(), stderr=subprocess.STDOUT)

in here the bash command produced in activate() is:

/sbin/ifup wlan0=wlan0-home -o wpa-psk=<key-here> -o wpa-ssid='<ssid-here>' -o wireless-channel=auto

Notice part wlan0=wlan0-home. Not sure what -home should mean here.
For me on my Debian wheezy on BeagleBone Black with Ralink RT5370 USB WiFi dongle this doesn't work, produces error:

Ignoring unknown interface wlan0=wlan0-home.

And what is more important - I couldn't google for any explanations or examples with this -home part or anything like that.

And same command with just wlan0=wlan0 works perfectly. I've edited this wifi lib to remove all mentions of self.name argument from it, as it's the only way to make it work for me, but I'm not sure if it's used anywhere in other usecases on other systems.

Please lead me to some explanation on what this parameter is.

Connection object

This is connected to #17. I want to implement it after that is merged, but before it's released so that there are no backwards-compatibility issues.

Instead of return the just the IP address from Scheme.activate, I was thinking that we could return a Connection object.

At first it would have things like this:

>>> scheme = Scheme.find('wlan0', 'home')
>>> connection = scheme.activate()
>>> connection.ip_address
'1.2.3.4'
>>> connection.interface
'wlan0'
>>> connection.scheme
Scheme(interface='wlan0', name='home', options={'wpa-ssid': 'XXX', 'wpa-psk': 'XXX', 'wireless-channel': 'auto'})

But eventually I want to be able to check if a connection is still alive

>>> connection.is_active

I also think it would be cool if it was possible to figure out the current Connection.

>>> active_connection = Connection.get_active()
>>> active_connection
Connection(interface='wlan0', ip_address='1.2.3.4')

Something like that.

What do you think @gavinwahl, @alexykot, @spektom?

interfaces file keeps growing

I am using the wifi python classes. If I add and delete schemes several times, the interface file keeps getting longer. It looks like when a scheme is deleted, empty lines are left in its place. Then, when a new scheme is added, it is appended to the file, after the empty lines. All works correctly, but just is probably not the intended action.

Doesn't work on Fedora

Fedora (22's) ifup command is different from Debian's, so we need to figure out how to work around that.

Scheme.activate() hangs

Whenever I run scheme.activate() it never completes. The program will just hang with no output and I don't connect to the wifi network. I tried with several different schemes (with and wtihout passkeys) and was unable to figure this out.

Does not handle networks named with '-'

I'm pretty sure the following regex from scheme.py doesn't handle multiple '-' characters:

scheme_re = re.compile(r'iface\s+(?P<interface>wlan\d?)(?:-(?P<name>\w+))?')

For example, Scheme.find("wlan0", "WOOP-DOOP") will never find anything.

Sometimes there's no channel

Sometimes the output of iwlist looks like this:

Cell 03 - Address: 10:0D:7F:7F:8B:EC 
  Channel:149 
  Frequency:5.745 GHz

This means frequency_re won't on this line in scan.py

                frequency, channel = frequency_re.search(value).groups()

ifup has different output than expected by the "parse_ifup_output()"

ifup --version
ifup version 0.7~beta2ubuntu11.1

The output of ifup looks like something in below:
ssh stop/waiting
ssh start/running, process 3899

If I understand correctly, parse_ifup_output() expect "ip_address". In this case, parse_ifup_output() will always return error because there is no ip_address print out even the interface is running.

IOError: [Errno 2] No such file or directory: '/etc/network/interfaces'

Just installed wifi on latest ARCH distro which is now using netctl and the wifi module is looking for /etc/network/interfaces which is no longer used.

wifi list

Traceback (most recent call last):
  File "/usr/bin/wifi", line 127, in <module>
    parser_connect.options = [scheme.name for scheme in Scheme.all()]
  File "/usr/lib/python2.7/site-packages/wifi/scheme.py", line 69, in all
    with open(cls.interfaces, 'r') as f:
IOError: [Errno 2] No such file or directory: '/etc/network/interfaces'

Any chance you can update this to work with netctl ??

Many Thanks

Ability to specify the interface

Chris mentioned that he has wlan0 and wlan1. We need the ability to specify which interface to use.

I propose a -i option, similar to most other commands.

scan command error

hi ,thanks your tools.
I has some problem with it, i hope you can give me some help

File "/usr/bin/wifi", line 202, in
args.func(args)
File "/usr/bin/wifi", line 51, in scan_command
print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
File "/usr/lib/python2.7/site-packages/wifi/scan.py", line 39, in all
stderr=subprocess.STDOUT)
File "/usr/lib64/python2.7/subprocess.py", line 568, in check_output
process = Popen(stdout=PIPE, _popenargs, *_kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

ps: os: centos7

pip not installing

I have problems installing wifi 1.0.0 (?) with pip on a raspberry pi,
getting the error No such file or directory: '/tmp/pip_build_pi/wifi/CHANGES.rst'

Help would be appreciated.

Tried with and without sudo.

The full log:

pi@raspberry ~/Phythm $ pip install wifi
Downloading/unpacking wifi
  Downloading wifi-1.0.0.tar.gz
  Running setup.py (path:/tmp/pip_build_pi/wifi/setup.py) egg_info for package wifi
    Skipping copying files to /etc/bash_completion.d/, no write access
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_pi/wifi/setup.py", line 42, in <module>
        long_description='\n\n'.join([read('README.rst'), read('CHANGES.rst')]),
      File "/tmp/pip_build_pi/wifi/setup.py", line 12, in read
        return open(os.path.join(os.path.dirname(__file__), fname)).read()
    IOError: [Errno 2] No such file or directory: '/tmp/pip_build_pi/wifi/CHANGES.rst'
    Complete output from command python setup.py egg_info:
    Skipping copying files to /etc/bash_completion.d/, no write access

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_pi/wifi/setup.py", line 42, in <module>

    long_description='\n\n'.join([read('README.rst'), read('CHANGES.rst')]),

  File "/tmp/pip_build_pi/wifi/setup.py", line 12, in read

    return open(os.path.join(os.path.dirname(__file__), fname)).read()

IOError: [Errno 2] No such file or directory: '/tmp/pip_build_pi/wifi/CHANGES.rst'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_pi/wifi
Storing debug log for failure in /home/pi/.pip/pip.log
pi@raspberry ~/Phythm $

Logfile:

$ cat /home/pi/.pip/pip.log
------------------------------------------------------------
/usr/local/bin/pip run on Tue Sep  2 04:19:18 2014
Downloading/unpacking wifi
  Getting page https://pypi.python.org/simple/wifi/
  URLs to search for versions for wifi:
  * https://pypi.python.org/simple/wifi/
  Analyzing links from page https://pypi.python.org/simple/wifi/
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.0.1.tar.gz#md5=268c545deddf6aaa4a57b6b6126a7a32 (from https://pypi.python.org/simple/wifi/), version: 0.0.1
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.1.0.tar.gz#md5=0b30d002a97ed6de1ba3eed294582b55 (from https://pypi.python.org/simple/wifi/), version: 0.1.0
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.1.1.tar.gz#md5=6e02cdc66153514017c8196ce86e80fb (from https://pypi.python.org/simple/wifi/), version: 0.1.1
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.2.0.tar.gz#md5=7df58691eb39be009e78e0c96b2c5598 (from https://pypi.python.org/simple/wifi/), version: 0.2.0
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.2.1.tar.gz#md5=c5c63a40e58c3955c27e8122490c428b (from https://pypi.python.org/simple/wifi/), version: 0.2.1
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.2.2.tar.gz#md5=57ae7542c3ba16241839efd7ee84c17b (from https://pypi.python.org/simple/wifi/), version: 0.2.2
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.3.0.tar.gz#md5=659c733b8f73cc85fb5e7496b5f2e0fc (from https://pypi.python.org/simple/wifi/), version: 0.3.0
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.3.1.tar.gz#md5=19c94c4318e7002a9fc83cff22bb92af (from https://pypi.python.org/simple/wifi/), version: 0.3.1
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.3.2.tar.gz#md5=cf2838f703d054b8c146ae1db4c0eeac (from https://pypi.python.org/simple/wifi/), version: 0.3.2
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-0.3.3.tar.gz#md5=38fb87d5e0d269706c24d2c9b31850ff (from https://pypi.python.org/simple/wifi/), version: 0.3.3
    Found link https://pypi.python.org/packages/source/w/wifi/wifi-1.0.0.tar.gz#md5=aeeafe962bc01cf9a55a146d0f301dfc (from https://pypi.python.org/simple/wifi/), version: 1.0.0
    Skipping link https://travis-ci.org/rockymeza/wifi (from https://pypi.python.org/simple/wifi/); not a file
    Skipping link https://wifi.readthedocs.org/en/latest/ (from https://pypi.python.org/simple/wifi/); not a file
  Using version 1.0.0 (newest of versions: 1.0.0, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.2, 0.2.1, 0.2.0, 0.1.1, 0.1.0, 0.0.1)
  Downloading wifi-1.0.0.tar.gz
  Downloading from URL https://pypi.python.org/packages/source/w/wifi/wifi-1.0.0.tar.gz#md5=aeeafe962bc01cf9a55a146d0f301dfc (from https://pypi.python.org/simple/wifi/)
  Running setup.py (path:/tmp/pip_build_pi/wifi/setup.py) egg_info for package wifi
    Skipping copying files to /etc/bash_completion.d/, no write access
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_pi/wifi/setup.py", line 42, in <module>
        long_description='\n\n'.join([read('README.rst'), read('CHANGES.rst')]),
      File "/tmp/pip_build_pi/wifi/setup.py", line 12, in read
        return open(os.path.join(os.path.dirname(__file__), fname)).read()
    IOError: [Errno 2] No such file or directory: '/tmp/pip_build_pi/wifi/CHANGES.rst'
    Complete output from command python setup.py egg_info:
    Skipping copying files to /etc/bash_completion.d/, no write access

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_pi/wifi/setup.py", line 42, in <module>

    long_description='\n\n'.join([read('README.rst'), read('CHANGES.rst')]),

  File "/tmp/pip_build_pi/wifi/setup.py", line 12, in read

    return open(os.path.join(os.path.dirname(__file__), fname)).read()

IOError: [Errno 2] No such file or directory: '/tmp/pip_build_pi/wifi/CHANGES.rst'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_pi/wifi
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/lib/python2.7/dist-packages/pip/req.py", line 1229, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/local/lib/python2.7/dist-packages/pip/req.py", line 325, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python2.7/dist-packages/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_pi/wifi

AttributeError: 'NoneType' object has no attribute 'groups'

from wifi.scan import Cell
Cell.all('wlan0')

gives this error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "wifi/scan.py", line 24, in all
    cells = map(Cell.from_string, cells_re.split(iwlist_scan)[1:])
  File "wifi/scan.py", line 34, in from_string
    return normalize(cell_string)
  File "wifi/scan.py", line 97, in normalize
    cell.quality, signal = quality_re.search(line).groups()
AttributeError: 'NoneType' object has no attribute 'groups'

with the command iwlist

iwlist wlan0 scan

outputs this

wlan0     Scan completed :
          Cell 01 - Address: A4:56:30:E8:97:F0
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=84/100  Signal level=43/100  
          Cell 02 - Address: 2C:36:F8:42:0E:40
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=90/100  Signal level=48/100  
          Cell 03 - Address: A4:56:30:E8:F5:F1
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=100/100  Signal level=100/100  
          Cell 04 - Address: 20:4E:7F:76:F1:06
                    ESSID:"Ja"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.422 GHz (Channel 3)
                    Encryption key:on
                    Bit Rates:300 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD7A0050F204104A0001101044000102103B0001031047001000000000000010000000204E7F76F106102100044E54475210230009776E72323030307633102400016E104200046E6F6E651054000800060050F204000110110016574E5232303030763328576972656C65737320415029100800020086103C000103
                    Quality=100/100  Signal level=92/100  
          Cell 05 - Address: A4:56:30:E8:FE:20
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=54/100  Signal level=43/100  
          Cell 06 - Address: F2:23:DB:A3:3B:A0
                    ESSID:"Antons iPhone"
                    Protocol:IEEE 802.11g
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=78/100  Signal level=16/100  
          Cell 07 - Address: 1C:AA:07:B0:3E:61
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=27/100  Signal level=46/100  
          Cell 08 - Address: 2C:36:F8:0E:AB:21
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=100/100  Signal level=64/100  
          Cell 09 - Address: A4:56:30:E9:BE:71
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=75/100  Signal level=47/100  
          Cell 10 - Address: 1C:AA:07:6F:2D:00
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=87/100  Signal level=47/100  
          Cell 11 - Address: 2C:36:F8:0E:93:70
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=48/100  
          Cell 12 - Address: A4:56:30:E8:F5:F0
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=100/100  
          Cell 13 - Address: 2C:36:F8:42:62:30
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=54/100  Signal level=84/100  
          Cell 14 - Address: 2C:36:F8:0E:AB:20
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=75/100  Signal level=87/100  
          Cell 15 - Address: 1C:AA:07:6F:2F:40
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=46/100  Signal level=43/100  
          Cell 16 - Address: 2C:36:F8:0E:93:71
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=68/100  Signal level=48/100  
          Cell 17 - Address: 2C:36:F8:42:0E:41
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=56/100  Signal level=46/100  
          Cell 18 - Address: 2C:36:F8:0E:AC:81
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=30/100  Signal level=43/100  
          Cell 19 - Address: 2C:36:F8:42:58:11
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=90/100  Signal level=46/100  
          Cell 20 - Address: A4:56:30:E8:F6:60
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=48/100  Signal level=26/100  
          Cell 21 - Address: 30:46:9A:8A:60:F4
                    ESSID:"Majsbollar"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD810050F204104A00011010440001021041000100103B00010310470010CAF22436FFC0A8D313D1A963280982E21021000D4E4554474541522C20496E632E10230009574E5232303030763210240009574E523230303076321042000230311054000800060050F204000110110009574E52323030307632100800020084103C000101
                    Quality=100/100  Signal level=72/100  
          Cell 22 - Address: A4:56:30:E8:97:F1
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=48/100  Signal level=43/100  
          Cell 23 - Address: 2C:36:F8:0E:9A:C1
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=100/100  Signal level=72/100  
          Cell 24 - Address: A4:56:30:E8:F6:61
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=41/100  Signal level=26/100  
          Cell 25 - Address: 2C:36:F8:0E:AC:80
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=101/100  Signal level=43/100  
          Cell 26 - Address: 54:3D:37:28:62:38
                    ESSID:"wifijkpg"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.457 GHz (Channel 10)
                    Encryption key:off
                    Bit Rates:130 Mb/s
                    Quality=95/100  Signal level=7/100  
          Cell 27 - Address: 54:3D:37:68:62:38
                    ESSID:""
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.457 GHz (Channel 10)
                    Encryption key:on
                    Bit Rates:130 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=10/100  
          Cell 28 - Address: 2C:36:F8:0E:9D:31
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=80/100  Signal level=46/100  
          Cell 29 - Address: 2C:36:F8:42:37:81
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=15/100  Signal level=23/100  
          Cell 30 - Address: 2C:36:F8:42:12:E1
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=96/100  Signal level=48/100  
          Cell 31 - Address: 1C:AA:07:B0:4C:61
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=36/100  Signal level=26/100  
          Cell 32 - Address: 2C:36:F8:0E:9D:30
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=70/100  Signal level=46/100  
          Cell 33 - Address: 2C:36:F8:42:62:31
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=45/100  Signal level=76/100  
          Cell 34 - Address: 1C:AA:07:6F:2F:41
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=84/100  Signal level=43/100  
          Cell 35 - Address: 2C:36:F8:0E:91:61
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=81/100  Signal level=43/100  
          Cell 36 - Address: 1C:AA:07:B0:84:B0
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=9/100  Signal level=26/100  
          Cell 37 - Address: 1C:AA:07:B0:9D:81
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=33/100  Signal level=26/100  
          Cell 38 - Address: A4:56:30:E8:FE:21
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=54/100  Signal level=43/100  
          Cell 39 - Address: 1C:AA:07:B0:3E:60
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=36/100  Signal level=42/100  
          Cell 40 - Address: 1C:AA:07:6F:2D:01
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=69/100  Signal level=47/100  
          Cell 41 - Address: A4:56:30:E9:BE:70
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=78/100  Signal level=56/100  
          Cell 42 - Address: 2C:36:F8:0E:91:60
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=84/100  Signal level=43/100  
          Cell 43 - Address: 2C:36:F8:42:58:10
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=90/100  Signal level=43/100  
          Cell 44 - Address: 2C:36:F8:0E:9A:C0
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=101/100  Signal level=72/100  
          Cell 45 - Address: 2C:36:F8:42:12:E0
                    ESSID:""
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1c0050f20101000050f20202000050f2020050f20401000050f2020000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac022800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=84/100  Signal level=43/100  
          Cell 46 - Address: 1C:AA:07:B0:9D:F1
                    ESSID:"eduroam"
                    Protocol:IEEE 802.11gn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac012800
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : 802.1x
                    Quality=36/100  Signal level=43/100  

Does not handle network names with spaces example: my network

Hi I am using your wifi and was very happy. But in one of my application the name of the network I was connecting to was changed from "MyNetwork" to "My Network" and wifi could not connect anymore. See the error message:

Traceback (most recent call last):
File "wifi_debug_pirai.py", line 37, in
scheme_embraco.activate()
File "/usr/local/lib/python2.7/dist-packages/wifi/scheme.py", line 172, in activate
subprocess.check_output(['/sbin/ifdown', self.interface], stderr=subprocess.STDOUT)
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/sbin/ifdown', 'wlan0']' returned non-zero exit status 1

And also it keeps saving the same scheme in the interfaces file everytime I re-run the script.

How can I handle network names that have spaces between words?

Saving schemes

Howdy @rockymeza!

In trying to setup automatic wifi connection with the Raspberry Pi, I noticed that wifi will add a line like this to /etc/network/interfaces:

iface wlan0-W7DC7 inet dhcp

Is this solely so that wifi can find the configuration again for that wifi network? Because if I remove the -W7DC7 my wifi card will reconnect automatically on reboot, but with the dash ssid name it will not automatically try to reconnect.

Would it be possible to change it to something like:

iface wlan0 inet dhcp #W7DC7

So that wifi can still find the config but it will try to connect automatically? Or would have multiple entries like that just make everything messed up? /etc/network/interfaces is not my forté 😢

Just found your lib the other day, great work!

Not comprehensive scan

TL;DR: I have a more comprehensive and exhaustive scan with iwlist wlan0 scan than using wifi.Cell.all('wlan0').

The point is: This is random. Sometimes, the module shows all available networks. Sometimes it only shows the one I'm connected to.

Background:

I have a router and a repeater. Both "broadcast" the same SSID, but obviously have different MAC addresses.

I need to change the Wifi password through the router interface (telnet). What this does is that the repeater can't access the router anymore, but still serves the SSID and has the strongest signal, so I need to connect to the router specifically.

When I do a iwlist wlan0 scan , I always have the results.

When I use the module, it depends. So I have to stop the Network Manager and start it again, wait 10 seconds and do a scan to get the networks' list.

Additional info for memo:

Router: SpeedTouch 585v6.
Repeater: Dlink DIR-505L.

Does not work properly on OpenWRT

New versions of OpenWRT no longer use iwlist, and instead use iw.

iwlist can be installed on OpenWRT with the command opkg install wireless-tools. However, iwlist is not available at /sbin/iwlist as is expected by wifi, instead being available at /usr/sbin/iwlist.

As a workaround, after installing wireless-tools, I ran the following command to fix the problem:

sed -i 's+/sbin/iwlist+/usr/sbin/iwlist+g' /usr/lib/python2.7/site-packages/wifi/scan.py

Python 2.6 support

subprocess.check_call was added in python 2.7. We should include the implementation here in order to support python 2.6.

print_table crashes because of numeric data

The matrix of values fed to print_table by scan_command has a numeric column that it can't handle.

Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/wifi/bin/wifi", line 7, in <module>
    execfile(__file__)
  File "/home/ubuntu/src/wifi/bin/wifi", line 153, in <module>
    args.func(args)
  File "/home/ubuntu/src/wifi/bin/wifi", line 47, in scan_command
    print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
  File "/home/ubuntu/src/wifi/wifi/utils.py", line 28, in print_table
    lengths = [max(map(len, column)) for column in zip(*matrix)]
TypeError: object of type 'int' has no len()

Request: Join open network

Would like to have fall through option where failing to join a saved network then autoconnect will attempt to join open networks.

AttributeError: 'Cell' object has no attribute 'ssid'

When running the wifi command, I intermittently get this error:

% wifi
Traceback (most recent call last):
  File "/usr/local/bin/wifi", line 202, in <module>
    args.func(args)
  File "/usr/local/bin/wifi", line 51, in scan_command
    print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
AttributeError: 'Cell' object has no attribute 'ssid'

I suspect there's a wireless network in my environment which doesn't broadcast SSID, or something, which causes this particular failure.

Cannot connect to/disconnect from any WiFi network, due to ifdown & ifup not being avaliable on ArchLinux(Raspberry Pi)

Ifup and ifdown is not avaliable on ArchLinux, at least on Raspberry Pi. Since they are not avaliable I can't connect to or disconnect from any WiFi. I made a script to call 'ip link set $1 down' for ifdown, so disconnecting now works, but I can't do that for ifdown, since 'ip' command doesn't have '-o MAC:ADDRESS' and other switches. Can you somehow implemet connecting and disconnecting using 'ip' command or something? Thanks

Different quality line output between Debian and Ubuntu

In Debian Jessie the line reads:

Quality:5/5  Signal level:-46 dBm  Noise level:-92 dBm

In Ubuntu 14.04:

Quality=66/70  Signal level=-44 dBm

The difference is in one group more (with noise level) and in delimiter character.

Ubuntu version:

$ /sbin/iwlist -v
iwlist    Wireless-Tools version 30
          Compatible with Wireless Extension v11 to v22.

Kernel    Currently compiled with Wireless Extension v22.

wlan1     Recommend Wireless Extension v21 or later,
          Currently compiled with Wireless Extension v22.

Debian version:

$ /sbin/iwlist -v
iwlist    Wireless-Tools version 30
          Compatible with Wireless Extension v11 to v22.

Kernel    Currently compiled with Wireless Extension v22.

wlan0     Recommend Wireless Extension v19 or later,
          Currently compiled with Wireless Extension v22.

Wifi module not works on mac yosemite

Hello, I'm try to do a hello work with you module, but not works, I installed the wifi module like:
pip install wifi
Then when I try to do whatever with your module, for example wifi scan I get the following problem:

Traceback (most recent call last):
  File "/usr/local/bin/wifi", line 202, in <module>
    args.func(args)
  File "/usr/local/bin/wifi", line 51, in scan_command
    print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
  File "/usr/local/lib/python2.7/site-packages/wifi/scan.py", line 29, in all
    stderr=subprocess.STDOUT)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

how could I fix it?

OSError: [Errno 2] No such file or directory

Terminal Output: Fresh install of wifi on OS X 10.10.3 (python 2.7)

$ wifi scan
Traceback (most recent call last):
  File "/usr/local/bin/wifi", line 202, in <module>
    args.func(args)
  File "/usr/local/bin/wifi", line 51, in scan_command
    print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
  File "/usr/local/lib/python2.7/site-packages/wifi/scan.py", line 29, in all
    stderr=subprocess.STDOUT)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

subprocess.CalledProcessError: Command '['/sbin/ifdown', 'wlan0']' returned non-zero exit status 1

Hi @rockymeza ,

Im working in.

Ubuntu 14.04
wifi 0.3.4
python 2.7

I get this Bug:

Traceback (most recent call last):
  File "/home/.../workspace/client-wifi-configuration/wifimanage/linux/__init__.py", line 39, in <module>
    scheme.activate()
  File "/home/.../workspace/client-wifi-configuration/venv/local/lib/python2.7/site-packages/wifi/scheme.py", line 155, in activate
    subprocess.check_output(['/sbin/ifdown', self.interface], stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/sbin/ifdown', 'wlan0']' returned non-zero exit status 1

and the code:

    cell  =  Cell.all('wlan0')[ 0 ]
    scheme  =  Scheme.for_cell('wlan0','home', cell,'pw')
    scheme.save() #success save scheme in /etc/network/interfaces
    scheme.activate()

the scheme :

iface wlan0-home inet dhcp
    wpa-psk 2252012b5441f871ad6e27192d0a9d81797fded0be25525d9fb2c9e86333c772
    wpa-ssid ....
    wireless-channel auto

And the output console:

>>> import wifi.subprocess_compat as subprocess
>>> subprocess.check_output(["ls", "-l", "/dev/null"])
'crw-rw-rw- 1 root root 1, 3 \xd9\x8a\xd9\x88\xd9\x86  7 09:05 /dev/null\n'
>>> subprocess.check_output(["/bin/sh", "-c","ls -l fgt.txt ; exit 0"],stderr=subprocess.STDOUT)
"ls: impossible d'acc\xc3\xa9der \xc3\xa0 fgt.txt: Aucun fichier ou dossier de ce type\n"

List index out of range with ra0

I'm using RAlink device, Right now i'm at school with a lot of wifi spots with 802.1x authentication.

And i'm getting these results after a scan.
wifi -i ra0 scan

Traceback (most recent call last):
  File "/usr/local/bin/wifi", line 5, in <module>
    pkg_resources.run_script('wifi==1.0.0', 'wifi')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/EGG-INFO/scripts/wifi", line 202, in <module>
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/EGG-INFO/scripts/wifi", line 51, in scan_command
    print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
  File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/wifi/scan.py", line 34, in all
    cells = map(Cell.from_string, cells_re.split(iwlist_scan)[1:])
  File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/wifi/scan.py", line 44, in from_string
    return normalize(cell_string)
  File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/wifi/scan.py", line 116, in normalize
    while lines[0].startswith(' ' * 10):
IndexError: list index out of range

Results of a iwlist ra0 scan

ra0       Scan completed :
          Cell 01 - Address: 50:06:04:C3:4D:90
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality=94/100  Signal level=-53 dBm  Noise level=-92 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 02 - Address: 50:06:04:C3:4D:92
                    Protocol:11g/n BW20
                    ESSID:"eduroam"
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality=94/100  Signal level=-53 dBm  Noise level=-92 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 03 - Address: 50:06:04:C3:4D:91
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality=89/100  Signal level=-55 dBm  Noise level=-92 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 04 - Address: 50:06:04:C3:4D:93
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality=94/100  Signal level=-53 dBm  Noise level=-92 dBm
                    Encryption key:off
                    Bit Rates:144 Mb/s
          Cell 05 - Address: 50:06:04:BB:BD:D2
                    Protocol:11g/n BW20
                    ESSID:"eduroam"
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=42/100  Signal level=-73 dBm  Noise level=-78 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 06 - Address: 50:06:04:BB:BD:D0
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=52/100  Signal level=-69 dBm  Noise level=-92 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 07 - Address: 50:06:04:C3:40:F3
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=47/100  Signal level=-71 dBm  Noise level=-75 dBm
                    Encryption key:off
                    Bit Rates:144 Mb/s
          Cell 08 - Address: 50:06:04:C3:40:F2
                    Protocol:11g/n BW20
                    ESSID:"eduroam"
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=47/100  Signal level=-71 dBm  Noise level=-76 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 09 - Address: 50:06:04:BB:BD:D3
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=42/100  Signal level=-73 dBm  Noise level=-80 dBm
                    Encryption key:off
                    Bit Rates:144 Mb/s
          Cell 10 - Address: 50:06:04:BB:BD:D1
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=42/100  Signal level=-73 dBm  Noise level=-78 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 11 - Address: 50:06:04:C3:40:F0
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=47/100  Signal level=-71 dBm  Noise level=-76 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x
          Cell 12 - Address: 50:06:04:C3:40:F1
                    Protocol:11g/n BW20
                    ESSID:""
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=42/100  Signal level=-73 dBm  Noise level=-77 dBm
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : 802.1x

Can not verify if and which connected with.

Hi Rocky. It seems the app does not have any command or class method to return connection state. It would be nice to have it done with the eventual network ssid we are connected with.
Do you want me to open a pull requestfor that? I have some ideas I could apply.
PS: I have just noticed scheme.activate() issue has not been fixed yet.

Is it possible add a secured scheme without knowing the security type in advance ?

Let say I know the network name and the password in advance but I am not sure exactly what type of security it uses (WEP or WPA).

Is it possible to add such a scheme without providing the security type ?
Than let the computer identify the security type when it scans and recognize the network.

Thanks
Lior

  • I noticed that by default it uses WEP.
    Another way to do this is to leave it as WEP and than if you find that the network type is WPA change the scheme.

Wpa/wpa2

HI,

If an access point supports 2 encryption types the wifi only shows wpa. Is this normal? if not I've made a little correction and added wpa-enterprise support.

interface doesn't support scanning

I'm trying to use the command line to run #wifi scan but I get the following error :
Error: wlan0 Interface doesn't support scanning.

Ubuntu version is 12.04 LTS

the problem for ver 0.3.8

Hi, Rock,
I installed wifi by pip successful, but when I run wifi or wifi scan command, the error is same and as below:
Traceback (most recent call last):
File "/usr/local/bin/wifi", line 202, in
args.func(args)
File "/usr/local/bin/wifi", line 51, in scan_command
print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
File "/usr/local/lib/python2.7/dist-packages/wifi/scan.py", line 44, in all
cells = map(Cell.from_string, cells_re.split(iwlist_scan)[1:])
File "/usr/local/lib/python2.7/dist-packages/wifi/scan.py", line 54, in from_string
return normalize(cell_string)
File "/usr/local/lib/python2.7/dist-packages/wifi/scan.py", line 137, in normalize
while lines[0].startswith(' ' * 10):
IndexError: list index out of range
but wifi --help, works fine.

connect to wifi networks using python wifi library

when i googled this is solution i found.
but it says .

if you want Connecting to a network
In order to connect to a network, you need to set up a scheme for it.

cell = Cell.all('wlan0')[0]
scheme = Scheme.for_cell('wlan0', 'home', cell)
scheme.save()
scheme.activate()
Once you have a scheme saved, you can retrieve it using Scheme.find().

scheme = Scheme.find('wlan0', 'home')
scheme.activate()

but this was not working for me
even i do the same above still it gives scheme not define error
please tell me any one .how to connect to wifi networks by python script..

signal strength

Would be useful to introduce the signal power in the attributes of Cell.all ('wlanX')

Omg...sorry for issues i follow reference in this page:http://wifi.readthedocs.org/en/latest/scanning.html

I did not realize that this is the attribute Cell.all("wlanX")[0].quality and Cell.all("wlanX")[0].signal
maybe it should be included in the page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.