6 Replies Latest reply: May 10, 2014 3:05 PM by Eshneken-Oracle RSS

    WIFI setup not working

    Eshneken-Oracle

      Hello,

       

      I'm signed up for the May 30th course and just got my course kit and decided to go through the setup instructions.

       

      I'm not able to get the wifi dongle to work as described in the instructions.  My /etc/network/interfaces file looks like this as per the instructions:

       

      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

       

      auto wlan0

      iface wlan0 inet static

              address 192.168.1.11

              netmask 255.255.255.0

              gateway 192.168.1.1

              wpa-ssid "<%my ssid%>"

              wpa-psk "<% my network password%>"

       

      I browsed through the forums here and found a lot of people were having issues at the start.  I've tried a bunch of the suggestions and none seem to work.  When I hook up the USB-TTY cable and try to restart networking, I typically see something like this:

       

      Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).

      Reconfiguring network interfaces...wpa_supplicant: /sbin/wpa_supplicant daemon failed to start

      run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1

      Cannot find device "wlan0"

      Failed to bring up wlan0.

      done.

       

      Any suggestions for what I may be doing wrong or what I can try?  I have a WPA2 network and am broadcasting my SSID.

       

      thanks!

      Ed

        • 1. Re: WIFI setup not working
          stainsb

          Below are my settings that I used at the start of the course.  They are similar but not quite the same as yours.  Try them and see if it works.


          Also, note I have the commands below and I used "reload" instead of "restart".  Just a suggestion to try.  I'm not a networking expert by any means.


          Also, I've actually switched to using "wicd" to manage my network settings.  It makes it easy to deal with keeping the wireless connection alive, etc.  You can find an example of how to set it up here:  http://www.bartbania.com/index.php/easy-wireless-configuration-for-raspberry-pi/ OR perhaps http://www.raspyfi.com/wi-fi-on-raspberry-pi-a-simple-guide/


          Note that if you use wicd and static dns servers like OpenDNS, then you'll need to customize a bit from that article.  I can provide more help if you choose that path.


          My process to setup my RPi cards:

          1. sudo cp /etc/network/interfaces /etc/network/interfaces.orig
          2. sudo vi /etc/network/interfaces (if you don’t know vi, use nano)

           

          auto lo

          iface lo inet loopback

           

          iface eth0 inet static

          address 192.168.1.200

          netmask 255.255.255.0

          gateway 192.168.1.1

          network 192.168.1.0

           

          allow-hotplug wlan0

          auto wlan0

          iface wlan0 inet static

          address 192.168.1.201

          netmask 255.255.255.0

          network 192.168.1.0

          broadcast 192.168.1.255

          gateway 192.168.1.1

          wpa-ssid <<your ssid>>

          wpa-psk <<your pswd>>

           

          1. sudo /etc/init.d/networking reload
          2. ping your router (gateway) then some external address like www.oracle.com
          • 2. Re: WIFI setup not working
            Tmcginn-Oracle

            Hi Ed -

             

            Per this post, if you are using WPA2, you might try adding these lines:

             

            wpa-pairwise CCMP

            wpa-group CCMP

             

            Please let me know if this fixes it - I would really like to clean up my instructions!

             

            Tom

            • 3. Re: WIFI setup not working
              Eshneken-Oracle

              Thanks for the suggestions.  I'm starting to think the problem may be more basic.  I ran across this forum:

               

              Raspberry Pi &amp;bull; View topic - WiFi Issues ? Start here !

               

              and when I try to 'lsusb' when connected via the USB/TTY patch cable, I don't see the Wifi module reported.  I've plugged a USB mouse into both USB ports on the pi and they show up when I do a lsusb.  I've also tried to plug the Wifi module into my Windows 7 computer and don't see Windows recognizing it or attempting to load drivers.

               

              I'm starting to think I may just have a dead Wifi module.  I've posted to the Adafruit support forums -- unless they give me something else to try, I'm going to request they sound out a replacement Wifi dongle.

               

              Aside from just plugging it in, I shouldn't have to do anything else to enable the Wifi module, right?

               

              thanks,

              Ed

              • 4. Re: WIFI setup not working
                Tmcginn-Oracle

                Hi Ed -

                 

                Right - at least not the one that Adafruit sells with the "kit".

                 

                Tom

                • 5. Re: WIFI setup not working
                  stainsb

                  Just out of curiosity, how many USB components do you have plugged into the board?  I doubt it's the issue, but it doesn't hurt to check the following:

                   

                  1. Make sure you have enough power.  Many people have reported issues with too little power to the RPi.  I use a powered USB hub.  If you're just using a single 5.0V adapter it may not have enough power.  I use a 5.25V adapter specifically designed to help the RPi not suffer the aforementioned issue.
                  2. If you're using an external hub and have the wifi dongle plugged into it, make sure you have a good USB cables.  The cheap cables are just that.  I almost went out and bought a new RPi board the weekend before class started due to power issues and USB.  In the end, I tested a few cables and found out that the cheap ones weren't working and gave erratic behavior on startup.

                  Again, just a shot in the dark but perhaps useful.

                   

                  Brent S

                  • 6. Re: WIFI setup not working
                    Eshneken-Oracle

                    I got a new USB dongle from Adafruit and now I've been able to connect with no issues!  The original dongle was defective.

                     

                    Here is the /etc/network/interfaces file I settled on that works:

                     

                    auto lo

                    iface lo inet loopback

                     

                    iface eth0 inet static

                    address 192.168.1.200

                    netmask 255.255.255.0

                    gateway 192.168.1.1

                    network 192.168.1.0

                     

                    allow-hotplug wlan0

                    auto wlan0

                    iface wlan0 inet static

                    address 192.168.1.201

                    netmask 255.255.255.0

                    network 192.168.1.0

                    broadcast 192.168.1.255

                    wpa-pairwise CCMP TKIP

                    wpa-group CCMP TKIP

                    wpa-proto RSN WPA

                    wpa-scan-ssid 1

                    wpa-ap-scan 1

                    wpa-key-mgmt WPA-PSK

                    wpa-ssid "..."

                    wpa-psk "...."

                     

                    I don't broadcast my wifi SSID, hence I picked up some additional pointers from this blog entry:

                     

                    The Palmtree Initiative: How to setup a Raspberry Pi with a hidden network using a Edimax EW-7811Un

                     

                    What was also useful was generating a WPA2 passphrase using this utility:  wpa_passphrase "<Your Wifi SSID>" "<Your Wifi PASSWORD>"

                     

                    This allows me to not have to put my passphrase in a plaintext file.  This is not a big deal for a home project, but nice to know that option exists.