access point without hostapd

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

sacha

24-01-2008 10:03:26

Is it possible to create an access point using rt2x00 driver (rt61pci) just by setting wlan interface in Master mode (and and be by adding some WEP keys)?

I already have an AP using hostapd, but would like to test different configurations (have some problems with connectivity loss, would like to locate them).

IvD

24-01-2008 18:49:29

I don't think it would work, since HostAP is in charge of accepting association attempts...

sacha

25-01-2008 06:46:56

I don't think it would work, since HostAP is in charge of accepting association attempts...[/quote21m5ggkp]

And could it be true that sometimes this functionality is implemented in hardware?

IvD

25-01-2008 19:23:28

I don't think it would work, since HostAP is in charge of accepting association attempts...[/quote1odcivk2]

And could it be true that sometimes this functionality is implemented in hardware?[/quote1odcivk2]

Yes, but are you seriously thinking the Ralink hardware has such build in capabilities? rt61 has firmware, yes, but they still need the full mac80211 to handle everything. And since mac80211 doesn't do anything without instructions from userspace, we still end up with a userspace having to do at least something.

solardiz

31-01-2008 04:34:48

sacha - do you have hostapd working with the rt2x00 driver? What versions? I'd like to set this up, too, but other threads on this forum seemed to indicate that the driver was not ready for master mode yet, and hostapd does not mention it as a supported one.

So far, I've got the rt2x00 git kernel as of yesterday working with the card in managed and ad-hoc modes, but not in master mode - I can set the interface to master mode, but the network is not seen when scanning from a nearby system (although other networks are seen). I wonder if this indicates an issue with the driver (still incomplete support for master mode?) or is it just because I am not using hostapd. IvD - your comments would be very welcome.

FWIW, I tried applying these additional changes, but it did not help -

[code34fsfy2t]
--- rt2x00-build/net/mac80211/ieee80211_ioctl.c.orig 2008-01-30 10:04:46 +0300
+++ rt2x00-build/net/mac80211/ieee80211_ioctl.c 2008-01-30 11:02:33 +0300
@@ -242,6 +242,9 @@ static int ieee80211_ioctl_siwmode(struc
case IW_MODE_ADHOC:
type = IEEE80211_IF_TYPE_IBSS;
break;
+ case IW_MODE_MASTER:
+ type = IEEE80211_IF_TYPE_AP;
+ break;
case IW_MODE_MONITOR:
type = IEEE80211_IF_TYPE_MNTR;
break;
--- rt2x00-build/net/mac80211/cfg.c.orig 2008-01-30 10:04:46 +0300
+++ rt2x00-build/net/mac80211/cfg.c 2008-01-30 12:07:58 +0300
@@ -28,6 +28,10 @@ nl80211_type_to_mac80211_type(enum nl802
return IEEE80211_IF_TYPE_STA;
case NL80211_IFTYPE_MONITOR:
return IEEE80211_IF_TYPE_MNTR;
+ case NL80211_IFTYPE_AP:
+ return IEEE80211_IF_TYPE_AP;
+ case NL80211_IFTYPE_AP_VLAN:
+ return IEEE80211_IF_TYPE_VLAN;
default:
return IEEE80211_IF_TYPE_INVALID;
}
[/code34fsfy2t]

(I did not follow the code paths, so possibly the changes are in fact irrelevant...)

solardiz

31-01-2008 05:02:42

I forgot to mention, in case this is relevant - the card I am using is Edimax EW-7128G (PCI), which also works with Ralink's rt61 driver (no master mode), and the firmware that I use with rt2x00 is rt2561s.bin (MD5 2878d5eaa4ff907d4df36a834915aa53) from Ralink's 2007_1210_RT61_Linux_STA_v1.1.2.0.tar.bz2

AdamBaker

31-01-2008 21:24:31

If you are using the latest rt2x00 git kernel then the driver probably contains everything that is needed for master mode on rt61. The ability to generate beacons is still missing on rt73, I don't know about the other devices.

You will however need to patch mac80211 and hostapd. The most recent explanation I can find of the needed changes is at http//readlist.com/lists/shmoo.com/hostap/0/3992.html

This is untested for rt2x00 so feedback would be appreciated.

bhulsken

01-02-2008 17:10:37

I got hostapd working a bit for rt2500pci,

using the latest wireless-everything.git with Johannes' patches ( from http//johannes.sipsolutions.net/patche ... all/LATEST )

011-mac80211-optional-alignment-warning.patch
012-mac80211-dissolve-prerx-handlers.patch
013-mac80211-sparse-check-endianness-by-default.patch
014-wireless-fix-erp-rate-flag.patch
015-mac80211-split-txrx-result.patch
016-mac80211-split-rx-drop.patch
017-nl80211-monitor-flags.patch
018-mac80211-support-monitor-flags.patch
019-mac80211-clean-rx-path.patch
020-mac80211-no-dynamic-rx-tx-handlers.patch
021-mac80211-move-code-into-rx-handler-invoke.patch
022-mac80211-cooked-monitor.patch
023-allow-ap-vlan-modes.patch
024-mac80211-allow-wds.patch
026-mac80211-inj-rts-cts.patch
028-mac80211-multi-bss-bss-struct.patch

and enabling Master mode again, by applying this to wireless-everything
--- compat-wireless-2.6/drivers/net/wireless/rt2x00/rt2x00mac.c 2008-01-31 163432.000000000 +0100
+++ rt2x00mac.c 2008-01-31 163537.000000000 +0100
@@ -164,14 +164,6 @@
struct rt2x00_dev *rt2x00dev = hw->priv;
struct interface *intf = &rt2x00dev->interface;

- /* FIXME Beaconing is broken in rt2x00. */
- if (conf->type == IEEE80211_IF_TYPE_IBSS ||
- conf->type == IEEE80211_IF_TYPE_AP) {
- ERROR(rt2x00dev,
- "rt2x00 does not support Adhoc or Master mode");
- return -EOPNOTSUPP;
- }
-
/*
* Don't allow interfaces to be added while
* either the device has disappeared or when

using hostapd-0.6.2, again with Johannes' patches ( http//johannes.sipsolutions.net/patche ... es.tar.bz2 )

I could connect my laptop at least once, on fedora8. Still tuning to get a more reliable configuration. If you are interested in trying stuff, here are the .src.rpms for the wireless stuff, and hostapd. They should compile on fedora 8, you need kernel-dev ofcourse, and the newest libnl from rawhide.

this is the patched hostapd
http//steadydecline.net/public/hostapd ... 01.src.rpm
this is the rt2x00 modules from wireless-everything, again patched
http//steadydecline.net/public/mac8021 ... -1.src.rpm
this is my hostapd log upon connecting, from line 721 it authenticates my laptop)
http//steadydecline.net/public/hostapd.log

cheers,
Bas

buliwoof

12-02-2008 14:46:24

Hi all,

[quotemwxdhlyx]I got hostapd working a bit for rt2500pci, [/quotemwxdhlyx] bhulsken do you think hostapd working also with rt61 cart ?

Do you think that I can use your method for using my Debian distribution as wifi router ?