Struggling with Wifi access point

Raspberry Pi related support

Struggling with Wifi access point

Postby dror » 03 Dec 2015, 10:28

Hello all,
I have a wifi dongle using Realtek RTL8188CUS chipset
Rune recognizes the dongle (shown under "network" in the UI).

I want it to act as a hotspot and I has been following @cmh714 post which explains how to use the create_ap script.
When I try to use create_ap it says I need to use rtl871xdrv driver, so I looked in the instruction at the create_ap "how to" section which explains how to deal with RT chipsets and found there a set of commands of how to install the rtl871xdrv driver. I followed the manual method (yaourt is not installed for me) and kept failing when running the makefile (many errors during executing).

Now, I'm not getting into detail because I am not sure if I even need to get into all of this.. maybe someone know an easier method?
Also looked here:

but at the "sh wifi-menu -o" part I get syntax errors - probably because I don't understand @BAZA editing instructions :(

Thanks for any help
Posts: 140
Joined: 03 Dec 2015, 10:14

Re: Struggling with Wifi access point

Postby dror » 07 Dec 2015, 12:23

OK so by far I finally succeeded with running the create_ap script without any error.
The problem is:
I can see my Access Point from my smartphone/tablet but when trying to connect it fail after a couple of attemps. Only shows "Saved" then "Connecting" and vice versa, and finally "WiFi connection failed".

My setup is :
Cable modem
Switch ---------- PC (connected to switch)
------------------- Rpi (connected to switch) --- Wifi dongle

Another information -
1. after running the create_ap , I look in the Rune interface at "Networks". There I can see the "eth0" with green mark and an IP address next to it (this is the regular IP I always see, and I think it is assigned by the modem (?) ), and the "wlan0" is also green but with an address like "192.x.x.x [ ]"
2. also tried using without security - as open network.

Can someone help me with debugging this issue?
Posts: 140
Joined: 03 Dec 2015, 10:14

Re: Struggling with Wifi access point

Postby dror » 15 Dec 2015, 09:37


Just in case someone faces this.
Follow cmh714 post to install create_ap
make sure you have the correct hostapd for your wifi adapter (google if you don't know I think I got mine from here ... spberry-Pi)
before you run create_ap with the correct flags to test your configuration, you have to make sure wpa_supplicant is not interfering (that was my issue). so run

ps aux | grep 'wpa_supplicant -B' | head -1 | cut -d " " -f 8 | xargs kill

to kill it. Make sure it is killed by running

ps ax | grep "wpa_supplicant -B" | grep -v grep

and see you get no output. If you do, change the "-f 8" flag in the first command to "-f X" where X is a number. check what goes, start from 1.
then test create_ap (use --daemon --driver rtl871xdrv if you have the 8188 chip).
When you're satisfied, edit the as cmh714 said.
With the create_ap you put in usr/bin, at the beginning before the "usage" part, add the above "ps aux | .... | xargs kill" line, preceded and followed by a "sleep 5". save and enable the service. reboot. done.
Last edited by dror on 05 Mar 2016, 20:50, edited 1 time in total.
Posts: 140
Joined: 03 Dec 2015, 10:14

Re: Struggling with Wifi access point

Postby TJH » 27 Dec 2015, 15:26

I'm pleased you got this working - respect!

I gave up and now use Max2Play which has everything you need already built in - WiFi hotspot, squeezebox server and squeezebox player so download to SD and off you go.
I did find that it only worked with a PiHut wifi dongle and not with a TPlink one - probably different chipsets.

On mobiles Rune UI is a lot nicer and easier than Squeezebox, so when (if) Rune 0.4 appears with what I need I'll switch back (especially if it can cope with more than one dongle).
Posts: 24
Joined: 13 Apr 2015, 14:04

Re: Struggling with Wifi access point

Postby dror » 28 Dec 2015, 08:36

I'm pleased you got this working - respect!

Posts: 140
Joined: 03 Dec 2015, 10:14

Re: Struggling with Wifi access point

Postby dror » 05 Mar 2016, 20:54

For the sake of completeness I have to add a solution for a problem I faced until lately.
The 8188cus chip acting as an AP was frequently dropping - after a period (could be couple of hours) I wasn't able to connect to it - just "saved" then "connecting" in an endless loop (just like the problem I had in the beginning when wpa_supplicant was the problem) . Only rebooting fixed that.
So, what do you do:

create a new configuration file by opening:
sudo nano /etc/modprobe.d/8192cu.conf

then add the lines:
# Disable power saving
options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1

Now the above lines appear all over the web with different variations for rtw_enusbss and rtw_ips_mode, and only setting them to '1' worked for me.

save and reboot
check you get '0' for
cat /sys/module/8192cu/parameters/rtw_power_mgnt

Fine for me.

To give another option for those having troubles with wifi dongle disconnections - Changing the operation channel gave me a great improvement! I changed from channel 1 to channel 4 or 6 and disconnections became much more seldom.
Posts: 140
Joined: 03 Dec 2015, 10:14

support RuneAudio Donate with PayPal

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 7 guests