Setting up Wifi under Debian on Raspberry Pi

(These instructions are for the debian6-13-04-2012 image but they should be applicable to later versions as well. YMMV)

Step 1 – Edit your APT Sources

Before we start, you should edit /etc/apt/sources.list and include the ‘non-free’ section of the repositories since firmware blobs for wireless adapters are usually ‘non-free':

$ sudo nano /etc/apt/sources.list

Change:

deb http://ftp.uk.debian.org/debian/ squeeze main

to

deb http://ftp.uk.debian.org/debian/ squeeze main non-free

and issue:

$ sudo apt-get update

to refresh the package database.

 

Step 2 – Figure out which chipset you have

Now, plug your USB wifi adapter to one of the ports and issue: lsusb. You should see something along the lines of:

$ lsusb

...
Bus 001 Device 004: ID 0ace:1215 ZyDAS ZD1211B 802.11g
...

Okay, it looks like the chipset we have here is ‘zd1211′ (Have a look at http://wiki.debian.org/WiFi for a list of supported chipsets)

Let’s see if there are any firmware packages we can install to get this up and running:

$ apt-cache search zd1211

zd1211-firmware - Firmware images for the zd1211rw wireless driver

Sweet, let’s install that:

$ sudo apt-get install zd1211-firmware

We should be good to go now. Unplug the adapter, plug it back in again and have a look at the output of lsmod:

$ lsmod

Module   Size   Used by
arc      4764   2
zd1211rw 40444  0
mac80211 171628 1 zd1211rw
cfg80211 123084 2 zd1211rw,mac80211
fuse     49036  1

You should see mention of zd1211.

dmesg should also give you an indication whether things are loaded or not:

$ dmesg

...
usb 1-1.2: new high speed USB device number 4 using dwc_otg
usb 1-1.2: New USB device found, idVendor=0ace, idProduct=1215
usb 1-1.2: New USB device strings: Mfr=16, Product=32, SerialNumber=0
usb 1-1.2: Product: USB2.0 WLAN
usb 1-1.2: Manufacturer: ZyDAS
cfg80211: Calling CRDA to update world regulatory domain
usb 1-1.2: reset high speed USB device number 4 using dwc_otg
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
zd1211rw 1-1.2:1.0: phy0
usbcore: registered new interface driver zd1211rw
zd1211rw 1-1.2:1.0: firmware version 4725
zd1211rw 1-1.2:1.0: zd1211b chip 0ace:1215 v4810 high 00-1a-ee UW2453_RF pa0 -7---
...

Awesome, looks like the adapter is up and running! To see which networks are available, do:

$ iwlist wlan0 scan

…which should give you a list of wireless networks around you.

 

Step 3 – Configure adapter and WPA settings

One final bit left to do now: configuring our adapter. Before that though, we should make sure that you have wpasupplicant package installed since you’ll probably want to connect to a WPA secured network:

$ sudo apt-get install wpasupplicant

After that’s done, create a configuration file for it:

$ sudo nano /etc/wpa.conf

network={
ssid="YOUR-SSID"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="WPA-PASSWORD"
}

And reference this in /etc/network/interfaces:

$ sudo nano /etc/network/interfaces

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf

 

Step 4 – Conclusion

Restart your networking subsystem with:

$ sudo /etc/init.d/networking restart

If you have DHCP enabled on your network, you should see something along the lines of:

Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:1a:ee:00:b4:12
Sending on LPF/wlan0/00:1a:ee:00:b4:12
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 192.168.0.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.103 -- renewal in 40349 seconds.
done.

(If not, you will have to edit /etc/network/interfaces and manually specify your IP address/gateway etc.)

You can also issue dmesg again to see what’s happening under the hood:

$ dmesg

...
wlan0: authenticate with 00:26:f2:3f:XX:XX (try 1)
wlan0: authenticated
wlan0: associate with 00:26:f2:3f:XX:XX (try 1)
wlan0: RX AssocResp from 00:26:f2:3f:XX:XX (capab=0x431 status=0 aid=3)
wlan0: associated

Which means you should now be connected!

If it doesn’t work, well, have you tried turning it off and on again? :)

This entry was posted in Posts and tagged , , . Bookmark the permalink.

79 Responses to Setting up Wifi under Debian on Raspberry Pi

  1. Drew Fustini says:

    Thanks! Looks like the module is now included for my RTL8187-based 802.11g adapter. I’ll try it out tomorrow.

    afustini@lappy486:/mnt/debian_pi/lib/modules/3.1.9+/kernel/drivers$ find . -type d |grep wireless
    ./net/wireless
    ./net/wireless/rtlwifi
    ./net/wireless/rtlwifi/rtl8192cu
    ./net/wireless/rtlwifi/rtl8192c
    ./net/wireless/zd1211rw
    ./net/wireless/ath
    ./net/wireless/ath/carl9170
    ./net/wireless/ath/ath9k
    ./net/wireless/libertas_tf
    ./net/wireless/rtl818x
    ./net/wireless/rtl818x/rtl8187
    ./net/wireless/libertas
    ./net/wireless/mwifiex
    ./net/wireless/b43legacy
    ./net/wireless/iwmc3200wifi
    ./net/wireless/b43
    ./net/wireless/p54
    ./net/wireless/hostap
    ./net/wireless/wl1251
    ./net/wireless/rt2x00

  2. Pingback: New Debian release, Wi-Fi tutorial from Omer | Raspberry Pi

  3. thanks, very clearly presented!

  4. Freegiver says:

    Great article!

    Instead of using wpa.conf, try this (directly in /etc/network/interfaces):

    auto wlan0
    iface wlan0 inet dhcp
    wpa-ssid “NETWORK SSID”
    wpa-psk “NETWORK PASSWORD”

    • Omer says:

      Thanks, I didn’t know you could do that :)

      • Dutch_Master says:

        Mind it may impose a security risk, putting in your username and password in clear text into that particular config file (as it’s often a port of call for crackers, given that it contains a lot of info of your network)…. But making it read-only to the root user may throw up a few errors too :-( Best avoid it if you don’t know what you’re doing… ;-)

        Regards,
        Dutch_Master from the Linux Format forums :-)

        • freezerburn says:

          can you please tell me how this a security risk but putting the plain text in /etc/wpa.config is not a risk? i am using freegiver’s method as it is the only one working for me.

          • RV says:

            I’m not entirely sure and I don’t have access to a machine that I can check on at the moment but off the cuff, I think wpa.conf is safer because of file permissions – it’s read only to root. Could be wrong. Haha.

    • Kenneth says:

      Yes! it works for me.
      Thank you.

    • Andrew says:

      Hi I have 2 wifi networks one works find the other just would not work with the settings in the wpa.config. looking at a scan the wp which didn’t work seem to have some slightly different parameters…
      The only way I could get this to work was to put the ssid and psk in the interfaces file which made the all think work fine.
      I think this has something to do with the config of the Pairwise as it does not have CCMP as a parameter, I couldn’t figure the magic words needed for the wpa.config to make it work so by just putting it in the interfaces file it seems to automatically sort itself out….

  5. William says:

    Hi,
    Thanks, but could you do a WiFi tutorial for Fedora Remix?

    • Omer says:

      Sorry William, I am not familiar with Fedora Remix.

      (Maybe someone else reading this can recommend a resource?)

  6. Seth Baker says:

    I want to make my Pi an wifi AP
    I just bought a Netgear WNDA3200 USB wireless adapter. The only adapter that I could find that is both USB and uses Ath9k driver. It works out the box on Ubuntu. Anybody know if I’ll need to do anything to make it work with the Pi version of Debian?

    • Dutch_Master says:

      Perform the search for the wireless driver as outlined in the article for the Ath9k driver. If you find a match, it’s supported, install it as described above and you’d be done. If it’s not in the repository, see if you can find a driver elsewhere (perhaps the Ubuntu repo, although no-one guarantees you it’ll work) or, if everything else fails, try ndiswrapper with the Win-OS driver. But that should really be your last resort! (and I’m not sure ndiswrapper is ported to the ARM platform, so YMMV!)

      Regards,
      Dutch_Master from the Linux Format forums :-)

  7. Drew Fustini says:

    Darn – my RTL8187-based adapter wouldn’t work in either Fedora or new Debian (kernel module does load but lots of DMA errors right after and iwlist sees no APs). While it does work in my x86 Ubuntu laptop, it was a no-name from Amazon so going to try a Trendnet model with that chipset tomorrow. I know JamesH had luck with RTL8187 and listed it on eLinux wiki.

    Also, I had luck with IOGear an Asus 802.11n adapters using the r8712u driver in Fedora. So I plan to try to compile it for the new Debian image as it was unfortunately not included.

  8. RasPi sitesinde bir Türk’ ün adını görünce heyecanlandım biraz:) Pek yaygın olmayan bir board üzerinde geliştirme yapmış olmanız güzel. Teşekkürler. Başarılarınızın devamını dilerim. Bizim board’ daha elimize geçmemişken! Kolay gelsin.
    PS: I wrote in Turkish but I hope there’s no problem :)

    • Omer says:

      Tesekkurler Hakki, umarim kisa surede eline gecer seninki de!

      PS: That’s not a problem ;)

      • Mustafa Azam SEZER says:

        Şaşırmak bir yana gururlandım. Tebrik ederim sizi Ömer bey. Halen, aynı zamanda sabırsızlıkla, Raspi’me kavuşacağım günü bekliyorum.

        Kolay gelsin,

  9. Neil Smith says:

    Thanks for the howto. Very useful. It was slightly different to get my Netgear N150 (aka WNA1100) dongle working. Here’s what I did to get it going:
    lsusb shows it as:

    Bus 001 Device 006: ID 0846:9030 NetGear, Inc. WNA1100 Wireless-N 150 [Atheros AR9271]

    Unfortunately, the firmware required is in the squeeze-backports repo, so that needs to be added to the sources list. Edit the first two lines of /etc/apt/sources.list to read:

    deb http://ftp.uk.debian.org/debian/ squeeze main non-free
    deb http://backports.debian.org/debian-backports squeeze-backports main non-free

    Then update apt and install the Atheros firmware from backports:
    sudo aptitude update
    sudo aptitude -t squeeze-backports install firmware-atheros

    Finally, remove and re-insert the dongle and it should be working. Follow the instructions above to set up WPASupplicant and connect it to your network.

    • Omer says:

      Thanks for the info, Neil.

      This might come in handy for future Google searches on the subject :)

    • Alan says:

      Hi – I tried this with the the netgear N150 wna1100 and it all seemed to go as intended, but then it doesn’t work :( I’m also getting the mouse and keyboard occasionally freezing in xwindows.
      When I boot, it tries to do DHCPDISCOVER for wlan0 but gets no offers
      ‘iwlist wlan0 scan’ gives ‘no scan result’, and if I take the adapter out and plug back in then the same command says scanning isn’t supported
      ‘lsmod’ gives sensible looking results
      ‘dmesg’ seems to show it
      My wireless network is a netgear wireless g router with no security so I missed out the WPA settings but otherwise added in the same details for wlan0 to the /etc/network/interfaces file and I am assuming that the adapter ought to pick up the wireless g network – the adapter works fine on my ubunto x86 computer and sees the network with no probs.
      I’ve tried reflashing the sd card and repeating with same result
      The keyboard mouse and wifi adapter are all on a powered usb porthub and the raspi is powered by a ipad charger (I had power problems running off a 700mA charger). Also I note that I only have 192MB memory (I thought they were supposed to have 256? )

      Any ideas? (I am new to Linux and whilst I have an Ubuntu machine, it just works through the GUIs so I have not needed to do much with it)

      Thanks!
      Alan

  10. Sheeponmeth says:

    Hi,

    Did you try to use wicd-cli ?A very usefull connection tool :-)

  11. JQ says:

    Need to make a nice video

    • Omer says:

      Since it’s mostly shell commands, I think textual representation works better than a video.

      Do let us know if you produce one, though :)

  12. Pingback: Raspberry Pi ile tanışma vakti geldi | PC Extra Online

  13. Neil Stoker says:

    Great tutorial Omer – it’ll be one of the early things I try when my RPi arrives!

    I guess it’s something I’ll need to look at when I get it, but regarding the question asking about using the RPi as an Access Point, I presume that would require the wifi adapter to support master mode, right?

    I’ve been interested as I’m keen to try setting up something akin to this: https://help.ubuntu.com/community/WifiDocs/WirelessBroadcastSystem
    so I can easily set up mobile(-ish) device for distribution of documents / files stored on the RPi over wifi to visitors.

  14. I have a Sempre Wireless USB stick WU300-2 and had to build the r8712u kernel module to get it working. The module is in staging area of kernel, which is not shipped with the RasPi Debian image ATM.

    I described the procedure in my blog: http://www.t3node.com/blog/sempre-wireless-usb-stick-wu300-2-on-raspberry-pi/
    You can also download the kernel module there.

  15. steve cory ( aka fulburncams on raspi org site) says:

    Omer
    Thanks for the how to, I have a problem though as follows, can you help.

    I have purchased TP-LINK WN722N that the Wiki states works, and followed the Wiki install guide and but am unable to get the wifi adapter to work.
    1) I have checked the adapter in Windows 7 and it works fine.
    2) I copied the scripts as per the wiki notes, and updated the apt sources etc.
    3) my interfaces file is as follows :-
    # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
    # /usr/share/doc/ifupdown/examples for more information.

    auto lo

    iface lo inet loopback
    iface eth0 inet static
    address 192.168.0.222
    netmask 255.255.255.0
    gateway 192.168.0.1

    # The wireless interface
    auto wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa.conf

    4) When i plugged adapter into Raspi for the first time and typed iwconfig
    I got wlan0 device not found and subsequently there is no
    mention of wlan0 when i type iwconfig.
    5) I ran dmesg and some of output is as follows :-

    usb 1-1.2: USB disconnect, device number 12
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    ath: Failed to wakeup in 500us
    usb 1-1.2: ath9k_htc: USB layer deinitialized
    usb 1-1.2: new high speed USB device number 13 using dwc_otg
    usb 1-1.2: New USB device found, idVendor=0cf3, idProduct=9271
    usb 1-1.2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
    usb 1-1.2: Product: USB2.0 WLAN
    usb 1-1.2: Manufacturer: ATHEROS
    usb 1-1.2: SerialNumber: 12345
    usb 1-1.2: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
    ath9k_htc 1-1.2:1.0: ath9k_htc: HTC initialized with 33 credits
    ath9k_htc 1-1.2:1.0: ath9k_htc: FW Version: 1.3
    ath: EEPROM regdomain: 0x809c
    ath: EEPROM indicates we should expect a country code
    ath: doing EEPROM country->regdmn map search
    ath: country maps to regdmn code: 0x52
    ath: Country alpha2 being used: CN
    ath: Regpair used: 0x52
    ieee80211 phy133: Atheros AR9271 Rev:1
    Registered led device: ath9k_htc-phy133
    usb 1-1.2: ath9k_htc: USB layer initialized
    DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK

    Please can someone help.

    Many thanks
    Steve

    • I have same problem. I haven’t found a solution yet.

      • Josef Larsson says:

        The problem is: Insufficient current.

        I have exactly the same problem. One solution is to buy a self-powered USB hub (costly). There is another solution though, which I have tested. It only works if you are willing to occupy both USB ports of the Pi.

        You need:
        1) Male – female USB cable.
        2) Male – cable that you are willing to sacrifice.

        There was a male – female USB cable included with my wireless dongle. So I only needed 2).

        By slicing up both cables somewhere, you will find a red (+5V) and black (GND) cable. You will need to strip these and have them reliably connected. You could twin them and use them tape, but to be sure, I would recommend soldering and then tape for isolation. This way your USB dongle will draw current from both USB ports.

        Now you will have a 2 male -> female USB cable, which you can then use with your WiFi dongle. Solved all my problems. I use the TL-WN721N. Good luck!

        • Derek S (hobbyist) says:

          You could also just solder a usb for power and a usb for data on a normal usb hub. In my situation where I made mine all portable just got a second power source and plugged it into that. I have too many spare parts sitting around my house to have to worry about cost, otherwise I’d give you a ballpark.

  16. steve cory ( aka fulburncams on raspi org site) says:

    I have now sorted the problem in the original post by powering the wifi adapter with powered usb hub, but now i get .

    wpa_supplicant: /sbin/wpa_supplicant daemon failed to start

    when I run the command “sudo ifup wlan0″

    Any clues as to how to fix this. Many thanks
    Steve

  17. FinnDoggo says:

    Thanks Omer,
    Great tutorial and very clear to follow for a complete beginner.
    RasPi now connected on Ralink rt2870 after a few leasing problems with router.
    Running Freegiver’s ‘s short script associated first time to sort this, though after Dutch Master’s security warning, I reverted to your suggested /etc/wpa.config solution and it worked fine too!
    Many Thanks

  18. Mark Amos says:

    I attempted to use the process above to connect a net gear WG111v2 (RTL8187 chipset), installed the WiFi dongle and got the following dmesg (looks like it worked?)
    usb 1-1.3: new high speed USB device number 6 using dwc_otg
    usb 1-1.3: New USB device found, idVendor=0846, idProduct=6a00
    usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 1-1.3: Product: NETGEAR WG111v2
    usb 1-1.3: Manufacturer: NETGEAR WG111v2
    usb 1-1.3: SerialNumber: 000FB5B7296F
    cfg80211: Calling CRDA to update world regulatory domain
    ieee80211 phy0: Selected rate control algorithm ‘minstrel_ht’
    ieee80211 phy0: hwaddr 00:0f:b5:b7:29:6f, RTL8187vB (default) V1 + rtl8225, rfkill mask 2
    rtl8187: Customer ID is 0xFF
    Registered led device: rtl8187-phy0::radio
    Registered led device: rtl8187-phy0::tx
    Registered led device: rtl8187-phy0::rx
    rtl8187: wireless switch is on
    usbcore: registered new interface driver rtl8187

    But, when I do iwlist wlan0 scan I get:
    wlan0 Failed to read scan data : Network is down

    Any clues as to where I should look next (this is my first attempt at installing a wifi adapter on Debian.)

  19. Mark Amos says:

    Never mind – my mistake: I had the Netgear WG111v2 plugged into an extension USB cable to the RPi, instead of connecting through the powered hub…

  20. Pingback: my raspberry pi made it safe and sound | Junco Blog

  21. singul4r1ty says:

    Great tutorial; will wpa supplicant be required to connect to a WEP network? Thanks

    • electromaticboy says:

      WEP and WPA are different encryption protocols so the answer is no. If you are using WEP:

      $ sudo nano /etc/network/interfaces

      auto wlan0
      iface wlan0 inet dhcp
      wireless-essid NETWORKNAME
      wireless-key FEFEFEFEFE
      wireless-channel 11
      wireless-mode managed

  22. WDZaphod says:

    Thanks for this, simple and straightforward!
    Worked in the 1st try :-)
    Great tutorial!

  23. Peter Hothersall says:

    Great straightforward tutorial !
    I have now got my Tenda usb adaptor working ok so long as I use a powered hub.
    But, if I try and use it without the ethernet cable in first, the wifi does not seem to start.
    Anybody got any ideas ?

  24. thanks for your excellent help. Got my RaspberryPi working with a wifi dongle I bought for £5.00 from 7dayshop.

  25. Andy Jones says:

    Hi Omer,

    Thanks to the above posts, I manged to get my Belkin F5D7050 (V4xxx, which uses a zd1211-firmware driver set) to work with some difficulty using Wheezy Beta, but Wheezy 2012-07-15 seems much better:

    At the raspberry Pi prompt:
    sudo apt-get install zd1211-firmware

    sudo nano /etc/network/interfaces

    and added the following to the end of the file:

    auto wlan0
    iface wlan0 inet dhcp
    wpa-ssid YOUR-SSID-HERE
    wpa-psk YOUR-PASSWORD-HERE

    (I did see that there is a way to hash the PASSWORD, so it isn’t visible in Plain Text.)

    On a reboot, this fires up just fine (with an unhidden SSID, at least. I’ve not retried it Hidden yet).

    This was not the case with Wheezy Beta, which insisted on the WiFi hub being set to WEP on one Pi reboot, and then, having managed a handshake of some sort, the hub could be returned to WPA-PSK (but had to be kept unhidden), and the Pi Rebooted again, but once the lease period ended, the WEP to WPA-PSK needed performing again.

    A friend warned me that some hubs modify a text PSK towards upper or lower case (while still displaying it how the user defined it), so it can be worth trying a hex string instead of a text PSK.

    The dongle is working on one of the USB ports, and the wireless keyboard receiver is powered OK off the other, and it all seems to fit in under the 700mA of the PSU.

    Andy

    • kelxon10995 says:

      If you have your wifi set to be hidden, use the following under your wifi ssid/password: wpa-scan-ssid 1

  26. Pingback: Der Raspberry Pi Thread - Seite 18

  27. Maybe you should change “iwlist wlan0 scan” to “sudo iwlist wlan0 scan”! Googled 2 hours wondering why I can’t find any networks…

  28. Mike K, says:

    Tried for wep on RASPBMC (working for Debian Wheezy) , scans for network but does not join, DHCP client does not seem to join & network restart gets “…deprecated..” message.

    Interfaces is setup as where the key is the hex version of the 5 character key , starting to reach the point of giving up & waiting for RC4. Does anyone have any clues. Must use WEP as the router is a base station repeating.

    allow-hotplug wlan0

    auto wlan0

    iface wlan0 inet dhcp

    wireless-essid 3COM
    wireless-key FEFEFEFEFE
    wireless-channel 01
    wireless-mode managed

    wlan0 Scan completed :
    Cell 01 – Address: 80:1F:02:02:D1:48
    ESSID:”3COM”
    Protocol:IEEE 802.11bgn
    Mode:Master
    Frequency:2.412 GHz (Channel 1)
    Encryption key:on
    Bit Rates:300 Mb/s
    Quality=74/100 Signal level=55/100
    Cell 02 – Address: C4:3D:C7:C6:AD:D2
    ESSID:”3COM”
    Protocol:IEEE 802.11bgn
    Mode:Master
    Frequency:2.412 GHz (Channel 1)
    Encryption key:on
    Bit Rates:300 Mb/s

    sudo /etc/init.d/networking restart
    Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces … (warning).
    Reconfiguring network interfaces…Internet Systems Consortium DHCP Client 4.1.1-P1
    Copyright 2004-2010 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/

    Listening on LPF/wlan0/80:1f:02:4b:36:90
    Sending on LPF/wlan0/80:1f:02:4b:36:90
    Sending on Socket/fallback
    Internet Systems Consortium DHCP Client 4.1.1-P1
    Copyright 2004-2010 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/

    Listening on LPF/wlan0/80:1f:02:4b:36:90
    Sending on LPF/wlan0/80:1f:02:4b:36:90
    Sending on Socket/fallback
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3

  29. hibol says:

    Hello,

    based on this tutorial and many others that say almost the same things,
    I can’t reach the network. Or I can reach it but in a random way, and when I’m lucky enough to grab it, it lasts for some seconds then drops again.

    My wifi dongle is a D-Link Wireless N Nano USB Adapter DWA-131 (rev.A1)

    The module for this returned by lsmod is : rtl8712u

    When I scan the wifi using “sudo iwlist wlan0 scan” I can see all the cells around the house, including mine.

    And when I try restarting the interface, it says that this command is deprecated (sudo /etc/init.d/networking restart) and then it searches for DHCDISCOVERY with 255.255.255.255 on port 67 using different numbers after that, and then it said something like “unable to obtain a lease at first try. Exiting.”
    Or just “Failed” in red.

    One try over 30 maybe, it can grab an IP address and a lease at this point (DHCPOFFERS obtained), and then the “route”command returns me the right route to the Internet. And I can update the packages list etc. But for less than one minute because the connection drops after a moment.

    What may be wrong with my stuff ?!

    Thanks a lot.

  30. Rob P. says:

    Omer,

    Thanks for the tutorial, you’ve pointed me towards what I need, but I wonder if you could help me a little bit more?

    I want to say that I used dmesg to figure out that I have a realtek chipset (rtl8192cu, rtl 8192c_common and rtlwifi). I had to use a workaround to find this out because using lsusb with the dongle plugged in just caused the pi to hang.

    At any rate I have the updated firmware-realtek and wireless-tools, as well as wpa supplicant. Here are my problems:

    lsusb still just hangs.

    iwlist wlano scan returns something about scanning not being supported.

    Do you have any idea what I’m doing wrong, and how to fix it?

  31. AB says:

    Great tutorial but unfortunately that didnt work for me.

    Out of the box , wifi won’t work with the installed SSL package. To make it work , I removed openssl , removed wpasupplicant , then installed latest openssl from source , installed wpasupplicant again and rebooted.. then the wifi association worked !

  32. TCB13 says:

    Hello,

    I’m having hangs too with an Alfa AWUS036NHA (Atheros AR9271). If I try to boot the system with the card connected it just hangs up forever. However if I connect the card after boot everything works fine.

    Any tips?

    • Omer says:

      A power issue perhaps? Booting is a really power hungry process so try feeding the Pi through a beefier power supply.

      • TCB13 says:

        Hi,
        Thanks for the reply. Anyway, it was a power issue indeed. I hacked around an USB cable to inject power from the same power supply as the Pi and it’s working fine now.

  33. Heybear says:

    I also am having a problem in getting my wifi dongle up. (sic) The question I have is the ssid, is that the ssid of the router or the raspberry pi? Seems like you wouldn’t want to make it the router, as you may want to join another network.. but I’m a novice here. thanks.

  34. Pingback: OpenSource Security & Training» Monitoring | Availability StickyBit » Mit Raspberry Pi und Livestatus eine Nagiosampel steuern

  35. Nev says:

    Worked perfectly, thank you!

  36. Kiiii says:

    I had problem wit most new raspberry pi from july an asus wlan 10. Problem was no dhcpoffers and reason too low current from the usb. Worked when change to better usb hub

  37. keble says:

    Many thanks for freegiver’s solution – this worked for me whereas using wpa.conf did not.
    I’m using a tendata wifi

  38. hey there – thanks for posting this! I’m a Raspi hobbyist and relatively new to Linux.

    I got my Raspi joining a wifi network thanks to your instructions, but I was wondering if you knew how to create a local wifi network on the Raspi. The ideal would be to have it broadcast out static IP address that could be joined by another computer. Thanks much.

  39. Pingback: Successful Debian (6.0) installation « mongopi

  40. jfrmilner says:

    Thanks for the post, this got my pi connected with a D-Link System DWA-140 RangeBooster N Adapter in no time.

  41. kev says:

    When I do apt cache search rtl8188cus it doesnt find anything.
    This is my second wifi device I have gotten. Please help

  42. Pingback: Raspberry PI wifi with static IP address – Neil Baldwin's blog « Neil Baldwin's blog

  43. fromark says:

    Unless I’m missing something, does one need a wired connection to Internet to download updates before attempting to set up a wireless connection?

    • Omer says:

      That is correct.

    • Lawrence says:

      You can download the deb file from another computer manually and then transfer them over to the Pi and install them via dpkg if the Pi cannot be connected to the internet, but that would be a last ditch effort. It’s normally a lot more convenient to plug it into ethernet to download the packages.

  44. Pingback: Raspberry Pi Version B 512MB

  45. alex says:

    Can one configure more than one AP so that the Pi will pick the first it finds?

  46. Pingback: Raspberry Pi Shairport build instructions | Useful snippets

Comments are closed.