GuidesTech

Configuring FON as a wireless client (WPA network)

There are hundred and one stuffs to be done with the FON router! My current D-Link network camera (DCS-2120) wasn’t capable of connecting to my wireless network due to the constraints of DCS-2120 in accepting certain characters in my WPA key. I toyed with the settings in console mode (of DCS-2120) and failed to make it understand the WPA key, so I guess I would need to work around it.

To work around it, I configured FON to be the wireless bridge! The DCS-2120 would connect to the FON through the ethernet port and FON would connect to my network as a wireless client.

Configuring it is easy on OpenWRT (kamikaze). 🙂

Step 1
Ensure you have connectivity with the internet, ssh into FON router and install WPA-Supplicant if you are planning to connect to a WPA secured network.

root@OpenWrt:~# ipkg update
root@OpenWrt:~# ipkg install wpa-supplicant

Step 2

Next would be configuring the ethernet port to be the lan interface and the wan to be the wireless. Now my /etc/config/network looks like this. If you don’t wish to delete off any additional stuffs you have inside, you can comment them off by add a # at the start of the line.

The ethernet port would distribute Class B address and the FON router itself would be using the IP 172.16.0.1/24

Step 3

Next would be configuring the wireless to be in client mode. My /etc/config/wireless now looks like this

Configure the WPA settings. Create a new file /etc/wpa_supplicant.conf (create the file wpa_supplicant.conf at /etc/). In this file, you would specify the SSID of the network to connect to as well as the passphrase for connecting to it.

To get the wpa_supplicant to auto-run on startup. We would need to create a shell script.
Create the file /etc/init.d/wpa_start.sh (filename is wpa_start.sh and located at /etc/init.d/)

Change the permission of the shell script to 755 and creating a symbolic link from /etc/rc.d/

root@OpenWrt:~# chmod 755 /etc/init.d/wpa_start.sh
root@OpenWrt:~# cd /etc/rc.d/
root@OpenWrt:/etc/rc.d# ln -s /etc/init.d/wpa_start.sh S90wpa_start

Reboot the device and FON is configured! Make sure all your settings are correct or you might be locking yourself out of FON due to misconfiguration of network interfaces!

 

Treat shadowandy!

If these step-by-step guides have been very helpful to you and saved you a lot of time, please consider treating shadowandy to a cup of Starbucks.  

This site contains links to Amazon. These links will take you to some of the products mentioned in today’s article. As an Amazon Associate, I earn from qualifying purchases.
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments