rt2x00.serialmonkey.com

Support forum for the rt2x00 project
It is currently Sat Jul 31, 2010 3:14 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: yet another rt61 master mode adventure
PostPosted: Sun Jun 22, 2008 9:34 am 
Offline

Joined: Sat Jun 21, 2008 10:50 pm
Posts: 5
Hi,

First i'd like to thank you all for the huge work done om maintaining rt2x00 drivers. I've been following this forum over a year and now i felt i had time to try rt2x00 drivers on my soekris net4801 board with RT2561/RT61 miniPCI card. so far, the ad-hoc mode worked fine with ndiswrapper.

Here's my story:

first, i compiled latest 2.6.26-rc5 kernel from rt2x00 git repository
then libnl from git repository. (had to fight with some linker errors)
finally, i succeeded compiling hostapd from git repository.
the modifications made to config file were:

Code:
CONFIG_DRIVER_NL80211=y
LIBNL=/usr/src/libnl
CFLAGS += -I$(LIBNL)/include/
LIBS += -L$(LIBNL)/lib/


To compile hostapd, i had to modify driver_nl80211.c, because libnl had changed the names and behaviour of some functions:

Code:
nl_handle_alloc_cb -> nl_socket_alloc_cb
nl_handle_destroy -> nl_socket_free
foo = genl_ctrl_alloc_cache(bar) -> genl_ctrl_alloc_cache(bar,&foo)


also, for the linker to succeed, i had to modify Makefile:
Code:
LIBS += -lnl -lnl-genl -lnl-nf -lnl-route


at this point the driver fails to work neither in master nor ad-hoc modes.
when i fire hostapd, i get:

Code:
moosipurk:~# hostapd -dd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
Opening raw packet socket for ifindex -1208805724
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
Hardware does not support configured mode
wlan0: IEEE 802.11 Hardware does not support configured mode (0)
Could not select hw_mode and channel. (-1)
wlan0: Unable to setup interface.
Flushing old station entries
Deauthenticate all stations
rmdir[ctrl_interface]: No such file or directory


following error appears to dmesg:
Code:
phy1: TX to low-level driver (len=26) FC=0x00c0 DUR=0x0000 A1=ff:ff:ff:ff:ff:ff A2=00:14:85:cd:9b:6d A3=00:14:85:cd:9b:6d
__dev_addr_discard: address leakage! da_users=1


iwconfig shows the wlan0 interface in master mode, but when i assign the SSID, IP and bring the interface up, my laptop doesnt see it and doesnt associate to it.
Any thoughts, or something i havent noticed yet?


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Sun Jun 22, 2008 11:31 am 
Offline

Joined: Sat Jun 21, 2008 10:50 pm
Posts: 5
few things i forgot in previous post:

Distro i use is Debian Etch.

lspci says:
Code:
00:00.0 Host bridge: Cyrix Corporation PCI Master
00:06.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
00:07.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
00:08.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
00:0e.0 Network controller: RaLink RT2561/RT61 802.11g PCI
00:12.0 ISA bridge: National Semiconductor Corporation SC1100 Bridge
00:12.1 Bridge: National Semiconductor Corporation SC1100 SMI
00:12.2 IDE interface: National Semiconductor Corporation SCx200 IDE (rev 01)
00:12.5 Bridge: National Semiconductor Corporation SC1100 XBus
00:13.0 USB Controller: Compaq Computer Corporation ZFMicro Chipset USB (rev 08)


output of iwconfig:
Code:
wlan0     Link encap:Ethernet  HWaddr 00:14:85:CD:9B:6D
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::214:85ff:fecd:9b6d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:1264 (1.2 KiB)


Attachment:
dmesg.txt [7.33 KiB]
Downloaded 55 times

Attachment:
hostapd.conf.txt [19.75 KiB]
Downloaded 286 times

Attachment:
File comment: ouput of lsmod
lsmod.txt [1.15 KiB]
Downloaded 53 times


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Sun Jun 22, 2008 1:15 pm 
Offline

Joined: Sat Jun 21, 2008 10:50 pm
Posts: 5
2 more hours of hacking and the card works well in master mode using WPA encryption..

the line missing from hostapd.conf was:
Code:
hw_mode=g


thanks for the good work.


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Sun Jun 22, 2008 1:25 pm 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5876
Location: Haarlem, The Netherlands
Good to hear it is working. :)

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Thu Jun 26, 2008 8:25 pm 
Offline

Joined: Thu Jun 26, 2008 3:46 pm
Posts: 5
paabu wrote:
Hi,
i compiled latest 2.6.26-rc5 kernel from rt2x00 git repository
then libnl from git repository. (had to fight with some linker errors)

Hi,
why did you build libnl rather than using the one available in etch?

I'm running lenny with 2.6.18 and would like to run my rt2400 card in AP mode too, is building hostapd needed rather than using a prebuilt .deb?


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Fri Jun 27, 2008 12:11 pm 
Offline

Joined: Sat Jun 21, 2008 10:50 pm
Posts: 5
Quote:
why did you build libnl rather than using the one available in etch?


hostapd failed to compile with the debians default libnl. I couldn't debug it, so i went for latest stable libnl 1.1, which also failed to compile on my system.
the git version of libnl compiled, so i stayed with it.

Quote:
is building hostapd needed rather than using a prebuilt .deb?


the latest stable hostapd 0.5.10 uses CONFIG_DRIVER_DEVICESCAPE and i see no hint to libnl in config file.
the git version i got to work uses CONFIG_DRIVER_NL80211

conclusion: master mode is pretty bleeding edge :)


Top
 Profile  
 
 Post subject: one more question
PostPosted: Sun Jun 29, 2008 7:55 pm 
Offline

Joined: Sat Jun 21, 2008 10:50 pm
Posts: 5
I dont know wheter it's a driver or hostapd issue or drivers:

i'm unable to put the card into 802.11bg nor 802.11b mode, so my windows laptop with 802.11b compatible card can connect the network.

other laptop with 802.11g compatible card works fine.


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Sun Jun 29, 2008 8:50 pm 
Offline

Joined: Wed May 17, 2006 10:03 pm
Posts: 262
AP mode support is still not complete in mac80211, see
http://wireless.kernel.org/en/developer ... #APsupport

I'm not sure what the issue listed with basic rate support is but it seems possible that is related to the failure to operate in b mode. It is also possible that the issues with short slot / short preamble relate to not being able to disable them which would break b compatibility.

Basically you are correct in surmising that AP mode is bleeding edge.


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Wed Oct 08, 2008 1:35 am 
Offline

Joined: Wed Feb 08, 2006 4:13 am
Posts: 18
paabu wrote:
2 more hours of hacking and the card works well in master mode using WPA encryption..

You said it works with WPA encryption but the hostapd.conf file you gave above had WPA disabled. Did you really get it to work? If so, would you please share the conf file you used?

I got my rt61 to work in AP mode following your and other people's posts in this forum. Thanks again for posting your progress. However, I couldn't get the WPA/2 to work like these guys in another thread (viewtopic.php?f=5&t=4963&start=0). Hostapd seem to be working, when I try to connect with a vista laptop it sees that the network is configured with WPA or WPA2 and asks for an appropriate-sized password. I see packets received by hostapd, but the laptop never establishes the connection.

I have a PCI card
Code:
01:06.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
on a Debian unstable system with the kernel 2.6.27-rc6-wl from the rt2x00 GIT tree with a 32-bit P4 CPU. I disabled the HW encryption support in the kernel since I was told by IvD that the code is still experimental. I also installed the latest hostapd and libnl packages from their respective GIT repositories as you described.

I'd appreciate if you have any ideas to try.

_________________
--Cengiz


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Wed Oct 08, 2008 7:34 am 
Offline

Joined: Sun Sep 21, 2008 11:38 am
Posts: 8
cengique wrote:
I got my rt61 to work in AP mode following your and other people's posts in this forum. Thanks again for posting your progress. However, I couldn't get the WPA/2 to work like these guys in another thread (viewtopic.php?f=5&t=4963&start=0).

Same problem here, at the moment I use a Linksys WPC54G Card
with the Broadcom BCM 4318 chipset and the b43 driver.
Without WPA/2 encryption I can use the AP Mode
and the PCs can connect to the "Access Point".

But with WPA/2 enabled I get a lot of:
Quote:
WPA: EAPOL-Key timeout

errors in the hostapd debug output.
So maybe its more a problem with the nl80211 interface driver within hostapd
or the mac80211 subsystem and not a problem of the hardware driver module?


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Thu Oct 30, 2008 5:51 am 
Offline

Joined: Thu Oct 30, 2008 5:44 am
Posts: 5
That's patch for hostapd-git for compiling it with libnl-git. I've not used libnl-1.1 because it didn't build cleanly.
Attachment:
hostap.git-libnl.patch [1.39 KiB]
Downloaded 85 times


upd: Sorry for broken patch. New one uploaded.


Top
 Profile  
 
 Post subject: Re: yet another rt61 master mode adventure
PostPosted: Thu Oct 30, 2008 3:59 pm 
Offline

Joined: Thu Oct 30, 2008 5:44 am
Posts: 5
Debian kernel package you may get at
deb http://woland.perm.ru/debian rt2x00-etch main


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group