I tried to scan for available wifi networks in my area, but sudo iw wlan0 scan gives me command failed: No such device (-19). Since I have no detailed knowledge about the iw command, I also tried sudo iw phy wlan0 scan, which gave me command failed: No such file or directory (-2).
NOTE: The adapter works fine, I already established a connection to my router, and iwlist is able to list available wifi networks. Yet, for some reason, iw does not work.

(I know, I can achieve a similar output with iwlist wlan0 scanning, but at my point, I just want this to work somehow.)

I am using the mini-wifi-adapter from adafruit with a RTl8192/8188CUS chipset.

I came across this SE-post, which says that the important kernel module is included, but not compiled. As clearly stated by that post, I tried to compile Raspbian with rtlwifi-support and did everything as told. Still, several hours later it's still the same. iw still gives the the same error-message as before and I don't see anything about rtlwifi- or rtl8192cu-drivers in lsmod.

Did I do something wrong or is there another way to make iw work on Raspian? Thanks in advance.

Additional information:
lsusb gives

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS802.11n WLAN Adapter

uname -a gives

Linux hostname 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST2015 armv7l GNU/Linux
  • Are you saying that iwlist works but iw does not? It's not clear here whether you think you are having a problem with the adapter, or just that particular command.
    – goldilocks
    Commented Dec 17, 2015 at 18:34
  • @goldilocks I updated my question. It's iw that does not work, the adapter is completely fine.
    – Sirac
    Commented Dec 17, 2015 at 18:39
  • What about iw dev wlan0 scan?
    – goldilocks
    Commented Dec 17, 2015 at 18:44
  • No luck, it prints command failed: No such device (-19).
    – Sirac
    Commented Dec 17, 2015 at 18:48
  • 2
    @goldilocks It seems that this bug exists for some time now. I found raspberrypi.stackexchange.com/questions/14528/… this question with the same core problem. I think this is a good points to end this, since the solutions presented there are too complicated, given that I can still use iwlist. Raspbian still has some severe bugs, I also cannot mount my USB-stick on boot :(. Thank you for the time you took to help me and giving me the pragmatic idea of using another OS (I never could have come up with this).
    – Sirac
    Commented Dec 17, 2015 at 21:55

1 Answer 1


If you are sure your adapter works fine, try running the command

sudo ifconfig wlan0 up

When you do this, all the available wifi networks should show up when you click the wifi signal button at the top right of the screen. You should then be able to click any of them and type in your password.

Edit: Try running the command sudo iw dev wlan0 scan since you say your wlan0 is up

  • 1
    Note, from man ifconfig: "This program is obsolete! For replacement check ip addr and ip link." It still works and should continue to indefinitely, but if you are new to all this you might as well learn the new ones. The equivalent here would be ip link set wlan0 up.
    – goldilocks
    Commented Apr 4, 2016 at 19:46
  • 1
    I tried using sudo ifconfig wlan0 up, but wlan0 was already up (as shown in ifconfig). Even after that command iw doesn't work. As stated in the question and in the comments, this might be a driver bug. (I can still scan for networks with iwscan, but I specifically want to use iw, just to be happy :) )
    – Sirac
    Commented Apr 7, 2016 at 22:02
  • Try looking at my edit Commented Apr 8, 2016 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.