Hostapd Access point fails to run

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
TommyAllen
 
Posts: 4
Joined: Thu Jan 28, 2016 8:45 pm

Hostapd Access point fails to run

Post by TommyAllen »

Trying to set up a WAP using this dongle:
https://learn.adafruit.com/setting-up-a ... youll-need

My Wifi Dongle:
https://www.adafruit.com/products/2638

Pimoroni claims AP is supported:
https://shop.pimoroni.com/collections/r ... ifi-dongle

First error showed up when running:
pi@raspberrypi ~ $ sudo apt-get install hostapd isc-dhcp-server
Returned:

Code: Select all

Generating /etc/default/isc-dhcp-server...
[....] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics                                      [FAIL failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
A few forum posts said that this issue would be fixed during the configuration

I continued with the tutorial with no issue until the 'First test!' section, where you run:
sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
I get a return of:

Code: Select all

Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0xed6638
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.
My configuration file (/etc/hostapd/hostapd.conf) looks like

Code: Select all

interface=wlan0
driver=rtl871xdrv
ssid=TomsPi
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
I assume rtl871xdrv is the correct driver for a BCM43143 chipset, but I can't really tell...

using the nl80211 referenced in the tutorial doesnt work either, returns 'unknown driver'

If I skip the first step test and try to start hostapd I get a return of

Code: Select all

[FAIL] Starting advanced IEEE 802.11 management: hostapd failed!

it looks to be a driver error (rtl871xdrv driver initialization failed)

and configuration file errors (ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!)

I've spent the past two days looking all over the place, but I have not found a working fix, I've found the same errors but with different adapters/adapters.



Any help would be appreciated! Pulling my hair out over this!

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Hostapd Access point fails to run

Post by drewfustini »

Which SD card image are you running on your Pi?
TommyAllen wrote: I assume rtl871xdrv is the correct driver for a BCM43143 chipset, but I can't really tell...
rtl871xdrv would be for Realtek chipsets and should not apply to the Broadcom chipset.

Have you tried these instructions?
eLinux.org: RPI-Wireless-Hotspot

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Hostapd Access point fails to run

Post by drewfustini »

This person appears to have had success:
Bcm 43143 Hostapd Driver Problem
I solved the driver problem. I followed another guide which is http://elinux.org/RPI-Wireless-Hotspot and there is a different udhpc configuration at here. Other one was making configuration to dhpc and this one is configates udhpc. And one more point, I did not make sudo apt-get update.

User avatar
TommyAllen
 
Posts: 4
Joined: Thu Jan 28, 2016 8:45 pm

Re: Hostapd Access point fails to run

Post by TommyAllen »

Thanks for the reply, I am running raspbian-wheezy (5/5/15)

I have tried that elinux guide but only after trying the Adafruit tutorial . I'll load up a fresh install of Rasbian and try that elinux guide today.

I'll report back if I am successful.

User avatar
TommyAllen
 
Posts: 4
Joined: Thu Jan 28, 2016 8:45 pm

Re: Hostapd Access point fails to run

Post by TommyAllen »

Success! Either I was doing something wrong before, or using the adafruit tutorial first stopped something in the elinux tutorial from working.

So all what did differently was run from a clean Rasbian install and created a open network with
If you would like to create an open network, put the following text into /etc/hostapd/hostapd.conf:

interface=wlan0
ssid=My_AP
hw_mode=g
channel=6
auth_algs=1
wmm_enabled=0
So no driver was actually specified.

Working like a charm, even VNC runs smoothly on this connection.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”