Turn Your Raspberry Pi Into a WiFi Hotspot with Edimax Nano USB EW-7811Un (RTL8188CUS chipset)

I’m writing this blog to help anyone with an Edimax Nano USB WiFi adapter (EW-7811Un) configure a Wireless Accesss Point. The main reason I wrote this post is because the Edimax was the first wireless adapter I ever recommended(turning a Raspberry Pi into a fully functional web server). I chose this adapter because it works out of the box, is cheap, and has a really low profile. But when I started the process of trying to turn my rPi into a WiFi hotspot, it seemed that every tutorial out there claimed that the Edimax card I had recommended “doesn’t support Access Point”.

Luckily for you and me, this is not the case.


Given the varied level of experience of my readers, this tutorial will start from scratch. If you already have your operating system running, skip forward as needed.

For this tutorial I am using Raspbian. I recommend it because it is an optimized version of Debian built specifically for Raspberry Pi’s. The last stable downloads can be found here.

To flash your SD Card, you will need to unzip the image and write it your SD card using Win32DiskImager. This tool can also be used to after our initial setup to create an image of our finalized implementation(very useful as a backup).


After the image is flashed, you can boot your device. At this point you can use your HDMI Cable/Mouse/Keyboard for your initial configuration, or you can use an SSH Client like Putty to connect. The default hostname, login, and password are as follows:

Username: pi
Password: raspberry

raspberry pi putty

For this tutorial, I will be using putty. On first boot, you will be prompted with a configuration tool called Raspi-Config. If the raspi-config doesnt load automatically, just enter the following command from the shell to get started.

sudo raspi-config


The settings I recommend you update are


The usual distribution images are 2 GB. When you copy the image to a larger SD card you have a portion of that card unused. expand_rootfs expands the initial image to expand to fill the rest of the SD card, giving you more space. By default, 64mb is reserved for the Graphical UI. Since we plan on using this as a WiFi Hotspot, we can reduce this to 32mb with the memory_split command.

After you finish your changes to the raspi-config, you should reboot your pi using the following command:

sudo shutdown -r now

At this point you have a fully functional linux server, but we still need to check our network card and setup our WiFi hotspot.


The first thing you need to do is make sure you have an existing wired connection to your rPi. After that, you need to install the following packages.

sudo apt-get install bridge-utils hostapd

The whole crux of the issue is that it is the apt hosted copy of hostapd that is not compatible with the RTL8188CUS chipset. But, thanks to the Edimax team, I’ve got a replacement hostapd binary to resolve this issue. This tutorial will not work without it.

To download and replace the installed binary version of hostapd we just installed, issue the following commands:

wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip 
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo mv hostapd /usr/sbin/hostapd.edimax 
sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd 
sudo chown root.root /usr/sbin/hostapd 
sudo chmod 755 /usr/sbin/hostapd

*Note, some people don’t like the idea of installing from untrusted 3rd parties, so if If would rather compile your own binary, you can download the realtek driver here . You will have to navigate to the ~/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8/hostapd and run a make, make install, then hostapd like i did above.

Bridge the Network Connections

Now that we have the proper hostapd installed, we need to create a bridge between our ethernet connection and our Edimax Wireless card. To do this, we need to edit our network interfaces:

sudo nano /etc/network/interfaces

To avoid any conflicts, you need to delete or comment out(#) any lines conatining wlan0 and then add the following text to bridge the connections, assuming your ethernet and wireless adapters are named eth0 and wlan0( use ifconfig -a to check)

auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0

The resulting file should look like this:

#loopback adapter
auto lo
iface lo inet loopback

#wired adapter
iface eth0 inet dhcp

auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0

Configuring Hostapd

Now that our interfaces are setup, we need to configure hostapd. To do so, create the following file

sudo nano /etc/hostapd/hostapd.conf

with the following contents:


Wrapping Up

We should be finished now, and afer a reboot

sudo reboot

you can test your configuration using the following command

sudo hostapd -dd /etc/hostapd/hostapd.conf

If it runs as expected, you can add it to startup by editing

sudo nano /etc/default/hostapd

and uncommenting and updating the following line


That should do it! I’m happy to answer any questions, just comment on this post. Thanks for reading!Raspberry Pi as WiFi Hotspot


  1. Mohammed

    Hey Dave thanks for this awesome tutorial, but when I try to connect to the new access point, it keeps telling me that an authentication error has occurred and it does not connect. What is going on?

    • dconroy

      Have you made any changes to the hostapd.conf? Are you bridging the connections?

      • Jack Barnhart

        Hey dave I can not find the Edimax anywhere, but I bought a G54/N150 Wifi USB Micro Adapter. It is made by NetGear. Will this still work?

    • Mohammed

      never mind.. a reboot fixed the issue

    • Is there any way to have it use WEP or no encryption? I’m trying to set this up as a hotspot for my DS.

    • Dennis Eckert

      Hello sir,

      Did you change the address as —

      http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip returns bash error of no such file or directory. I did have a wget in front of it but I’m missing something about how to type in this e-mail form. I tried to paste into it netsurfer browser but won’t support pasteing. lsusb reports my adapter (opurchased from AdaFruit) as 0bda:8176 and RTL8188CUS.
      Re getting the zip file, I first pasted from your wev site the download link and it did not work. then I handtyped it in and still reports no such file or directory.

      • It looks like you left off the “wget”.

        Don’t use a browser.

        Run the command beginning with “wget” on your Pi

  2. Dave you did an awesome development job! I’ve been struggling with getting PiUi up and running, because of the the Realtek WiFi chip compatibility challenge. Tried several versions of the web server with no luck, but yours ran first time! Nice job implementing the Realtek drivers properly.

    And PiUi runs flawlesly on top of your server. If you haven’t, you should check it out. A great way to set up platform-independent remote application control.

    • dconroy

      I hadnt heard of it, thanks. I’ll check it out. Glad my post could help you…


    • dconroy

      Finally got around to running PiUi, what a great little script. Now my mind is really racing, thanks!

  3. I tried this and I got an initialization error on the driver. It stated the following:
    “Could not set interface wlan0 flags: Operation not permitted.”
    I am running as root so this shouldn’t be a permissions problem ­čśŤ

  4. The exact error I’m getting is this:

    root@raspberrypi:~# hostapd /etc/hostapd/hostapd.conf
    Configuration file: /etc/hostapd/hostapd.conf
    Could not set interface wlan0 flags: Operation not permitted
    ioctl[SIOCSIWMODE]: Operation not permitted
    Could not set interface to mode(3)!
    Could not set interface to master mode!
    rtl871xdrv driver initialization failed.

    • dconroy

      Can you check to see if your wireless card is interface wlan0 by running the command ifconfig?

    • What version of hostapd are you using? For RTL8188CUS chipset you need the exact version of hostapd like mentioned in this article with the download link as the standalone hostapd does not support master mode on this chipset however the chipset has this mode.


  5. Hi Dave, thanks for the great guide. I’m using the edimax and pi as a stand alone AP for my van so no need for the bridge.

    Everything works great but the AP is only working in 802.11b mode. When I specify hw_mode=n or g, hostapd won’t start so I’m guessing it’s the new driver? Any ideas?

    • dconroy

      can you post your hostapd.conf?

    • dconroy

      Do you get any error messages? Could be extraneous white spaces?

      • At work, but a quick update… hw_mode=g works now, when i specify hw_mode=n, it does spit out an error about “n” not being valid, can’t remember the exact error.

        I used your hostapd.conf from above with different SSID and pw. The only other change I made was to comment out the br0 line since I’m not using bridging, just stand alone AP.

        • dconroy

          try adding the line


          • I’ll try that out, thanks!

          • I have exactly the same issue! Adding the IEEE80211n=1 lne did not work for me…can anyone confirm that they actually get n speeds?

          • set a # before hardwaremode=n and enter ieee80211n=1 instead

  6. got your link from a raspberrypi forum user. after trying the adafruit tutorial and a few diff hostapd versions, bingo! your tutorial had my Pi bridging in less than 30min. i was only needing a bridge AP anyways for my home net.

    i’m using the LB-Link USB adapter, model BL-LW05-AR5. ‘lsusb’ lists the driver as Realtek RTL8188CUS, in case any other users find that helpful.

    appreciate your tutorial!!!

    • dconroy

      Glad the tutorial could help, I spent days trying to get it work the first time around! And thanks for the tip.

  7. Thx a lot saved me from buying a new wifi-adapter.
    Nice Tutorial, works fine, pretty good work.


  8. Kartik

    This worked as long as my Pi was connected to the router which provided DHCP services. However, If I connected the router directly to the modem (Time Warner), this procedure would not work. I followed the instructions in this page and used the hostapd application and the hostapd.conf from here. I did not bridge network interfaces and used udhcpd and iptables.

  9. Hi there, I was wondering if all of this is isolated to the operating system that it’s configured on? I have a spare 4GB SD card and I don’t want to change the settings I have on my primary Raspbian SD card. If I made the 4GB card primarily a Hotspot card, that won’t affect how my 32GB Raspbian card deals with RAM and wifi, will it?

    • dconroy

      Hello Nick,you are correct it is isolated to the card.

      You could install this on your 4gb card and just swap it in and out with your 32gb card as neeeded.

      Or, you could always buy another Pi! I’ve got 6 now!

      • Hey, I finally got my pi out to try this out. However, the first time I tried connecting, my device (an Android phone) was stuck on authenticating and eventually ignored the network due to ‘poor connection’. I turned on DLNA auto-ip and was able to connect, but that assigned a 169.254 address to my phone, whereas all other devices including the pi have 192.168 addresses. None of my internet applications work, although it says I’m connected with full bars. Any idea what the problem could be?

        • 169.154 means you aren’t getting an ip. See if setting up on any connected device works. If so, make sure your DNS is working on the pi or whatever device that is providing your pi Internet


          • DNS is working on the router, and I tried a few different devices, all of them have the same problem. My hostapd.conf is identical to yours, minus a change in password and network name. I also tried changing the channel, but to no avail.

  10. Does anyone know what sort of range you get with this wifi? Could users in the floors above still get a decent signal or do you need to be pretty close to to Pi to get a strong signal?

    thanks in advance

    • dconroy

      I as able to get strong signal in my basement with this running in my kitchen directly above me. I wouldnt push it further than that. If you want a better range, I’d suggest getting a wireless card with an antenna and using a powered USB hub.

      • Richard Wenner

        A cheap passive option is to place the WiFi device at the focus of a microwave dish – either directly or using a very short cable.

  11. Dave,
    It worked like a charm. I am using a USB WiFi model Belkin Surf N150 and I needed desperately an AP based on the Raspberry.
    Thank you for the _great_ tutorial.


  12. Hi Dave thanks for the tutorial , very good job . In my Raspberry it works fine as Wifi Hotspot , the only issue I have is that the board now doesn’t responde at ping command and also ssh is not responding , bat the Hotspot works fine , remote client can connect to internet.
    How is it possible this issue ?
    Thanks in advance.


  13. Great work and write up! Works flawlessly on the first try. I’m using an Edimax 7612UAn V2, but I believe it has the same chip as the 7811Un. Anyway wholeheartedly recommended, only the range could be somewhat better, even with the antenna of the 7612UAn and using a powered USB hub, but for my purpose I can’t complain. Thank you Dave!

  14. Ulrich Baustian

    The signal quality is excellent, but it accepts neither the password I have given the raspberry, nor the password of my router. Any recommendations?

    • Ulrich Baustian

      I have found the password in your hostapd.conf:


      Now everything works fine.

  15. malcolm dick

    Worked great for me. Thank you very much.

    Question: Would it be possible to use 2 edimax USB dongles – one as an AP and the other to connect to a WiFi hotspot?
    The reason this would be handy is when I travel with a group, we have many devices to connect but many Hotspot services and Hotel wifi limit the number of devices you can connect to 1.

    • Chris Thomas

      I’d also be interested in doing the same thing!

      • malcolm dick

        Hey I had a play and got this going!
        What I did was:
        – Plugged both Edimaxes into the 2 USB ports on the Pi
        – Configured the Pi for medium overclocking in the Noobs setup (Raspbian). It didn’t work without this

        – Changed /etc/network/interfaces to include this

        bridge_ports wlan1 wlan0 #changed eth0 to wlan1
        allow-hotplug wlan1
        auto wlan1
        iface wlan1 inet dhcp
        wireless-essid xxxxxx #the public AP

        – Added the DHCP setup as per Dave’e earlier link

        Only bummer is having to change the essid when you move to a different hotspot. Probably needs a little web page to do this for you.

        • I am experiencing an issue where I have both wifi adapters running on boot, one of them hosting the access point and the other successfully connecting to my router. Whenever I try to access the AP at that time the connection to my router drops and I can access the local webserver only. Could you please give some advice on why wlan1 stops working after a connection to wlan0? Here is my interfaces file:

          auto lo

          iface lo inet loopback
          iface eth0 inet dhcp

          allow-hotplug wlan0
          iface wlan0 inet static

          bridge_ports wlan1 wlan0

          allow-hotplug wlan1
          auto wlan1
          iface wlan1 inet manual
          wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
          iface default inet dhcp

          • If I ssh the Pi from the access point and type wpi_cli reconnect it auto selects wlan1 and connects it back to the internet. Is there a reason that it auto disconnects when I connect to wlan0 from any device?

  16. This tutorial is a good starting point! Unfortunately, the hosted.conf file leaves the Edimax adapter running at the slowest possible speed. In order to get the full 150Mbps performance, I added the following to hostapd.conf:


    Depending on your channel, you might need to use [HT40-] rather than [HT-40+]. Now when I run ‘iwconfig’ it shows me that the bit rate is 150Mb/s rather than 11Mb/s.

    FWIW, I tried a bunch of the other ht_capab options and found that the following DO NOT work with the EW-7811Un: [RX-STBC*], [DELAYED_BA], [SMPS-*], [GF].

    • Hi ScottS,

      i also have the performance problem.
      So i have added your suggestion to the hostapd.conf but the best connection i get is 54Mbps

      Can you give me a hint?

  17. MagicPi

    Hi Dave,
    thanks for this great Tutorial, but how can I disable the bridging?

  18. Jack Saunders

    Hi, i have set this up and its working great, i also have set up a VPN tunnel using openvpn, what’s a simple way to use that internet connection with the wireless access point?


  19. Hello Dave,

    thank you very much for that cool description. It works well with ethernet to wlan adapter.
    My qustion is, is it possible to make a oure WiFi hotspot? Do I need two wlan adapters or is it possible with just one wlan adapter and what do I have to change in the configurazions?

    Thank you very much in advance.

    With kind regards


  20. Rob Steenvoorde

    Thanks for the tutorial, it’s working perfectly!

  21. Scott Stephan

    Hey Dave!,

    Great tutorial, but I’m bumping into what feels like a simple error. WHen I try to run the hostapd.conf, I get this error: “invalid/unknown driver ‘rt1871xdrv”.

    I’ve run through the whole install off your website twice now and still getting the error- Any idea where I might have mucked it up? I didn’t get any errors during the process

    • dconroy

      Hello Scott, before we debug any further, are you sure your wifi card has the RTL8188CUS chipset? This is a very specific tutorial for that hardware

    • Virgilol

      Scott: Edit your hostadp.conf, in driver=rtl871xdrv, it’s not rt1, it’s rtl. A “l” (letter), not a “one”.

      • Trav Easton

        Thank you very much. This was the exact error I was having, I even checked it twice and didn’t pick up my one/L mistake.

      • olddosman

        Well spotted Virgilol! I had the same typo. Excellent tutorial Dave – now my Pi will be appreciated by the family when we visit wifi less relatives at Xmas!

  22. Hi! Great tutorial! But if I want to use the wifi dongle only as Hotspot with a dchp server and not with the bridge option? I would use it on my car and I haven’t the lan plugged into

  23. Hi Dave. Greate tutorial. Would this also work on a normal Debian. With the driver solution?

  24. Hey Dave,

    Great little tutorial. I’m getting the following error though:
    random: Trying to read entropy from /dev/random
    Configuration file: /etc/hostapd/hostapd.conf
    Could not read interface flags: No such device
    ioctl(SIOCGIFINDEX): No such device
    rtl871xdrv driver initialization failed.

    I’ve tested the edimax in other Windows machines and it does work but it doesn’t look like its been recognized here. I’m pretty new when it comes to linux – any suggestions? PS I’m using the Shairport raspberry pi image from here as my base:


  25. Hi. This post is great, but I am reaching my point of frustration. Let me start by saying that I tried the standard hostapd package, and making/compiling my own realtek drivers, and third try is using your package. My problem is always the same: I get the proper hostapd.conf file, i’m not bridging interfaces but rather using a dhcp server listening on wlan0, and I am able to start hostapd with hostapd -dd /etc/hostapd/hostapd.conf.
    Furthermore, the SSID is broadcasted and I can see it with my cellphone, laptop, kindle fire, you name it.

    I’ve tried many clients and they simply can’t connect…. the client hangs there for a bit, tries to connect, and times out. Some call it an “authentication error”. Needless to say, I’ve tried with WPA2, WPA, and even none (I actually want it Open).
    My hostapd.conf is as simple as:
    [root@pi ~]# more /etc/hostapd/hostapd-mini.conf

    The -dd option is not showing me anything other than:
    wlan0: Setup of interface done.
    Wireless event: cmd=0x8b15 len=20
    Wireless event: cmd=0x8b15 len=20
    Wireless event: cmd=0x8b19 len=8

    And I have no clue what those are….

    Any help is greatly appreciated…. I feel like I am so close to it.

    • I am having this exact same problem. Trying to connect with wpa_supplicant leaves it in a loop of ‘Trying to associate’ and ‘Authentication timed out’.

      Doing iwlist wlan0 scan on another machine shows the access point information all looks sane (i.e. no different than any other wpa access point)

      dmesg shows no errors. I get a similar output from hostapd.

      I am also not using a bridge, and have dnsmasq listening on wlan0. Ill check to make sure there isnt some bug requiring it to need a bridge interface, but Im almost certain that wont work.

      • Can I confirm that you’re using kernel 3.6.11+?

        I tried the rtl_hostapd_2G.conf from the realtek package (which looks like it hasnt been updated since kernel 3.0.8?) and same problem, no dice.

        I ran strace on hostapd and it looks like it goes into a loop of timeouts waiting for data from something. lsof|grep hostapd doesnt say anything that helps me.

        strace output snip:
        select(8, [5 6 7], [], [], {0, 0}) = 0 (Timeout)
        gettimeofday({1377978723, 891003}, NULL) = 0
        gettimeofday({1377978723, 893062}, NULL) = 0
        gettimeofday({1377978723, 894911}, NULL) = 0
        select(8, [5 6 7], [], [], {9, 989530}) = 0 (Timeout)
        gettimeofday({1377978733, 897005}, NULL) = 0
        gettimeofday({1377978733, 897304}, NULL) = 0
        gettimeofday({1377978733, 897615}, NULL) = 0
        gettimeofday({1377978733, 897902}, NULL) = 0

        • dconroy

          Yes to 3.6.11+

          • It was my fault. I skipped the part about bridging, which had the bit about removing /etc/network/interfaces entries. wpa_cli on the pi was fighting with hostapd. I can almost guarantee thats the problem with the previous poster.

            I did however find this in my digging:
            and was able to get the standard hostapd working in at least open mode by replacing the kernel modules shipped with rasperian with standard ones.

            Thanks again for the tutorial, and good luck to everyone else.

          • Bill, I’m glad you got it working. I try to keep up with the comments, but this blog post alone has 60!

            Thanks for sharing your fix as well.

  26. Charles Krinke

    Dear Dave:

    I wonder if you could expand on compiling the special hostapd and the changes Realtek made to this package. I am working on a powerpc project using the Edimax EW-7811Un as opposed to my Raspi right now and need to understand the cross-compilation a bit.

    I normally expect to define ARCH=powerpc & CROSS_COMPILE=powerpc-linux-gnu- and move forward, but this Makefile does not respond to CROSS_COMPILE or ARCH.

    I am hoping you can help me gain understanding of how to use this Makefile to compile a powerpc binary and possibly what some of the changes made by Realtek to hostapd and wpa_supplicant are.

    Thank you kindly, Charles

  27. jyoung383

    Thanks Dave! this has got me connecting to my pi very easily. I have 1 modification i would like to make and after days I am still stuck. I want to be able to connect to my pi hotspot without the pi being connected to the internet with an ethernet cable. whenever I try to connect with no cable attached it wont connect. I don’t need passthrough. basically I have webiopi running on the pi and want to connect to that server wirelessly, no internet access is needed. thanks for any help you might have.

    • If you just want an access point without a bridge, after following Dave’s instructions, the /etc/network/interfaces file can be changed to something like:

      auto lo

      iface lo inet loopback
      iface eth0 inet dhcp

      allow-hotplug wlan0

      iface wlan0 inet static

      This works for me. In my case I also setup raspbian with a DHCP server by installing udhcpd, so clients use this to get an address, but I think static addresses for clients will also work.

  28. GREAT JOB!!! THANKS A LOT for this tutorial man, know I’m navigating througth r-pi. I’ve been tried to make this for a few days without success because the way to make the brigde doesn’t worked correctly. With your infromation about this I can make it works!!!
    I Created an open wireless network so I commented the lines about WPA encription and I used a diferent wireless adapter with a rt5370 driver, to make a the configuration in order to work this adapter I changed the driver line in hostapd.conf too by the next line:

    I have a question: I need to install something more to make a hotspot captive portal but when I tried to ping something the response is:
    ping: unknown host xxx.xxxxxxx.xxx

    So do you have any sugestions?

    Great & Thanks again dude!!!!
    Grettings from Mexico!!! :p

  29. Thanks for writing this up so clearly.

  30. So when I go to test using the command sudo hostapd -dd /… My pi will launch into the whole thing

    Using interface wlan0 with hwaddr 80:1f:02:7e:6f:ab and ssid 'Win32BlasterWorm'
    Deriving WPA PSK based on passphrase
    SSID - hexdump_ascii(len=16):
    57 69 6e 33 32 42 6c 61 73 74 65 72 57 6f 72 6d Win32BlasterWorm
    PSK (ASCII passphrase) - hexdump_ascii(len=12): [REMOVED]
    PSK (from passphrase) - hexdump(len=32): [REMOVED]
    random: Got 20/20 bytes from /dev/random
    Get randomness: len=32 entropy=0
    GMK - hexdump(len=32): [REMOVED]
    Get randomness: len=32 entropy=0
    Key Counter - hexdump(len=32): [REMOVED]
    WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
    Get randomness: len=16 entropy=0
    GTK - hexdump(len=32): [REMOVED]
    WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
    wlan0: Setup of interface done.
    Wireless event: cmd=0x8b06 len=8
    Wireless event: cmd=0x8b15 len=20
    wlan0: WPA rekeying GTK
    WPA: group state machine entering state SETKEYS (VLAN-ID 0)
    Get randomness: len=16 entropy=0
    GTK - hexdump(len=32): [REMOVED]
    wpa_group_setkeys: GKeyDoneStations=0

    and then it enters this loop that says

    wlan0: WPA rekeying GTK
    WPA: group state machine entering state SETKEYS (VLAN-ID 0)
    Get randomness: len=16 entropy=0
    GTK - hexdump(len=32): [REMOVED]
    wpa_group_setkeys: GKeyDoneStations=0
    WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)

    and it will just repeat through this loop over and over, any suggestions on were to look? I’ve tried reading through the comments to see if anybody was having a similar problem but it appeared that nobody was, (I could be wrong)

    there is a lot more above what I gave, but most of that seemed ok, I noticed it said something about wireless event and then gave some kind of number but I couldn’t find anything that was much help on what those numbers mean

    any help to get me going in the right direction would be greatly appreciated

  31. Have you ever used hostapd with open ports? I am trying to use it on a pi to make a portable server that i can use to move files between two computers for a club project.

    Thanks for any help.

    Great tutorial by the way, worked perfectly.

  32. Made my day! …or Night.
    Perfekt for me to take one pi to my working place.
    Thanks a lot!

  33. Hi Dave,

    does this also work with raspbmc?

    Thanks to you!

  34. Dave or anyone else who may know – if I used this solution as a wireless repeater like someone suggested by using two WiFi dongles, do you know if I can broadcast a SSID same as what I’m consuming or connecting to, ie my primary router’s SSID would it work OK, like other wireless repeaters do with two physical adapters or one virtual and one physical like dd-wrt?


  35. Hi Dave,

    I am using a recent release of raspbmc, which is based on Raspbian, but possibly there are some differences that stops this working for me…

    The first thing was that I found the original /etc/network/interfaces was empty, although it did exist.

    When I make this file look exactly as you mention above (starting “#loopback adapter” and ending “bridge_ports eth0 wlan0″), on reboot, eth0 does not come up. Same result with just the three lines in the box right above the full version.

    I can issue “sudo ifup eth0″ though, and my eth0 network comes back up, and gets its IP address from a DHCP server.

    I tried adding “auto eth0″ to the file, but that doesn’t make it work at boot either! Only if I set the file back to being empty does it seem to start the eth0 network on boot.

    Since the “interfaces” file is empty, there must be some configuration elsewhere…

    It looks like the config is in /etc/NetworkManager/… since I found some relevant config files there and since https://wiki.debian.org/NetworkManager mentions some interaction information about the “interfaces” file.

    The “sudo hostapd -dd /etc/hostapd/hostapd.conf” step showed some signs of life (AP was visible but immediately disconnected), but I need a system with a working network at boot before I can make any permanent changes.

    Do you think it is “NetworkManager” that is causing this, and do you have any suggestions on how to get it working? (My config is nothing unusual; it is just eth0=wired Ethernet and wlan0=Edimax EW-7811Un USB dongle).


    • Hi Tim,
      I’m trying to do the exact same thing with the same components and raspbmc. If you found a solution, can you share it?

      • Sure. I did a bit of digging:-

        * raspbmc does use NetworkManager [http://forum.stmlabs.com/showthread.php?tid=5495].
        * NetworkManager will not manage any interface mentioned in /etc/network/interfaces [https://wiki.debian.org/NetworkManager], although if you set “managed=true in /etc/NetworkManager/NetworkManager.conf”, it will “handle” that interface [https://wiki.debian.org/NetworkManager] (not sure what “handle” means exactly).
        * It’s possible/likely that eth0 was not coming up because mentioning it in /etc/network/interfaces meant that NetworkManager stopped handling it, as a result.
        * NetworkManager had support for “AP-mode Hotspot” added in version 0.98, released in February 2013 [https://projects.gnome.org/NetworkManager].
        * raspbmc network settings are configured using the XBMC UI and are stored in /home/pi/.xbmc/userdata/addon_data/script.raspbmc.settings/settings.xml [http://forum.stmlabs.com/showthread.php?tid=1792].
        * It looks like those settings.xml are used to update the NetworkManager configuration and there is a rasbpmc script to set up networking (so possibly it is responsible for updating the NetworkManager configuration) and the following will list the available options when run as user pi: “python /scripts/nm-update-network.py -h” [http://forum.stmlabs.com/showthread.php?tid=5495].

        One possible strategy would be to look into the support for bridging networks that was added to NetworkManager and extend the nm-update-network.py script to add the extra options.

        It’s unlikely I’ll get time to do this myself. Anyone brave enough and who finds the above helpful, please add a comment here with further info – thanks!


  36. Christian

    it works fine. But what i have to do to make it undo.
    At the Moment i can start the AP, but after a reboot i am not able to connect to my ohter AP. My Wlan device is not present…

    please help !!!

  37. Great job, Dave!
    And the tutorial is perfect.
    Thanks a lot !

  38. Hi Dave,

    I have an Alfa 1 card for wifi, how do I know what’s the right driver that I need to add in hostapd.conf?


  39. Hi Dave and greetings from France.
    Thx a lot for your hostapd file for the Edimax Usb wifi key.
    I wanted to make the onion router prject as described in the last “Linux & Dev mag” and of course had the problem when I tried to start the hostapd service.
    But I still wonder why we had this problem with the Edimax Stick. The tuto was based on a usb wifi key sold by adafruit. I checked the chip and the Edimax seemed to use the same. So bought it at Amazon (sending costs from UK were too expensive for the adafruit model). I could have bought a usb wifi adapter by PI HUT at Amazon which was cheaper but some people said that the chip used was varying, so I didn’t want to take that risk.

    Anyway, your Hostapd solved my problem and I could connect to internet with a windows Phone and an Android device without any trouble.
    Second step will be to add the TOR :)

    Just a question. Is there a risk that a dist-upgrade could update or replace the current Hostapd file and break my “toy” by the same way ?


  40. Hi Dave,

    the Edimax dongle always was my favorite wifi adapter, bad sadly it doesn’t work in wifi access point mode (I thought).
    Now I tested your replacement hostapd binary in my little robot project (PiBot-B). to my surprize: it works fine without the need to change anything else.

    Thanks a lot!

  41. hello,
    I have the WL-700-N usb wifi of Synalogic, and has the chip RTL8188CU …. is it the same chip as the RTL8188CUS? ….
    I do not run the drivers ….
    The problem:

    random: Trying to read entropy from /dev/random
    Configuration file: /etc/hostapd/hostapd.conf
    Configure bridge br0 for EAPOL traffic.
    ioctl[SIOCSIWMODE]: Invalid argument
    Could not set interface to mode(3)!
    Could not set interface to master mode!
    rtl871xdrv driver initialization failed.

  42. Hello,
    it work fine, thanks Dave.
    is it possible to limit access to a single wireless connection?
    Thank you

  43. Larry Dighera

    Thank you very much for reccommending the Edimax EW-7811Un USB WiFi adapter for Linux networking. I’m running Arch Linux on a Raspberry Pi, and had been struggling to make a D-Link Nano DWA-131 A1 (and others: Edup EP-N5808, …) work reliably for months. Switching to the EW-7811Un enabled wireless connection pronto!

    Best regards,

  44. Thank you so much , I try it for a long time with RTL8188CUS so now I can go to next step (Thank you so very much)

  45. Infinity580


    Your Tutorial dosent works, i have the same edimax w-lan stick but my netbook cant connect and i dont get a message or eror.

    • its probably the dns server. reboot the dns after hostapd starts and I bet you will connect.

  46. Dougie Lawson

    Thanks so much for this. I downloaded
    RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911 from the Realtek site, built the hostapd version in that package and it just works.

    I’m using a powerline for the ethernet but my new AP is running.

  47. TeaYoung Kwon

    Thank tutorial

    I want to use hostapd without eth0.
    So has the following changes.
    / etc / network / interfaces
    bridge_porots wlan0

    The connection. However, only the first few seconds of the connection.
    I isolated network between the two and I want to transfer files wirelessly.

    two isolated without eth0 in order to configure the network, what should I do?

    thank you

  48. Hello,
    I used Edimax EW-7811Un 802.11n. I could manage hostapd recompilation. Everything is OK. I’ve setup isc-dhcp-server as below

    # cat /etc/default/isc-dhcp-server


    root@rpikhuong:~# cat /etc/dhcp/dhcpd.conf
    ddns-update-style none;
    log-facility local7;
    default-lease-time 600;
    max-lease-time 7200;
    option subnet-mask;
    option broadcast-address;
    #option routers;
    #option domain-name "raspberrypi.com";

    subnet netmask {

    when i tried to connect to the RPI access point from my android phone or my ubuntu by inputing the password above. But both devices can't receive IP address. It seems DHCP daemon couldn't provide IP address via wlan0 or I did somemissing.

    I've tried to use tcpdump on wlan0 of RPI but I didn't see any package sent from ubuntu machine/android phone.

    nm-tool on ubuntu machine represented as below

    - Device: eth1 [Pi_AP] --------------------------------------------------------
    Type: 802.11 WiFi
    Driver: wl
    State: connecting (configuring)
    Default: no
    HW Address: 70:F1:A1:DF:58:14


    Wireless Properties
    WEP Encryption: yes
    WPA Encryption: yes
    WPA2 Encryption: yes

    Please advise.


  49. Hi. Thank you for the tutorial. I am trying to set my eth0 connection with a fixed IP, but as soon as I do that, I lose the bridge. I no longer have access to the internet via my tablet. I changed the line

    iface eth0 inet dhcp


    iface eth0 inet static

    It also happens as soon as I input:

    sudo ifconfig eth0

    Any hints? Does it need gateway information?

  50. Thanks you so much for your instructions.
    They worked out of the box.

  51. Hi! Thanks for the guide, very well written. After the reboot I can’t connect via ssh to my raspberry. (I use mobaxterm). Any ideas?

  52. Hi
    This tutorial seems simple and great, but it does not work with me :(
    I explain : I bought this adapter on Adafruit with my Pi [http://tellu.re/HYTODq] and I’m trying to configure an AP but I can’t.
    I did everything but I don’t see my WiFi network on my mobile devices. Another thing is my Pi is connected through Ethernet to my box which is also on 192.168.0.x, how to change it ? Because I did all the steps but when I rebooted (at the end), the system said me his IP adresses were (on the eth0) and (on br0). While I was applying what was written, I could ping the Pi and control it via SSH from my laptop but now I can’t.
    Can you help me please ?

  53. hi.great tutorial.
    can you help me?

    i want to use the edimax as “access point”. no bridging. ethernet should will be use only to make some updates.
    only an ap to connect with my iphone and control some gpios over an php website.

    how i’ve change the sudo nano /etc/network/interfaces?

    • Hey need the same.

      No bridging, only AP to connect my mobile deviced to the web server running on my RPi.

      Is it enough NOT to install bridge-utils and NOT to add the bridging lines to config?


    • Francisco

      I need exact the same thing, do you know how to do it?

    • Thanks, Dave, for the great tutorial. I couldn’t get isc-dhcp-server to work, but with udhcpd I was able to establish a connection and get a lease with my Android (v.4.0.1) phone. I didn’t enable bridging, because I don’t believe I need it for what I’m trying to do (?)… which is: just connect to the Pi’s wifi with the phone and get the bash prompt. IOW, I want to ssh into the Pi with my phone… IOW use the phone as the screen, keyboard, and mouse for the Pi. Using the android app, JuiceSSH, I was able to get onto the Pi over the wired connection, but not via the Pi’s access point. Does anyone know what I’m missing?

      I think a few other people are trying to do pretty much the same thing.


  54. Hi Dave,

    thank you very much for you good tutorial. After the setup of the WAP I have some trouble installing TOR on my Raspberry Pi.

    Could you please recommend any tutorial that explains how to setup TOR?

    What is particularly difficult for me is, I guess, this, because there is no IP number now:

    “wlan0 Link encap:Ethernet Hardware Adresse 44:33:4c:74:31:04
    RX packets:6 errors:0 dropped:0 overruns:0 frame:0
    TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
    Kollisionen:0 Sendewarteschlangenl├Ąnge:1000
    RX bytes:0 (0.0 B) TX bytes:10365 (10.1 KiB)”

    Thank you very much for your kind help in advance!

    Kind regards :-)

    • I have the same problem. Anyone have a solution?

    • I can’t talk to the Tor setup, but I got wlan0 on the Pi to have a static IP address with this in /etc/network/interfaces:

      allow hotplug wlan0
      iface wlan0 inet static

      Of course you’ll want to change the numbers to fit your network configuration.

  55. Thanks a lot. You made my day.

    I was busy trying to get things working without any success until I found this article. Great work!

    Next step is making my Pi work with my S4 via PiUi and finally installing the RPi time-laps controller both from David Singleton.


  56. Hi,

    i followed your guid but it still does not work-.-
    when I try to connect my PC with the Hotspot/AP its not connectin and i loose my connection in putty. and then i loose the AP

  57. Is it possible to use two wifi dongles, and then create a wireless repeater? I have no idea what the network interfaces would look like.

  58. Dave –
    Great tutorial, I agree with the rest of the posts! I was previously stuck compiling kernel modules when I saw this post. This method is easier, and works!

    One question – I configured Tor with the setup you describe, but my public WLAN ip is not scrambled, it continues to be the same as my router (the non-RPi one), although all the Tor logs and diagnostics indicate it is working. Will it work with this bridged setup? It should be easy after the AP is setup, I would think.

  59. I tried using this tutorial with the SpillPassPi image from http://www.spillmonkey.com/?page_id=5 since I am trying to turn the Pi into a Nintendo Zone for Street Pass relays. The dongle I have (http://www.adafruit.com/products/1012#Description) doesn’t work with SpillPassPi, so I tried your tutorial since Windows device manager stated it used the trl8188cus driver. However, I could not get it to work. I assume I have to use Raspbian, which I will try tonight. I am totally new at this, so hopefully I can get it working.

  60. Doesn’t work for me:

    ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
    wlan0: Setup of interface done.
    Wireless event: cmd=0x8b15 len=20

  61. Jon Cain


    I keep getting this looping problem at the end, I’ve tried this and several other tutorials and still get stuck at the same place:

    root@JonsRaspberryPi:~# sudo hostapd -dd /etc/hostapd/hostapd.conf
    random: Trying to read entropy from /dev/random
    Configuration file: /etc/hostapd/hostapd.conf
    Configure bridge br0 for EAPOL traffic.
    BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
    Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
    Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
    Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
    Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
    Completing interface initialization
    Mode: IEEE 802.11g Channel: 1 Frequency: 2412 MHz
    RATE[0] rate=10 flags=0x1
    RATE[1] rate=20 flags=0x1
    RATE[2] rate=55 flags=0x1
    RATE[3] rate=110 flags=0x1
    RATE[4] rate=60 flags=0x0
    RATE[5] rate=90 flags=0x0
    RATE[6] rate=120 flags=0x0
    RATE[7] rate=180 flags=0x0
    RATE[8] rate=240 flags=0x0
    RATE[9] rate=360 flags=0x0
    RATE[10] rate=480 flags=0x0
    RATE[11] rate=540 flags=0x0
    Flushing old station entries
    Deauthenticate all stations
    +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
    Using interface wlan0 with hwaddr 80:1f:02:c9:29:f0 and ssid ‘JonCainPi’
    Deriving WPA PSK based on passphrase
    SSID – hexdump_ascii(len=9):
    4a 6f 6e 43 61 69 6e 50 69 JonCainPi
    PSK (ASCII passphrase) – hexdump_ascii(len=13): [REMOVED]
    PSK (from passphrase) – hexdump(len=32): [REMOVED]
    urandom: Got 20/20 bytes from /dev/urandom
    Get randomness: len=32 entropy=0
    GMK – hexdump(len=32): [REMOVED]
    Get randomness: len=32 entropy=0
    Key Counter – hexdump(len=32): [REMOVED]
    WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
    Get randomness: len=16 entropy=0
    GTK – hexdump(len=32): [REMOVED]
    WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
    rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, JonCainPi,9
    wlan0: Setup of interface done.

    (Gets stuck here until I ctrl c)

    ^CSignal 2 received – terminating
    Flushing old station entries
    Deauthenticate all stations
    +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
    ELOOP: remaining socket: sock=7 eloop_data=0x1666810 user_data=(nil) handler=0x2a000

    Please help


  62. Matthew Vortex

    Thank you SO much. I was just about to buy a new wifi dongle, but thanks to your instructions, I got my Belkin N150 dongle working. So funny that the hardware will support, but the software won’t (w/o your contribution).

    Note to all: it is rtL871xdrv. Kicked my butt for an hour trying to use the #1.

    Also, if your main goal is an adhoc network (like to an Android tablet or iphone) make sure you check Dave’s other article at:


    • Matthew Vortex

      Correction…dongle was a NETGEAR N150 (WNA1100). Router was a BELKIN.

  63. hzd98495

    Not working for now.
    The realtek driver from the realtek site supports only up to kernel version 3.9 and Raspbian is now using kernel version 3.10.

    The driver presented here by the author of the blog is even older and seriously outdated.

    The most promising solution at the moment is just buy a better dongle that is supported by raspbian.

    • hzd98495

      Well, apparently I was wrong…
      That kernel restriction I mentioned seems only to be important during compilation.
      The driver offered by the author of this blog does work…

      Please accept my sincere apologies, Dave

  64. Kuliczka

    Thank you very much!!! tested al lot of manuals(for the rtl8188CUS) who promised to do exactly this but non of them worked.

    Worked perfect for the first try!!!

  65. Hallo, I had also try your tutorial with my Raspberry and it works fine now. Now I want to install Tor but there is no new IP-Adresse cause its just a bridge to the wlan router. Can you please explain in few sentences how we can implement TOR now? Cause i’m not the only one who is interested in this following the other comments.
    Best Regards

  66. hzd98495@uikd.com

    I’m about to dump the RTL8188CUS based dongle in the trash and buy a better one.
    It seems impossible to get this thing working on N-band.

    G-band is perfect with near maximum speed. N-band is a disaster.
    If I specify a ht_capab line with whatever option on it (even [HT40+]) hostapd does come up, the network is detectable(!) but connecting is impossible. I even tried the ht_capab line suggested by Scott S a bit higher up in this thread.
    Just G-band does the job but performs not better than the standard consumer router available for a much lower price than a Raspberry.

    I did borrow a rt3070 based dongle (made by ralink) from a friend and that one does work. It even reaches 150 Mbit/s, so it’s near perfect.

    Apparently the RTL8188CUS chipset does not have (all of) the capabilities it advertizes with iw list.

    Is any one having suggestions to get the RTL8188CUS to accept connections?

  67. Hi, Could you post the configurations you did for the ‘.config’ when compiling the hostapd?
    I must be doing something wrong because it compiles fine but I get this message from running it:

    Starting advanced IEEE 802.11 management
    hostapdioctl[PRISM2_IOCTL_PRISM2_PARAM]: Bad address

    I’m also using Raspbian with the EDIMAX EW-7811Un adapter.

    • Never mind the “.config” question. My mistake. Once I added “driver=rtl871xdrv” to hostapd.config, the error went away and the hot spot was active.
      I mainly followed the directions at “http://elinux.org/RPI-Wireless-Hotspot” which provided the config entries for an ‘open’ AP. Those entries didn’t include a “driver” line.
      Then I compiled the sources you pointed out for the hostapd binary.
      Thanks for the helpful posts!

  68. I have the ssid running ok, and it is joinable, but I get no internet access when connected to it. If anyone has any ideas, please help. thanks

  69. thnx for the post…it worked on the laptop…but I cant connect to my android…and wifi does not show after reboot…in order to enable wifi I have to type sudo hostapd -dd /etc/hostapd/hostapd.conf everytime…how to enable it automatically…

  70. Avni Jain

    Hi Dave

    I followed the entire tutorial as it is while an ssh and when i rebooted after making all changes as told my sd card didnt boot via ssh.
    I want to make this hotspot while ssh through putty.I am using a Huawei 3g dongle E220. I want my raspberry pi to act as a server while ssh. How can i solve this ?
    Are there any changes i need to make to the interfaces file ?

    I am working on a project whose one part is to get this working.

    Kindly help !

  71. msound76

    Great job, Dave!
    Your tutorial is perfect.
    Thanks a lot. Since I don’t want to have access point running all the time I want to ask you if there is a way to manually star & stop the service instead of add it to the startup.

  72. Hi Dave,
    just configured my EW-7811Un with 2 modifications:
    I recommend to set
    to get maximum bandwidth and better security.
    EW-7811Un does its job perfectly, really good tutorial, thanks!

  73. Jordan314

    Re: my previous comment: I had udhcpd running which was a conflicting dhcp server. I had previously followed this tutorial (http://www.novitiate.co.uk/?p=183 ) that used it.
    Thanks to this forum (http://www.raspberrypi.org/forums/viewtopic.php?t=29536&p=263884 ) for the solution! And thanks for the amazing tutorial!

  74. Michael

    Brilliant! Thanks so much, really clear tutorial that worked as soon as I sorted out my typing!

  75. Tried to do this, but the link to your version of hostapd.zip is giving a 404 file not found error. I’ll try the realtek site. I have a generic dongle that lsusb reports is using the RT8188CUS chip, so I assume this will all work…

    The broken link:
    wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip

    • Grrr. Following the link I just posted above works for me,
      I had typed 08 instead of 07 on my RPi.

      Feel free to delete my two posts.

  76. Maxmad68

    My RPi doesn’t start
    Help me please

  77. Mengu Ucok

    Thank you, your tutorial worked with WN725N V2.0 perfectly, which has RTL8188EUS chipset.

  78. ChicagoBob123

    I still have problems with the RTL8188CUS. Just so frustrating. I have downloaded you driver and installed.
    I even built my own and tried them but when I restart hostapd I get
    Starting advanced IEEE 802.11 management: hostapdioctl[RTL_IOCTL_HOSTAPD]: Operation not supported . ok

    When I try to access the PI I see the PI but can not obtain an address most of the time. SOMETIMES I do and everything works.
    I am so lost.
    What does
    sudo hostapd -dd /etc/hostapd/hoastapd.conf
    do for you?
    Thanks hope someone can help.

  79. Followed the instructions, the network shows up on my iPhone. When I try and join the network I get “Unable to join the network “DaveConroyPi”. Check and the password is correct. Not sure what to do to resolve this!


  80. Works like a charm – great tutorial, thanks!

  81. Hey all out there,
    i ve got a problem with this project.
    Everytime i type in this:

    sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak

    comes this response:

    mv: cannot stat `/usr/sbin/hostapd': No such file or directory

    i have no idea whats the meaning of this is
    please help me

    such raspberry pi beginner

  82. I had to hard reboot following the reboot command to regain SSH control, but works great!!! thanks

  83. Dude
    awesome work right there, no other guide workeout for me but this…

    • the only problem i seem havin is… idk like after 20 minutes or so the hotspot just stops, its still detectable by my devices but it has limited connectivity, then when i restart RASPI everythin is baq to normal for another 20 minutes or so, any ideas?

      • I did the same experience. After some time of idle, the SSID is not visible anymore. After reboot everything works fine.

  84. Hi Dave,

    This worked like a charm!!! Thanks

    I have a question. Is it possible to have the ssid hidden? Hope you can help me with this.

    Thanks in advance

  85. Hi Everything works great guide, however I have lost SSH connection via putty to rpi. I can not connect using SSH. And I need SSH to perform further activities. Can you help me get back SSH connectivity.

  86. HI awsome tut. However I have a problem

    I can successfully create the access point. But the moment I do that I loose connectivity with rpi via SSH or any IP which it gets. Access point is working perfectly but connect to rpi via SSH. If I remove the access point I can very well access rpi over SSH (putty) but not when I enable Access point I cannot use SSH. Can you please help me resolve this….

  87. If I change the ssid and passphrase it won’t log in. Actually, I can’t log in using the existing Daveconroypi SSID or Conroypi password.

    This is on my iphone and macbook. Suggestions?

  88. First thanks for this great guide!

    And for all those that have problems with SSH and PING after the setup.

    For me a “sudo iptables -F” (flushing iptables) worked just fine.

  89. i use wired internet service from my dormitory’s internet provider and they have very strict policy on filtering MAC address. I use RPi as an AP with wn725n USB wifi dongle and i’ve followed your guide. So how can i change RPi MAC address so that i can pass the MAC filter ?
    Sorry for my bad english

  90. After hours of testing i still have problems with the wlan driver.
    I use the latest version of raspbian (wheezy-24.12.2014) and the Edimax stick. Downloaded the special version of hostapd and prepared any file.
    If i start hostapd i get the message “invalid/unknown driver rtl1871xdrv”. lsusb shows me that the stick is attached and dmesg shows a realtek-wlan-adapter using rtl8192cu. lsmod shows that 8192cu is loaded. If i change the driver declaration in the conf file to rtl8192cu it got also the unkown driver message. Any ideas? Maybe something changed in wheezy????

  91. I have this all up and running, as a component of my security system.
    Problem is – I want to run it standalone, and when I disconnect the wired LAN, it will no longer authenticate.

    Any ideas on how to resolve this?
    I have two DHCP servers on the network operating behind bridges.

    I have a feeling my DHCP may not be working, and that it’s forwarding to a DHCP on the wired LAN somewhere.

  92. Himmelssonne.zoeblitz@gmail.com

    I have the following problem. I did everything as it was in the tutorial. I had been shown a network that was functional. But this network has collapsed after about 1 min and disappeared from the list of wireless connections. The Pi is 0.5m beside me. I used this adapter: https://www.vilros.com/raspberry-pi/wifi-adapter.html
    If the Netztwerk is just collapsed, I get it very difficult commis again. Insert again with multiple restarts of Pi and adapters. Can someone help what it could be?

  93. Himmelssonne

    I have the following problem. I did everything as it was in the tutorial. I had been shown a network that was functional. But this network has collapsed after about 1 min and disappeared from the list of wireless connections. The Pi is 0.5m beside me. I used this adapter: https://www.vilros.com/raspberry-pi/wifi-adapter.html
    If the Netztwerk is just collapsed, I get it very difficult commis again. Insert again with multiple restarts of Pi and adapters. Can someone help what it could be?

  94. Karl Ludwig

    Hey Dave, I tried your toutorial and it seems to work so far. But I am connect via Openconnect to a cisco VPN connection… Can you tell me, which addapter I have to use, because If I try eth0 as bridge-startpoint it doesn’t work…

  95. hardik gohil

    getting this error when i am trying to test the following:
    sudo hostapd -dd /etc/hostapd/hostapd.conf

    the error is:
    random: Trying to read entropy from /dev/random
    Configuration file: /etc/hostapd/hostapd.conf
    Could not read interface wlan0 flags: No such device
    ioctl(SIOCGIFINDEX): No such device
    rtl871xdrv driver initialization failed.

    please suggest me and give some solution to this ….

  96. Works fine! thank you man!

  97. Hello, I have any probleme with this tutorial, first of all I cannot connected with my smartphone and second of all the conecttion with my computer work’s but wath is the adress of the router for connected with ssh

    Thank you for your response,

    Best regards

  98. How after connection with the hot spot open my webpage who run with apache on my pi

  99. hardik gohil

    I have created a wifi hotspot using raspberry pi B+ model with TP link dongle, i want to forward all incoming traffic (Http request coming on port 80 & 443) to fix IP of my RPi…..
    -> sudo iptables -t nat -A PREROUTING -d 0/0 -p tcp –dport 80 -j DNAT –to-destination
    -> sudo iptables -t nat -A PREROUTING -d 0/0 -p tcp –dport 443 -j DNAT –to-destination

    m using this commands … but it doesn’t work well.. can any one help me out with this…..???


  1. Using your Raspberry Pi as a Wireless Router and Web Server | DaveConroy.com - [...] using the (previously) unsupported WiFi Adapter (RTL8188CUS chipset) that I wrote about in this Raspberry Pi WiFi Hotspot [...]
  2. Raspberry Pi WiFi Access Point | Warranty Void - [...] Turn Your Raspberry Pi Into a WiFi Hotspot with Edimax Nano USB EW-7811Un (RTL8188CUS chipset) [...]
  3. Super duper WiFi dongles | PiStuffing - […] P.S. All the above dongles use the Realtek chipset, so, where soft AP is supported, can be used as …
  4. Turn your Raspberry Pi into a wifi hotspot with an Edimax dongle | Raspberry Pi Pod - […] I must’ve missed this one before. Dave Conroy has written a tutorial on turning your Pi into a wifi …

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>