0

I started my Raspberry Pi 2, connected to an external monitor. Everything works as supposed.

I connected my USB Wifi adapter and it's being detected by the pi:

$ lsusb
...
Bus 001 Device 04: ID 0bda:818b Realtek Semiconductor Corp.
...

However, there are no wifi networks:

$ iwconfig
lo        no wireless extensions

eth0      no wireless extensions

Realizing I don't have Internet connection on the raspberry, how can I make the wifi connection work?

I'm running Raspbian. So, how can I make it work (maybe some missing packages?)?


Relevant output:

$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


auto wlan0
allow hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid "..."
        wpa-psk "..."
$ uname -r
3.18.13-v7+
$ ls /lib/modules/3.18.13-v7+/kernel/drivers/net/wireless/
at76c50x-usb.ko  brcm80211    mac80211_hwsim.ko  rt2x00     zd1211rw
ath              hostap       mwifiex            rtl818x
b43              libertas     p54                rtl8192cu
b43legacy        libertas_tf  rndis_wlan.ko      zd1201.ko
pi@raspberrypi:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
        wpa-ssid "Edimax"
        wpa-psk "<password>"


auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
14
  • 1
    Can you provide any dmesg logs that describe what wifi adapter is detected? I'm wondering if the kernel is recognizing the USB ID and loading any modules.
    – WineSoaked
    Commented Aug 11, 2015 at 6:25
  • @WineSoaked Sure! I don't think would be a good idea to post it here in the question... :-) I connected an ethernet cable to make my life easier and I'm connected from my laptop via ssh to raspberry. Commented Aug 11, 2015 at 6:30
  • Yeah, it looks like the adapter is being enumerated, but no driver is being loaded for it. So... the short version of this is that you might need to get a different wifi adapter, one that is guaranteed to run on the version of Raspbian (or whatever OS you've chosen).
    – WineSoaked
    Commented Aug 11, 2015 at 6:36
  • The somewhat longer option would be to locate a driver that will recognize that USB ID and make sure that it's available on the SD card. This is not a beginner-level task.
    – WineSoaked
    Commented Aug 11, 2015 at 6:37
  • @WineSoaked But... I have a CD with the drivers. And it contains an install script. I tried it and it compiles some C/C++ stuff and then fails: recipe for target 'modules' failed. Commented Aug 11, 2015 at 6:37

2 Answers 2

2

Ther reason why you don't have a wlan0 is that you don't have a wlan0 stanza in your /etc/network/interfaces. Go there and make a setting for wlan0 by typing sudo nano /etc/network/interfaces and add the example stanza

auto wlan0
allow hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid "ssidofyourrouter"
        wpa-psk "passwordofyourrouter"

If you have auto line, allow line is not compulsory, for more information check https://wiki.debian.org/WiFi/HowToUse

iface wlan0 inet dhcp isn't your only option, you can set it manual or static too but the settings will be different. After you added the stanza I've put above to /etc/network/interfacestype sudo ifdown wlan0 and then sudo ifup wlan0.

If you have entered the right settings you will be connected to the router you have been specified in the stanza by "ssidofyourrouter" and "passwordofyourrouter". By dhcp(dynamic host configuration protocol) then your Pi will be assigned an IP between the specified interval in your router settings.

13
  • Thanks! I'm getting misplaced option on allow hotplug wlan0 line. Commented Aug 11, 2015 at 13:15
  • You're welcome. Can you edit your question with your settings in /etc/network/interfaces and also with error Commented Aug 11, 2015 at 13:17
  • How to install iwdown? Previously I tried on another computer. On raspberry I get -bash: iwdown: command not found. Commented Aug 11, 2015 at 13:27
  • Commands are ifdown, and ifup :) Commented Aug 11, 2015 at 13:32
  • Ah, true! :) I updated my question. The error is /etc/network/interfaces:19: interface wlan0 declared allow-auto twice, which makes sense I guess. Commented Aug 11, 2015 at 13:35
-1

The NOOBS kernel does not have a driver for this USB device. Try using the Raspbian image instead.

Ref: https://github.com/pvaret/rtl8192cu-fixes/issues/50#issuecomment-129484228

2
  • I am currently using Raspbian actually. I'm going to give you a bounty if you solve my issue... :) Commented Sep 13, 2015 at 6:50
  • See my comment. Commented Sep 15, 2015 at 6:10

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.