Rpi Wifi access point

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
user879
 
Posts: 11
Joined: Tue Sep 24, 2013 12:39 am

Rpi Wifi access point

Post by user879 »

Capture2.JPG
Capture2.JPG (28.14 KiB) Viewed 302 times
Thanks for your time, I have 2 questions.
1. Can (and if so, how) the Rpi generate a wifi network and connect to a different wifi network at the same time? (using 2 wifi dongles and essentially replacing eth0 with a wifi connection, although I would like to have it wired most of the time but be able to disconnect wired internet and switch to wifi.)
Note: I momentarily only have access to the web through wifi, I use a second dongle on wlan1 during the tutorial.

2. I cannot seem to get dhcp server to run reliably, when I run

Code: Select all

sudo service isc-dhcp-server start
I receive this error message:
Capture1.JPG
Capture1.JPG (14.08 KiB) Viewed 302 times
I found this when I ran tail -f /var/log/syslog
Capture.JPG
Capture.JPG (42.83 KiB) Viewed 302 times
Capture2.JPG
Capture2.JPG (28.14 KiB) Viewed 302 times
When I couldn't get the access point working I went through all the steps in the tutorial (except for the hostapd steps, because that seemed to be working) and dhcp server magically came to life! I never found any errors in the code, I just checked the code and re-ran commands.
Any help is appreciated!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Rpi Wifi access point

Post by adafruit_support_rick »

The Pi probably doesn't have enough power in its USB budget to run two WiFI dongles. Try connecting both dongles through a self-powered hub.

User avatar
user879
 
Posts: 11
Joined: Tue Sep 24, 2013 12:39 am

Re: Rpi Wifi access point

Post by user879 »

Thanks! I tried a powered usb hub, didn't seem to change anything. I am using a B+ with 2amp psu and config.txt with this added:
Capture3.JPG
Capture3.JPG (22.58 KiB) Viewed 256 times
If I didn't add the right thing please advise the correct modification, I found the instructions here: http://www.raspberrypi.org/forums/viewt ... 50#p577877

Correct me if I'm wrong, but shouldn't the config.txt mod give usb enough power?
I rebooted after dhcp magically worked and it(dhcp) hasn't worked since.
This is my /etc/network/interfaces
Capture4.JPG
Capture4.JPG (25.89 KiB) Viewed 256 times
Could wlan1 be conflicting with wlan0 and dhcp?

User avatar
user879
 
Posts: 11
Joined: Tue Sep 24, 2013 12:39 am

Re: Rpi Wifi access point

Post by user879 »

Thanks Rick!
While looking at /etc/network/interfaces pic I posted I realized netmask said 2255.255.255.0! Fixed that and access point is now working!
Thank you so much!
One question: can I set the pi up to forward requests from devices connected to it's network not only to eth0 but to wlan1 as well? Would these commands work with just replacing eth0 with wlan1?

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”