dominictarr / wifi.sh

MIT License
217 stars 11 forks source link

Did not detect interface #9

Open gregoswald opened 9 years ago

gregoswald commented 9 years ago

Scan didnt work i got this error.

>sudo wifi.sh scan
SSID                                    , SIGNAL , SECURITY
command failed: No such device (-19)

This is the output of iplink showing the interfaces.

>ip -o link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default \ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000\ link/ether 00:26:c6:c6:a7:a4 brd ff:ff:ff:ff:ff:ff 3: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000\ link/ether 00:22:68:1f:d5:18 brd ff:ff:ff:ff:ff:ff
dominictarr commented 9 years ago

looks like for some reason your devices come in a different order to mine, and that is causing this error. unfortunately there is no simple way to tell whether a given interface is wifi or not, so we'll have to pattern match the interface names.

this is a bit ugly, but maybe the only way to pick the right interface automatically.

vvo commented 9 years ago

I had the same problem so I always use INTERFACE= and it works. Interface order is distro related. I use archlinux and interface order vary from time to time :dancer:

dominictarr commented 9 years ago

@vvo can you post the output of ip -o link on your system?

vvo commented 9 years ago
> ip -o link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default \    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000\    link/ether 28:d2:44:87:42:0d brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000\    link/ether e8:2a:ea:07:e5:72 brd ff:ff:ff:ff:ff:ff
vvo commented 9 years ago

Oh yeah and there's no "wlan0" :D

dominictarr commented 9 years ago

@vvo it looks like this should work. when i originally wrote this, i used it with a usb key (because I had an hp with bcom chipset that had bad driver support). I can't remember what the interface was called but it was something different. I think it did start with "w" at least, if not "wl"