2 Replies Latest reply on Dec 24, 2013 3:00 PM by ivanoconnor

    Raspberry Pi wifi connection with Wi-Pi dongle

    ivanoconnor

      Hi Complete newbie to Pi's  (just bought one for my 8 year old son as I remember ZX Spectrums with some fondness). Basically bought a kit which contains Raspberry Pi Model B 512MB and runs Wheezy (via a preloaded SD card, a 4 way USB hub and keyboard/mouse and an Element 14 Wi-Pi dongle. We log in ok and when we do the WiFi Config set up, it picks up our BT Home Hub ok. We scan all this in and enter the Wireless Key code into the PSK password and all seems ok. The Status comes up as '4 way handshake' but it keeps on saying 'wpa_gui Disconnected from network' and we have never managed to get on the internet from Midori. We have tried following the same WIFI set up for the Element 14 Wi-Pi many times and had no luck. It is also the 2nd Wi-Pi dongle as we sent the 1st one back thinking it may be faulty. My laptop picks up the same WIFI signal where the Pi is so guess it is not a signal issue. Has anyone got any clues? Please treat any answers as if you are talking to a complete beginner!! Thanks for any help - desperate to get it running for Xmas day for my son!! Thanks, Steve

        • Re: Raspberry Pi wifi connection with Wi-Pi dongle
          shabaz

          Hi Ivan,

           

          This is what worked for me (I used the latest image, I did not have a preloaded card).

           

          First, confirm that the /etc/network/interfaces file looks like this:

          pi@raspberrypi:~$ cat /etc/network/interfaces

          auto lo
          
          iface lo inet loopback
          iface eth0 inet dhcp
          
          allow-hotplug wlan0
          iface wlan0 inet manual
          wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
          iface default inet dhcp
          

           

          Then, get the /etc/wpa_supplicant/wpa_supplicant.conf file to look like this:

          pi@raspberrypi:~$ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf

          ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
          update_config=1
          network={
           ssid="enter-ssid-here"
           scan_ssid=1
           psk="enter-key-here"
           proto=RSN
           key_mgmt=WPA-PSK
           pairwise=CCMP
           auth_alg=OPEN
          }
          

           

          (The above relied on the information found at this site).

          Then, assuming the network cable is disconnected, the RPI will connect using the WiPi module and acquire an IP address from your router.

          You can check this, by logging onto your router:

          You should see this on some BT home hubs:

          router.png

          Notice that there are two 'raspberrypi' "connections", where one is at status "Not connected" and the other is "Connected". The former refers to the wired Ethernet connection (which is disconnected) and the latter refers to the wireless connection. Yours may be on the right side (I have a separate wireless access point).

          Then, it should be possible to get some more detail with the router:

          router2.png

          The above shows the IP address that the router has given to the RPI. You can use that address to connect to the RPI. If you're using a monitor and keyboard then you don't need the above information, and you can obtain it directly from the RPI using:

          pi@raspberrypi:~$ ifconfig -a

          eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
                    UP BROADCAST MULTICAST  MTU:1500  Metric:1
                    RX packets:730 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:253 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:57134 (55.7 KiB)  TX bytes:35325 (34.4 KiB)
          
          lo        Link encap:Local Loopback  
                    inet addr:127.0.0.1  Mask:255.0.0.0
                    UP LOOPBACK RUNNING  MTU:16436  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:0 
                    RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          
          wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
                    inet addr:192.168.1.92  Bcast:192.168.1.255  Mask:255.255.255.0
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:310 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:30886 (30.1 KiB)  TX bytes:11439 (11.1 KiB)
          

           

          On line 17, you can see the IP address.

           

          There is some additional information here, which I've not had a chance to try.