1. Store
  2. Apps
  3. Hardware
  4. Support
  5. Solutions

ClearFoundation

Forums
Welcome, Guest
Hostapd - rt61pci acting as an Access Point
(1 viewing) 1 Guest
Go to bottomPage: 123
TOPIC: Hostapd - rt61pci acting as an Access Point
*
#21824
Hostapd - rt61pci acting as an Access Point 4 Years ago  
After many many months of hacking at my wireless card, i've finally managed to get it running in master mode - I'd previously thought it was impossible until I found some short nuggets on information on the net....recent kernel upgrades have also helpd. I've now managed to build hostapd so that it supports nl80211 and the latest madwifi drivers. This means I can now run my rt61pci card in master mode as an access point!

Requirements:
At least kernel-2.6.18-194 (as provided in ClearOS5.2 SP1) as this comes with v2.3.0 of module rt61pci
Any of my testing kernel-2.6.32.x series will also do
Updated version of libnl (see RPM below)
Card firmware

My card:
Code:

01:08.0 Network controller: RaLink RT2561/RT61 802.11g PC
[root@starlane ~]# modinfo rt61pci
filename:       /lib/modules/2.6.18-194.8.1.v5/kernel/drivers/net/wireless/rt2x00/rt61pci.ko
license:        GPL
firmware:       rt2661.bin
firmware:       rt2561s.bin
firmware:       rt2561.bin
description:    Ralink RT61 PCI & PCMCIA Wireless LAN driver.
version:        2.3.0
author:         http://rt2x00.serialmonkey.com
srcversion:     837F6BFF59EED4FCA542D27
alias:          pci:v00001814d00000401sv*sd*bc*sc*i*
alias:          pci:v00001814d00000302sv*sd*bc*sc*i*
alias:          pci:v00001814d00000301sv*sd*bc*sc*i*
depends:        rt2x00lib,rt2x00pci,eeprom_93cx6,crc-itu-t
vermagic:       2.6.18-194.8.1.v5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1
parm:           nohwcrypt:Disable hardware encryption. (bool)
I



Installation:-
1. First configure your card from the webconfig (give it a static IP on it's own subnet, and LAN or HotLAN role)

2. Download the card firmware from www.ralinktech.com/support.php?s=2
Extract and save all three *.bin files into /lib/firmware

3. Install
Setup the community repo as per instructions HERE
Code:

yum --enablerepo=timb install hostapd


If your running a newer kernel-2.6.32+ you can use a new version of hostapd
Code:

yum --enablrepo=timb-testing --enablerepo=timb install hostapd



4. Edit config at /etc/hostapd.conf, as a minimum you will need to add the interface name (wlan0), the hw_mode (a,b or g), channel number (1-13), and ssid. You can also select the madwifi driver if using an Atheros card by changing the driver name. Driver options are: hostap / wired / madwifi / nl80211

If you want WPA2 uncomment the four lines and the passphrase. The passphrase needs to be greater than 8 characters long.

Code:

# Uncomment these for base WPA & WPA2 support with a pre-shared key
wpa=3
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

# DO NOT FORGET TO SET A WPA PASSPHRASE!!
wpa_passphrase=mypassphrase

# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211

# Customize these for your local configuration...
interface=wlan0
hw_mode=g
channel=1
ssid=RT61PCI-AP


5. Then run 'service hostapd start'

You should now find that your card has entered master mode, (run 'iwconfig' to check) and that your access point is now available to be connected to.

6. DHCP
Before you can connect you will need to enable DHCP on this interface. You can do this from the webconfig

Troubleshooting
Errors and client handshakes are displayed in /var/log/messages
Debugging - run 'service hostapd stop' then from the console 'hostapd -d /etc/hostapd.conf' to get the debug output
Frequent start/stops of the service may result in the driver crashing due to the virtual wlan0 interface. Disable the interface and reload the module to start again,
Code:

service hostapd stop
ifconfig wlan0 down
modprobe -r rt61pci
modprobe rt61pci
service hostapd start


If things are still a bit flaky try the newer 2.6.32 kernels

Thanks! i'm posting this from my laptop connected at 54mpbs using WPA2-PSK, with throughput of 25Mbps


For the technically minded:-
I have also provided hostapd-0.7.3 (the latest version) but this requires the 2.6.32 kernel due to upgrades in the nl80211 driver. Feel free to try this version also. 0.6.9 works well with the 2.6.18 kernels...
You cannot use iwconfig to set master mode, the rt2x00 drivers for the rt61 card only permit hostapd to make these changes
The config file provided is a simplified version of the actual hostapd config. There are many more configurations available...see the hostapd source for details
You can configure more complex environments such as radius authenticaton, see hostapd docs for info
Tim Burgess
Moderator
Posts: 6675
graph
User Offline Click here to see the profile of this user
Last Edit: 2011/09/28 19:20 By timb80.
The administrator has disabled public write access.
 
#21826
Re: Hostapd - rt61pci acting as an Access Point 4 Years ago  
This page was also valuable for understanding how to get hostapd / nl80211 up and running
wireless.kernel.org/en/users/Documentation/hostapd
Tim Burgess
Moderator
Posts: 6675
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21833
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
Tim, this is sooo cool. As usual, you deliver some great technology. I'm eager to try this out.
Dave Loper
ClearFoundation
Posts: 810
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21838
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
David Loper wrote:
Tim, this is sooo cool. As usual, you deliver some great technology. I'm eager to try this out.

Why is this so cool? I try to understand this tread but master mode... Wow i'm getting dizzy of this stuff.

I don't doubt your knowledge guys but to me it's like yeah like...
Marcel van Leeuwen
Platinum Boarder
Posts: 1662
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Server: Xeon E3-1275, Intel S1200V3RPL, 16GB, Samsung 840 Pro : ClearOS Professional 6.5 | Storage: Synology RS2414+ : DSM 5.0
 
#21839
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
hehe master mode is like the holy grail of wireless networking, it turns your normal wireless PCI card - which normally can only connect to other existing networks, into an access point. This means you can setup a wireless network using your NIC, and don't need another NIC / Wireless router combo to do the job for you.

Thanks David, let me know how it goes!
Tim Burgess
Moderator
Posts: 6675
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/12/16 15:09 By timb80.
The administrator has disabled public write access.
 
#21861
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
Sweet!
Peter Baldwin
Developer
Posts: 2106
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21895
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
I used this method to set up my AP and it's been running for over a month now with no issues. It actually seems to run more stable than the hardware it replaced.

I did upgrade to the 2.6.32 kernel and the wireless card I used has an ath9k chip so I didn't need madwifi. I also had to compile libnl and hostapd from source since no working RPM's seemed to exist at the time - that would have saved me a lot of work, but it was a learning experience

In fact, I was so shocked that it all worked (despite my lack of skills in this particular area) that if the old eServer I installed it on dies I'll be devastated LOL
Raquel Wey
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21898
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
Correct, with the previous WPA2 infrastructure piece that was done, and the hostapd, we only need a good list of Wireless NICs that support master mode that have been tested on ClearOS and you can have a directory-enabled wireless access node.

This means that you can create a ClearOS Wireless access point that has a backup replicate of the directory so if your Wireless access is not able to connect to the master server, you can still cache the authentication. Add the captive portal stuff done recently as well, content filtration and voila... ClearOS Internet Cafe version.

Now all we need is a MIPS kernel
Dave Loper
ClearFoundation
Posts: 810
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21899
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
Tim Burgess wrote:
hehe master mode is like the holy grail of wireless networking, it turns your normal wireless PCI card - which normally can only connect to other existing networks, into an access point. This means you can setup a wireless network using your NIC, and don't need another NIC / Wireless router combo to do the job for you.

Thanks David, let me know how it goes!


, now i understand. I thought it was a card specially to act as a access point but you do this with a normal wireless card. Indeed COOL Tim.

Do you you like your new job as developer...
Marcel van Leeuwen
Platinum Boarder
Posts: 1662
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Server: Xeon E3-1275, Intel S1200V3RPL, 16GB, Samsung 840 Pro : ClearOS Professional 6.5 | Storage: Synology RS2414+ : DSM 5.0
 
#21904
Re:Hostapd - rt61pci acting as an Access Point 4 Years ago  
Racquel, hopefully the RPM's will save others the grief that I and you endured to get it up and running! hopefully you'll be able to help test with your ath9k chip?

David, this list is a good starting point... any of the Ralink rtXX cards based on the r2x00 drivers should be ok. Indeed Radius to provide the authentication, matched with Hostapd, and then captive portal makes an intruiging combination!.....am I right in thinking a MIPS kernel would open up the embedded device market then you could have ClearOS running on your home router
linuxwireless.org/en/users/Drivers

Marcel, I love the challenge
Tim Burgess
Moderator
Posts: 6675
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/12/17 16:35 By timb80.
The administrator has disabled public write access.
 
Go to topPage: 123
  get the latest posts directly to your desktop