Turn Your Raspberry Pi into a WiFi Hotspot with Edimax Nano USB Ew-7811un (Rtl8188cus chipset)

Source: Internet
Author: User
Tags raspi

http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/

Posted by Dconroy on Jul, Raspberry Pi | 142 Comments | 143,087 views

I ' m writing this blog to the help anyone with an Edimax Nano USB WiFi Adapter (ew-7811un) Configure a Wireless accesss point. The main reason I wrote this post are because the Edimax was the first wireless adapter I ever recommended (turning a RASPBE Rry Pi into a fully functional Web server). I chose this adapter because it works out of the box, is cheap, and have a really low profile. If I started the process of trying to turn my rPi into a WiFi hotspot, it seemed that every tutorial out there claim Ed that the Edimax card I had recommended "doesn ' t support Access Point".

Luckily for you and me.

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

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

To flash your SD card, you'll need to unzip the image and write it your SD card using Win32diskimager. This tool can also is used to after we initial setup to create an image of our finalized implementation (very useful as a Backup).

After the image was flashed, you can boot your device. At the your HDMI cable/mouse/keyboard for your initial configuration, or you can use a SSH Client like Putty to connect. The default hostname, login, and password are as follows:

Host:raspberrypi
Username:pi
Password:raspberry

For this tutorial, I'll be using putty. On the first boot, you'll 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 is

update
expand_rootfs
change_pass
change_timezone
memory_split

The usual distribution images is 2 GB. When your copy of the image to a larger SD card has a portion of that card unused. Expand_rootfs expands the initial image to expand to fill the rest of the SD card, giving your more space. By default, 64MB was reserved for the graphical UI. Since we plan on using the as a WiFi Hotspot, we can reduce this to 32MB with the Memory_split command.

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

-R Now

At the fully functional Linux server, but we still need to check our network card and setup our Wi-Fi hot Spot.

Prerequisites

The first thing you need to do are make sure and you have a existing wired connection to your rPi. After this, you need to install the following packages.

Apt-get Install Bridge-utils HOSTAPD

The whole crux of the issue is that it's the apt hosted copy of HOSTAPD that's not compatible with the Rtl8188cus CH Ipset. But, thanks to the Edimax team, I ' ve got a replacement HOSTAPD binary to resolve this issue. This tutorial won't 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.zipUnzip Hostapd.zipSudoMv/usr/sbin/hostapd/usr/sbin/hostapd.bakSudoMV HOSTAPD/usr/sbin/hostapd.edimaxSudoln-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 would rather compile your own bi nary, you can download the Realtek driver here. 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, do install, then HOSTAPD like I do above.

Bridge the Network Connections

Now, we had the proper HOSTAPD installed, we need to create a bridge between our Ethernet connection and our Edimax W Ireless card. To does this, we need to edit our network interfaces:

/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 is 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

#bridge
Auto Br0
Iface br0 inet DHCP
Bridge_ports eth0 Wlan0

Configuring HOSTAPD

Now the Our interfaces is setup, we need to configure HOSTAPD. To doing so, create the following file

/etc/HOSTAPD/hostapd.conf 

With the following contents:

interface=wlan0
driver=rtl871xdrv
bridge=br0
ssid=DaveConroyPi
channel=1
wmm_enabled=0
wpa=1
wpa_passphrase=ConroyPi
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

Wrapping up

We should is finished now, and afer a reboot

sudo reboot

You can test your configuration using the following command

/etc/HOSTAPD/hostapd.conf 

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

/etc/default/HOSTAPD 

and uncommenting and updating the following line

DAEMON_CONF="/etc/hostapd/hostapd.conf"

That should do it! I ' m happy to answer any questions, just comment on this post. Thanks for reading!

Turn Your Raspberry Pi into a WiFi Hotspot with Edimax Nano USB Ew-7811un (Rtl8188cus chipset)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.