Raspberry Pi RTL8188CUS hostapd extremely weak signal

After following this forum for more than a year without having a problem now I have again a question.
Currently I’m working with the Raspberry Pi.
I want to use it to create an AP.

The RPi came with a RTL8188CUS based USB dongle.
When I use it in regular mode I get 150 Mb/s speed and a link quality of 100%. So that’s quite good.
But when I use it with hostapd I get again 150 Mb/s speed but a link quality between 0 and 2%.
This is so weak that a laptop about 6m away cannot connect.
I use a special driver because it does not support nl80211.
How can I boost the link quality? Apparently the antenna is not bad since working in regular mode is extremely good.

Is this an Edimax EW-7811Un nano ?

Have you seen this:
http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/

Thanks for your reaction.

The dongle is a TL-WN723N v2.
I did see the tutorial you mentioned. In fact I followed it.
Like I said the dongle goes into master mode with hostapd but the signal strength is extremely weak.

Please let me explain a bit more:

I just did a restart after a few days of inactivity regarding the RPi.

iwconfig on the RPi gives me:
wlan0 IEEE 802.11bgn ESSID:“My_Rasp_AP” Nickname:“WIFI@REALTEK
Mode:Master Frequency:2.412 GHz Access Point: A0:F3:C1:09:8A:B8
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

As you can see it is indeed in master mode, but the signal parameters are terrible.
Obviously my laptop cannot connect right now.

Changing the channel does not make any difference.

ifconfig gives me:
wlan0 Link encap:Ethernet HWaddr a0:f3:c1:09:8a:b8
inet addr:10.0.1.18 Bcast:10.0.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:456 (456.0 B)

So there’s a configured interface too.

hostapd.conf looks like:
interface=wlan0
driver=rtl871xdrv
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=My_Rasp_AP
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=XXXXXXX (there is a real passphrase here of course…)
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wmm_enabled=1
ieee80211n=1
ht_capab=[HT40+][SHORT-GI-40]

Removing the last three lines does not make any difference.

Sorry it’s taken me so long to get around to this, but I’ll try settting it up with my Edimax nano and Pi monday and see if I get the same problem.

No worries. Take your time.
I can see you’ve lots of questions to attend to.
In the mean time I’ve made some progress.
Somehow the signal strength has “magically” increased however I didn’t change anything in configurations
It is now 39%, but the link speed is still not good: 1-12 Mbit/s.
I can remember that I had this problem before while creating an accesspoint on Ubuntu server (which I currently use).
Using hostapd 2.0 which is still experimental but seems to be very good solved that problem.
Is it possible to use hostapd 2.0 on the ARM architecture of the RPi? I can’t find relevant info online.

Now I still have a series of other problems.
The main problem is currently that I don’t have internet connectivity.
The RPi can ping external servers, any computer connected wirelessly to the RPi cannot.
This looks like a routing problem, but I don’t want to set a route on each client computer.

OK, I’m giving up on this.
There’s no single site online that gives positive results with this.

I now have full internet ‘connectivity’ at a disappointing speed of typically less than 10 Mbit/sec.
The effective range of the AP is about 8 metres in G-mode and less than 5 metres in N-mode.

I’ve discarded the RTL8188CUS based dongle and bought one that identifies itself as being RaLink RT3070.
That one has an effective range of at least 20 metres.

My advice to every reader of this:
Don’t buy a dongle with a RTL8188CUS chipset. According to most sites there are a few good brands (for example Edimax), but most other brands of these dongles are cheap Chinese imitations that are completely worthless.
You have been warned… ;D ;D

Really … though I haven’t been able to spent much time on this, take it from me the Edimax probably isn’t much better, I haven’t been able to get it to work at all so far … could be me though.

That said, unless it’s just for an interesting project I can’t see the point … surely it’s cheaper just to get an access point such as:

or

etc. ?

Actually, there’s no point at all :wink:
I just like to do experiments with computer equipment.
I’m just trying to do some “house automation” and I’m now into Raspberry Pi’s.
Like I said I was able to create a functional AP by using a different brand dongle connected to a simple powered USB hub.
That one is fully functional on an Ubuntu server, so it is possible.

What intrigues me most right now is why that RTL8188CUS based dongle performs so bad as AP while in regular “managed” mode there’s nothing wrong with it.
Apparently there’s a difference between the RX and the TX antenna or the power it uses for transmissions is somehow too low or too limited.

I can’t see that … otherwise even in normal use it would need to be close to the router.

Tiz a weird problem, that’s for sure…

Maybe a firmware bug … did you try changing the channel is hostapd ?

Does the adapter do hardware decryption … did you test it with encryption turned off or the hwcrypt=0 flag set ?
(I’m just wondering if it can’t handle 2 differing WPA decrypts at the same time … though I wouldn’t expect that to present as a signal strength issue, more a dropped connection)

I know it doesn’t matter any more … just curious :wink:

No, that’s not working.
Changing channels, countrycodes, encryption on or off: all not working.

I wonder how many people are actually using a RPi.
I tried about 25 different queries on Google about Raspberry and RTL8188CUS and all of them contained this thread (usually on position #1) and none of them offered more than 8 answers with most of those answers being irrelevant.

Which kernel version are you running ?

I do know rtl8188cus can be backported from the 3.12 kernel … wonder if that would help (maybe they’ve fixed sommat, maybe not) ?


reference:
http://linuxforums.org.uk/index.php?topic=11493.msg92167#msg92167

That might be interesting.
My RPi says its kernel is: Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l
That kernel should be the latest one.

I did test the RTL8188CUS on a linux computer with kernel 3.12.6, but that’s not working.
hostapd no go at all, regular wlan mode sees AP’s but cannot connect to any of them.

On RPI: hostapd is working but very weak, regular wlan mode sees all AP’s and connects at full speed.

So right now at regular Linux the situation is worse.
According to all references I could find RTL8188US is not supported on kernel 3.10 and newer.

If you have reason to believe different that would be very valuable information.
I’m very curious to learn what you’ve found.

Current status of my experiments:
I’ve created a test setup with an RT3070 based dongle. The hostap signal of this one is so strong that even my IP cam outside can detect it.

Did we ever get the vendor:device ID string for this adapter ?

lsusb

?

Not from me, but I can tell that it is: 0bda:8176