Creating an Access Point in 11.1

If anyone can offer any advice, I’d be VERY pleased . . .

I have used YaST2 (Network Settings | Global Options | Network Setup = Traditional with ifup) to create an Access Point for my network.

All looks good. I can set the mode to “Master”, ESSID and Security as I would expect - except I can’t find a field to set ESSID broadcast on/off? But I’ve got bigger problems that that to overcome first.

After weeks of looking-at, all I’ve got is this from /var/log/boot.msg:



Setting up (remotefs) network interfaces:
wlan0 device: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)
command ‘iwconfig wlan0 mode Master’ returned Error for wireless request “Set Mode” (8B06) : SET failed on device wlan0 ; Invalid argument.

Now, as I’m sure you know, the AR5008 can be used as an Access Point (in fact I robbed it from a Belkin FD8632 to be absolutely sure that the hardware/firmware is suitable). Are the iwconfig command parameters case sensitive?

Any advice or links to a setup document would be really, REALLY welcome.

Regards, ~Martin

martinprowe wrote:
> If anyone can offer any advice, I’d be VERY pleased . . .
>
> I have used YaST2 (Network Settings | Global Options | Network Setup =
> Traditional with ifup) to create an Access Point for my network.
>
> All looks good. I can set the mode to “Master”, ESSID and Security as I
> would expect - except I can’t find a field to set ESSID broadcast
> on/off? But I’ve got bigger problems that that to overcome first.
>
> After weeks of looking-at, all I’ve got is this from
> /var/log/boot.msg:
>
> …
> …
> Setting up (remotefs) network interfaces:
> wlan0 device: Atheros Communications Inc. AR5008 Wireless Network
> Adapter (rev 01)
> command ‘iwconfig wlan0 mode Master’ returned Error for wireless
> request “Set Mode” (8B06) : SET failed on device wlan0 ; Invalid
> argument.
> …
> …
>
>
> Now, as I’m sure you know, the AR5008 can be used as an Access Point
> (in fact I robbed it from a Belkin FD8632 to be absolutely sure that the
> hardware/firmware is suitable). Are the iwconfig command parameters case
> sensitive?
>
> Any advice or links to a setup document would be really, REALLY
> welcome.

I have been planning on writing a howto on this topic, but have not gotten too
far yet.

The one sound piece of advice I can give is to abandon the junk WEXT tools such
as iwconfig, etc. in favor of hostapd. The only gotcha is that the version
shipped with 11.1 (0.5.10) is not new enough to support nl80211 as the driver.
You will need to download and build the current version of hostapd. Once that is
done, you can run an AP from most devices with drivers that use mac80211. In my
case, I used a BCM4318 and b43. Setting up an AP was as simple as creating a
file /etc/hostapd.conf with contents


interface=wlan0
driver=nl80211

hw_mode=g
channel=1
ssid=test

wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=12345678

and starting hostapd, with the command:


sudo hostapd -B /etc/hostapd.conf

At that point, I could see the beacons and associate with this AP running with
WPA2 encryption.

The part I have not finished is the firewall, DHCP server configuration, etc.

Larry

Hi Larry,

Thanks for the advice. I’d be more than happy to swich to any tool that will do the job. The only gotcha with your gotcha is : “You will need to download and build the current version of hostapd.” Being a newbe of less than a month to SuSE (and Linux) - I wouldn’t have the first idea on how to go about it!

Got the patience to lead me through this minefield?

Hoping? ~Martin

martinprowe wrote:
>
> Thanks for the advice. I’d be more than happy to swich to any tool that
> will do the job. The only gotcha with your gotcha is : “You will need to
> download and build the current version of hostapd.” Being a newbe of
> less than a month to SuSE (and Linux) - I wouldn’t have the first idea
> on how to go about it!
>
> Got the patience to lead me through this minefield?

It is not a minefield.

The first step is to use YaST => Software Management to install gcc (the
compiler), make, and hostapd packages. Although we need a newer version, the
openSUSE package installs some support files. You then use Google to find the
source package for hostapd-0.6.X (X is now 8), and download it to your home
directory. Open a console and enter the command ‘tar zxvf hostapd-0.6.8.tar.gz’.
Follow this with ‘cd hostapd-0.6.8/hostapd’ and ‘make’. This should finish
without error. If it does, finish the installation with ‘sudo make install’. The
new version of hostapd will now be available. Modify /etc/hostapd.conf as needed.

Larry

Martin: I am not a wireless expert; larry is the guru;

but if I offer some pointers for installing the Latest stable release:(hostapd-0.6.8) that larry recommended to you;

you get it as a compressed hostapd-0.6.8.tar.gz file

so essentially you decompress it, and configure, make and install

you get the file from here I believe

hostapd: IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator

and here is a Wikipedia about it

hostapd - Wikipedia, the free encyclopedia

Here is a summary from an earlier Suse posting with extra bits from me …

How to Install tar.gz Files - Linux Forums

on how to install a tar.gz file.

If you click on the link in the above, you will download it to a specified directory in your system that you choose;
then you need to open a terminal and change directory to the one containing hostapd.tar.gz

as root

Code:

**tar -zxvf nameof.tar.gz
**
this command above is the equivalent of unzip in windows (it uncompresses an archive)

this should create a hostapd directory inside your download directory; if you type ls, it lists the directories and you should see it; then cd hostapd; then run the below:

then usually do below(but always read INSTALL file or README etc)

Code:

./configure
make
make install

you usually can do configure and make as a regular user and make install as root. But these are very generic questions and the INSTALL file or whatever it is called in each particular case will give detailed instructions and if you still don’t know then ask.

did you install OpenSuse from a DVD? If so, you should have all the background ingredients you will need running: make; gcc and others; if the steps above fail at any point; they will usually tell you what you are missing: ie gcc or somesuch

here is a longer howto on installing tarballs; read it too

How to install Linux / UNIX *.tar.gz tarball files

let the forum know how you get along

Hi again Larry and er . . . “Busy Penguin”?

Thank you both very much for the very prompt replies and excellent directions.
It was going so well too! But . . .(and I did read the README). These are the last few lines of my console session. It seems I need a configuration file? Can I check with you experts that I can safely follow the “run cp defconfig …” instructions? Or will that make matters worse?


... (last few lines of the unzip)
hostapd-0.6.8/src/wps/wps_upnp_ssdp.c
hostapd-0.6.8/src/wps/wps_upnp_web.c
router:/home/remote # cd hostapd-0.6.8/hostapd
router:/home/remote/hostapd-0.6.8/hostapd # make
Building hostapd requires a configuration file
(.config). See README for more instructions. You can
run "cp defconfig .config" to create an example
configuration.
make: *** [verify_config] Error 1
router:/home/remote/hostapd-0.6.8/hostapd # _

Looking forward to the next instalment,
~Martin

part of linux is sadly, doing some homework on your own;

your post includes the advice from the programme

See README for more instructions

your .tar.gz contained I think three readme files; so have a read at them: we run gnome, and so use gedit as a text editor/reader;

if you are kde, google for what is right for you;

I think larry finger would agree you need to do the homework first

In the hope that you still feel inclined to help, the file hostapd/readme says that there is a sample hostapd.conf included in the package. Which indeed there is. And although most of it is rem’ed-out, some lines are (I assume) valid. So why is make complaining? Is the problem downsteam and something in hostapd.conf is wrong or incomplete?

Best regards, ~Martin

martinprowe wrote:
>
> In the hope that you still feel inclined to help, the file
> hostapd/readme says that there is a sample hostapd.conf included in the
> package. Which indeed there is. And although most of it is rem’ed-out,
> some lines are (I assume) valid. So why is make complaining? Is the
> problem downsteam and something in hostapd.conf is wrong or incomplete?

Sorry, I forgot the configuration step. While in the hostapd-0.6.8/hostapd
directory, you should

cp defconfig .config

Then exit .config, find the line that contains #CONFIG_DRIVER_NL80211=y and
remove the # symbol.

You should then rename the sample /etc/hostapd.conf to /etc/hostapd.conf_orig
and substitute the one I gave you a couple of posts ago.

Larry

Thanks for coming back Larry,
Its very much appreciated.

Does that mean replace completely (716 lines with 12!) or merge?
I have assumed that the merge is more likely and moved on.

So after amending the /hostapd/.config and the /etc/hostapd.config, I returned to your instructions and ran make. Opps . . .

This is is the output from make!

Who said that this wasn’t a Minefield?

Regards, ~Martin

martinprowe wrote:
> Thanks for coming back Larry,
> Its very much appreciated.
>
> lwfinger;1958134 Wrote:
>>
>> Sorry, I forgot the configuration step. While in the
>> hostapd-0.6.8/hostapd directory, you should
>>
>> cp defconfig .config
>>
>> Then exit .config, find the line that contains #CONFIG_DRIVER_NL80211=y
>> and remove the # symbol.
>>
>> You should then rename the sample /etc/hostapd.conf to
>> /etc/hostapd.conf_orig
>> and substitute the one I gave you a couple of posts ago.
>
> Does that mean replace completely (716 lines with 12!) or merge?
> I have assumed that the merge is more likely and moved on.
>
> So after amending the /hostapd/.config and the /etc/hostapd.config, I
> returned to your instructions and ran make. Opps . . .
>
> ‘This is is the output from make!’
> (http://www.mpr75.talktalk.net/MakeOutput.html)

First of all, NEVER run any make as root. Too many things can go wrong. About
3 years ago, there was an error in the make file for the kernel. When a kernel
was built as root, /dev/null got destroyed, which caused all manner of strange
things to happen.

It looks as if you need to install the kernel sources as well. Perhaps only the
kernel headers are required, but do the source for safety.

In fact, only the 12 lines are needed, but you can merge them if you want to
keep all the comments.

Larry

First of all, NEVER run any make as root.

Thank you, yet again, for the advice.

It looks as if you need to install the kernel sources as well. Perhaps only the kernel headers are required, but do the source for safety.

But I THINK(?) I have got the source code installed? I used YaST|SW Mgmt|“kernel-source” and “kernel-syms”. Is this correct?

I have also cleaned up the lf/cr’s in the Output from “make” to make it a bit easer to read.

I am wondering if it is not the nl80211 driver source that I need? Where does that come from?

Don’t loose stamina now! I’m sure that we are almost there :wink:

Regards, ~Martin


netlink/genl/genl.h: No such file or directory 
locate genl.h

/usr/include/netlink/genl/genl.h
rpm -qf /usr/include/netlink/genl/genl.h

**libnl-devel**-1.1-48.22

Index of /repositories/home:/Akoellh/openSUSE_11.1_Update

RepoView: Akoellh’s Home Project (openSUSE_11.1_Update) - package hostapd 0.6.8

(No warranty - use at your own risk)

Sorry to highjack this thread, but I am currently facing the same problem, with the exact same chipset.

I was, however, able to compile hostapd 0.6.8 by installing zlib-devel and libopenssl-devel. Now, though, it seems that I do not have the nl80211 driver…

How do I fix this?

Any help would be appreciated :slight_smile:

martinprowe wrote:
>
> I am wondering if it is not the nl80211 driver source that I need?
> Where does that come from?

The kernel.

I think we need some additional steps to make your kernel sources to be usable
for an external build. I don’t need to do them there.

We need to do a little work first.


sudo chown -R XXX:users /usr/src/linux*
cd /usr/src/linux
cp /proc/config.gz .
gunzip config.gz
cp config .config
make prepare

In the chown command, XXX is your user name.

Larry

Zodiak wrote:
> Sorry to highjack this thread, but I am currently facing the same
> problem, with the exact same chipset.
>
> I was, however, able to compile hostapd 0.6.8 by installing zlib-devel
> and libopenssl-devel. Now, though, it seems that I do not have the
> nl80211 driver…
>
> How do I fix this?

Argggh. It turns out that nl80211 was added after 2.6.27. You will need the
compat-wireless package from http://linuxwireless.org/en/users/Download.

Larry

martinprowe wrote:
>
> Don’t loose stamina now! I’m sure that we are almost there :wink:

You probably won’t need the steps in my previous message; however, you will need
to download, build and install compat-wireless from
http://linuxwireless.org/en/users/Download.

Larry

Webpin -results for compat wireless (openSUSE 11.1)

Larry Finger wrote:
> martinprowe wrote:
>> Don’t loose stamina now! I’m sure that we are almost there :wink:
>
> You probably won’t need the steps in my previous message; however, you will need
> to download, build and install compat-wireless from
> http://linuxwireless.org/en/users/Download.

You will also need the libnl and libnl-devel packages.

Larry