OpenWrt Forum Archive

Topic: HOWTO RouterStation Pro install wireless cards

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

[size=18]HOWTO RouterStation Pro install wireless cards[/size]

This how-to is for installing and running wireless minipci cards on a RouterStation pro

It is assumed you have a working internet connection. For this how to I have connected useing a serial connection as per instructions found here http://www.ubnt.com/wiki/index.php?titl … etup_Guide Other methods are possible e.g SSH or Telnet.

This how-to is based on windows vista PC using the following equipment.

Software

Putty
Tftpd32
OpenWRT Backfire 10.03 RC3

Hardware

Routerstation Pro with power supply
TP-Link TL-WN861N wireless minipci card
Ubiquiti SR2 WiFi Mini-PCI Radio

[size=16]Install Procedure[/size]

Download software and firmware listed above

Install mini PCI cards in your routerstation

Install OpenWRT firmware on your routerstation

On your windows PC set your NIC for a static IP address
192.168.1.10
255.255.255.0

[size=14]Recovery mode[/size]

Place routerstation in recovery mode. Hold in the reset button then apply power to the routerstation. Release the reset button after 10 seconds.

Plug and Ethernet cable between PC NIC and routerstation WAN port

In may case I have also connected a serial cable between routerstation and PC serial port. Putty is set up using a serial connection with baud rate of 115200

Load Tftpd32 on your PC.
Select Tftp Client
Change server interface to 192.168.1.10 form the selection box
Note: If 192.168.1.10 will only be an option if NIC is set properly and the Ethernet cable is connected to a powered up router.
In HOST enter 192.168.1.20
In LOCAL FILE select your backfire image

Click PUT

A display box should come up saying "blocks transferred"

Click OK

The full install process takes many minutes after this process. If you don't have a serial connection I would suggest waiting 5 -10 minutes to make sure the process is finished.

Once flashed we need to enter CLI (command line interface). Im using my serial connection but if you want to use an Ethernet change you NIC back to a DHCP client then plug the Ethernet cable between NIC and RouterSation LAN Port. In putty
select TELNET
Enter host name 192.168.1.1
Click OPEN

At this point it is good practice to set SSH password (you can also do this through web interface)

passwd root

Enter your new password

[size=16]Install packages[/size]

We need to plug and Ethernet cable between DSL router and WAN port on your routerstation so we can install packages from the internet.

Once an internet is established run the following commands

opkg update
opkg install wpad
opkg install kmod-madwifi
opkg install kmod-ath9k

and just for fun

opkg install nano

I've found at this point I needed to reboot the router

reboot

Wait a minute or so you should be able to SSH into you router

Once back into CLI run the command

wifi
'radio0' is disabled
'wifi0' is disabled
'radio0' is disabled
'wifi0' is disabled
root@OpenWrt:/#

we need to enable the wifi radios

nano /etc/config/wireless
config wifi-device  radio0
        option type     mac80211
        option channel  5
        option macaddr  00:27:19:ba:b4:35
        option hwmode   11ng
        option htmode   HT20
        list ht_capab   SHORT-GI-40
        list ht_capab   DSSS_CCK-40
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1

config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption none

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option channel  auto

        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption none

Change option disable to 0 and maybe SSID name and what ever setting you may want to change

config wifi-device  radio0
        option type     mac80211
        option channel  5
        option macaddr  00:27:19:ba:b4:35
        option hwmode   11ng
        option htmode   HT20
        list ht_capab   SHORT-GI-40
        list ht_capab   DSSS_CCK-40
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     SSID1
        option encryption none

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option channel  auto

        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option ssid     SSID2
        option encryption none

Save and exit nano

To check setting

wifi

You should get

Configuration file: /var/run/hostapd-phy0.conf
device wlan0 entered promiscuous mode
br-lan: port 2(wlan0) entering forwarding state
Using interface wlan0 with hwaddr 00:27:19:ba:b4:35 and ssid 'SSID1'
device wlan0 left promiscuous mode
br-lan: port 2(wlan0) entering disabled state
device wlan0 entered promiscuous mode
br-lan: port 2(wlan0) entering forwarding state
device ath0 entered promiscuous mode
br-lan: port 3(ath0) entering forwarding state
root@OpenWrt:/#

You should be good to go

[size=18]Trouble shooting commands[/size]

wifi down
rm /etc/config/wireless
wifi detect

You will see the default-configuration which most likely works with your driver. Should look somehow like this:

config wifi-device  radio0
        option type     mac80211
        option channel  5
        option macaddr  00:1b:fc:91:8f:eb
        option hwmode   11g
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1

config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     red
        option encryption       none

If nothing is displayed, the driver probably does not support the card. -> try a diffent driver or card.
Oterwise do

wifi detect > /etc/config/wireless

and edit the file with "vi".

1) Delete the "option disabled 1" line
2) Set "option ssid" to your wlan name.
3) If you have installed wpa-supplicant, you can change "option encryption none" to "option encryption psk" or "option encryption psk2" for WPA or WPA2 and add an additional line: "option key mysecretkey"
4) Important Note: When using ATH9K, the script will suggest "option hwmode 11ng". That didn't work with my "TP-Link TL-WN861N" card. I had to change it to "option hwmode 11g".

Now do:

wifi up

and wifi should be working. Then you can start fiddling with the other options in there and do "wifi up" to reinitialize wifi.

If if does not work, you might want to do "dmesg" to view the most recent kernel messages.


Oh, another thing: Your clients will not always get their IP addresses via dhcp from your router. DHCP only works on your wifi interface, if wifi was brought up on boot. So reboot instead of doing "wifi up" after fiddling with your config or assign an IP address manually on your wifi clients (for testing).

1) A reboot should is not required.

2) The 'wifi' command is fine without any parameters. 'wifi' just rereads the wireless configuration.

1) A reboot should is not required.

maybe I should have used this command instead of reboot

wifi up

I spent hours trying to get my cards to work.

It would be good if we could add and edit the wiki

James wrote:

4) Important Note: When using ATH9K, the script will suggest "option hwmode 11ng". That didn't work with my "TP-Link TL-WN861N" card. I had to change it to "option hwmode 11g".

So does that mean that it isn't running in N - but is really running G?

Hi,

I was just researching on this matter, I'm new to miniPCI cards, pardon the possibly silly question:

Wouldn't it be possible to produce a simple openWRT WIFI router with just 2 components and the OpenWRT firmware:

Routerstation Pro with power supply
TP-Link TL-WN861N wireless minipci card


Why the need for the Ubiquiti SR2 WiFi Mini-PCI Radio also? Which are the differences between the SR2 and the TL-WN861N
and why are they both needed?


Thanks in advance,

Wickwire

wickwire wrote:

Hi,

I was just researching on this matter, I'm new to miniPCI cards, pardon the possibly silly question:

Wouldn't it be possible to produce a simple openWRT WIFI router with just 2 components and the OpenWRT firmware:

Routerstation Pro with power supply
TP-Link TL-WN861N wireless minipci card


Why the need for the Ubiquiti SR2 WiFi Mini-PCI Radio also? Which are the differences between the SR2 and the TL-WN861N
and why are they both needed?


Thanks in advance,

Wickwire

you are correct, you only need one card. Its just an example.

From my understanding this how-to has become some what depreciated. Newer backfire firmwares set themselves up (plug and play)

The discussion might have continued from here.