Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Inability to scan if wlan0 is not up #4

Closed
wants to merge 1 commit into from
Closed

Conversation

rockymeza
Copy link
Owner

In order to be able to scan. I need to run wifi connect home. It does not matter if the network actually connected, but the interface needs to be up before I can scan.

@rockymeza
Copy link
Owner Author

rocky@rossum:~$ sudo wifi scan
wlan0     Interface doesn't support scanning : Network is down

Traceback (most recent call last):
  File "/usr/local/bin/wifi", line 7, in <module>
    execfile(__file__)
  File "/home/rocky/projects/wifi/bin/wifi", line 95, in <module>
    args.func(args)
  File "/home/rocky/projects/wifi/bin/wifi", line 10, in scan_command
    cells = iwlist()
  File "/home/rocky/projects/wifi/wifi/__init__.py", line 25, in iwlist
    scan = subprocess.check_output(['/sbin/iwlist', 'wlan0', 'scan'])
  File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/sbin/iwlist', 'wlan0', 'scan']' returned non-zero exit status 255

@rockymeza
Copy link
Owner Author

I fixed this error by turning on the interface using ip link set dev wlan0 up, which lets you scan, but doesn't try to connect to a network.

@gavinwahl, can you test it out?

Erf- added a commit to Erf-/wifi that referenced this pull request Jul 31, 2015
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve some build issues (still least).
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve some build issues (still least).
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve build issues.
Erf- pushed a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
Test scan.
 Modifications qui seront validées :
	nouveau fichier: tests/test_scan.py
	nouveau fichier: wifi/dummydata.py
	modifié:         wifi/scan.py

Realisation du test du listing de reseaux disponibles en utilisant l'argument
'sudo'.

Le fichier dummydata contient les variables qui seront utilisees dans les
tests, a l'instar des fixtures de pytest.

Le fichier scan contient les modifications apportees par Yohan.

Add sudo args to terminal calls.
	modified :         tests/test_parsing.py
	modified :         tests/test_scan.py
	modified :         tests/test_schemes.py
	removed :        wifi/dummydata.py
	modified :         wifi/scheme.py

Pull request fix #1.
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve build issues.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
Le fichier dummydata contient les variables qui seront utilisees dans les
tests, a l'instar des fixtures de pytest.

Le fichier scan contient les modifications apportees par Yohan.

Add sudo args to terminal calls.
	modified :         tests/test_parsing.py
	modified :         tests/test_scan.py
	modified :         tests/test_schemes.py
	removed :        wifi/dummydata.py
	modified :         wifi/scheme.py

Pull request fix #1.
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve build issues.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
Add sudo args to terminal calls.
	modified :         tests/test_parsing.py
	modified :         tests/test_scan.py
	modified :         tests/test_schemes.py
	removed :        wifi/dummydata.py
	modified :         wifi/scheme.py

Pull request fix #1.
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve build issues.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 3, 2015
Add sudo args to terminal calls.
	modified :         tests/test_parsing.py
	modified :         tests/test_scan.py
	modified :         tests/test_schemes.py
	removed :        wifi/dummydata.py
	modified :         wifi/scheme.py

Pull request fix #1.
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve build issues.
Erf- added a commit to Erf-/wifi that referenced this pull request Aug 4, 2015
Add sudo args to terminal calls.
	modified :         tests/test_parsing.py
	modified :         tests/test_scan.py
	modified :         tests/test_schemes.py
	removed :        wifi/dummydata.py
	modified :         wifi/scheme.py

Pull request fix #1.
	modifié :         tests/test_scan.py
	modifié :         tests/test_schemes.py

Pull request fix #2.
	modifié:         tests/test_scan.py
	modifié:         tests/test_schemes.py

Pull request fix rockymeza#3.
	modifié:         setup.py
Add 'mock' to the requires.

Pull request fix rockymeza#4.
	modifié:         .travis.yml
Demand for latest update of setuptools when installing.

Pull request fix rockymeza#5.
Improve code readability.

Add Travis to my own repository.

Restore file permissions.

Pull request fixes rebase.

Rebase of the pull request fixes in order to clear the code and to solve build issues.
@rockymeza rockymeza closed this Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant