This tutorial is showing how to deploy and implement a local community wireless network by low budget materials and devices.


The low cost and development of the follow project consists in an embedded router with built-in services, To build it was used an ARM-based PC called “Raspberry Pi”, and through some operative system and network parameters modification, was possible configure the device as a router, including a web servers with an embedded instant messaging.

You can find the repository of the project in the follow link:


In the next tutorial, it will be show what kind of modifications have to be done to transform the Raspberry Pi into a router, as well as how to run services and include them at the Raspberry Pi.

This is the step by step, enjoy it!


  • Raspberry Pi (Model A or B) Model A is enough, and is cheaper
  • SD card memory at least 4Gb
  • Wireless USB adaptor (Careful with Linux support)
  • Power supply 5V from 0.7A to 1 A
  • Batteries and a DC-DC power regulator module (Optional)
  • Raspberry Pi case



  • LAN cable (RJ45) and Internet connection
  • USB keyboard
  • Video cables HDMI or RCA (just for the first time)
  • Laptop or desktop. (I used Ubuntu)




  • The first step to start with is  downoalding Raspbian OS, all the concerning information is here http://www.raspberrypi.org/downloads
  • Once the *.img file has been downloaded you will be able to prepare the SD card:

Insert the SD card in the laptop or desktop Sd card adaptor and then type the follow in a console:

~$ dmesg

You will see in your console something similar to the image above, have into account the last line where you might find the SD card identification name, for this case is  “mmcblk0” device. Once you get the SD card Identification name, it will be necessary dismount it from the media directory, in order to do it you have to type the follow command:

~$ umount /media/”yoursdcard”

Once you SD card is unmounted, you have to type the command that is showed i the image below, in order to do a copy of the operative system image directly to the SD card.

This process migh take several minutes. When it will be done, the console will show the records and the date copied, something similar as the image below:

Now you it will be possible to see how the SD Card look like in “gparted” before extend the storage partition:

This is how the SD card look like after extend the storage partition inorder  to get more space for additional packages:


Now it is time to explore the Raspberry Pi, let’s connect all the periferics:

  • Wireless USB adaptor
  • Keyboard
  • HDMI cable
  • LAN cable (RJ45) to an Internet connection
  • Power Supply

After you plug all the periferics above mentioned, it will show how Raspbian boot looks like:

The first time the raspberry pi is turned on, it  will  prompt to setting up some boot package, the tool that prompted you is called “rasp-config”

In this step you will be able to enable the SSH service in order to configure the Raspberry Pi in a remote way. You should select the 8 option “ Advanced options”

Once you choose “advances options”move forward to chose the A4 option “SSH” to enable it, then select finish. Finally you will be prompt to login,  default user is “pi” and default password is “raspberry”

In order to upgrade and update all the software packages you should type this command:

~$ sudo apt-get update && sudo apt-get upgrade

Now Raspberry Pi is able to establish a SSH connection, first step is  plug a LAN cable into the Raspberry Pi, after the router automatically will assign an IP address to the Raspberry Pi. To verify the IP address was assigned, just need type “ifconfig”.

Once you get the IP address, you have to type the follow command to establish the SSH connection

~$ ssh pi@


Once the above steps were  done will be time to unplug the HDMI and keyboard cables.

To become the Raspberry pi in a router is neccesary install “hostapd” and “isc-dhcp-server” software package, to get them type the follow command i the console:

~$ sudo apt-get install hostapd && sudo apt-get install isc-dhcp-server

After installed software packages, those have to be setting up, is ncessary apply changes in hostapd, dhcp server, and interface parameters. Before procede to setting up the packages, be sure the USB wireless adapter has Linux support, you could see the link below to realize what linux wireless adapters are supported:


In this case was used the TL-WN722N adapter, its chipset is an Atheros and its Linux driver is “ath9k_htc”

Setting Hostapd:

Hostapd is the package that allow put the USB wireless adapter in Master mode. In order to setting up you must create a text file with the command showed below and place it in the follow path:

~$ sudo nano /etc/hostapd/hostapd.conf

Once you tipped the command you will be placed in the “nano” software package editor, in it you will be able to set up the hostapd package, the below code is a basic configuration for an open security access point.


Do not forget to save the changes once you finished. In order to make hostapd package starts always at boot time, you should set up a daemon, the below code showed how to do it. Move it into the path ~$ etc/default/hostapd and uncomment the last line [ DAEMON_CONF=”/etc/hostapd/hostapd.conf ].

Now to assign an IP for the Raspberry Pi you should move in the follow path and type:

~$ sudo nano /etc/network/interfaces

Then make sure your configuration look like the below screenshot.

In this case IP address was choose for the Raspberry Pi, ineed you would set the IP you wish. Be sure to erase all the old wlan0 configuration, in this case last 4 lines were commented adding a # at the start of each line.

Now you must to set up the DHCP server to allow connect clients to the Raspberry Pi and get different IP addresses. In this case the “isc.-dhcp-server” software package was choose to assign IP addresses, the way you must setup the DHCP server is showed in the follow path  “etc/default/isc-dhcp-server” this how the file looks like:

In order to set the daemon, you have to uncomment the line related with the configuration server file [ DHCPD_CONF=/etc/dhcp/dhcpd.conf ] then you must write the server network interface you are using. (Note: You can set up more than one interface).

Finally you should edit the configuration DHCP server file, who is in the path “DHCPD_CONF=/etc/dhcp/dhcpd.conf” once you be there, you have to do the follow changes:

Uncomment the line called “authoritative” to assign “isc-dhcp server” as the local dhcp server.

For instance you would implement your own dhcp server as the way we showed in the image above, then save changes and restart.

After all you will be able to connect through your mobile device to the Raspberry Pi via WIFI. In other tutorial I will show how to deploy a web server.

Up votes: Down votes:


  1. I tend not to write a great deal of comments, but i did a few searching and wound up
    And I do have 2 questions for you if you tend
    not to mind. Could it be simply me or does it
    look as if like a few of these comments look like written by brain dead folks?
    :-P And, if you are writing on additional online social sites, I would like
    to follow anything new you have to post. Could you make a list of every one of your community pages like your Facebook page,
    twitter feed, or linkedin profile?

Leave a Reply

Your email address will not be published.