USB/PCI devices, in Master-Mode, on Ubuntu Hardy?

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

MJK

23-10-2009 00:33:03

Hi,
I'm hoping to connect a USB WiFi dongle (Ralink RT2571WF chipset) to a Ubuntu Hardy (LTS, 8.04.3, kernel 2.6.24) box, and to configure it as an Access Point (ie, in "Master Mode"). After researching various forums, it seems that only the following have any chance of success Ralink RT2x00[usb], Prism/Atheros/Intersil (eg, ISL3887), Marvell (8385/8686). And then, only with more recent kernels, especially 2.6.29.

So, if anyone has succeeded (on Hardy), I would be very grateful for any pointers. Compiling drivers, tweaking sources/config files, etc, is acceptable, as long as the instructions are "moderately" complete!

If no solutions exist for any USB devices (in Master Mode) on Hardy, then I'd appreciate info on any PCI devices that might work on Hardy, and, failing that, on any USB (or PCI!) devices that might work on more recent releases of Ubuntu.

Thank you,
- Mike

RushPL

23-10-2009 11:01:43

You actually don't need the newest kernel. There is a project called [bck70u356]compat-wireless[/bck70u356] which backports wifi drivers from newer kernels to the older ones so chances are that you can simply find yourself some new and shiny 'compat-wireless' package. On top of it setup hostapd and you're basically done.

MJK

23-10-2009 20:47:19

Thank you very much, RushPL.

I had already downloaded the "compat-wireless-old" package (and the matching "linux-headers" file), and installed it. The "MAKEs" gave a few errors at the very end, but the install seemed to have been ok (generally wink ). "wlan0" and "wmaster0" appeared, and lsmod showed the rt73/rt2x00/mac80211 modules, which (I think!) also suggested the install was probably OK. However, iwconfig still reported errors on trying to set "master mode".

I had not done anything on "hostapd", so maybe that's the "missing link"! I'll try to check out that fellow.

Thank you again,
- Mike

denilsonsa

23-10-2009 22:31:26

Not sure if you can make Master Mode work with USB devices. I remember the developers had an issue with them, and thus there was no support for Master Mode on USB devices. Check this topic
viewtopic.php?f=5&t=5005

However, I don't know if that issue has been solved or not.
[edit see also viewtopic.php?p=33730#p33730 ]

On the other hand, I know that rt61pci does work with Master Mode. (I'm using it right now!)

MJK

23-10-2009 23:09:04

Wow, excellent comments and links, Denilson - thank you. I've spent about 2 weeks on his topic (and with others!), but I think I had not seen the threads you mentioned.

It does seem to be a major can-of-worms, and also "subject-to-change"... I've seen a few threads mention those "ACK"-protocol issues.

I'll review their comments, and those on your own blog!!, and I'll report back here on any successes (or failures).

Thank you,
- Mike

rektide

26-10-2009 12:53:07

I've used hostapd to put my rt2800usb into master mode. That appeared to go ok, but hostapd throws some errors & clients time out when actual authentication starts to happen.

mc20

27-10-2009 04:10:21

You actually don't need the newest kernel. There is a project called [b3d5lznkw]compat-wireless[/b3d5lznkw] which backports wifi drivers from newer kernels to the older ones so chances are that you can simply find yourself some new and shiny 'compat-wireless' package. On top of it setup hostapd and you're basically done.[/quote3d5lznkw]

will it work with rt61pci? i need to put this card into master mode on Arch linux..

denilsonsa

27-10-2009 04:23:36

will it work with rt61pci? i need to put this card into master mode on Arch linux..[/quotenew7ktrl]

Can't you update to a newer kernel? I managed to make Master Mode work with rt61pci with 2.6.30 kernel. See my posts
viewtopic.php?p=33830#p33830
http//my.opera.com/CrazyTerabyte/blog/ ... de-finally

mc20

27-10-2009 08:53:51

finally, I managed to put rt61pci in master mode on Arch with kernel 2.6.31 by compiling compat-wireless (from here)[/urlormz8vbb] and hostapd with nl80211 [url=http://linuxwireless.org/en/users/Documentation/hostapdormz8vbb](from here)[/urlormz8vbb] from sources..

hostapd from my distro doesn't support nl80211, but I will check if legacy driver will sufficient to master mode..

greets

EDIT
it seems so only hostapd need to be compiled, because today I managed to put RT61 in Master mode without compat-wireless..

Sorry if I wrote as Captain Obvious )

MJK

04-11-2009 04:54:50

...an update...

I started from the beginning again...
- Linux (Ubuntu 8.04.3), kernel 2.6.24
- compat-wireless-old (2.6)
- the development packages (build-essential, headers, openssl, git, git-core, etc)
- libnl-1.1 (sources, re-compiled, etc)
- hostapd – latest – 0.7.0.

So far, I've not installed the RT2x00 drivers (etc, etc) from git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git, nor tried to install any later kernel sources – assuming these would result in a major kernel update, which might break other apps, etc...

I've updated hostapd.conf. When I run [bewff9p20]./hostapd hostapd.conf[/bewff9p20], I get “[iewff9p20]nl80211 Could not add multicast membership for scan events -2 (No such file or directory)[/iewff9p20]”. A few posts indicate that this message arises because hostapd 0.7.0 needs kernel 2.6.29 or later. So, perhaps getting the Ralink USB device into Master-mode on 2.6.24 is not a runner...

Can anyone confirm this, or indicate if the above RT2X00 update might help, or if I should try to install a later kernel from Ubuntu (assuming this is possible!), or if I should try the 0.6.9 version of hostapd, or.....

Thank you again for the previous posts, and for any other suggestions.
- Mike

denilsonsa

04-11-2009 07:33:20

A few posts indicate that this message arises because hostapd 0.7.0 needs kernel 2.6.29 or later. So, perhaps getting the Ralink USB device into Master-mode on 2.6.24 is not a runner...[/quote1xd0lt29]
Personally I think that 2.6.24 is quite old, and probably you will need a newer kernel.

I say *probably*, because I'm not sure if it is possible to make it work with such old kernel. I bet it won't work unless you either update the kernel or try to install compat-wireless or something.

My suggestion follow the instructions to manually compile your own kernel (or get a new kernel from apt-get). Updating a kernel won't break things (except nvidia drivers, some older drivers have issues with newer kernels). Also, you can have multiple kernels installed, and choose which one to run at Grub. Thus, you can install a newer kernel, see if it works, and easily go back to the previous one if it doesn't.

MJK

05-11-2009 01:37:02

Thank you (again!) for your feedback...

[quote3ms51a4a]Personally I think that 2.6.24 is quite old, and probably you will need a newer kernel.[/quote3ms51a4a]
OK, I'll try IvD's sources, and see if that helps. If not, I'll then try some of the Ubuntu ones.

[quote3ms51a4a]I say *probably*, because I'm not sure if it is possible to make it work with such old kernel. I bet it won't work unless you either update the kernel or try to install compat-wireless or something.[/quote3ms51a4a]
I have "compat-wireless-old" installed, because I was using 2.6.24. I guess I'll have to use the later "compat-wireless", if I go to an appropriate (more recent) kernel.

[quote3ms51a4a]My suggestion follow the instructions to manually compile your own kernel (or get a new kernel from apt-get). Updating a kernel won't break things (except nvidia drivers, some older drivers have issues with newer kernels). Also, you can have multiple kernels installed, and choose which one to run at Grub. Thus, you can install a newer kernel, see if it works, and easily go back to the previous one if it doesn't.[/quote3ms51a4a]
OK. "Done!"

2 other minor queries
- Log-files Despite changing the logging options in hostapd.conf (and some fiddling with the sys[k]logd settings), I have never seen any “hostap” message in any log-file. And I've seen no posts anywhere that others have had this issue.
- I'm compiling a long detailed note of the steps I've followed – about 6 pages (A4/Letter). Any suggestions where I should post this – in case it's of any use to anyone in the same predicament - HowtoForge, Google-Docs, somewhere here, some Wiki, etc? Obviously, it would be useful to allow others to edit, and/or comment... HowtoForge sounds good to me...

Thank you again,
- Mike

phusg

09-12-2009 22:01:39

will it work with rt61pci? i need to put this card into master mode on Arch linux..[/quoteot91yv6u]

Can't you update to a newer kernel? I managed to make Master Mode work with rt61pci with 2.6.30 kernel. See my posts
viewtopic.php?p=33830#p33830
http//my.opera.com/CrazyTerabyte/blog/ ... de-finally[/quoteot91yv6u]Hi there Denilson,

Thanks for write up. I'm having some trouble following in your footsteps though. I have a Sitecom WL-171 wireless adaptor, also with RT61 chipset,
[codeot91yv6u]# lspci
05:08.0 Network controller: RaLink RT2561/RT61 802.11g PCI

# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
eth1 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:"wifi"
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=13 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0[/codeot91yv6u]
But when I try to change to master mode,
[codeot91yv6u]
# iwconfig wlan0 Mode Master
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.[/codeot91yv6u]
Which firmware are you using for your card? I'm using version 1.2 which seems to be the latest AFAIK. My kernel is also version 2.6.30. I'm using Debian Linux. Hopefully you or someone else here can give me a hint as to what the problem is...

Greetings from Holland,
Pete

denilsonsa

09-12-2009 23:24:25

But when I try to change to master mode,
[code1jt7x8b3]
# iwconfig wlan0 Mode Master
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.[/code1jt7x8b3][/quote1jt7x8b3]
You can't set it to master mode manually.

The hostapd daemon will set the interface to the master mode (and do any other required initializations for such mode).