You are not logged in.

#1 2012-02-07 10:07:56

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 180

[Hostapd] Set wlan0 in Master mode

Hello,

I'm trying to create an wifi hotspot from my latptop following this tuto
Turn your Linux computer into a wireless access point using hostapd

I'm using the driver iwl4965

02:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
	Subsystem: Intel Corporation PRO/Wireless 4965 AG or AGN
	Kernel driver in use: iwl4965

This is supposed to work in master mode but it actually doesn't

# iwconfig wlan0 mode Master
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument

To get there, I've been following the tuto, so

# /etc/rc.d/networkmanager stop
# killall dhcpcd
# ifconfig eth0 down
# ifconfig wlan0 down
# echo 1 > /proc/sys/net/ipv4/ip_forward
# brctl addbr br0
# brctl addif br0 eth0
# brctl setfd br0 0
# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.001e6809196c	no		eth0

Any idea why ?

Thank you

Last edited by martvefun (2012-02-07 12:26:35)


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Thinkpad

Offline

#2 2012-02-07 11:01:08

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [Hostapd] Set wlan0 in Master mode

Setting up master mode is not as simple as running iwconfig. You need to use hostapd.

Offline

#3 2012-02-07 11:22:41

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 180

Re: [Hostapd] Set wlan0 in Master mode

Thank you for your answer, indeed I didn't read carefully, my mistake.

Now I run in another problem when launching hostapd

# hostapd -dd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Add own interface ifindex 8
nl80211: Add own interface ifindex 3
nl80211: Failed to set interface 3 to mode 3: -95 (Operation not supported)
nl80211: Failed to set interface 3 to mode 3: -95 (Operation not supported)
nl80211: Interface mode change to 3 from 0 failed
nl80211: Failed to set interface wlan0 into AP mode
nl80211 driver initialization failed.
ELOOP: remaining socket: sock=4 eloop_data=0x1d2a410 user_data=0x1d2ab40 handler=0x42daa0
ELOOP: remaining socket: sock=6 eloop_data=0x1d2d1b0 user_data=(nil) handler=0x436a90

The hostapd.conf file
What is this mode 3 ? The authentication algorithm ?

It tried setting the auth to 0 (to have open access) but I got another error "Line 34: no authentication algorithms allowed" (34 is the line auth_algs=)

Last edited by martvefun (2012-02-07 12:59:08)


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Thinkpad

Offline

#4 2012-02-07 12:10:39

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Hostapd] Set wlan0 in Master mode

It still seems to have problems to configure the interface as AP.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2012-02-07 13:09:03

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 180

Re: [Hostapd] Set wlan0 in Master mode

Now I'm not sure my card can be used in AP mode anyway.
I read you need to have "AP" in "Supported interface modes" when doing iw list

Result

...
	Supported interface modes:
		 * IBSS
		 * managed
		 * monitor
...

Does it mean I've no way to do it with this computer or is it the driver (like using a different version will work ?)


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Thinkpad

Offline

#6 2012-02-07 13:18:19

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Hostapd] Set wlan0 in Master mode

I remember I could put my IPW4965 in monitor mode, but I never tried AP. But yes, not all drivers/hardware support AP mode on Linux.

Seems to be a driver problem though: looks like iwlwifi does not support AP mode. That might be very well the reason why you don't see any routers out there with Intel wireless...

Same here on my 6200 AGN btw:

	Supported interface modes:
		 * IBSS
		 * managed
		 * monitor

Last edited by .:B:. (2012-02-07 13:19:38)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2012-02-07 13:50:41

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 180

Re: [Hostapd] Set wlan0 in Master mode

Yes it seems intel driver does not support AP. On the list of linuxwireless, we see other intel cards are not compatible for AP.
Problem "solved", no AP then.
Thank you for your answer

Last edited by martvefun (2012-02-07 13:53:57)


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Thinkpad

Offline

#8 2012-02-07 14:06:25

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [Hostapd] Set wlan0 in Master mode

Not even iwlwifi cards have AP support? I must say, that surprises me quite a bit.

Offline

#9 2012-02-07 14:09:52

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 180

Re: [Hostapd] Set wlan0 in Master mode

Wikipedia says the same, no master mode for iwlwifi.


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Thinkpad

Offline

#10 2012-02-07 15:42:38

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Hostapd] Set wlan0 in Master mode

Gusar wrote:

Not even iwlwifi cards have AP support? I must say, that surprises me quite a bit.

Probably a driver limitation. Apparently IPW3945 and IPW4965 do support AP mode with the older drivers. Might be an issue with the wireless stack, I believe the older Linux drivers did not use the present wireless stack.

Last edited by .:B:. (2012-02-07 15:43:27)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#11 2012-02-07 16:17:01

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [Hostapd] Set wlan0 in Master mode

It's always been the same stack - mac80211, however it's possible there were changes inside the stack, and rather than update the drivers, the functionality was simply removed. The drivers are after all considered "legacy". Doesn't explain why iwlwifi doesn't have AP functionality though. Probably Intel just doesn't care about it. Which I find surprising. Pretty much all other drivers - Atheros, Realtek, Ralink, Broadcom (well, just b43) - have it.

Offline

Board footer

Powered by FluxBB