# how to make a wireless access point with in-kernel rt2x00

## equaeghe

Hi,

I've got a rt2500 on my desktop and would like to use it to create a wireless access point (wap) out of it.

The desktop is connected via ethernet (eth0) to an ADSL modem (works fine).

Currently, I have a second ethernet card (eth1) for wired network sharing (works fine).

I've compiled the in-kernel rt2x00 module(s) and have managed to setup the wireless card (wlan0) in managed mode (works fine as such).

Now I would like to put wlan0 in master mode (or perhaps ad-hoc) optionally with wep encryption (wpa possible) so it functions as a wireless access point. Here I encounter some problems; I hope to get some help on them here.

First let me give my anonymized /etc/conf.d/net

```

modules=( "iproute2" )

config_eth0=( "dhcp" "192.168.0.1/24 brd 192.168.0.255" )

dhcp_eth0="release"

dhcpcd_eth0="-N"

config_eth1=( "192.168.1.1/24 brd 192.168.0.255" )

essid_wlan0="any" # comment when making wap

config_wlan0=( "192.168.2.1/24 brd 192.168.0.255" )

#essid_wlan0="<ESSID>" # uncomment when making wap

#key_<ESSID>="<KEY> enc open" # uncomment when making wap

#mode_wlan0="ad-hoc" # second choice when making wap

#mode_wlan0="master" # best choice for making wap

```

When going the ad-hoc route: /etc/init.d/net.wlan0 --verbose restart

```

 * Stopping wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel ifconfig iproute2 system dhcpcd ip6to4

 *   Bringing down wlan0

 *     Shutting down wlan0 ...  [ ok ]

 * Starting wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel iproute2 system dhcpcd ip6to4

 *       iwconfig provides wireless

 *       iproute2 provides interface

 *       dhcpcd provides dhcp

SIOCSIFFLAGS: Operation not supported

SIOCSIFFLAGS: Operation not supported

 *   Configuring wlan0 for MAC address <MAC_ADDRESS> ...  [ ok ]

SIOCSIFFLAGS: Operation not supported

 *   Configuring wireless network for wlan0

 *     wlan0 connected to ESSID "<ESSID>" at 00:00:00:00:00:00

 *     in ad-hoc mode on channel 3 (WEP enabled)

 *   Configuring wlan0 for ESSID "<ESSID>" ...  [ ok ]

SIOCSIFFLAGS: Operation not supported

 *   Bringing up wlan0

 *     192.168.2.1/24

SIOCSIFFLAGS: Operation not supported

SIOCSIFFLAGS: Operation not supported [ ok ]

SIOCSIFFLAGS: Operation not supported

```

I get "SIOCSIFFLAGS: Operation not supported"-warnings I have no clue about (what they are, what to do about them,...). The ad-hoc network is not visible. Checking with iwconfig shows that the tx power is off, putting it on results in a still invisible network...

iwconfig wlan0 gives

```

wlan0     IEEE 802.11g  ESSID:"<ESSID>"

          Mode:Ad-Hoc  Frequency:2.422 GHz  Cell: Not-Associated

          Tx-Power=27 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B

          Encryption key:<SOME_KEY>

          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

```

ip route does not give a route associated to the assigned 192.168.2.1 address, perhaps that is the problem... however, ip addr gives

```

4: wmaster0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000

    link/ieee802.11 <MAC_ADDRESS> brd ff:ff:ff:ff:ff:ff

5: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000

    link/ether <MAC_ADDRESS> brd ff:ff:ff:ff:ff:ff

    inet 192.168.2.1/24 brd 192.168.0.255 scope global wlan0

```

whatever that's worth.

When trying the master route: /etc/init.d/net.wlan0 --verbose restart

```

 * Caching service dependencies ...  [ ok ]

 * Stopping wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel ifconfig iproute2 system dhcpcd ip6to4

 *   Bringing down wlan0

 *     Shutting down wlan0 ...  [ ok ]

 * Starting wlan0

 *   Loading networking modules for wlan0

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel iproute2 system dhcpcd ip6to4

 *       iwconfig provides wireless

 *       iproute2 provides interface

 *       dhcpcd provides dhcp

SIOCSIFFLAGS: Operation not supported

SIOCSIFFLAGS: Operation not supported

 *   Configuring wlan0 for MAC address <MAC_ADDRESS> ...  [ ok ]

SIOCSIFFLAGS: Operation not supported

 *   Configuring wireless network for wlan0

Error for wireless request "Set Mode" (8B06) :

    SET failed on device wlan0 ; Invalid argument.

 *   wlan0 does not support setting the mode to "master"

 *     wlan0 connected to ESSID "<ESSID>" at 00:00:00:00:00:00

 *     in ad-hoc mode on channel 3 (WEP enabled)

 *   Configuring wlan0 for ESSID "<ESSID>" ... [ ok ]

SIOCSIFFLAGS: Operation not supported

 *   Bringing up wlan0

 *     192.168.2.1/24

SIOCSIFFLAGS: Operation not supported

SIOCSIFFLAGS: Operation not supported [ ok ]

SIOCSIFFLAGS: Operation not supported

```

No luck: master mode does not seem to be supported, although I thought I had read that the rt2x00 for the rt2500 did support it... or is this a kernel configuration problem?

Any help/pointers/suggestions appreciated

Erik

----------

## jpl888

Hi,

I have personal experience of the RT73USB chipset and you probably won't get master mode working.

Indeed the rt2x00 site says this  *Quote:*   

> two days ago, January 24th, Linux Kernel 2.6.24 was released. This is the first mainline kernel that includes (sadly a somewhat buggy) rt2x00 release.

 

Stick to ad-hoc mode for the moment or get a PCI/PCMCIA/express card with an Atheros chipset.

Have fun!

----------

## solamour

Is there any update on using RT73USB in the master mode? Considering that the previous post was over 3 years ago, I sure hope there has been development efforts. If anyone has seen progress, please share. Thank you.

__

sol

----------

## Ant P.

Any stable driver using the kernel mac80211 driver framework should support master mode. rt2x00 has been fully functional for several releases now.

----------

## cwr

I fought to get the RT2x00 driver into master mode for quite a while before giving up, but that was

a couple of years ago.  In the end I switched to an Atheros card, and that worked pretty much

first shot.  However, it's hostapd that actually flips the Atheros into master mode - as I recall, the

initial configuration comes  up as "managed".  You might try messing with hostapd and seeing

what that does.

Will

----------

