rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Setting Access Points Using EW-7811Un Wireless Adaptor

Sun Sep 09, 2012 10:57 am

Hello ,

I have installed EW-7811Un 802.11n Wireless Adapter on Raspberry running Debian 2012-08-16-wheezy-raspbian with Linux raspberrypi 3.1.9+ Kernel. Wifi Adaptor is configured perfectly and communicating with Network. I want to configure Wireless access point on raspberry using Hostapd. While Configuring Hostapd. I am getting following issue:-

root@raspberrypi:~# hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
Could not open file /sys/class/net/wlan0/phy80211/name: No such file or directory
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Failed to set interface 3 to mode 2: -19 (No such device)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Failed to set interface 3 to mode 2: -19 (No such device)
nl80211: Interface mode change to 2 from 0 failed
nl80211 driver initialization failed.


Somebody please help me in fixing this issue .

Thanks in Advance
Regards,
Rajiv

nickstewartroc
Posts: 5
Joined: Fri Aug 24, 2012 3:31 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 11, 2012 2:26 pm

When you installed the hostapd package, did you go through any type of configuration? Or did you just run? It looks like part of the problem is it not finding a file listing in the config file :
Could not open file /sys/class/net/wlan0/phy80211/name: No such file or directory
You could also check to see if that file is there, because it might be there, but when you run hostapd it does not have the permissions to open it-

Nick

rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 11, 2012 3:37 pm

Now i am getting following error:-
root@raspberrypi:/etc/hostapd# hostapd -dd hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: hostapd.conf
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
Segmentation fault

Following i my Hostapd.conf Configuration :-
interface=wlan0
driver=nl80211
country_code=FR
ssid=MY_AP
hw_mode=g
channel=6
wpa=2
wpa_passphrase=mypassphrase12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


I am wondering is Debian 2012-08-16-wheezy-raspbian support nl80211 generic netlink drivers.

Any Thoughts?

Rajiv

Arkadian
Posts: 1
Joined: Tue Sep 11, 2012 11:27 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 11, 2012 11:30 pm

I'm having the same problem with the same adaptor. If I find a solution, I'll let you know!

stevhorn5
Posts: 120
Joined: Wed Jul 04, 2012 5:47 pm
Location: Ontario, Canada

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Wed Sep 12, 2012 10:30 am

There's a good tutorial on how to get this up and running here (it worked for me):

http://sirlagz.net/2012/08/09/how-to-us ... er-part-1/

Just a couple of things to note BEFORE working through the tutorial:

1) Install bridge-utils (sudo apt-get install bridge-utils) BEFORE you install and configure hostapd and things will go more smoothly
2) Make sure there aren't any trailing spaces in any lines in the /etc/hostapd/hostapd.conf file. hostapd will not start if they're there. (It took me quite awhile to troubleshoot this.) I also removed all commented out lines in all the configuration files as some of them were throwing out errors.
3) If you're just using the RPi as an access point, there is no need to install and configure dnsmasq as ip addresses will come from your router's dhcp server.

rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Wed Sep 12, 2012 11:12 am

Thanks. I will try these steps.

Can you please tell me what USB adapter you have used to set up access point ?

Rajiv

stevhorn5
Posts: 120
Joined: Wed Jul 04, 2012 5:47 pm
Location: Ontario, Canada

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Wed Sep 12, 2012 11:17 am

Hi rajivsh85

I used a Linksys WUSB600N v2 usb adapter.

rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Wed Sep 12, 2012 6:14 pm

No Luck still i am getting same error :? :cry:

Rajiv

stevhorn5
Posts: 120
Joined: Wed Jul 04, 2012 5:47 pm
Location: Ontario, Canada

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Thu Sep 13, 2012 9:15 am

Rajiv:

Did you run iw list to make sure that adapter supports AP?

rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Fri Sep 14, 2012 2:18 am

I am getting following error on running iw list

root@raspberrypi:~# iw list
nl80211 not found.

Rajiv

stevhorn5
Posts: 120
Joined: Wed Jul 04, 2012 5:47 pm
Location: Ontario, Canada

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Fri Sep 14, 2012 9:56 am

That's odd. It sounds like the driver may not be installed correctly.

Here are some troubleshooting ideas ( from: http://elinux.org/RPi_edimax_EW-7811Un):

Troubleshooting
1. If the blue light on the adapter comes on, but the adapter does not acquire an IP address, the problem is in wpa_supplicant.conf. ifconfig will show the adapter, but not an IP address.
2. If the blue light does not come on, the problem is in the earlier stages.
3. Use the command line utility dmesg to review kernel messages. It is helpful to save the output to file so that it can be edited and examined at leisure (use dmesg >dmesg.log and then edit dmesg.log).
4. Despite the fact that rtl8192cu.ko has been blocked, dmesg still gives the following message: usbcore: registered new interface driver rtl8192cu. This does not indicate an error.
5. dmesg does not record error messages relating to errors in wpa_supplicant.conf. The only way to see these is to boot with a directly attached display and watch the messages going by. These are errors such as a failure to put quotes round the SSID.

Good Luck.

hemna
Posts: 6
Joined: Mon Sep 17, 2012 5:23 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Mon Sep 17, 2012 5:27 pm

I get this same exact problem.

Code: Select all

root@raspberrypi:/etc/hostapd# hostapd -dd hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: hostapd.conf
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
Segmentation fault
I tried following the tutorial here
http://sirlagz.net/2012/08/09/how-to-us ... er-part-1/

But I still get the same segfault after failing to find the nl80211 driver

I can use wpa_supplicant to get the wifi to work, but I want my raspberry pi to work w/o needing an AccessPoint available, hence the need to get hostapd working.

rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 4:31 am

I am able to make edimax nano 7811Un working. But not able to setup edimax as access point using hostapd.

Is it really possible to set it up on raspberry using hostapd ?

I have tried it on windows 7 and it worked fine as access point.

Did anybody tried successfully edimax on raspberry ?

Rajiv

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 4:41 am

What chipset does that use ?
Realtek ?
if running "iw list" returns an error or cant find nl80211, hostapd will not work as it relies on nl80211.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

rajivsh85
Posts: 7
Joined: Sun Sep 09, 2012 10:33 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 5:39 am

Hello SirLagz,

I was also thinking same. ew-7811un has rtk8188cus chipset.

Do you mean rtl8188cus chipset doesn't support nl80211 drivers ? if Yes, Can you suggest any wireless usb adaptor which works with hostapd on raspberry .

Thanks,

Rajiv

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 5:51 am

Only one I've tested personally is the RALink RT5370.
some rtl8781 should also work.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

hemna
Posts: 6
Joined: Mon Sep 17, 2012 5:23 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 4:14 pm

I have the Asus N10 usb adapter and iwlist wlan0 commands work just fine, but hostapd still fails to start due to the

Code: Select all

hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
rmdir[ctrl_interface]: No such file or directory
Segmentation fault

Code: Select all

root@raspberrypi:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0b05:1786 ASUSTek Computer, Inc. USB-N10 802.11n Network Adapter [Realtek RTL8188SU]

Code: Select all

root@raspberrypi:~# iwlist wlan0 scanning
wlan0     Scan completed :
          Cell 01 - Address: 2C:B0:5D:30:DA:C9
                    ESSID:"EatABagOfShit"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
                              12 Mb/s; 48 Mb/s
                    IE: Unknown: DD840050F204104A00011010440001021041000100103B00010310470010CA6ED31D3FB2A8AAF55088F0C1B0E7491021000D4E4554474541522C20496E632E1023000A574E44523337303076331024000A574E44523337303076331042000230311054000800060050F20400011011000A574E4452333730307633100800020084103C000103
                    Signal level=100/100  
          Cell 02 - Address: 2E:B0:5D:30:DA:CA
                    ESSID:"Hemna_Guest"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:off
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
                              12 Mb/s; 48 Mb/s
                    Signal level=60/100

hemna
Posts: 6
Joined: Mon Sep 17, 2012 5:23 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 9:52 pm

Looking into this further, it seems that if you have a usb wifi device and then hostapd
driver=nl80211 gives the dreaded error below, you are hosed.

Code: Select all

hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
rmdir[ctrl_interface]: No such file or directory
Segmentation fault

hostapd doesn't support the old style wext (Linux Wireless Extensions API). hostapd really only supports the new nl80211 interface and there are a significant number of usb drivers that do not conform to the newer nl80211 api at all. hostapd will never support wext according to posts I've seen.

As a reference...
http://comments.gmane.org/gmane.linux.d ... stap/23278


The best I've been able to do is to force my Asus N10 usb wifi device into Ad-Hoc mode with wpa_supplicant. This works well with laptops and desktops....the big problem is that Android doesn't support ad-hoc without rooting the device and replacing the wpa_supplicant binary with a newer version....*sigh*.

I think we need to amend the raspberry pi usb devices page to describe which usb wifi cards implement the nl80211 API, so that you can do hostapd for AP mode.

hemna
Posts: 6
Joined: Mon Sep 17, 2012 5:23 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Tue Sep 18, 2012 10:11 pm

Here is the page that describes which drivers support cfg80211, and I presume the nl80211 api

http://wireless.kernel.org/en/users/Drivers

Use that as a cross reference with this url

http://elinux.org/RPi_VerifiedPeriphera ... i_Adapters

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Thu Sep 20, 2012 1:06 am

hemna wrote:I have the Asus N10 usb adapter and iwlist wlan0 commands work just fine, but hostapd still fails to start due to the
Not iwlist.
iw[SPACE]list.
iw list will tell you whether your adapter works with nl80211.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

marcb
Posts: 1
Joined: Sun Sep 23, 2012 11:12 am

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Sun Sep 23, 2012 11:21 am

I have the same problem setting up an AP with the ASUS USB-N10. It seems, indeed, that the driver provided in raspbian (r8712u) does not support cfg80211, hence no go for hostapd.

However, ASUS provides the sources for a driver on its website - ASUS USB-N10 Driver 1.0.0.18 for Linux, 2012.08.30 update. I have tried compiling and installing this driver, but unfortunately it bricks my Raspberry Pi (I have to reboot). Can anyone skilled enough please have a look into this driver and let the rest of us know if it could be tweaked to play along nicely with cfg80211.

Many thanks.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Sun Sep 23, 2012 2:28 pm

marcb wrote:I have the same problem setting up an AP with the ASUS USB-N10. It seems, indeed, that the driver provided in raspbian (r8712u) does not support cfg80211, hence no go for hostapd.

However, ASUS provides the sources for a driver on its website - ASUS USB-N10 Driver 1.0.0.18 for Linux, 2012.08.30 update. I have tried compiling and installing this driver, but unfortunately it bricks my Raspberry Pi (I have to reboot). Can anyone skilled enough please have a look into this driver and let the rest of us know if it could be tweaked to play along nicely with cfg80211.

Many thanks.
How does it "brick" your raspberry Pi ?
Do you mean it crashes and then you need to reboot ?
Try recompiling with swap enabled.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

Creagan
Posts: 3
Joined: Sun Sep 23, 2012 3:08 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Sun Sep 23, 2012 3:14 pm

I have the same issue - I have a EdiMax EW-7811Un using the Realtek RTL8188CUS chipset and when I use "iw list" I get the "nl80211 not found" error.

All I want if for the Pi to act as a wireless access point so that I can ssh to it without having a router.

Has anyone been able to achieve this with this wifi usb device?

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Sun Sep 23, 2012 4:04 pm

You would have to set it up in AdHoc mode...

There is a an older thread on doing this, but I don't know if it will help you.
http://www.raspberrypi.org/phpBB3//view ... 36&t=15130
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

Creagan
Posts: 3
Joined: Sun Sep 23, 2012 3:08 pm

Re: Setting Access Points Using EW-7811Un Wireless Adaptor

Sun Sep 23, 2012 5:59 pm

Thank Dweeber - I have tested this and it seems to be a bit flacky - I would rather set the Pi to be an access point - I am 97.256% there, all I nee to do is get past the "nl80211 not found" when I try to start hostapd or even when I run "iw list"

Anyone have any thoughts on why this might happen?

Return to “Networking and servers”