rockymeza/wifi

Does not work properly on OpenWRT

Opened this issue · 2 comments

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

Hi @Noilly,

Thanks for reporting this. I'm actually getting the same problem on Fedora. In addition to iwlist not being installed, ifup and ifdown are using a completely different mechanism.

I've been looking into upgrading to use the netlink kernel API directly (perhaps using pyroute2), but the going has been a little rough on that front.

As a side note, can I ask what you are doing with wifi on a OpenWRT device? I've only heard of people using it on laptops and rasberry pis.

Thanks again

Hi @rockymeza ,

I'm using it to detect nearby WiFi networks, and I then use that information and some input from the user to create a network bridge. All through a Python application.