3

Raspberry PI 2 was the best christmas present this year, but I’m having some serious issues with the wi-fi connection setup. I manage to connect only with ethernet cable.

I also noticed a weird behavior of the internet connection: after a couple of minutes the raspberry is turned on the internet connection dies on every other device. It’s like the raspberry vampirizes the internet connection everywhere! Initially I thought it was a coincidence, but it happens almost everytime, so I think the two things are related.

I tried a lot of solutions I found (and understood) online, but I didn’t manage to make them work. Consider, please, I’m new to Raspberry and to Raspbian/Debian/Linux (I worked for a year on a PC with Ubuntu a couple of years ago, but I never had problems that I couldn’t resolve with 10 minutes on google).

The Wi-fi stick is being picked up and the stick modules are loaded (I think), here’s the result of lsmod:

Module                  Size  Used by
arc4                    1753  2 
rt2800usb              17716  0 
rt2800lib              71860  1 rt2800usb
rt2x00usb               8545  1 rt2800usb
rt2x00lib              36817  3 rt2x00usb,rt2800lib,rt2800usb
mac80211              541952  3 rt2x00lib,rt2x00usb,rt2800lib
cfg80211              419759  2 mac80211,rt2x00lib
crc_ccitt               1161  1 rt2800lib
rfkill                 16659  2 cfg80211
bcm2835_gpiomem         3023  0 
evdev                  10226  6 
joydev                  9047  0 
snd_bcm2835            19739  3 
snd_pcm                74833  1 snd_bcm2835
snd_timer              18164  1 snd_pcm
snd                    52116  9 snd_bcm2835,snd_timer,snd_pcm
uio_pdrv_genirq         2966  0 
uio                     8228  1 uio_pdrv_genirq
i2c_dev                 6040  0 
fuse                   81721  3 
ipv6                  341380  30 

Here’s the result of ifconfig -a

eth0  Link encap:Ethernet  HWaddr b8:27:eb:35:ca:ef  
      inet6 addr: fe80::397a:2c60:ef27:a17d/64 Scope:Link
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo    Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:248 errors:0 dropped:0 overruns:0 frame:0
      TX packets:248 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:20832 (20.3 KiB)  TX bytes:20832 (20.3 KiB)

wlan0 Link encap:Ethernet  HWaddr 00:0f:60:08:d8:e4  
      inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::20f:60ff:fe08:d8e4/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:31 errors:0 dropped:0 overruns:0 frame:0
      TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:4609 (4.5 KiB)  TX bytes:17260 (16.8 KiB)

My interfaces file looks like this:

auto wlan0

iface lo inet loopback

iface eth0 inet manual

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

And this is my wpa_supplicant.conf (yes, I’m absolutely sure the login and password are correct: I checked them a thousand times and tested them on other devices, they work)(hidden here):

network={
    ssid="my id"
    psk="my password"
}

Thanks everyone!

Edit: I'm adding some (I hope useful) information: When i ping www.google.com i get unknown host. When i ping 8.8.8.8 i get data:

64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=48.4 sec
(etc)
Pippilotta
  • 31
  • 2
  • How are you powering the Pi? Is the WiFi dongle connected to the Pi or a USB Hub? If a usb is it a powered hub? – Steve Robillard Dec 25 '15 at 13:21
  • 1
    I have (once) heard the story "the internet connection dies on every other device" here before. However, note that it is not possible for one device to do this forcefully -- if they are disconnecting it is either voluntarily or because the router did it. – goldilocks Dec 25 '15 at 13:42
  • Hi Steve. The Pi is powered with a micro USB power supplier connected to the house electricity (it's similar to a smartphone charger and I bought it with a pack with the Pi). The Wi-Fi Dongle is a USB stick i put in one of the four USB ports of the Pi. I don't know what you mean with "powered hub". – Pippilotta Dec 25 '15 at 13:45
  • Hi Goldilocks, but why would the router have this strange behavior? – Pippilotta Dec 25 '15 at 13:47
  • USB hubs come in two flavors powered and unpowered. A powered hub will connect to the Pi via USB cable and have a connector that connects to the mains, These types of problems are often power related, I would get a powered USB hub and plug the WiFi dongle into that. BTW to respond to someone you need to add an @ in front of their name. – Steve Robillard Dec 25 '15 at 13:54
  • Well, i had this issue too. All i did was plug in the wifi receiver in my Pi and restarted it. Once the pi restarted the wifi module was automatically showing and i had to tap in my wifi password. I use raspberry pi with Jessie distro. Thanks – giri-sh Dec 25 '15 at 14:43
  • 1
    @SteveRobillard thanks for the answer, i guess that I'm not using powered USB, then, I'm sticking it directly in one of the PI ports. I bought the wi-fi dongle 801.11n with the PI, online I've read of many people using my same model and nobody mentioned power problems. – Pippilotta Dec 25 '15 at 14:48
  • @GirishSortur thanks. I use it with debian (raspbian) 8.0 and unfortunately rebooting the system doesn't work for me. – Pippilotta Dec 25 '15 at 15:02
  • 1
    I can't tell you why a router would do this, only that it is not possible for the pi to do so without the cooperation of the router and/or the other devices. Otherwise miscreants could too easily walk into any library or internet cafe and disable the whole subnet. In fact they would not even need to be miscreants, they could just be people with a misconfigured laptop. Does not happen because it is not possible. – goldilocks Dec 25 '15 at 16:21
  • @Pippilotta can you try upgrading to latest raspbian and see if it helps. I had installed version jessie directly on the micro-sd card. Hope the new release helps with your wifi module detection. – giri-sh Dec 25 '15 at 17:30
  • @GirishSortur just upgraded to the last version and nothing changed, the wi-fi connection still doesn't work. Thanks for the suggestion! – Pippilotta Dec 25 '15 at 19:16
  • I have heard of odd device disconnections happening and IIRC this was due to two devices trying to use the same IP address - which can happen if one of them is misbehaving due to not being set up correctly. – SlySven Dec 25 '15 at 22:41
  • 1
    You have fiddled with /etc/network/interfaces and what you have is incorrect. See http://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-networking-wifi-static-ip – Milliways Dec 25 '15 at 23:19
  • @Milliways thanks for the suggestion, i corrected my interfaces file as indicated in the post you linked, but nothing changed, my wi-fi still doesn't work. When I ping google it gives me unknown host. – Pippilotta Dec 26 '15 at 12:28

1 Answers1

2

I had a similar problem with a Netgear dongle. It worked after I added key_mgmt=WPA-PSK to the network definition in /etc/wpa_supplicant/wpa_supplicant.conf.

This is exactly what my /etc/network/interfaces contains:

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

This is how my /etc/wpa_supplicant/wpa_supplicant.conf looks like:

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

network={
        ssid="MY_NETWORK_NAME"
        psk="my_key"
        key_mgmt=WPA-PSK
}

The only thing I changed here in the example are my ssid and psk. I'm not sure it's needed, but like in the example, those values are in double quotes. Use your own values for ssid and psk.