You are not logged in.

#1 2012-06-05 08:47:35

akshay2000
Member
From: Kanpur
Registered: 2011-08-01
Posts: 29
Website

Unable to bring wlan0 up

Hello. First let me explain the situation,

I have been trying to setup hostapd so as to use My Dell XPS 401x as WiFi hotspot. It has Intel 6200N wireless card. Network is configured with networkmanager as I use Gnome. I have already confirmed that hosted networks are supported by it. I was following this guide. After setting everything up, I tried to bring up wlan0 using iproute2:

ip link set wlan0 up

However, when I checked using command ip addr state of wlan0 was down. Then I stopped networkmanager and switched back to the network scripts of Arch. My eth0 needs static IP which is correctly configured in /etc/rc.conf and it does work. However, just below the eth0, I have defined wlan0 with static IP. I am still unable to bring wlan0 up. When I enter command

#ip link set wlan0 up

nothing happens. No error is shown. However, ip addr still tells that wlan0 is down.

Am I missing anything? Is this way outdated? Is there any other way or better guide to set up hostapd?
Thanks in advance.


Wit beyond measure is man's greatest treasure!
Windows Phone app for Linux!

Offline

#2 2012-06-05 11:13:42

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,431

Re: Unable to bring wlan0 up

Configuring wlan interfaces with the rc.conf section and network is in fact outdated; you need netcfg. Try to bring up the interface manually and set the route with ip. Alternatively you should be able to set a static route in networkmanager also.
Maybe this gets you more info: https://wiki.archlinux.org/index.php/So … cess_Point

Offline

#3 2012-06-05 11:35:58

akshay2000
Member
From: Kanpur
Registered: 2011-08-01
Posts: 29
Website

Re: Unable to bring wlan0 up

Strike0 wrote:

Thanks for reply. I have gone through the wiki entry about SAP. However, its one of those not-so-clear wiki articles. Secondly, my problem seems a bit different.

Strike0 wrote:

Try to bring up the interface manually and set the route with ip.

I'm not sure what do you mean by manually - a bit dumb about that. Isn't using ip command already a manual method? Or, is there any other 'more manual' method?

Strike0 wrote:

Alternatively you should be able to set a static route in networkmanager also.

How do I do that? Just go through the GUI as in: nm-connection-editor>Wireless>'now what?'
Thanks again!


Wit beyond measure is man's greatest treasure!
Windows Phone app for Linux!

Offline

#4 2012-06-05 11:57:12

axel668
Member
Registered: 2009-08-15
Posts: 168

Re: Unable to bring wlan0 up

depending on your hardware / driver it could be eth1 instead of wlan0.


"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
(Mitch Ratcliffe)

Offline

#5 2012-06-05 12:30:59

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,431

Re: Unable to bring wlan0 up

akshay2000 wrote:

I'm not sure what do you mean by manually - a bit dumb about that. Isn't using ip command already a manual method? Or, is there any other 'more manual' method?

Yes that is the manual way, but of course you have to bring the wlan interface up and connected to your router before that.

akshay2000 wrote:
Strike0 wrote:

Alternatively you should be able to set a static route in networkmanager also.

How do I do that? Just go through the GUI as in: nm-connection-editor>Wireless>'now what?'

You just add a connection, go to the IPv4 tab, choose "manual" and appoint a static IP and route/DNS.

Have a search in the forum for "hostapd", the threads will augment the wiki on that.

Offline

#6 2012-06-05 18:26:25

akshay2000
Member
From: Kanpur
Registered: 2011-08-01
Posts: 29
Website

Re: Unable to bring wlan0 up

Strike0 wrote:

Have a search in the forum for "hostapd", the threads will augment the wiki on that.

As I already use Gnome I started following this thread.

For me, clicking 'Start Hotspot' starts hotspot on Ad-hoc mode, I guess. However, ad-hoc doesn't go well with mobile devices. Windows Phone and Android couldn't see it - iOS uses it peacefully! So, I wanted 'infrastructure' network. As you suggested, I went to nm-connection-editor>Wireless>Add connection. Connection parameters are as follows:

ssid: Finally!
Mode: Infrastructure
Device Mac address: blahblah(wlan0)
MTU: automatic
Security: None
IPv4: IP: 192.168.0.1, Netmask: 255.255.255.0 Gateway: Left blank - changed itself to 0.0.0.0
DNS: 8.8.8.8
IPv6: Ignore

Still, I'm having same problem as Paanini. It tries to connect and then I get message: Activation failed.
Again, in the crux, I am unable to bring it up. wlan0 correctly detects and connects to the WiFi networks. Even Ad-hoc hostspot works and shares Internet beautifully. Its just so close to what I want.

P.S.: When I start dnsmasq, Ad-hoc fails to activate. I'm feeling just so messed up!

Thanks a lot for attention!

Last edited by akshay2000 (2012-06-05 18:29:46)


Wit beyond measure is man's greatest treasure!
Windows Phone app for Linux!

Offline

#7 2012-06-05 19:54:49

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,431

Re: Unable to bring wlan0 up

Ah, sorry about that: When I answered your initial question (about static IP settings), I forgot the reason for your endeavour is to setup an AP. So: no, those networkmanager settings were a wrong track then.
I re-scanned the how-to you referred to in your original post and that seems to be just the right track - hostapd et al. Interesting your iphone worked with the adhoc as a hotspot (?).

Before you go on further, you should check if your wifi card / driver combination supports master mode (=infrastructure mode), which is the one you want to get hostapd up running. If your card is using the iwlwifi driver, I am afraid there seem to be  roadblocks in the air there.

Offline

#8 2012-06-06 07:02:11

akshay2000
Member
From: Kanpur
Registered: 2011-08-01
Posts: 29
Website

Re: Unable to bring wlan0 up

Strike0 wrote:

If your card is using the iwlwifi driver, I am afraid there seem to be  roadblocks in the air there.

Hmm... I see it here:

12:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6200 [8086:422c] (rev 35)
	Subsystem: Intel Corporation Centrino Advanced-N 6200 2x2 AGN [8086:1321]
	Flags: bus master, fast devsel, latency 0, IRQ 48
	Memory at fbc00000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: [c8] Power Management version 3
	Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [e0] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Device Serial Number 58-94-6b-ff-ff-b2-49-08
	Kernel driver in use: iwlwifi

Secondly, iw list gave me this:

Supported interface modes:
	 * IBSS
	 * managed
	 * monitor
software interface modes (can always be added):
	 * monitor
interface combinations are not supported

So, does that mean its the time to mark this thread 'Solved'? Can't I use any other driver/version of driver which will support it. I'm damn sure about the hardware - it works on Windows.
Thanks again.


Wit beyond measure is man's greatest treasure!
Windows Phone app for Linux!

Offline

#9 2012-06-07 08:47:01

akshay2000
Member
From: Kanpur
Registered: 2011-08-01
Posts: 29
Website

Re: Unable to bring wlan0 up

Hello!

I have had great trouble setting up hostapd on my laptop. Here I am writing down the steps for future reference.

Before you go ahead, make it sure 100 times that your wireless card-driver combination supports hosted WiFi networks (also called master or infrastructure mode) under Linux - yes, specifically under Linux. You might be able to do it under Windows using proprietary drivers, but Linux doesn't support all of them yet. One way to check is to go here and go through the list. You can verify which driver is used by kernel by using lspci command. If you want to avoid all that hassle, simply run:

iw list

This command is available through a tiny package iw - official repositories.
Look at output for something like this:

Supported interface modes:
	 * IBSS
	 * managed
	 * monitor
software interface modes (can always be added):
	 * monitor
interface combinations are not supported

As it can be seen, my hardware-driver combination doesn't seem to support master mode yet. So, no hosted WiFi for me.

Once you make sure that you are supported, here is an (a bit old) excellent article here.

The article makes use of ifconfig which is deprecated. If you are using networkmanager, you can simply go ahead and start hotspot thorough nm-connection-editor - should work out of box. You will still need the packages dnsmasq, iptables and hostapd as nm-connection-editor just works as graphical front end. These packages are not needed. The nm-connection-editor doesn't work as graphical front end. Its rather alternative. Configuration of these packages depends on the hardware. In my case, I could easily start hotspot in ad-hoc mode without any configuration. Infrastructure mode obviously did not work as my drivers don't support it.

This is purely based on my experience. If anything is wrong or if you want to add anything, please do so. I haven't been able to start the hotspot yet.

Last edited by akshay2000 (2012-06-16 15:35:33)


Wit beyond measure is man's greatest treasure!
Windows Phone app for Linux!

Offline

#10 2012-06-07 09:30:40

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,431

Re: Unable to bring wlan0 up

It's a piece of hardware with nice capabilities, yes. I have no experiences with using other drivers on those though.

edit: The above referred to post #8. Deleted obsolete reference to post #9 as the OP has edited it away.

Last edited by Strike0 (2012-06-16 13:24:15)

Offline

#11 2012-06-16 13:53:03

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,431

Re: Unable to bring wlan0 up

akshay2000 wrote:

...You will still need the packages dnsmasq, iptables and hostapd as nm-connection-editor just works as graphical front end. ..

Great summary you provide. Just the above sentence is a bit misleading IMO as the current nm/nm-connection-editor hotspot feature does not act as a front-end to all those packages. Rather it is an alternative (to the hostapd way described in the article linked above) to create a hotspot in ad-hoc mode. For that to work, the connecting client must support it also.

Some more information on networkmanager's current and (hopefully) further future hotspot features are given here. The wifi driver will still need to support AP mode then, as akshay2000 summarizes in post #9.

Offline

#12 2012-06-16 15:31:37

akshay2000
Member
From: Kanpur
Registered: 2011-08-01
Posts: 29
Website

Re: Unable to bring wlan0 up

Strike0 wrote:
akshay2000 wrote:

...You will still need the packages dnsmasq, iptables and hostapd as nm-connection-editor just works as graphical front end. ..

Great summary you provide. Just the above sentence is a bit misleading IMO as the current nm/nm-connection-editor hotspot feature does not act as a front-end to all those packages. Rather it is an alternative (to the hostapd way described in the article linked above) to create a hotspot in ad-hoc mode. For that to work, the connecting client must support it also.

Some more information on networkmanager's current and (hopefully) further future hotspot features are given here. The wifi driver will still need to support AP mode then, as akshay2000 summarizes in post #9.

You are right! It doesn't use those packages. It is indeed an alternative way to hostapd method. Card still needs to support the master mode.


Wit beyond measure is man's greatest treasure!
Windows Phone app for Linux!

Offline

Board footer

Powered by FluxBB