Setting Up WiFi Access Point with Edimax EW-7811UN on Raspberry Pi

I am running an image processing algorithm on my Raspberry Pi and I need to access it wirelessly (wired connection is sooo ’90s :p ). So my requirements are following:
– WiFi Access Point for remote access
– no need internet connection
– runs on Raspbian Wheezy

1. Configuring network
Edit /etc/network/interfaces, remove anything related to wlan0 then add this lines:

iface wlan0 inet static

Although the configuration is already defined, sometimes it won’t be applied by the system upon booting. To make sure, add ifup wlan0 inside /etc/rc.local file before exit 0 so it will look like this:

#!/bin/sh -e
# rc.local

# add this
ifup wlan0

exit 0

2. Installing DHCP Server and “DNS” Configuration
DHCP is the one that is responsible to give out IP addresses to clients who are connected to the Access Point. Meanwhile, DNS or Name Service is working as some kind of dictionary, that translates numbers of IP address into human-readable names that are easy to remember and to type.

This time I will use dnsmasq for easy and fast DHCP+DNS deployment.

sudo apt-get -y install dnsmasq

After installation it will run the daemon automatically. Stop it and then we work on the configuration:

sudo service dnsmasq stop
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo touch /etc/dnsmasq.conf

Now edit the newly created dnsmasq.conf config file. For minimum setup, this should be the content of the config file:


For full configuration options, you can refer to the original config file (dnsmasq.conf.orig).

Although is easy enough to remember, isn’t it easier if we use “raspi” as address? So then you can simply type ssh raspi or http://raspi/. To make this happen, edit /etc/hosts file, append with this:        raspi raspberrypi raspi.local raspberrypi.local

3. Installing hostapd
This WiFi USB Dongle from Edimax uses Realtek chipset, it is rtl8192 to be precise. Kindly enough, Realtek has provided hostapd implementation which is specific for this chipset.

For installation instructions, I suggest you to follow Jens Segers’ blog post.

After finishing installation, edit the hostapd configuration file to fit your needs.

Leave a comment


  1. Swen Schneider

     /  August 26, 2013

    Thanks! Just what I looked for. Now using solarpowered RasPi with WiFi (without internet) on a campground with friends. Backup fotos (sftp), syncing calendars (owncloud), …
    Made at least one man happy 🙂

  1. Raspberry Pi and Wireless | Quentin Weir

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: