rockymeza / wifi

[unmaintained] WiFi tools for linux
http://pypi.python.org/pypi/wifi
BSD 2-Clause "Simplified" License
305 stars 151 forks source link

scheme.activate() returns non zero exit status 1 #118

Open nadeemnehru opened 5 years ago

nadeemnehru commented 5 years ago

I am trying to connect to a wireless network using wifi library in python script and am running python 3.6.8 Upon executing scheme.activate(), I get the following output subprocess.CalledProcessError: Command '['/sbin/ifup', 'wlp6s0=wlp6s0-home', '-o', 'wpa-ssid=DataRoom', '-o', 'wpa-psk=902456bdc9a0ff7e7fecf72c303e75d87d4e6bf209e24c36453bc6cc8a9e1ee1', '-o', 'wireless-channel=auto']' returned non-zero exit status 1

I tried to search for the solution but found no related issue. Thanks for the help

jLynx commented 5 years ago

Same issue. Any update?

Chazpanzee commented 4 years ago

Also having the same issue with this, I have found a couple of threads that seem to be quite old and no longer relevant / closed and have not solved my issue.

The code i am using is:

`from future import print_function

from wifi import Cell, Scheme, SchemeWPA

get all cells from the air

ssids = [cell.ssid for cell in Cell.all('wlan0')]

schemes = list(Scheme.all())

cell = list(Cell.all('wlan0'))

for scheme in schemes: ssid = scheme.options.get('wpa-ssid', scheme.options.get('wireless-essid')) if ssid in ssids: print('Connecting to %s' % ssid) scheme.activate() break`

"SchemeWPA" is a monkey patch job i found in another thread that helped get me here