Author Topic: Raspberry Pi RTL8188CUS hostapd extremely weak signal  (Read 2577 times)

0 Members and 1 Guest are viewing this topic.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Raspberry Pi RTL8188CUS hostapd extremely weak signal
« on: January 27, 2014, 04:19:15 pm »
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #2 on: January 30, 2014, 05:26:40 pm »
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.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #3 on: January 30, 2014, 06:10:27 pm »
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #4 on: February 01, 2014, 01:04:50 am »
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.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #5 on: February 01, 2014, 04:51:13 pm »
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.
« Last Edit: February 01, 2014, 04:53:37 pm by q7icmfm1x0h609c6xiok »

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #6 on: February 06, 2014, 05:01:21 pm »
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

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #7 on: February 06, 2014, 05:08:18 pm »
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:
http://www.ebuyer.com/169923-tenda-wireless-n150-access-point-router-extender-w311r-
or
http://www.ebuyer.com/259811-tp-link-tl-wa730re-repeater-external-tl-wa730re
etc. ?

--
« Last Edit: February 06, 2014, 05:48:23 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #8 on: February 07, 2014, 01:34:45 am »
Actually, there's no point at all   ;)
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #9 on: February 07, 2014, 01:36:51 pm »
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 ;)
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #10 on: March 02, 2014, 06:13:24 pm »
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #11 on: March 02, 2014, 07:07:17 pm »
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
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #12 on: March 04, 2014, 05:40:22 pm »
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.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #13 on: March 04, 2014, 06:05:44 pm »
Did we ever get the vendor:device ID string for this adapter ?
Code: [Select]
lsusb
?
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline q7icmfm1x0h609c6xiok

  • Jr. Member
  • **
  • Posts: 47
  • Karma: 4
  • I've just joined!
    • View Profile
    • Awards
Re: Raspberry Pi RTL8188CUS hostapd extremely weak signal
« Reply #14 on: March 12, 2014, 02:05:52 am »
Not from me, but I can tell that it is: 0bda:8176

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal