Connect and Test

Now that we have the software installed on a Pi, it's time to connect to it and test the connection. I'm using a Windows computer but any kind should work fine

On the Pi, run the command tail -f /var/log/syslog to watch the system log data, handy for checking and debugging whats going on!

Connect with another computer to the AP you made in the previous step

Enter the WPA key you specified in the previous step
In the Pi syslog you should see stuff like this! It indicates that a client connected, at what time and what IP address was given to them

If you can't connect at all, something is wrong with hostapd
On your computer, open up a Terminal (mac/linux) or Start->Run->cmd to open up a command line

First check what ifconfig (mac/linux) or ipconfig (windows) says. You should have IP address in the 192.168.42.10-50 range

Try pinging the Pi, its address is 192.168.42.1 - on windows it will ping 3 times and quit. On mac/linux press Control-C to quit after a few pings. You should get successful pings as seen below

If that doesn't work, something is wrong with hostapd or dhcpd (more likely)

Next try ping 8.8.8.8, if this doesn't work but the previous does, something is wrong with dhcpd or the NAT configuration (more likely)

Finally, we'll check that DNS works, try pinging www.mit.edu. If this doesn't work, something is wrong with dhcpd

If everything is good so far, try browsing the internet, sending email, etc. You are now using your Pi as a Wifi Router!

More!


Its possible to set up your router for open or WEP access, but we don't cover that here (and it's not as secure!) You might want to search around for tutorials such as this one that cover hostapd options
Last updated on 2016-09-13 at 01.34.24 AM Published on 2013-06-12 at 04.30.11 PM