RaspberryPi with Realtek RTL8188 and custom hostapd

Posted by Orbiter 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
RaspberryPi with Realtek RTL8188 and custom hostapd
April 24, 2013 04:20PM
I bought a TL-WN725N to run an AP on my RPi for a PirateBox. The following page provided a manual to get a custom hostapd, which actually runs with that Wifi USB plug:
[www.jenssegers.be]

now after the installation of the custom hostapd, the binary path for hostapd was
/usr/local/bin/hostapd
which I linked with
sudo ln -s /usr/local/bin/hostapd /usr/sbin/hostapd
so that the piratebox start/stop script can find it.
However, it does not work:
pi@raspberrypi ~ $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file .... 
Generating dnsmasq.conf .....
Generating Environment-config for ligttpd .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
[ ok ] Starting hostap... :.
[....]   Setting up wlan:Bringing up wifi interface wlan0 
Setting up wlan0
[ ok ] Starting dnsmasq... :.
[ ok ] Starting droopy...:.
Generated HTML-Shoutbox File.
[ ok ] Starting lighttpd...:.
pi@raspberrypi ~ $
after this, no wlan host is visible. There must be some special case for the set-up as explained in "Manual install" in
[piratebox.aod-rpg.de]

what can I do to debug this?
Same problem, any solutions?
Re: RaspberryPi with Realtek RTL8188 and custom hostapd
September 15, 2013 03:19PM
did you ever try to start hostapd manually and see what debug output brings up?
Re: RaspberryPi with Realtek RTL8188 and custom hostapd
September 15, 2013 08:26PM
sudo service hostapd restart:
[ ok ] Stopping advanced IEEE 802.11 management: hostapd.
[....] Starting advanced IEEE 802.11 management: hostapdioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
. ok
Re: RaspberryPi with Realtek RTL8188 and custom hostapd
September 16, 2013 07:09PM
I haven't meant (re)starting the normal init.d process.

just
 sudo hostapd -dd /opt/piratebox/conf/hostapd.conf  
Re: RaspberryPi with Realtek RTL8188 and custom hostapd
September 16, 2013 07:17PM
I don't have my Raspberry Pi here, but the output seemed fine except those ioctl messages. My guess is that the driver doesn't support hostapd yet.
Re: RaspberryPi with Realtek RTL8188 and custom hostapd
October 27, 2013 10:48PM
Hey, I got the TL-WN725N to work after following steps 5/6 from these instructions:
[www.raspberrypi.org]

Rebuilding the hostapd binary and replacing the one on the rpi *after* installing it the usual way, then changing the specified driver (but not the other suggested options) in step 6, worked just fine.

Good luck!
Re: RaspberryPi with Realtek RTL8188 and custom hostapd
December 31, 2013 10:48AM
Just a heads up as I was having a similar issue above doing a manual install of PirateBox on my Series B RPi where I already knew about installing the correct hostapd for my Edimax USB wifi. I was still getting these errors when running:

pi@raspberrypi ~ $ /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_packet_init: socket(PF_PACKET): Operation not permitted
rtl871xdrv driver initialization failed.

pi@raspberrypi ~ $ hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_packet_init: socket(PF_PACKET): Operation not permitted
rtl871xdrv driver initialization failed.

But after manually just running: `sudo service hostapd start` connecting to my RiPi via wifi now works and I can upload and chat.
So far as I can tell, something in 3.18.7+ has screwed things up. None of the thousands of custom hostapd binaries for realtek now work with an RTL8188CUS. All I get at startup is

ioctl[SIOCSIWMODE]: Operation not permitted
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.