Python WiFi library
-
Is Python WiFi Library supported/compatible with Omega 2+?
Would like to scan and do WiFi connections from Python script.So far can install and import wifi, Cell library in python 2.7.
But wifi scanning doesn't work out of the box.
To save me time digging to find details, has anyone had any positive experience or advice?
Would be much appreciated.cells = wifi.Cell.all('ra0')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/wifi/scan.py", line 39, in all
stderr=subprocess.STDOUT)
File "/usr/lib/python2.7/subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 390, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directorySOLVED using ubus
-
SOLVED using ubus
-
Yep, ubus is especially nice since it outputs JSON
See this repo for usage details for theonion
ubus calls: https://github.com/OnionIoT/onion-ubus#onion-ubus