Master mode again

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

wolleric

29-02-2008 21:19:10

Hi everyone,

one more topic about rt2x00 in master mode...
I have an RT2500 which I would like to set-up as an AP. I've pulled the git kernels (rt2x00, linux-2.6 and John Linville's wireless-testing) and applied the most recent patches from Johannes Berg every two or three days now for some months (!). Same with hostapd. But I never managed to get it to work.
To set the RT2500 into master mode via iwconfig, Johannes' patches are even insufficient, I have to manually add two lines to ieee80211_ioctl.c. hostapd prints lots of lines about not being able to communicate with the kernel (setting rates etc.). It actually creates an AP visible to clients, but upon connecting nothing happens.

Did anyone here manage to get this to work correctly? Johannes told me via e-mail, there shouldn't be any additional patches necessary for the rt2x00 driver to work, so obviously I'm doing something wrong. /

Regards,
Eric

AdamBaker

29-02-2008 23:23:56

Have you first confirmed that the kernel you are using works reliably in managed mode (i.e. as a client)? There are a couple of bugs in the current kernel that make it not work with at least some devices so you need to know if it is working with yours before you can assess what might be wrong in master mode.

wolleric

29-02-2008 23:46:02

Hmm, believe me, I'd be glad to test it, but I have no other APs around...that's why I'm using rt2500 legacy drivers in ad-hoc mode for quite some time now, with all the disadvantages ad-hoc comes with.

LeoNerd

01-03-2008 16:57:30

I'm suffering the same issue, on an RT61 card

000e.0 Network controller RaLink RT2561/RT61 802.11g PCI

I'm using the rt2x00 git kernel (which claims 2.6.25-rc2).

Have you first confirmed that the kernel you are using works reliably in managed mode (i.e. as a client)? There are a couple of bugs in the current kernel that make it not work with at least some devices so you need to know if it is working with yours before you can assess what might be wrong in master mode.[/quote1u9guxnc]

It appears to work in managed mode; that is, I can at least "scan" for APs

# iwlist wireless scan
wireless Scan completed
Cell 01 - Address 001601xxyyzz
ESSID"001601xxyyzz"
ModeMaster
...

I don't have any APs around that I can use, but attempting to associate with a non-encrypted one I see in the scan list does give result

wireless IEEE 802.11 ESSID"Cricket01"
ModeManaged Frequency2.462 GHz Access Point 00173Fxxyyzz

Attempting to set master or ad-hoc mode always fails with

# iwconfig wireless mode master
Error for wireless request "Set Mode" (8B06)
SET failed on device wireless ; Invalid argument.

# iwconfig wireless mode ad-hoc
Error for wireless request "Set Mode" (8B06)
SET failed on device wireless ; Device or resource busy.


What next should I try?

-- EDITED TO ADD --

By the way, I'm not sure if it's relevant, but I build a monolithic, rather than modular kernel, for this embedded router/AP device.

IvD

01-03-2008 17:49:51


# iwconfig wireless mode master
Error for wireless request "Set Mode" (8B06)
SET failed on device wireless ; Invalid argument.

# iwconfig wireless mode ad-hoc
Error for wireless request "Set Mode" (8B06)
SET failed on device wireless ; Device or resource busy.
[/quote2ol3uea2]

Did you apply Johannes Bergs patches to enabled master mode?
Is the interface down when you try to change the working mode?

Addiotionally 2.6.25-rc has master and adhoc mode disabled in rt2x00.
Check patch
http//git.kernel.org/?p=linux/kernel/g ... 680a0e6b7f

LeoNerd

02-03-2008 00:32:15

Did you apply Johannes Bergs patches to enabled master mode?
[/quote7lhjqfwq]

Ah - I wasn't aware that was needed. I shall look into that.

Is the interface down when you try to change the working mode?
[/quote7lhjqfwq]

I didn't realise that was necessary - having "ifconfig down"ed it, it now switches to ad-hoc mode. I can't manage to make it work in this mode though, but I don't know if that's this driver or the other end - another post for that trouble I think.

Addiotionally 2.6.25-rc has master and adhoc mode disabled in rt2x00.
Check patch
http//git.kernel.org/?p=linux/kernel/g ... 680a0e6b7f[/quote7lhjqfwq]

Yes; I've seen that patch. The lines it removes are already not present in my kernel.

wolleric

02-03-2008 10:08:27

I know this wasn't for me, but I'll quote you anyway, Ivo. )


Did you apply Johannes Bergs patches to enabled master mode?
[/quoteh41hs68g]

I did, and as I said one has to manually patch ieee80211_ioctl.c to allow master mode in siwmode() for iwconfig to accept the mode switch.


Is the interface down when you try to change the working mode?
[/quoteh41hs68g]

It is.


Addiotionally 2.6.25-rc has master and adhoc mode disabled in rt2x00.
Check patch
http//git.kernel.org/?p=linux/kernel/g ... 680a0e6b7f
[/quoteh41hs68g]

That's why I tried different git trees, but with the same result.

I'm seriously thinking about getting a broadcom adapter because obviously Johannes managed to get at least those to work. /

Regards, Eric

pweber07

03-03-2008 00:59:49

I certainly wish that the status quo of the legacy drivers had been carried on until the drivers in the kernel tree had matured enough to provide a better module. I have been running legacy for 4 years with an rt2500 pci board and was really happy until the crash of 2.6.19 and when the old drivers just went away. You see I had been happily running an ad-hoc home network using the rt2500 providing Internet access. Since these needed changes came down I have been quite frustrated and finally got another card to come up as an ad-hoc bss. It is a shame but the only method to connect to the PC and out into the Internet is through a Redmond OS which I thoroughly hate.
I bought a usb stick in the hopes that it would work on my laptop, that has another chip in it that doesn't work yet either. But then I found it to have the ralink chip rt73 in it. I have not been able to get the situation back to what it was since I upgraded from the ...18 kernel.
Could you please give me the right information about how to get the chip running ad-hoc? Otherwise as the writer above states, perhaps I should return the USB stick and go looking for something that is actually supported under linux. But I had been really happy about the solid support that this site has given the rt2x00 family over the years.

Phil cry

IvD

03-03-2008 09:13:48

I certainly wish that the status quo of the legacy drivers had been carried on until the drivers in the kernel tree had matured enough to provide a better module.
[/quote3426f4mz]

What are you talking about, the legacy drivers are still maintained...


I have been running legacy for 4 years with an rt2500 pci board and was really happy until the crash of 2.6.19 and when the old drivers just went away.
[/quote3426f4mz]

Went away? The download links are still present, there is still developer activity, what more do you need? Something that magically sends newer versions of the driver to your computer. ;)


You see I had been happily running an ad-hoc home network using the rt2500 providing Internet access. Since these needed changes came down I have been quite frustrated and finally got another card to come up as an ad-hoc bss. It is a shame but the only method to connect to the PC and out into the Internet is through a Redmond OS which I thoroughly hate.
I bought a usb stick in the hopes that it would work on my laptop, that has another chip in it that doesn't work yet either. But then I found it to have the ralink chip rt73 in it. I have not been able to get the situation back to what it was since I upgraded from the ...18 kernel.
Could you please give me the right information about how to get the chip running ad-hoc?[/quote3426f4mz]

For the legacy drivers, just read the iwpriv_usage.txt and various howtos on this website...

wolleric

04-03-2008 13:19:06


Could you please give me the right information about how to get the chip running ad-hoc?[/quote2g4a4lgn]

Hi Phil,

if I understand you correctly, you want to use an RT2500 PCI in ad-hoc mode. This is, at least for me, no problem with the legacy cvs drivers and any recent kernel. Just don't use iwconfig/iwpriv, modify only the config file, "/etc/Wireless/RT2500STA/RT2500STA.dat" I think it was. There you can even set WPA-NONE as ad-hoc encryption there. Works like a charm here.

HTH, Eric

p.s. By the way, once again, obviously nobody has succeeded in using master mode since kernel 2.6.18 or so? Ah, those were the days.... )

pweber07

04-03-2008 23:47:16

Hello,
Thank you for your help, although the master isn't working I have got the wifi running in my house finally. I have an acx111 card running on the main gentoo workstation/router ad-hoc and my laptop is using the rt73usb dongle in ad-hoc mode. Since I am running gentoo flavor, sabayon, I backed down to the stable kernel 2.6.23 and they had the patch incorporated in the portage tree. Just a caveat, it didn't seem to operate too well at first glance until I ran an ifconfig down and then up following the changes in iwconfig, and voila I was pinging out to the internet. After changing my /etc/conf.d/net file to reflect the changes the dongle comes up.
As long as I can run ad-hoc between the two boxes and have some encryption, I feel that I am fairly safe for now. This toshiba has a realtek 8196 chip onboard and the drivers are no where close to the work that is being done on this site, they lock the kernel wreaking havoc on my system and doing what should never happen with linux, forcing a hard reset.
Again thanks for the help, after a month of frustration I finally have something up and running.

Regards,
Phil wink

wolleric

05-03-2008 11:38:43

Hmm, sounds like the solution to your problem had nothing to do with my "help". ;) Anyway, glad to hear you managed to get your WLAN up and running.
By the way, apart from the missing WPA encryption methods and the lower maximum distance between two clients, are there any disadvantages in using ad-hoc mode? For example instabilities when a third/fourth/... client connects?

Regards, Eric

pweber07

05-03-2008 15:54:08

Hello Eric,
Well, actually the acx is running ad-hoc but has the same power out and speeds as the ap would and I only have had up to four machines up and have not really noticed any difficulties yet. Where the acx card is I did have an edimax ew7128g which has the 2560 or 61 chip on it. That is a gentoo box and when I updated around the 2.6.21 kernel I lost connectivity, BTW this was a really frustrating situation. That is when I dug into another client and grabbed the other card.

Right now I am not yet willing to pull the edimax out again until these cards support hostap, which really doesn't appear to be more that six months in the future. It would be great if all of the wifi chip manufacturers were as willing to help the linux community as Ralink has done with their users.

Realtek and Toshiba did us no service when Toshiba incorporated the Realtek IC in their laptops, it would have been much more productive to have used the Ralink rt73usb instead. Under the Richmond OS the chip is operating at ap speeds in ad-hoc, which is not really following the standards. Their "inf" files do not even refer to the installed chip if one attempts to use NDISwrapper, hence, it won't even run on a 64bit Linux OS. This really follows what I always say, if one buys cheap it will be more expensive in the long run, I got a good price on the Toshiba.

Enough said on that point, I am a happy camper now, I do have a wifi link up and don't have to string the Ethernet cable across the room, hogging all of the bandwidth on one machine. My wife is happy, she can do her internet shopping without having to take over and leave me waiting until she is done. Now I can finish getting the Toshiba fully operational and running Linux the way that I believe that it is supposed to be done.

One final point, perhaps it means nothing to other than gentoo machines
If I have the dongle plugged in when I start up the machine it configures perfectly and before the gui is up I have a fully routed connection.
On the other hand, if I plug the dongle in later I have to drop the ifconfig using --ifconfig wlan0 down--, and then either --/etc/init.d/net.wlan0 restart-- or manually setting up the card with iwconfig and then ifconfig.

Thanks for giving me your two cents, I am certain that it will help others as they run into that brick wall as I had.

Regards,
Phil )

DimiG

20-03-2008 19:37:04

Hi,

So, as wrote on this forum, AP 'Master' mode was disabled because of bug and no way to use Linux as Access Point replacement. Right? But how is possible temporary enable it, check and report here if it works? Use the patch? How to apply it?
My kernel is 2.6.22.17-0.1-default

Would be great to read step by step instruction,
Sorry many questions,
Dimitri