16

Alright, I have been unable to find a solution to this problem anywhere else online, so please bear with me:

I have a new Raspberry Pi Model 2B which came with a wifi dongle (Ralink RT5370) and when I fired it up with the pre-installed Raspbian, the wifi worked correctly. I also bought a mini HDMI screen for the pi which wouldn't work without installing the driver from a DVD shipped with the screen. After installing the driver, the screen works well, but now my wifi stopped working. The light on the dongle does not turn on anymore and I am unable to scan for wireless networks.

After some searching on Google, I have determined that the dongle is recognized (it is listed when I run lsusb), its module is installed (the module rt2800usb is listed when I run lsmod), and the firmware seems to be installed (I ran ifconfig -a and it displays wlan0 information). However, when I run iwlist wlan0 scan, I get the output:

wlan0    Failed to read scan data: Network is down

And when I run sudo ifdown wlan0 && sudo ifup wlan0 to see if the network is reachable, I get the following output:

ifdown: interface wlan0 not configured
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpa_supplicant exited with return code 1
Failed to bring up wlan0

I have tried editing both /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf according to various examples online to no avail. Here are my current versions:

interfaces:

auto lo
allow-hotplug lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet manual

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

wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="mySSID"
    key_mgmt=WPA_PSK
    proto=WPA
    pairwise=TKIP
    psk="myPassKey"
}

As a side note, I have triple-checked that my network information is correct and that the wifi network is discoverable from other computers, so I doubt that the problem is on that end. I am at a point where I really have no idea where or what my problem could be. I have tried downloading wifi managers, that didn't work. I have rebooted, updated, and upgraded my software versions repeatedly, that didn't work. I have tried altering and/or removing lines from the above files, that didn't work. I consistently am unable to scan for wireless networks (Note: ethernet works fine) despite successfully connecting to networks before installing this screen driver! If anyone has any idea what my problem might be and how to fix it, I would be extremely grateful. Thanks!

  • 1
    What does ifconfig show? – Sirac Dec 31 '15 at 18:11
  • 1
    Regular ifconfig with no parameters just shows eth0 and lo, no wlan0. Do you want to know the full readout of each? – Kyle Dec 31 '15 at 19:24
  • 1
    So, somehow, your wlan0-interface is not available, there isn't even a connection attempt with your WiFi. It would be good to know the output of ifconfig -a, as goldilocks suggested. This shows if wlan0 is even "there". You could also check your system messages, display the latest with dmesg | tail, show all with dmesg, better dmesg | less. Hopefully this will show what's wrong with wlan0. – Sirac Jan 1 '16 at 3:21
  • 1
    Alright, the output from dmesg | tail shows a whole bunch of errors regarding firmware requests. Direct firmware load for rt2870.bin failed with error -2 rt2x00lib_request_firmware: Error - Failed to request Firmware rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin' Does that tell anyone anything useful? – Kyle Jan 1 '16 at 21:23
  • 1
    I tried apt-get install firmware-ralink but it says that the firmware is already the newest version. – Kyle Jan 1 '16 at 21:25
7

One of the things that I have read a hundred times in dealing with anything attached to the USB on any model of RPi is to make sure that you have a decent Power Supply (2 or more Amps) or use a quality powered USB hub. Could it be possible that your WiFi dongle isn't getting enough power now because the HDMI screen is too greedy?

  • I've put a few capital letters in for readability sakes - hope you don't mind. And yes, of the points you raise BOTH are often an issue, and BOTH may need attention to solve the OPs problems! 8-) – SlySven Jan 18 '16 at 11:17
  • 1
    I changed the power supply and now I have my WIFI dongle working again. Thanks ! – user52227 Aug 20 '16 at 12:30
2

just in case it might help. I was following this tutorial https://www.sunfounder.com/wiki/index.php?title=How_to_Use_an_RFID_RC522_on_Raspberry_Pi

Basically, after editing the sudo nano /boot/config.txt file and setting device_tree=on

broke my wireless on the next reboot. Deleting that line solved the issue.

  • That file is very dangerous. One mistake and it will render your Pi unbootable... – IgorGanapolsky Aug 15 '16 at 5:19
  • 1
    @IgorGanapolsky Sure, and at that point you can pull the SD card out, open it on a PC, and change the file back. – Yousef Amar Jan 10 '18 at 14:52
1

You need the firmware for your dongle. Some install will be already on your device but try:

apt-get update 
apt-get install git-core binutils rpi-update

then make sure you have the last kernel in place

rpi-update

get a bunch of firmware.... yes, a lot. You will Need some disk space, near 80Mb.

git clone http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

copy your firmware to the right place

mkdir /lib/firmware
cp linux-firmware/rt2870.bin /lib/firmware/rt2870.bin

and then your are free to delete the cloned files on your linux-firmware directory

  • 3
    I love when people give advice to fix a wifi dongle that is unable to connect to a network by telling them to use "sudo apt-get install ..." or similar command which actually requires a working connection. LOL – rbaleksandar Oct 31 '16 at 9:14
  • @rbaleksandar if possible they could connect to the router via ethernet and ssh in – DorkMonstuh Jan 14 '17 at 23:16
  • If you don't have a monitor to connect your Pi to, you will have to use nmap or similar to find the Pi's IP (as far as I know there is no default IP assigned to enable easy sshing in it). Once the IP is found you can transfer the deb packages and install these offline (though it's always quite enjoyable to resolve all the dependencies issues that may occur). Bridging (for example notebook's wifi to provide Internet connection to the Pi over LAN) is also possible. But all that is...hmmm...not that enjoyable (omho) to deal with when you just want to have your Pi up and running in no time. – rbaleksandar Jan 14 '17 at 23:49
  • @rbaleksandar DHCP on the Pi registers its hostname with your router. Most consumer models and Windows-based systems will then automatically add that to the local DNS, and raspberry(.localdomain) will resolve to its IP address. – Someone Nov 6 at 8:51
1

Probably the wireless adapter interface renamed to wlx_ _ _ _ _ _ _

(Predictable Network Interface Names: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/).

  1. run dmesg and find something like this:

    [ 7.044805] rtl8192cu 1-1.2:1.0 wlx74da3833acb9: renamed from wlan0

This is the new name: wlx74da3833acb9

run iwconfig. In my case:

wlx74da3833acb9  IEEE 802.11bgn  ESSID:"sysadmin"  Nickname:"<WIFI@REALTEK>"
      Mode:Managed  Frequency:2.437 GHz  Access Point: 10:FE:ED:E0:6C:96   
      Bit Rate:150 Mb/s   Sensitivity:0/0  
      Retry:off   RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality=100/100  Signal level=76/100  Noise level=0/100
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

edit /etc/network/interfaces and rename wlan0 to wlxXXXXXXXXXX

In my case:

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

reboot

  1. Or

edit:

/lib/udev/rules.d/73-usb-net-by-mac.rules

comment everything:

    # Use MAC based names for network interfaces which are directly or indirectly
# on USB and have an universally administered (stable) MAC address (second bit
# is 0).

#IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
#PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/d$

#ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
#    ATTR{address}=="?[014589cd]:*", \
#    IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"

#LABEL="usb_net_by_mac_end"

reboot

0

Turns out that a change in /boot/config.txt created a similar issue for me! In my case the "interface was not found".

Puzzling because the changes in config.txt were to deal with HDMI display issues (trying to get a 5" monitor to work). Once restored to the original config.txt, WiFi resumed working normally without any change hardware or software change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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