yet another rt61 master mode adventure

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4859

paabu

22-06-2008 09:34:34

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

[codegnqla8uq]CONFIG_DRIVER_NL80211=y
LIBNL=/usr/src/libnl
CFLAGS += -I$(LIBNL)/include/
LIBS += -L$(LIBNL)/lib/
[/codegnqla8uq]

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

[codegnqla8uq]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)[/codegnqla8uq]

also, for the linker to succeed, i had to modify Makefile
[codegnqla8uq]LIBS += -lnl -lnl-genl -lnl-nf -lnl-route[/codegnqla8uq]

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

[codegnqla8uq]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[/codegnqla8uq]

following error appears to dmesg
[codegnqla8uq]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
[/codegnqla8uq]

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?

paabu

22-06-2008 11:31:28

few things i forgot in previous post

Distro i use is Debian Etch.

lspci says
[codevj6trxnx]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)[/codevj6trxnx]

output of iwconfig
[codevj6trxnx]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)
[/codevj6trxnx]

[attachment=0vj6trxnx]dmesg.txt[/attachmentvj6trxnx]
[attachment=1vj6trxnx]hostapd.conf.txt[/attachmentvj6trxnx]
[attachment=2vj6trxnx]lsmod.txt[/attachmentvj6trxnx]

paabu

22-06-2008 13:15:32

2 more hours of hacking and the card works well in master mode using WPA encryption..

the line missing from hostapd.conf was
[codel0zmkjui]hw_mode=g[/codel0zmkjui]

thanks for the good work.

IvD

22-06-2008 13:25:13

Good to hear it is working. )

anddam

26-06-2008 20:25:53

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)
[/quote3h7q4zlc]
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?

paabu

27-06-2008 12:11:25

[quote3koksb5l]why did you build libnl rather than using the one available in etch?[/quote3koksb5l]

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.

[quote3koksb5l]is building hostapd needed rather than using a prebuilt .deb?[/quote3koksb5l]

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 )

paabu

29-06-2008 19:55:05

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.

AdamBaker

29-06-2008 20:50:59

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.

cengique

08-10-2008 01:35:17

2 more hours of hacking and the card works well in master mode using WPA encryption..
[/quote5v0s1kor]
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 [code5v0s1kor]01:06.0 Network controller: RaLink RT2561/RT61 rev B 802.11g[/code5v0s1kor] 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.

ZX81

08-10-2008 07:34:32


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).[/quote2fh1tgyj]
Same problem here, at the moment I use a Linksys WPC54G Card
with the [b2fh1tgyj]Broadcom BCM 4318 chipset and the b43 driver[/b2fh1tgyj].
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
[quote2fh1tgyj]
WPA EAPOL-Key timeout
[/quote2fh1tgyj]
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?

Woland

30-10-2008 05:51:17

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=01m2emvr0]hostap.git-libnl.patch[/attachment1m2emvr0]

[b1m2emvr0]upd[/b1m2emvr0] Sorry for broken patch. New one uploaded.

Woland

30-10-2008 15:59:54

Debian kernel package you may get at
deb http//woland.perm.ru/debian rt2x00-etch main