rt61 soft-AP with Gentoo

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

C00LM4N

07-07-2008 20:05:19

I've been trying to set an AP on my gentoo server for a long time and still can't do it.
I was trying do it with rt2x00 git kernel, but had no success. Now the rt2x00 drivers included in gentoo kernel and I'm trying set AP again))
Firstly I couldn't compile libnl - files nf_conntrack_common.h and nf_conntrack_tcp.h didn't exist. But there were ip_conntrack.h and ip_conntack_tcp.h. I just renamed them and libnl compiled succesfully. Had no other ideas...
Now I can't install hostapd. If I do it using emerge, then it don't know about nl80211 driver. If I manually enable support of nl80211 in config file and then compile I get and error

[coded8leh3pm]cc -MMD -O2 -Wall -g -DHOSTAPD_DUMP_STATE -I../src -I../src/crypto -I../src/utils -I../src/common -DUSE_KERNEL_HEADERS -I/usr/src/linux/include -I/usr/src/libnl/include -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_IAPP -DCONFIG_RSN_PREAUTH -DCONFIG_PEERKEY -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_NL80211 -DEAP_MD5 -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_TLV -DEAP_SERVER -DEAP_TLS_FUNCS -DPKCS12_FUNCS -DINTERNAL_SHA256 -DCONFIG_NO_FIPS186_2_PRF -DCONFIG_NO_T_PRF -DCONFIG_IPV6 -c -o driver_nl80211.o driver_nl80211.c
driver_nl80211.c: In function 'nl80211_create_iface':
driver_nl80211.c:951: error: 'NL80211_MNTR_FLAG_COOK_FRAMES' undeclared (first use in this function)
driver_nl80211.c:951: error: (Each undeclared identifier is reported only once
driver_nl80211.c:951: error: for each function it appears in.)
driver_nl80211.c:953: error: 'NL80211_ATTR_MNTR_FLAGS' undeclared (first use in this function)
driver_nl80211.c: In function 'phy_info_handler':
driver_nl80211.c:1269: error: 'NL80211_BAND_ATTR_MAX' undeclared (first use in this function)
driver_nl80211.c:1271: error: 'NL80211_FREQUENCY_ATTR_MAX' undeclared (first use in this function)
driver_nl80211.c:1273: error: 'NL80211_FREQUENCY_ATTR_FREQ' undeclared (first use in this function)
driver_nl80211.c:1273: error: array index in initializer not of integer type
driver_nl80211.c:1273: error: (near initialization for 'freq_policy')
driver_nl80211.c:1273: error: field name not in record or union initializer
driver_nl80211.c:1273: error: (near initialization for 'freq_policy')
driver_nl80211.c:1274: error: 'NL80211_FREQUENCY_ATTR_DISABLED' undeclared (first use in this function)
driver_nl80211.c:1274: error: array index in initializer not of integer type
driver_nl80211.c:1274: error: (near initialization for 'freq_policy')
driver_nl80211.c:1274: error: field name not in record or union initializer
driver_nl80211.c:1274: error: (near initialization for 'freq_policy')
driver_nl80211.c:1275: error: 'NL80211_FREQUENCY_ATTR_PASSIVE_SCAN' undeclared (first use in this function)
driver_nl80211.c:1275: error: array index in initializer not of integer type
driver_nl80211.c:1275: error: (near initialization for 'freq_policy')
driver_nl80211.c:1275: error: field name not in record or union initializer
driver_nl80211.c:1275: error: (near initialization for 'freq_policy')
driver_nl80211.c:1276: error: 'NL80211_FREQUENCY_ATTR_NO_IBSS' undeclared (first use in this function)
driver_nl80211.c:1276: error: array index in initializer not of integer type
driver_nl80211.c:1276: error: (near initialization for 'freq_policy')
driver_nl80211.c:1276: error: field name not in record or union initializer
driver_nl80211.c:1276: error: (near initialization for 'freq_policy')
driver_nl80211.c:1277: error: 'NL80211_FREQUENCY_ATTR_RADAR' undeclared (first use in this function)
driver_nl80211.c:1277: error: array index in initializer not of integer type
driver_nl80211.c:1277: error: (near initialization for 'freq_policy')
driver_nl80211.c:1277: error: field name not in record or union initializer
driver_nl80211.c:1277: error: (near initialization for 'freq_policy')
driver_nl80211.c:1280: error: 'NL80211_BITRATE_ATTR_MAX' undeclared (first use in this function)
driver_nl80211.c:1282: error: 'NL80211_BITRATE_ATTR_RATE' undeclared (first use in this function)
driver_nl80211.c:1282: error: array index in initializer not of integer type
driver_nl80211.c:1282: error: (near initialization for 'rate_policy')
driver_nl80211.c:1282: error: field name not in record or union initializer
driver_nl80211.c:1282: error: (near initialization for 'rate_policy')
driver_nl80211.c:1283: error: 'NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE' undeclared (first use in this function)
driver_nl80211.c:1283: error: array index in initializer not of integer type
driver_nl80211.c:1283: error: (near initialization for 'rate_policy')
driver_nl80211.c:1283: error: field name not in record or union initializer
driver_nl80211.c:1283: error: (near initialization for 'rate_policy')
driver_nl80211.c:1296: error: 'NL80211_ATTR_WIPHY_BANDS' undeclared (first use in this function)
driver_nl80211.c:1314: error: 'NL80211_BAND_ATTR_FREQS' undeclared (first use in this function)
driver_nl80211.c:1366: error: 'NL80211_BAND_ATTR_RATES' undeclared (first use in this function)
driver_nl80211.c:1281: warning: unused variable 'rate_policy'
driver_nl80211.c:1280: warning: unused variable 'tb_rate'
driver_nl80211.c:1272: warning: unused variable 'freq_policy'
driver_nl80211.c:1271: warning: unused variable 'tb_freq'
driver_nl80211.c:1269: warning: unused variable 'tb_band'
make: *** [driver_nl80211.o] Error 1
[/coded8leh3pm]

Can anyone tell me step-by-step what I need to have and what I should to do to get this soft-AP working! It starts to enrage me...

IvD

07-07-2008 20:49:22

As described in countless topics on this forum
You _must_ use rt2x00.git
You _must_ use hostapd.git

help40

08-07-2008 06:30:12

I understand that you love Linux (so am I) and that you want to setup AP with your gentoo distribution .... but if you just want to use your Ralink Wifi card as AP for your laptop or pocket ... and ....
if you can pick out one old PC with the smallest HDD you can find in your "basement" you are happy and you can setup this PC as AP using "m0n0wall" it is BSD based and the driver work fine in AP mode (master mode).
I was disappointed when I found that I must recompile all my Linux distro to get my Edimax card work as AP. lately I found accidentally that BSD driver "ral" can be set as AP.
I test it and it work ..... so next step is to put ....this "old PC" of mine somewhere at the roof with one omni antena .... and to enjoy WiFi with my Ralink based card.

SOrry if this is offtopic, I am just trying to help to other with problem like mine .....
I think that no one here want to use PC running Windows as AP ....
so I think that my proposal is acceptable ....

P.S. you need
- PC ? Pentium
- RAM ? 64?B
- HDD ? 10 MB (better IDE flash module ....or CF on IDE module)
- your favourite RaLink WiFi card
- you need to use 13b version (1.2 do not include this driver)
- at least one NIC
my PC even do not have Video card ... I set it up with null modem cable trough COM1

ok ok I am finishing already ) one final .....
I found m0n0wall very easy to use ...... but it is hard to set it up with only one NIC, so I am giving the resolution here

let sis0 - your NIC
1)create a fake VLAN subinterface on sis0 and use that as a WAN interface (with some fake IP address, or just leave it in DHCP client mode), just to keep m0n0wall happy.
2)Then assign sis0 to the LAN interface
3) your wireless card to OPT1. (optional interface --asked after LAN and WAN)
4) Then enable bridging to LAN on the OPT1 setup page. No need for any firewall rules, and you can manage it through it's LAN IP address.

C00LM4N

08-07-2008 20:03:04

help40, thank you for that great idea, but I don't like simple ways mrgreen
There are too many services that I've set up on my server, and also this is a file server.
I'll continue trying to make an AP with gentoo )

Where I can find how to configure hostapd and how to compile it with right drivers support, what I should enable in kernel config, how to solve problems with libnl compiling (missing kernel headers or they're just have another name - ip* istead of nf*) and much other questions. All of these stages has many variants on different forums and MANs, so I just don't know what of them are right.