Jump to content

Lamobo-R1 wifi unstable in AP ("host") mode [better buy a good wifi dongle with proper linux support]


Recommended Posts

Posted

(a quick note if someone made cut & paste...I just had made wmm_enabled=1 before I posted the "script". Changed it again to 0 in the previous post, has I have had it since I compiled the new drivers. If it is 1 the connection takes longer to stall than it used to with the older drivers, but it still stalls.)

Posted

Many thanks Rui for this.  I have a silly question, but do you build on the Lamobo or under Ubuntu like Igor describes?  I cannot get the build to work on my Debian Jessie PC so I will make an Ubuntu dev environment over the next few days to try this out.

Posted

Hi Chester, I actually have bought an SSD Crucial disk for my Lamobo,  running and building on it. Nevertheless, when I was trying NetBSD I built the toolchain and the kernel on Jessie in an Intel i7 machine. It is not really easy to come across pages talking about that, and it demands some investigation, time and lots of trial and error. Exerting too much writes in the MicroSD cards also kills them alas, while trying Bananian, NetBSD, Openwrt and Armbian I killed one card and one of my workmates killed another in sensibly the same period while testing a Banana PI M1, an Orange PI and an Odroid C4 with the same card.

Posted

I just edited yet again the instructions to cater for people compiling using the MicroSD card. The file from realtek is too big, and you just need a 100KB tar.gz inside it. Added some footnotes about not needing to reboot after compiling the driver. Also added a note for disabling neighbours 40Mhz check in the hostpad source code. To credit it, this page helped a lot, http://wannabe-nerd.tweakblogs.net/blog/10870/wifi-access-point-using-a-realtek-8192cu-based-usb-wifi-dongle-with-a-raspberry-pi.html, it actually pointed me in the right direction for the hostap/realtek file. I posted a link there to this thread.  I welcome any additions/corrections - yeah, I know I have (ab)used root instead of sudo, I posted it for it to be simple for beginners and not adding more steps configuring sudo in the armbian image. It may be worth playing with the log levels in hostapd.conf if you have a badly behaved client or more PCs - by default when a client joins your SSID an entry is logged. 

 

 

# Levels (minimum value for logged events):

# 0 = verbose debugging
# 1 = debugging
# 2 = informational messages
# 3 = notification
# 4 = warning
#
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2

Posted

As a quick note, I am a specialist in FreeRadius, in a very near future I will be trying to configure 802.1X / hostap+freeradius 3.x in the armbian. As a side note, how many of you have wifes "nagging" about wifi problems when they happen? i could swear I was not the only one talking about it here ;)

Posted
  On 10/22/2015 at 6:33 PM, Rui Ribeiro said:

Install tools for later on

 
#aptitude install dkms git
 
Correct missing sys/cdefs.h in the armbian 4.5 image or otherwise we wont be able to compile the hostapd version from realtek
 
#aptitude reinstall libc6-dev
 
Download the source of the new driver
 
 
Steps to compile it
 
#cd rt8192cu

Working like a charm, no drops, 40MHz bandwidth in channel 5.

 

Hi Rui,

 

In my Banana 15.04 manual these steps are documented for a couple months now :-)

In Igor's armbian these steps were not necessary because he already delivers a driver and a fresh hostapd.

 

The only new thing is this, that I found lately and is mentioned in this thread from me as well.

neighbours to enable always 40MHz channels.

 

I hope the first joy, will last long.

 

Cheers

Tido

Posted

Hi Tido,

 

The 2.4GHz bandwidth occupation in my bandwidth is terrible. Either I missed entirely something, or wifi was not usable at all for me in the last Armbian release, as I commented previously, even after using some of the workarounds people were talking about here.

 

I have not claimed I made it all up from the ground up, I saw instructions here and there, and had to piece them and modify them accordingly. Many times the steps in the middle were not to my liking or outdated. The patches that I am talking in the driver, I made it myself actually. Which manual are you talking about, one google document I think I opened yesterday in this thread? (I think)

 

To tell the truth, it is a pity I have not seen it earlier on...it would have shaved me some hours. Wherever it is, I did not seen it earlier.

 

I have been complaining the current solution was not working for days now. If you do had a complete solution, well publish it.

 

I have just published this to help other people, and I had some significant work doing it. I could have kept this to myself.

 

Otherwise, commenting this in this manner, I will take you for an arrogant jerk, I am afraid.

 

Are we all here for sharing or not? Well, you are welcome to mix my suggestions with your document. I do prefer freezing packages than (re)creating files and then having dangling files, for instance. Or making packages at work with a local repository.

 

P.S. I would suggest putting the author name on the document, ignore the references about the document if it is not yours.

Posted (edited)

Hi Rui, Tido, Igor,

 

 

@Rui: you made some excellent job. Igor & other fellows made parts of the solution, you made the glue of the solution, something more clear.

 

  Reveal hidden contents

 

 

(to paraphrase Tido...)

 

if you have linux-*-root-next-lamobo-r1 then hostapd* are included in the package designed for Armbian.

 

Did you get this package?

 

  Reveal hidden contents

 

@Igor,

 

What would you think of splitting the package in 2/3 packages? Mixing all in "linux-*-root-next-lamobo-r1" making original "hostapd" broken
many thanks

 

  Reveal hidden contents

 

Edited by wildcat_paris
only wrapped with "[spoiler]"
Posted (edited)

I am trying hard I cannot reproduce the kernel logs on Armbian 4.5

ok, while changing back autoconf.h

 

  Reveal hidden contents

 

Edited by wildcat_paris
added spoiler
Posted

Hi Wildcat, Tido sent me the link to the documents in a private message and now put it in his signature. Apparently I had the package already installed, not working for me I am afraid. I will try to get again the original hostap files from the package to test them out.  I suggest also adding that disabling debug patch that I made, the first time my wifi went off, it was because all that garbage on the log file put it out, apparently. 

 

For chester and Petr, I have managed to have my wifi up several days now. Yesterday updated my Mac and iPhone with a lot of concurrent updates all fine. Today, managed to get iperf to 10 concurrent connections and 80Mbps in a single machine from my Mac to my Lamobo (via wifi).

Posted (edited)

Hi Rui,

 

1/

yes Tido + Igor docs lead me to Armbian website :)

I have found some stuff  in https://aur.archlinux.org/packages/8192cu-dkms/=> nodebug.patch, kernel 4.x patch, other wifi usb keys

 

2/

ok before that, the Armbian 4.5 gives a more or less correct wifi for lamobo-r1 but the signal can drop from 50-60 dB (fine signal) to 70-90 dB (signal lost)

 

my D-link-160 usb key has a fairly stronger stable AP signal (2.4GHz) 40-50 dB

 

I wanted to keep DLink160 for the 5GHz AP https://wikidevi.com/wiki/D-Link_DWA-160_rev_B1

 

  Reveal hidden contents

 

Edited by wildcat_paris
spoiler added
Posted

I had trouble with the wifi and bananian, openwrt AND armbian 4.5. First time I found it, and came to it because bananian and openwrt from sinovoip are full of problems - and netbsd/freebsd unfortunately do not support the switch. I already thought of buying an USB wifi that support 5Ghz...I used to have a new gen Time Capsule and use 5Ghz exclusively, however a power surge killed it - nevertheless it was in the cards setting up an open source solution to control my home traffic. Except for the external antenas I have no doubt it will be far better - ha, and losing the only USB connector.   I am 5m from my Lamobo and having between 83-80% signal, SNR 44dB-34dB connecting to the Lamobo wifi. Guillaume,  had a look at the new driver you mention, no AP mode yet. btw, does anyone know how to disable 802.11b? Already tried some of the official methods, none seems to work.

Posted

I have switched back to the armbian kernel and wifi driver

 

I have just tested a copper heatsink on the lamobo USB chipset (also added one copper pad on the switch chipset)

 

it seems the wifi signal is far more stable (within a 5 dB margin) and noticed so far a 5-10 dB lesser noise than previously

 

note: My Dlink 160 (B1) as AP is still 10dB better.

 

So far:

- the heatsink is probably improving thermal condition

- it is so large compared to the chipset... maybe a minor shielding effect

Posted

Interesting comments Guillaume... I was thinking of putting an heatsink on top of the A20 chipset ; I have an SSD hard disk on top of the switch chipset, so it is a no go. Maybe it is acting as a shield too?

Posted

I am waiting for the couple of days to see if I finally managed to make everything stable in my configuration. Meanwhile I switched bridging for routing+NAT as typically the operator routers are crap, and I also want to configure IPsec. put it in the modem port of the operator configured as bridge, and right now I manage easily more speed via wifi.

Posted

On a side note, while I do have a 40Mhz SSID, my Mac is only connecting at 20Mhz, getting between 65 and 150Mbps. Has someone managed to get 300Mbps? 2.4GHz bandwidth very crowded here, no idea if it is the AP/Realtek or the Mac doing yet.

Posted

Rui,

 

configuring hostapd.conf with HT40 + other options will make you have 300Mbits/s but don't waste your time any longer.

 

I have stopped fighting with the onboard wifi (drivers, new pair of 9dBi antennas, etc.)

 

I have switched back to my Wifi USB key Dlink 160-B1 @2.4GHz which is perfect for my needs

 

"Problem solved" for me

Posted

Hi, I already have HT40+. The point is that the  AP side is working with 40MHz, but the client side is with 20MHz. Actually I have it working quite well, sadly when having sustained speeds for a bit while, it dies with too much frequency for my taste. I also have got mine with two 5dB antenas.  Or sort of dies... the active TCP connections only die when closed, but does not accept more TCP or UDP connections. Uhhhh? What is particularly infuriating is even after stopping hostapd and rrmoding the driver, it does not go up again. I suspect I am hitting an old bug in the hostapd code, however that behaviour I am describing is odd for the situation. I would go full *BSD, however the switch is not yet supported. *sigh* On the other side, the niceties of Linux, I have minidlna working and streaming movies quite well to my SmartTV.  As for buying an USB AP, I would prefer using 5Ghz. I do not particularly welcome losing the only USB port, and spending yet more money on the Lamobo. I also am searching for a possible platform to sell, however I am not happy with it as it is.

Posted (edited)

Rui wrote :

  Reveal hidden contents

 

 

Rui,

 

Your write up is great, but I'm having some trouble (and forgive me, but I'm a newbie to all this).

 

I got the latest Armbian Debian Jessie for the Lamobo R1 - and it worked first time, WIFI was stable as a rock, but my download rate was only 13mbs (upload was 23+).

 

So I tried your steps - but am getting an error when I try to start hostapd service: Invalid Argument, and then a second error that there is no such file or directory.

 

Running hostapd with -dd I get:

 

drv->ifindex=5

Configure bridge br0 for EAPOL traffic.

ioctrl [sIOCSIWMODE]: Invalid Argument

Could not set interface to mode (3)

Could not set interface to master mode!

rtl871xdrv driver initialization failed.

 

I don't have a var/run/hostapd (as referenced in the hostapd.conf file).  I'm guessing that's for a command line interface, so I commented this line out of the hostapd.conf file.

 

One other thing.  I've repeated this more than once, and now see that I get an error when making dkms.  

 

Did I miss a step somewhere?

 

Thanks for any help or advice you can give me.

 

Shawn.

Edited by wildcat_paris
added "spoiler" on so large quote :)
Posted

It would help to see the error. I also had errors in one of the one of Armbian upgrades with dkms before giving up on using the lamobo R1 wifi. I still use it as a router, however I have a TP-Link with openwrt connected to it. I also bought a very interesting (and cheap) dual frequency ralink based wifi pen.

Posted
  On 1/8/2016 at 1:27 PM, Shawn Wood said:
Rui,

I got the latest Armbian Debian Jessie for the Lamobo R1 - and it worked first time, WIFI was stable as a rock, but my download rate was only 13mbs (upload was 23+).

 

Could not set interface to mode (3)

Could not set interface to master mode!

rtl871xdrv driver initialization failed.

  On 1/8/2016 at 3:23 PM, Rui Ribeiro said:

It would help to see the error. I also had errors in one of the one of Armbian upgrades with dkms before giving up on using the lamobo R1 wifi. I still use it as a router, however I have a TP-Link with openwrt connected to it. I also bought a very interesting (and cheap) dual frequency ralink based wifi pen.

 

@Shawn

 

Are you using a recent kernel like 4.3.x / 4.4.x?

the recent kernel includes a driver for 8192CU but only as a client

I guess "Could not set interface to mode (3)" is setting in AP mode" which doesn't work with the kernel module

 

just try

gr@bpi:~$ iw list

you will get this

Supported interface modes:
                 * managed
                 * monitor

instead of (AP compatible)

Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point

btw

gr@bpi:~$ lsmod
Module                  Size  Used by
rtl8xxxu               51066  0
mac80211              353027  4 rtl8xxxu

gr@bpi:~$ cat /proc/version
Linux version 4.4.0-rc8-sunxi (root@server1404) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #1 SMP Tue Jan 5 02:34:34 CET 2016

as Rui says, just get a wifi dongle with proper Linux driver in AP mode, don't waste your time.

Posted

Well, hell.  I bought this device (pretty expensive compared to the banana pi) specifically to build a self-contained Wifi Router w/ embedded SoftEthernet to connect two separate networks together.

 

I've spent so much time trying to just get the thing working to point that I can begin testing the SoftEthernet, hate to give up on it completely, and I hate to spend more money on more equipment.

 

Let me ask you this.  Do you think the slow download rate (13 mbps) that I was getting with the clean Armbian Jessie install was a problem w/ the Wifi, or possibly something else (since the upload rate was a sizzling 23 mbps)?  

Posted

@Shawn

I read only "Debian Jessie" but you wrote "Armbian Debian Jessie" ok, Armbian has its separate 8192CU driver with AP

 

Make sure you have rtl8192cu (Armbian) or rtl8xxxu (Kernel) => lsmod (please)

 

But as you can read on the forum (search for tkaiser comments) the Lamobo-R1 has no stable wifi AP and it has only one GMAC connected to the B53125 switch (I own one Lamobo-r1)

 

so connecting ethernet "one LAN to another LAN" mean at the very best (with some patches), you will get only the half (or 1/4) of a gigabit ethernet bandwidth => Lamobo-r1 would have needed 2 GMAC connected to the ethernet switch (one "IN", one "OUT").

 

and (alas), it is only USB2, so USB/GMAC ethernet converter with not help (I have tried), it is worse than A20 GMAC+switch.

Posted
  On 1/8/2016 at 7:23 PM, Shawn Wood said:

the slow download rate (13 mbps) that I was getting with the clean Armbian Jessie install was a problem w/ the Wifi, or possibly something else (since the upload rate was a sizzling 23 mbps)?  

This is tricky, as people sometimes mean it different. Megabyte /Megabit is 8 times different.

I think currently on Ethernet the best we get is around 370Mbit/s / 8 = 46Mb/s

 

 

  On 1/8/2016 at 8:33 PM, wildcat_paris said:
so connecting ethernet "one LAN to another LAN" mean at the very best (with some patches), you will get only the half (or 1/4) of a gigabit ethernet bandwidth => Lamobo-r1 would have needed 2 GMAC connected to the ethernet switch (one "IN", one "OUT").

This is an interesting point you raise, when did you find /come to this conclusion ?

Posted
  On 7/18/2015 at 7:41 AM, Igor said:

http://wiki.lamobo.org/index.php/Lamobo_R1S

New version is coming out but with Mediatek wifi which is as crappy as Realtek.

 

Well, even if this board is just a prototype. The place where the HDD should be is crowded with parts !

 

Beside, I was thinking how to easy attach the HDD about 1,5mm above the PCB, but with a SATA connector.

This way the HDD would far less heat up the components on the PCB.

I cannot imagne that the chinese by itself will come up with smarter boards and cheap in price.

 

My guess is, we would have to design mockups how it should look like and make this available to them, then

they would copy it. Maybe with even some basic Chip suggestion.

Posted (edited)
  On 1/9/2016 at 9:08 AM, Tido said:

This is an interesting point you raise, when did you find /come to this conclusion ?

 

I have applied the patches / adapted the fix provided by openwrt for lamobo-r1

 

when zador suggested I use iperf3 to test local/internet (playing with the TCP window as well)

I realized:

- iperf3 results from lamobo-r1 to other (well know network linux) local machine is giving 850 Mbits/s for RX 450 Mbits/s for TX (with 10MB tcp window!) => it matches the statement from openwrt lamobo-r1 (so the fix is working, the bandwidth is CPU limited by the "too many interrupts" as well as TX issues with GMAC)

- iperf3 results from lamobo-r1 to the internet (Max 500Mbit/s down 200 MBits/s up) are RX/450 Mbits/s TX/220 Mbits/s (which is "OK" for my Fiber Internet contract)

- any local machine (my linux PC [former "router"], my Windows7, my odroidXU4), going through the lamobo-r1 is limited to RX/230Mbits TX/210Mbit/s

 

I tought of tkaiser saying the  B53125 has only on GMAC  A20 SoC has only one GMAC link to the B53125 (it would need 2 GMAC one "in" one "out" = at least 2 Gbit/s) to handle traffic in/out

 

so when the lamobo-r1 transfer data from one host to another (I limited my test to local network/Internet), it is doing RX from local/TX to internet (vice versa, handling IRQ for RX and IRQ for TX on the same cpu/thread even when changing this config having 2 cpu/thread available)

=> the limiting factor is TX to the internet / CPU handling the too many IRQ

 

ok, my conclusions are flowed, I would need to do transfer local/local through lamobo-r1 to have a more reliable statement, as I have not studied the impact of IPtables/NAT/etc.

 

so doing A20/GMAC in/out at the same time is limitation, my empiric idea is it cut the A20/GMAC bandwidth par 2 at best

(ok it is flowed)

 

NOTE: I am still hoping for a tech fix to reduce the number of IRQ

Edited by wildcat_paris
WRONG: B53125 has only on GMAC => A20 SoC has only one GMAC link to the B53125
Posted
  On 1/9/2016 at 9:47 AM, Tido said:

Well, even if this board is just a prototype. The place where the HDD should be is crowded with parts !

 

;)  even an interesting prototype if they have learned from their mistakes with lamobo-r1

 

But my guess is they have many Lamobo-r1 in stock, they just cannot sell Lamobo-r1s before they sell every piece of lamobo-r1 in stock!!!

 

tkaiser has very interesting ideas about options to pick a "home router" but IMHO there are not as multipurpose as the lamobo-r1 would be for price/size/etc.

Posted
  On 1/9/2016 at 1:40 PM, wildcat_paris said:

I use iperf3 to test local/internet ...

 

I tought of tkaiser saying the B53125 has only on GMAC (it would need 2 GMAC one "in" one "out" = at least 2 Gbit/s) to handle traffic in/out

As I have already mentioned in this Tread the BCM53125 comes with:

Two additional Gigabit ports for glueless connection to CPU, WLAN, Cable, or DSL chipsets

 

Picture from EBV

post-18-0-56166100-1452374225_thumb.jpg

 

 

Possible data flows (via VLAN, minimal IPtables/NAT like in my manual ?):

 

R1 HDD /SDcard to local

local to R1 HDD /SDcard

 

R1 HDD /SDcard to internet port

internet port to R1 HDD /SDcard

 

local PC to internet port (doesn't need to be internet, can be another PC)

internet port to local PC

 

local PC to local PC

8 possible ways to go or did I misunderstand?

 

This way we would basically understand what with the current driver is capable, WiFi has anyway a lower through put.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines