Connecting Asus WL500g to a wireless network, in client mode, through an Alfa AWUS036h adapter
To connect an ASUS router, that has USB ports, to a wireless network, in client mode, you will need the followings:
1. An USB wireless adapter, in this example we will use the Alfa Networks AWUS036h adapter
2. An Asus router with USB ports and OpenWRT firmware, in this example we will use an Asus WL500g router
3. A remote wireless network. The Asus router will connect to the remote wireless network using an AWUS036h wireless adapter.
In the picture above, Asus WL-500g connects to a wireless network using a USB wireless adapter. Thus, computers connected to the Asus WL-500g router can access the Internet connection of a remote wireless network. Using an wireless adapter like AWUS036h, you can improve signal strength and you can connect to remote wireless networks at farther distances.
Network topology:
– Asus router connects to the remote wireless network, in client mode, through an wireless adapter
– the clients can connect to Asus router using a wireless connection (if the router has a built-in wireless card) or a wired connection.
– the clients, connected to Asus router, will have access to the resources of the remote wireless network and will be able to use the internet connection of this network.
Installing AWUS036h wireless adapter on Asus WL-500g with OpenWRT firmware
Installing a wireless adapter on Asus WL-500g router with OpenWRT BackFire 10.03 BRCM47XX firmware.Use a SSH client like PuTTy to connect to your router and to be able to run the commands below.
1. Installing packages for USB support on OpenWRT
opkg update opkg install kmod-usb-core opkg install kmod-usb-uhci opkg install kmod-usb-ohci opkg install kmod-usb2 insmod usb-ohci insmod usbcore insmod uhci insmod ehci-hcd
2. AWUS036h driver install on OpenWRT
opkg update opkg install kmod-rtl8187
– connect your USB wireless adapter to Asus Router
3. Test if AWUS036h driver is installed properly
lsusb
If the drivers were properly installed, you should receive a message like this:
Bus 001 Device 001: ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter
Setting up Asus WL-500g router as a wireless client, connecting the router to a remote wireless network
1. AWUS036h wireless adapter setup:
Replace XX with adapter’s MAC address. The MAC address can be found on the back of your wireless adapter!
Edit /etc/config/wireless file, using the following command:
vi /etc/config/wireless
and add the following lines:
config wifi-device radio1 option type mac80211 option channel 6 option macaddr XX:XX:XX:XX:XX:XX
save the file, close it and check for the ID assigned to your wireless adapter (wlan0 or wlan1) using this command:
iwconfig
To check if the wireless adapter works properly, scan for wireless networks using the following command:
iwlist wlan0 scan
(depending on the output of iwconfig command, use wlan0 or wlan1)
2. Connecting Asus WL500g router, to a wireless network, in client mode:
To connect the router to a wireless network, you must know the network’s SSID and network’s BSSID. The following settings are valid for connecting to an open wireless network (no password is required to access the network) that has the SSID “Deconf” and BSSID “XX:XX XX:XX:XX:XX”:
vi /etc/config/wireless
add the following lines to your /etc/config/wireless file:
config wifi-iface option device radio1 option encryption none option mode sta option ssid Deconf option network wan option bssid XX:XX:XX:XX:XX:XX
save the file, close it and enable the wireless adapter using the following command:
ifconfig wlan0 up
(depending on the output of iwconfig command, use wlan0 or wlan1)
Save your router’s settings in flash memory and restart it:
nvram commit reboot
Access router’s WEB Interface and go to Administration > Network > Interface > Wan and choose wlan0 or wlan1. Use Save button to apply the new settings.
If you have properly configured the Asus WL500g router, it will automatically connect to the remote wireless network. If the wireless network has an Internet connection, users connected to ASUS router will have access to Internet via AWUS306h USB adapter.