spearz
Posts: 1
Joined: Fri Aug 22, 2014 2:12 pm

Re: wireless AP with hostapd and realtek chipset (works)

Fri Aug 22, 2014 2:46 pm

Just joined the forum to say thanks for this post! I had been struggling with it a for a day or so, and this post really helped me out.

My AP now works great, although I had to leave hostapd installed from repo and then copy the Realtek compiled binary over the top of the old one for it to work, otherwise you end up with no /etc/init.d/hostapd script to start the service? (maybe that's just me ;-))
Thanks again for the instructions. If it helps anyone, this was my process to get everything working:

1) Followed these instructions up until the "Update hostapd" section:
https://learn.adafruit.com/setting-up-a ... l-software

2) Download the Realtek drivers from the link at the top of these instructions (RTL8188CUS)

3) Copy that zip file to your Pi

4) unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip (or whatever file you downloaded, this was correct at time of writing)

5) cd to /root/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd

6) tar xvzf ./wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz

7) cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812

8) make && make install

9) cp /usr/local/bin/hostapd /usr/sbin

10) chmod 755 /usr/sbin/hostapd (not sure if this is needed, it doesn't hurt though).

11) Go back to the original instructions in step 1, section entitled "First test!" and continue to follow

12) Ignore the last section entitled "Extra: Removing WPA-Supplicant"

13) Done :)

Cheers and thanks to OP,

pj_finnegan
Posts: 1
Joined: Tue Nov 25, 2014 3:10 pm

Re: wireless AP with hostapd and realtek chipset (works)

Tue Nov 25, 2014 4:14 pm

Hello,
a million thanks to the OP and all the other posters for this procedure, it almost worked on my RPi with a TL-WN725N version 2 TP-Link dongle .
To make it work fully, though, I had to recompile and reinstall also wpa_supplicant, wpa_passphrase and wpa_client, because when a issued a

Code: Select all

ifup wlan0
command I received lots of IOCTL errors and couldn't se the SSID from outside.
To recompile:

Code: Select all

cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_r7475.20130812/wpa_supplicant
sudo make
sudo make install
This will reinstall wpa_supplicant, wpa_passphrase and wpa_client under /usr/local/sbin.
I made sure to remove the original binaries under /sbin and /usr/bin, then I issued the commands:

Code: Select all

sudo service isc-dhcp-server stop
sudo service hostapd stop
sudo ifdown wlan0
sudo ifup wlan0
sudo service hostapd start
sudo service isc-dhcp-server start
And I could connect to the WiFi hostpots without problems, using SSID and password provided in the /etc/hostapd/hostapd.conf file.
For configuring the network interfaces, DHCP and iptables, I had used the script available at the following URL:
http://raspberry-at-home.com/hotspot-wifi-access-point/

User avatar
pimail
Posts: 8
Joined: Thu Mar 19, 2015 7:51 am
Location: Berlin
Contact: Website

Re: wireless AP with hostapd and realtek chipset (works)

Fri Mar 20, 2015 8:13 am

this worked 4 me

https://docs.google.com/document/d/16hJ ... MoJzcQ/pub

making a standalone AP with raspberry pi 2 and EDIMAX = REALTEK wifi dongle

:idea:
http://pimail.blogspot.de

User avatar
nsayer
Posts: 50
Joined: Thu Jun 26, 2014 12:43 am
Contact: Website

Re: wireless AP with hostapd and realtek chipset (works)

Mon Mar 30, 2015 3:19 am

Something about 3.18.7+ has broken hostapd with an RTL8188CUS.

Any attempt - with any of the thousands of copies of the customized hostapd binary available for download - results in
ioctl[SIOCSIWMODE]: Operation not permitted
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.
Check out my store! http://store.geppettoelectronics.com/

erwincas
Posts: 1
Joined: Sun Sep 06, 2015 1:53 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sun Sep 06, 2015 1:55 pm

Thanks man, i have been searching for days on how to do this and this worked!
You made my day

revathi26494
Posts: 1
Joined: Sat Oct 10, 2015 6:03 am

Re: wireless AP with hostapd and realtek chipset (works)

Sat Oct 10, 2015 6:09 am

hi friends ,

i have 2B pi and Rt5370 ralink wifi adapter . i have been following this linkhttp://elinux.org/RPI-Wireless-Hotspot to set wifi access point on Rpi . but it doesnt working.

kindly help me to
solve this.

Hoagie
Posts: 119
Joined: Sun Sep 23, 2012 7:19 pm

Re: wireless AP with hostapd and realtek chipset (works)

Tue Oct 20, 2015 5:50 am

Hi,

Has anyone managed to get this working with Rasbian Jessie? I had no problem on Wheezy, but keep getting this on Jessie when starting hostapd.

Code: Select all

nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started
Thanks.

therealman
Posts: 8
Joined: Thu Jul 28, 2016 8:45 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sat Jul 30, 2016 5:43 pm

Hoagie wrote:Hi,

Has anyone managed to get this working with Rasbian Jessie? I had no problem on Wheezy, but keep getting this on Jessie when starting hostapd.

Code: Select all

nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started
Thanks.

Hi. Hope this reply isn't too late. It looks like you're using the wrong driver if you're using a device with a RTL8188CUS chipset such as the Edimax EW-7811Un N150 Nano: you want rtl871xdrv not nl80211.

Change the driver= bit in /etc/hostapd/hostapd.conf and if it still doesn't work, check that the driver is installed properly.
If you told people in the 1970s that in around 40 years time, a computer the size of a credit card would have 1GB of RAM, they'd have laughed at you.

therealman
Posts: 8
Joined: Thu Jul 28, 2016 8:45 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sat Jul 30, 2016 5:58 pm

Thanks everyone for this thread. I'm having trouble getting this to work with my Edimax EW-7811Un N150 adapter.

This is the issue I'm having: http://superuser.com/questions/1106250/ ... -wpa2-work

I found this guide after posting that and decided to give the method posted by spearez a go. Unfortunately, I get the same problem when I try to connect.

Does anyone know how I can get this to work?

Thanks in advance.
If you told people in the 1970s that in around 40 years time, a computer the size of a credit card would have 1GB of RAM, they'd have laughed at you.

epoch1970
Posts: 5385
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: wireless AP with hostapd and realtek chipset (works)

Sat Jul 30, 2016 6:00 pm

therealman wrote: you want rtl871xdrv not nl80211.
Absolutely not. If you dig out a conversation that's months old at least do it for a good reason.

Currently with Raspbian kernel 4.4.x to make an AP with a device based on RTL8188CUS you must use the standard hostapd package and specify nl80211 (or nothing, that's the default anyway) as driver.

The days of recompiling hostapd for these devices are over.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

therealman
Posts: 8
Joined: Thu Jul 28, 2016 8:45 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sat Jul 30, 2016 8:04 pm

epoch1970 wrote:
therealman wrote: you want rtl871xdrv not nl80211.
Absolutely not. If you dig out a conversation that's months old at least do it for a good reason.

Currently with Raspbian kernel 4.4.x to make an AP with a device based on RTL8188CUS you must use the standard hostapd package and specify nl80211 (or nothing, that's the default anyway) as driver.

The days of recompiling hostapd for these devices are over.
:o Very sorry! Didn't know that!

So can you treat RTL8188CUS devices like any other now?
If you told people in the 1970s that in around 40 years time, a computer the size of a credit card would have 1GB of RAM, they'd have laughed at you.

epoch1970
Posts: 5385
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: wireless AP with hostapd and realtek chipset (works)

Sat Jul 30, 2016 8:32 pm

Follow the trail... viewtopic.php?f=66&t=154413
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

therealman
Posts: 8
Joined: Thu Jul 28, 2016 8:45 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sun Jul 31, 2016 11:44 am

Thanks so very much for this. I'll look through it later.

Should fix my issue :D
If you told people in the 1970s that in around 40 years time, a computer the size of a credit card would have 1GB of RAM, they'd have laughed at you.

therealman
Posts: 8
Joined: Thu Jul 28, 2016 8:45 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sun Jul 31, 2016 5:15 pm

epoch1970 wrote:Follow the trail... viewtopic.php?f=66&t=154413
epoch1970 Thank you so much! Every tutorial on the web seems to say that you still need to compile custom hostapd. It's working like a charm now and it's way easier to install from repo.

Do you mind if I when I answer my own question on the Super User link I posted that I mention your solution?

Thanks again :)
If you told people in the 1970s that in around 40 years time, a computer the size of a credit card would have 1GB of RAM, they'd have laughed at you.

epoch1970
Posts: 5385
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: wireless AP with hostapd and realtek chipset (works)

Sun Jul 31, 2016 5:47 pm

Excellent.
therealman wrote:Do you mind if I when I answer my own question on the Super User link I posted that I mention your solution?
Of course not. Spread the good news!
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

therealman
Posts: 8
Joined: Thu Jul 28, 2016 8:45 pm

Re: wireless AP with hostapd and realtek chipset (works)

Sun Jul 31, 2016 5:50 pm

Thanks!
If you told people in the 1970s that in around 40 years time, a computer the size of a credit card would have 1GB of RAM, they'd have laughed at you.

Return to “General discussion”