Quantcast
Channel: PirateBox Forum - Raspberry Pi(rate)Box
Viewing all articles
Browse latest Browse all 1863

Re: WiFi AP with Edimax EW-7811Un

$
0
0
Hi all, I wanted to chronicle my experience getting this all working for you guys. In case anyone else gets in the same boat, or more likely, if I mess something up and need to start over :)

I have a Raspberry Pi B+ and an Edimax EW-7811Un and was successful in getting everything working thanks to this thread and some help from Matthias via IRC. Thanks everyone!

So, from the top:
----------------------------------------------------------------------------------

1. Download and write the Arch image, following the Raspberry Pi Tutorial
- Once written you need to do a few steps before you actually enable and start piratebox, so:

2. Boot the Pi with the SD card in, and with a ethernet cable plugged. You need to ssh into the box, so you need to find it's IP address. I use an app called Fing on android which will print all your LAN devices IPs. but anywho once you have the IP type in a terminal (replacing the #'s with your actual numbers)
ssh root@192.168.###.##
(For windows users, you can use Putty to do this, and point it's host address to the IP address you learned)
the username and password are both root by default.

3. Once you see a prompt, go ahead and change your password with the command
passwd

4. OK, now we need to switch the hostapd with the one built from Realtek's source, which Matthias has been kind enough to include for us. I tried to build it from source as described in the OP, but after building it didn't work (YMMV). So, since we have the option of using this known working one, we'll do that. So:
pacman -U /prebuild/hostapd/hostapd-8192cu-0.8_rtw_r7475.20130812_beta-3-armv6h.pkg.tar.xz
Note: that filename could change someday, so just type the first few letters and use TAB to complete the filename. just make sure it's the one for 8192cu.
When you hit enter it will ask if you want to remove the current hostapd, and then confirm again. Choose yes for both.

5. When it's done, we need to tell pacman (the pacage manager for arch) to never try to update this package for us, as it may break things someday. To do so, type:
nano /etc/pacman.conf
use your arrow keys to work your way to the bottom of the file and add the following line at the end:
IgnorePkg=hostapd
When you're done, hit Ctl+O to write the file out, hit enter to confirm, then hit Ctl+X to exit nano

6. Next up, we just need to tell hostapd to use the proper driver for our adapter. so:
nano /opt/piratebox/conf/hostapd.conf
Edit it to look like the following:
interface=wlan0
driver=rtl871xdrv
ssid=PirateBox - Share Freely
hw_mode=g
channel=1
ieee80211n=1
The bolded portion is the main thing to change. I have ieee80211n enabled as well which should increase speed.
When done, Ctl+O and Ctl+X to save, and exit as before.

7. When you are done, you can go ahead and reboot with
shutdown -r now
And when its back up, ssh back in and continue the RaspberryPi setup tutorial as before, continuing from Installation section, step 6.

------------------------------------------------------------------------------------------

Once you have got to the point (in the Raspberry Pi guide) of running "systemctl start/enable piratebox", you ought to see an access point from any device you have that supports WiFi. If not, try a reboot and try again, if still nothing, reply here and I and others will try to help you. Double check your hostapd conf files. And if you get an error on boot about wlan link not being ready you can try the solutions in this topic. Id recommend most of those changes even if everything is working.

NOTES:
I had a bit of trouble due to a stupid mistake, make sure when you edit the hostapd.conf that you type the driver name right. there is a L and a 1 in that name. in all caps it'd be RTL871XDRV but don't type it in caps ;)

The only thing I haven't tested thus far is bridged mode, though I would like to get that working eventually. If anyone can report back if/how they got it working I'd be very grateful!

:)-D
Cheers all! and a big thanks to the devs who made it possible for me to have a piratebox!

Viewing all articles
Browse latest Browse all 1863

Trending Articles