TS_Fan Posted July 16, 2015 Posted July 16, 2015 Hi there First of all thanks a lot for your images. Currently I am trying to setup my R1 as wifi access point using the image Lamobo-r1_Debian_3.2_jessie_4.1.2 The out of the box hostapd let me connect successfully from my wireless devices. After some time, one hour or so, the connection starts dropping and reconnecting up to a point that I cannot connect at all. BTW, I could not get hostapd working stable with Bananian and self compiled drivers as well. Symptoms were similar. I am also not using any harddisk or USB devices. I also used a second R1 and have the same problems. Does anyone have the same symptoms and knows how to fix this? Or does anyone have stable wifi on this device with the builtin realtek device? Any help is greatly appreciated. If I should provide more details, please let me know Thanks Uli
Igor Posted July 17, 2015 Posted July 17, 2015 The chipset is cheap & crap as well the drivers. There are few alternative drivers around but I am not aware if they are any better. I think the driver on 3.4.x works better. BTW: One alternative is located in /usr/local/bin ... blacklist kernel driver and load that one. 1
TS_Fan Posted July 17, 2015 Author Posted July 17, 2015 I might be better off buying another USB Wifi adapter but somehow I feel the urge to get the onboard wifi running. If I blacklist the driver as follows, I can see no wlan adapter at all when checking "ifconfig -a" nano blacklist.conf blacklist rtl8192cu Anything I am missing?
Igor Posted July 18, 2015 Posted July 18, 2015 You need to load alternative driver. It's located in /usr/local/bin insmod rt8192.cu or similar But don't expect too much. Get image with kernel 3.4.108 ... wifi is working better.
petrmaje Posted July 18, 2015 Posted July 18, 2015 You will loose your time only, when you are trying onboard wifi get running. I tested with all available drivers/kernels/systems and result is the same - nearly unusable. Buy quality USB wifi, and you will have zero problems. 2
Igor Posted July 18, 2015 Posted July 18, 2015 Buy quality USB wifi, and you will have zero problems. Any recommendations? http://wiki.lamobo.org/index.php/Lamobo_R1S New version is coming out but with Mediatek wifi which is as crappy as Realtek. I think we'll get more cheap (but with a little better hw) router boards soon. 2
TS_Fan Posted July 18, 2015 Author Posted July 18, 2015 petrmaje, yeah, thanks for the advice I already spent way too much time in this crappy onboard card. Why did they include anyways. Igor, good to know, that the wifi probably will be as crappy in the R1S. I will look for an stable, fast, USB wifi device now with a good reception. I hope there is one out there. First result: I have a spare TP-Link TL-WN722N which is has a great reception (better than all wifi routers I used) and is working rock stable as Access point with Kernel 3.4. Certainly there has to be a downside to this. n mode is unstable so I have to stick with g for the time being. External USB power supply didn't help. At least my wife stopped complaining, which is a great step forward. Today I ordered a RaLink RT5370 and a LogiLink WL0150. As soon as I have some results I will post them here.
petrmaje Posted July 18, 2015 Posted July 18, 2015 petrmaje, yeah, thanks for the advice I already spent way too much time in this crappy onboard card. Why did they include anyways. Igor, good to know, that the wifi probably will be as crappy in the R1S. I will look for an stable, fast, USB wifi device now with a good reception. I hope there is one out there. First result: I have a spare TP-Link TL-WN722N which is has a great reception (better than all wifi routers I used) and is working rock stable as Access point with Kernel 3.4. Certainly there has to be a downside to this. n mode is unstable so I have to stick with g for the time being. External USB power supply didn't help. At least my wife stopped complaining, which is a great step forward. Today I ordered a RaLink RT5370 and a LogiLink WL0150. As soon as I have some results I will post them here. WN722N is great device. I used this wifi dongle for long time with Raspbian on PI2.
jguirlinger Posted September 7, 2015 Posted September 7, 2015 petrmaje, yeah, thanks for the advice I already spent way too much time in this crappy onboard card. Why did they include anyways. Igor, good to know, that the wifi probably will be as crappy in the R1S. I will look for an stable, fast, USB wifi device now with a good reception. I hope there is one out there. First result: I have a spare TP-Link TL-WN722N which is has a great reception (better than all wifi routers I used) and is working rock stable as Access point with Kernel 3.4. Certainly there has to be a downside to this. n mode is unstable so I have to stick with g for the time being. External USB power supply didn't help. At least my wife stopped complaining, which is a great step forward. Today I ordered a RaLink RT5370 and a LogiLink WL0150. As soon as I have some results I will post them here. Any update on this ? The WiFi access point is the last step for my Bpi R1 to become my home-made firewall/router, and I didn't manage to make it working fine. I'm very interested in your test results
Moorviper Posted September 7, 2015 Posted September 7, 2015 last year i got one of the first batch of the bananapi r1 and was happy when it was back in their shop. This device is wasted Money. They didn't react on bug-report's. So i contacted the wlan-chip-company directly. They said that that the rtl8192 is the cheapest model they have. They told them that 300mbit isn't possible with that chip and they should use the more expensive. in theory than chip can handle 300 mbit BUT it was designed as lowcost/lowlevel. An they implemented a mechanism in hardware that detect when the two wlan chips are bonded per software and do a resett ;-) what is possible with this chip ist 2 different wlan's with 150 mbit. 1
Chester Posted September 18, 2015 Posted September 18, 2015 Hi Everyone and thanks to Igor and all who contribute!I'm also trying to get R1 WiFi stable, I have compared this with the latest OpenWRT V4 image from 01/09/2015 on banana-pi.org) and that does have a stable WiFi (not great, but stable) so I'm trying to figure out where the differences are. I haven't been able to get the alternate driver for the Armbian Jessie image working but I'm not sure of all the steps to make the change .... just changing hostapd.conf and hostapd to the -rt versions does not seem to be enough -- do I also need to blacklist the kernel drivers?I will put a build environment together this weekend so I can play a bit more but any advice is wecome. That OpenWRT image proves the hardware is good enough for my needs but I want to run Armbian for other reasons.
Tido Posted September 18, 2015 Posted September 18, 2015 in theory the chip can handle 300 mbit BUT it was designed as lowcost/lowlevel. An they implemented a mechanism in hardware that detect when the two wlan chips are bonded per software and do a reset ;-) what is possible with this chip ist 2 different wlan's with 150 mbit. Well, if it is true what you say - please quote where it is mentioned: Product Information RTL8192CU I cannot find it. Your comment sounds like FUD (to discourage people). So proof us, where is it written that they have chosen the wrong product, beside USB2.0 connection !! The RTL8192CE (PCI Express Interface) is used quite often: List of 802.11ac Hardware search with your browser for rtl8192c. The specification beside USB2.0 sounds quiet similar to me.
Chester Posted September 18, 2015 Posted September 18, 2015 OK a quick update -- I got this working stable with only one change in /etc/hostapd.conf -- wmm_enabled=0 This apparently disables "wireless multimedia" which I think is a kind of QoS. Either way I just want a basic, stable g and this works for me.
Igor Posted September 19, 2015 Posted September 19, 2015 Thanks. I added this to the default config. Better to have stable than unstable with a little better performance.
Tido Posted September 20, 2015 Posted September 20, 2015 OK a quick update -- I got this working stable with only one change in /etc/hostapd.conf -- wmm_enabled=0 Hi, just out of curiosity, did you run Step1, it is in my manual: // Step 1 // scan networks: iwlist wlan0 scan show available channels: iwlist wlan0 channel find least used channel: cat /proc/net/rtl819xC/wlan0/best_channel // Step 2 // Just configuring these didn't enable n-mode for my nix router. Turns out hostapd checks for neighboring SSID's. If there are a lot of those, it won't activate the secondary n-channel. A quick inSSIDer scan showed me my neighbours were in fact using the secondary channel. Apparently many routers don't have this check (as described in RFC) built in. I used the patch described in the url below to disable the neighborhood network check, and force hostapd to run in n-mode. http://www.brunsware.de/blog/gentoo/hostapd-40mhz-disable-neighbor-check.html source: stackoverflow // Step 3 // Some more interesting information on the bottom of page 5 of this doc HT40- and HT40+ 1
Rui Ribeiro Posted October 15, 2015 Posted October 15, 2015 I have been playing with the lamobo for quite a while. I actually do not like bananian. Tried openwrt also did not like it. The wifi seems to only operate for a bit while. Just tried the last version of armbian, kernel 4.2.3, the wifi drops after a few minutes, and I can only use it again if I close and open the wifi icon in my macbook. Interestingly enough, if I keep a ping in a shell it seems to last longer. Will do some more testing, though I am inclined to say the onboard wifi is so bad it is not usable. 1
Rui Ribeiro Posted October 15, 2015 Posted October 15, 2015 Been investigating a little. Unfortunately did not progress more, because the MicroSD card finally died. It seems the wifi driver has a long standing bug in Debian and derivates. I think I also saw a passing message about this either here or in SinoVoip board. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1365844I also found a very interesting explanation for a problem of not being able to not select 40Mhz channel bandwidth - http://www.brunsware.de/blog/gentoo/hostapd-40mhz-disable-neighbor-check.html 1
Rui Ribeiro Posted October 21, 2015 Posted October 21, 2015 Hi Igor. I finally had the time and managed to put wifi working with the realtek driver and hostapd in a stable way. However, I had a very significant problem. When trying to compile hostapd, it complained about /usr/include/sys/cdefs.h missing, and I had to fix it doing a aptitude reinstall libc6-dev, so clearly something is missing in the image. The suggestions about values or wmm_enabled do not worked at all for me. All the tricks just managed to get me wifi in the client side a couple of minutes, and then all went dead. The only solution was to turn off and turn wifi on again on the client side, and then it worked for another 2 or 3 minutes more. The instructions that I found online for installing the new driver/hostapd, while putting me in the right direction, were mostly outdated. I documented everything along the way, will post or create a page. I also found the realtek driver has some debugging activated that was spewing a lot of shit to the logs - which I do believe that if you are using logs in RAM, can be a significant problem. I deactivated them in the source code. I have clearly the impression that whilst I need the realtek driver, there might be other alternatives to their (outdated?) hostapd in github. I also am actually having the 40Mhz channel bandwidth without having to patch the hostapd from realtek. As a side note, also using an SSD drive, although I installed everything manually, and not using the script in /root. While I understand the defaults are there for catering to a large audience, I do prefer having the kernel and logs in the SSD drive. Disabled some of the things that were in RAM, including /tmp and /var/log (ramlog) since as I am not using the MicroSD card, I do not have to wear about tear. Thanks for armbian, I do prefer it so much better than the alternatives. -- Rui Ribeiro
Igor Posted October 21, 2015 Posted October 21, 2015 I am looking forward for details - just make a post and we can pin it. My hostapd build tool is here: https://github.com/igorpecovnik/hostapd ... as you can see not much extra on the top of official.I haven't compile hostapd for a while so something might be missing, sure. I'll check & fix. ADD: I just try and it compile without a problem on a fresh image. Both variants. If you are using SSD slow write speed is not a problem any more. Ramlog is a good addon for SD card scenarios.
Rui Ribeiro Posted October 21, 2015 Posted October 21, 2015 Thanks for the attention. Gave you a star in your hostap github page with my github account. I have photos of the process and some parts in a text file, will piece it all together in the next couple of days.
Rui Ribeiro Posted October 21, 2015 Posted October 21, 2015 I was not sufficient clear I see...while trying to compile the hostapd version from realtek I had that error about a missing C header file.
Chester Posted October 21, 2015 Posted October 21, 2015 Hi, just out of curiosity, did you run Step1, it is in my manual: // Step 1 // scan networks: iwlist wlan0 scan show available channels: iwlist wlan0 channel find least used channel: cat /proc/net/rtl819xC/wlan0/best_channel First, thanks Tido and ruir and sorry for not responding earlier -- I was in need of a working solution so eventually had to use a different device, but I would like to get back to this now. I did scan for the least-used channel and tried that, but I still needed to do enable_wmm=0 in order for it to become stable. I also watched the signal strength and without this it was unstable, so my feeling is that it's something to do with hostapd, however I couldn't get a build environment working (on Debian Jesssie) and I don't want to get into Ubuntu just to build Armbian (perhaps when I have more time).
Rui Ribeiro Posted October 22, 2015 Posted October 22, 2015 chester and Igor, as suggested by Igor here I have the changes in a rough form to make wifi in Lamobo R1 Stable. $su Install aptitude just because I prefer using it #apt-get install aptitude 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 #git clone https://github.com/dz0ny/rt8192cu.git Steps to compile it #cd rt8192cu Edit include/autoconf.h and comment //#define CONFIG_DEBUG_RTL819X (line 299) //#define CONFIG_PROC_DEBUG 1 (line 301) If you do not disable the debug mode your logs will grow too fast. Now let´s continue. This will compile, rmmod the old driver and install the new #make dkms #cd .. You do not need to reboot here. The make rules took care of removing the old driver, inserting the new, inserting a dkms rule for recompiling again the driver for kernel upgrades, and blacklisting the old module. Go to this page to download the realtek file http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8192CU and download the linux kernel driver (under RTL8192CU) I got a file called 0001-RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip. This file is around 1GB, if with limited space and/or MicroSD card on the destination unzip it on your machine, and just copy the tar.gz mentioned bellow. $unzip 0001-RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip $cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911 $cd wpa_supplicant_hostapd Copy wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz to your R1/pi/whatever. #tar -zxvf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz #cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812 #cd hostapd Based on this page, I also commented out the check of neighbours to enable always 40MHz channels. http://www.brunsware.de/blog/gentoo/hostapd-40mhz-disable-neighbor-check.html It seems I am not needing it here, conditions might change in a near future. In file src/ap/hw_features.c line 453 - function ieee80211n_check_scan /* iface->conf->secondary_channel = 0; */ Now compile hostap #make stop hostap service. If it is not running, it will throw an error, ignore it #service hostapd stop not sure if the service was uninstalled by me before or by any previous script, installing the package just in case #aptitude install hostapd freeze hostapd package, for it in the future not to be upgraded #echo hostapd hold | dpkg —set-selections Overwrite hostap with the realtek ones that we compiled #cp hostapd hostapd_cli /usr/sbin Now create /etc/hostapd.conf file with: ssid=YOURSSID interface=wlan0 ctrl_interface=/var/run/hostapd channel=5 wpa=2 wpa_passphrase=YOUR_SSID_PASSWORD bridge=br0 wmm_enabled=0 driver=rtl871xdrv beacon_int=100 hw_mode=g ieee80211n=1 wme_enabled=1 ht_capab=[sHORT-GI-40][HT40+][HT40-][DSSS_CCK-40] wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP max_num_sta=8 wpa_group_rekey=86400 Start again the service. #service hostapd start DONE. So after setting this up, to check up everything: #iwconfig wlan0 IEEE 802.11bgn ESSID:"YOURSSID" Nickname:"<WIFI@REALTEK>" Mode:Master Frequency:2.432 GHz Access Point: AC:A2:13:5C:96:31 Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=100/100 Signal level=88/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 $lsmod | grep rtl8192cu rtl8192cu My dmesg is after a reboot. $dmesg usb 2-1: new high-speed USB device number 2 using ehci-platform [ 2.599494] usb 2-1: New USB device found, idVendor=0bda, idProduct=8178 [ 2.599527] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2.599544] usb 2-1: Product: 802.11n WLAN Adapter [ 2.599560] usb 2-1: Manufacturer: Realtek [ 2.599575] usb 2-1: SerialNumber: 00e04c000001 [ 3.909414] usbcore: registered new interface driver rtl8192cu [ 4.944917] cfg80211: World regulatory domain updated: [ 4.944946] cfg80211: DFS Master region: unset [ 4.944953] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 4.944965] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 4.944974] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 4.944982] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A) [ 4.944993] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A) [ 4.945003] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s) [ 4.945012] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s) [ 4.945021] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [ 4.945029] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) [ 9.504116] +871x_drv - drv_open, bup=0 [ 9.508641] ===> FirmwareDownload91C() fw:Rtl819XFwImageArray_TSMC [ 9.508664] FirmwareDownload92C accquire FW from embedded image [ 9.508674] fw_ver=v88, fw_subver=2, sig=0x88c0 [ 9.534123] fw download ok! [ 9.534140] Set RF Chip ID to RF_6052 and RF type to 2. [ 9.930023] IQK:Start!!! [ 9.941896] Path A IQK Success!! [ 9.946770] Path B IQK Success!! [ 9.955388] Path A IQK Success!! [ 9.960148] Path B IQK Success!! [ 9.965028] IQK: final_candidate is 0 [ 9.965066] IQK: RegE94=ff RegE9C=3fe RegEA4=f7 RegEAC=3 RegEB4=101 RegEBC=a RegEC4=fb RegECC=9 Path A IQ Calibration Success ! [ 9.967525] Path B IQ Calibration Success ! [ 10.081283] pdmpriv->TxPowerTrackControl = 1 [ 10.086157] rtl8192cu_hal_init in 580ms [ 10.102538] MAC Address = ac:a2:13:5c:96:31 [ 10.103040] -871x_drv - drv_open, bup=1 # iwlist wlan0 channel wlan0 14 channels in total; available frequencies : Channel 01 : 2.412 GHz Channel 02 : 2.417 GHz Channel 03 : 2.422 GHz Channel 04 : 2.427 GHz Channel 05 : 2.432 GHz Channel 06 : 2.437 GHz Channel 07 : 2.442 GHz Channel 08 : 2.447 GHz Channel 09 : 2.452 GHz Channel 10 : 2.457 GHz Channel 11 : 2.462 GHz Channel 12 : 2.467 GHz Channel 13 : 2.472 GHz Channel 14 : 2.484 GHz Current Frequency:2.432 GHz (Channel 5) Listing neighbours frequencies # iwlist wlan0 scan | grep Channel Frequency:2.412 GHz (Channel 1) Frequency:2.412 GHz (Channel 1) Frequency:2.422 GHz (Channel 3) Frequency:2.412 GHz (Channel 1) Frequency:2.422 GHz (Channel 3) Frequency:2.422 GHz (Channel 3) Frequency:2.422 GHz (Channel 3) Frequency:2.437 GHz (Channel 6) Frequency:2.437 GHz (Channel 6) Frequency:2.442 GHz (Channel 7) Frequency:2.442 GHz (Channel 7) Frequency:2.437 GHz (Channel 6) Frequency:2.437 GHz (Channel 6) Frequency:2.437 GHz (Channel 6) Frequency:2.437 GHz (Channel 6) Frequency:2.442 GHz (Channel 7) Frequency:2.452 GHz (Channel 9) Frequency:2.452 GHz (Channel 9) Frequency:2.452 GHz (Channel 9) Frequency:2.462 GHz (Channel 11) Frequency:2.462 GHz (Channel 11) Frequency:2.462 GHz (Channel 11) Frequency:2.467 GHz (Channel 12) Frequency:2.467 GHz (Channel 12) Frequency:2.472 GHz (Channel 13) Working like a charm, no drops, 40MHz bandwidth in channel 5. -- Rui Ribeiro 5
Rui Ribeiro Posted October 22, 2015 Posted October 22, 2015 (yes, I know it makes sense to move it, waiting till wife ends a movie...)
Rui Ribeiro Posted October 22, 2015 Posted October 22, 2015 Here is the speed to the Internet at large.
petrmaje Posted October 22, 2015 Posted October 22, 2015 My SSID is "rui" Hi Rui, it looks impresive, but I had similar results with some drivers a time before. How many devices do you have connected to the AP? Try to connect for example 3 or 4 wifi devices, some of the far from the AP and generate network traffic simultaneously. If your driver will handle it without speed drop to minimum, congatulations!!!! Petr
Rui Ribeiro Posted October 22, 2015 Posted October 22, 2015 Hi Petr, 3 devices at the moment, multicasting a movie to an Apple TV while I made the measurements, and 2 simultaneous devices in the last couple of days without any hitches. For me it is far much better, I never had a wifi connection without stalling to a halt on the client side for more than 2-3 minutes. I will do more extensive tests next week. 1
petrmaje Posted October 22, 2015 Posted October 22, 2015 Hi Petr, 3 devices at the moment, multicasting a movie to the Apple TV while I made the measurements, and 2 simultaneous devices in the last couple of days without any hitches. For me it is far much better, I never had a wifi connection with stalling to a halt on the client side for more than 2-3 minutes. I will do more extensive tests next week. It looks like big step forward I will try it on my lamobo during weekend
Recommended Posts