OpenWrt Forum Archive

Topic: Update on Linksys WRT1900AC support

The content of this topic has been archived between 16 Sep 2014 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

kirkgbr wrote:

May I ask what in your talks with Kaloz caused you to switch?

Please read what LTSI stands for and you'll have the answer.

nitroshift

nitroshift wrote:

As a consequence to the talks with Kaloz, I have decided to switch to LTSI kernel (4.1 at the moment, will change in 2017). Although I will compile test firmware based on 4.4 / 4.6, I will also backport and commit relevant changes for 4.1 to be included upstream in the following days / weeks.

nitroshift


please, build for 1900acs device too!

davidc502 wrote:
kylejvrsa wrote:

Wonder if this will help this device perform better as well with regards to bufferbloat?

https://git.kernel.org/cgit/linux/kerne … f503f1dcca

A+ bufferbloat scores with or without the net-next patch.

davidc502, just curious if you're using QoS? Are you getting A+ bufferbloat scores for the May 1 build that you posted?

Thanks.

I've been trying to compile NetData for the WRT1900ac, and if anyone with experience cross compiling on OpenWRT could take a look at this GitHub issue I opened to see if one can determine where the process is going wrong, I'd really appreciate it (as NetData blows Collectd out of the water)

  • To jump directly to the errors being received and other output in that thread: here

(Last edited by JW0914 on 7 May 2016, 18:57)

RogerSC wrote:
davidc502 wrote:
kylejvrsa wrote:

Wonder if this will help this device perform better as well with regards to bufferbloat?

https://git.kernel.org/cgit/linux/kerne … f503f1dcca

A+ bufferbloat scores with or without the net-next patch.

davidc502, just curious if you're using QoS? Are you getting A+ bufferbloat scores for the May 1 build that you posted?

Thanks.

The misconception with bufferbloat is that it's always your router/modem, but in reality, bufferbloat can happen ANYWHERE along the path between you and the last HOP (Router).

So, there may be a router in timbuktu (who knows where) that has been poorly configured, and you're going to get a poor bufferbloat report. I'm not saying that it can't be the home router/modem, it's just that I used to get bad bufferbloat reports when on Comcast's network, and when I switched to fiber I always get A to A+ (Same Router running OpenWrt!)  So, at least in this case it it seemed to be some obscure router(s) OR perhaps communication between my router and Comcast's modem that was the problem.

One thing I would like dslreports to do is to tell the customer which HOP has bufferbloat. AH! But there may be help in determining where it is in the path... PingPlotter can help to determine where the problems happening >  http://www.pingplotter.com/

In the case it is believed OpenWrt may be the problem, there are QoS scripts that can help tune undesirable latency. Read more about it here >>> https://wiki.openwrt.org/doc/howto/sqm

Also, I've just uploaded packages that include QoS scripts, so there should be something for you in there either way.

Hope that helps.

Thanks for pingplotter, I've heard it referred to but not used it. You're right on about not knowing where in the path latencies are introduced when you just get a one number result. I'm just curious about this stuff since I'm not a gamer, and don't perceive the results of bufferbloat here anyways. Other than what dslreports tells me...there is one hop in the path between me and dslreports according to pingplotter that has excess latency (part of Comcast's infrastructure), but from what I'm seeing most of the latency must be from my router.

(Last edited by RogerSC on 8 May 2016, 08:05)

JW0914 wrote:

@xhemp - I compiled 4.4.8 about 90 min ago without issue.

The error seems like a text error within a config... did you by chance edit any build files/configs in windows?

No, I just do it entirely on my Linux box but i believe I know the culprit, the old .config, let me retry. Thanks @JW0914 and @anomeome

JW0914 wrote:

I've been trying to compile NetData for the WRT1900ac, and if anyone with experience cross compiling on OpenWRT could take a look at this GitHub issue I opened to see if one can determine where the process is going wrong, I'd really appreciate it (as NetData blows Collectd out of the water)

  • To jump directly to the errors being received and other output in that thread: here

Have you got anywhere with NetData? I have never cross compiled but have been trying.
That program is sweet on an Ubuntu VM

northbound wrote:
JW0914 wrote:

I've been trying to compile NetData for the WRT1900ac, and if anyone with experience cross compiling on OpenWRT could take a look at this GitHub issue I opened to see if one can determine where the process is going wrong, I'd really appreciate it (as NetData blows Collectd out of the water)

  • To jump directly to the errors being received and other output in that thread: here

Have you got anywhere with NetData? I have never cross compiled but have been trying.
That program is sweet on an Ubuntu VM

The author of NetData replied with a suggestion, so I'm gonna give that a shot tonight.  The main issue I'm having is with the makefile, however, I'm hoping the author's suggestion will alleviate that issue.  If not, someone with experience cross compiling for OpenWRT will need to chime in, as the cross compile wiki is incomplete and out-dated.  NetData should literally work with any linux distro, so it definitely will run on OpenWRT... as soon as we get the makefile sorted.

JW0914 wrote:
northbound wrote:
JW0914 wrote:

I've been trying to compile NetData for the WRT1900ac, and if anyone with experience cross compiling on OpenWRT could take a look at this GitHub issue I opened to see if one can determine where the process is going wrong, I'd really appreciate it (as NetData blows Collectd out of the water)

  • To jump directly to the errors being received and other output in that thread: here

Have you got anywhere with NetData? I have never cross compiled but have been trying.
That program is sweet on an Ubuntu VM

The author of NetData replied with a suggestion, so I'm gonna give that a shot tonight.  The main issue I'm having is with the makefile, however, I'm hoping the author's suggestion will alleviate that issue.  If not, someone with experience cross compiling for OpenWRT will need to chime in, as the cross compile wiki is incomplete and out-dated.  NetData should literally work with any linux distro, so it definitely will run on OpenWRT... as soon as we get the makefile sorted.

Good news... I've been able to successfully cross compile netdata for OpenWRT.

Bad news... some kinks still need working out, as this is what I get upon issuing /usr/sbin/netdata

[root@WRT1900] ~ # /usr/sbin/netdata
/usr/sbin/netdata: line 1:ELF: not found
/usr/sbin/netdata: line 2: ▒y▒▒▒: not found
PuTTY/usr/sbin/netdata: line 2: I!▒[▒w0Y{▒ not found
/usr/sbin/netdata: line 2: ▒▒L▒▒qEe#▒r▒▒d: not found
PuTTYPuTTYPuTTYPuTTY/usr/sbin/netdata: line 3: ▒d+h▒d,p▒d-x▒d.▒▒d/▒▒d0▒▒d1▒▒d2▒▒d3▒▒d4▒▒d5▒▒d6▒d7ȡd8Сd9ءd:▒d: not found
/usr/sbin/netdata: line 3: can't open ▒d=▒d: no such file
/usr/sbin/netdata: line 3: ▒d: not found
/usr/sbin/netdata: line 3:▒da▒db▒dc: not found
/usr/sbin/netdata: line 3: h▒d
                              p▒d
x▒d▒▒d▒▒d▒▒d▒▒d▒▒d▒▒d▒▒d▒▒d▒dȠdРdؠd▒d▒d▒d▒d▒▒d: not found
/usr/sbin/netdata: line 5: ▒▒▒▒%▒z: not found
/usr/sbin/netdata: line 5: ▒@▒▒▒▒%▒z
                                    ▒0▒▒▒▒%▒z
▒: not found
/usr/sbin/netdata: line 5: {▒▒▒▒▒%{▒▒▒▒▒%▒z▒p▒▒▒▒%▒▒▒▒▒▒%jz▒P▒▒▒▒%bz▒@▒▒▒▒%Zz0▒▒▒▒%Rz▒: not found
/usr/sbin/netdata: line 13: syntax error: unexpected word (expecting ")")
[root@WRT1900] ~ # PuTTYPuTTYPuTTYPuTTYPuTTYPuTTY
gsustek wrote:

nice one, it works for me


btw. lsusb doesn't work

https://jpst.it/Iek7
i had to install version
Package: usbutils
Version: 007-2


Thnx.

Great, thou I won't look into busybox' lsusb. If you want to go bare-bone there is always cat /sys/kernel/debug/usb/devices.

Have you already had a chance to test the sata-disk trigger patch?

nitroshift wrote:

As a consequence to the talks with Kaloz, I have decided to switch to LTSI kernel (4.1 at the moment, will change in 2017). Although I will compile test firmware based on 4.4 / 4.6, I will also backport and commit relevant changes for 4.1 to be included upstream in the following days / weeks.

nitroshift

Which upstream are you referring to? Linus , ltsi or openwrt? What are the relevant changes? Do you have a repo I'd could browse?

On an side note, I was wondering who the relevant folks are for getting things done in openwrt for this particular hardware? Sounds like you'd know. Mind to outline?

Thanks in advance

@sera

Upstream OpenWRT. A relevant change is for example support for Buffer Manager. I haven't got a browseable repo as my work in progress isn't public but its results end up submitted to patchwork and eventually merged into OpenWRT tree. As for the side note, the dev in charge of mvebu platform is Kaloz.

nitroshift

(Last edited by nitroshift on 8 May 2016, 08:35)

davidc502 wrote:

The misconception with bufferbloat is that it's always your router/modem, but in reality, bufferbloat can happen ANYWHERE along the path between you and the last HOP (Router).

So, there may be a router in timbuktu (who knows where) that has been poorly configured, and you're going to get a poor bufferbloat report.

For me it is the next hop, so the ISP gateway...

http://i.imgur.com/GF6Ccu3.png

Edit:
This was for download and very extreme test.
For upload it seems to be the third hop where ping raises +500ms without SQM. Probably that ISP router is doing traffic shaping to limit speed to 100/10. For download it is limited already on FC router, it is having 100Mbit/s link speed.
And yes, sqm helps very well in this.

(Last edited by Bogey on 8 May 2016, 08:39)

Bogey wrote:

I have been now running 24 hours wrt1900acs and suddenly wifi is limited to 22mbit/s on both 2.4GHz and 5GHz.

I remember seeing some post about 20mbit/s limit but could not find. Is it because of wifi driver or what?

wifi off/on seems to fix it.

Any idea? here is speedtest using wifi 5GHz
http://www.speedtest.net/result/5309057558.png
and 2.4GHz
http://www.speedtest.net/result/5309064567.png
signal and rate was ok:
http://aijaa.com/fghlnB

After wifi off / on it is again back to normal

5GHz
http://www.speedtest.net/result/5309069466.png

2.4GHz
http://www.speedtest.net/result/5309075678.png

What's bugging me is those bugs, there is no pattern, any version off 1900 has is and they are repeating, can we enumerate our devices(with build version, packages installed) to see some patterns and resolve bugs?

gsustek:1900acs:arokhr41966:removed_mwan3,sqm,nzgbet,strongswan:issue_after 12h 5GHz doesn't even broadcast after 24h:error_https://github.com/kaloz/mwlwifi/issues/41


dmesg:


[54650.738903] wlan0-1: failed to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-5)
[55248.535091] ieee80211 phy0: cmd 0x9122=UpdateEncryption timed out
[55248.541216] ieee80211 phy0: return code: 0x1122
[55248.545776] ieee80211 phy0: timeout: 0x1122
[55248.549978] ieee80211 phy0: failed execution
[55248.554266] wlan0: failed to set key (1, ff:ff:ff:ff:ff:ff) to hardware (-5)
[55252.752217] ieee80211 phy0: cmd 0x9122=UpdateEncryption timed out
[55252.758442] ieee80211 phy0: return code: 0x1122
[55252.763129] ieee80211 phy0: timeout: 0x1122
[55252.767452] ieee80211 phy0: failed execution
[55252.771862] wlan0-1: failed to set key (1, ff:ff:ff:ff:ff:ff) to hardware (-5)

(Last edited by gsustek on 8 May 2016, 12:11)

@JW0914
My gut tells me that there are necessary requirements that Openwrt can not fulfill.
It is just too stripped down from a full Linux system and the necessary packages are not ava.
I hope I am wrong. NetData is a great program and it would be nice to have the ability to
install it on Openwrt. I hope you get it going but I can't see how with no help from the developers of
NetData. But I still wish you good luck. And please keep me posted on the outcome.
Thanks.

@david

I'm moving and be without my fiber WAN for a while, would be kind enough to host temporarily my repo for me ? I can make a CNAME record to point your dns in the meantime to avoid breaking builds updates.

Regards,

Full repo dump link: https://www.dropbox.com/sh/cplxtco0wypj … xQLEa?dl=0

(Last edited by mrfrezee on 19 May 2016, 16:07)

northbound wrote:

@JW0914
My gut tells me that there are necessary requirements that Openwrt can not fulfill.
It is just too stripped down from a full Linux system and the necessary packages are not ava.
I hope I am wrong. NetData is a great program and it would be nice to have the ability to
install it on Openwrt. I hope you get it going but I can't see how with no help from the developers of
NetData. But I still wish you good luck. And please keep me posted on the outcome.
Thanks.

That's the thing though, they claim it should work on any linux distro.  I've never cross-compiled before and there simply isn't enough relevant information as to how to compile stuff for OpenWRT.  According to the OpenWRT Cross Compile Wiki, once ./configure is ran, you should have a functional compilation and binary for openwrt.  Either that wiki is incomplete, or liberties have been taken with the assumption one reading has cross compiled before.

Is it possible to compile directly on the router?  extroot would need to utilized, but is it possible?  Also, does anyone know of a user who has cross compiled a program for OpenWRT before, as I'd like to know if the steps I took are the correct ones.

Steps Taken

  • Developer states zlib must be installed into DESTDIR prior to issuing make install for NetData (when cross compiling)

    • zlib was compiled for arm separately (via this wiki), and installed into ~/openwrt/package/utils/netdata

zlib compilation

  • skipping to zlib make install

make install DESTDIR=~/openwrt/package/utils/netdata ZLIB_CFLAGS=" " ZLIB_LIBS="-L/tmp/root1 -lz"

netdata cross compilation

  • Added to .bashrc

    • PATH=$PATH:/home/jw0914/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi/bin

    • export PATH

    • STAGING_DIR=/home/jw0914/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.3.0_musl-1.1.14_eabi

    • export STAGING_DIR

git clone https://github.com/firehol/netdata.git --depth=1
cd netdata

autoreconf -ivf
./configure --build=x86_64-pc-linux-gnu --host=arm-openwrt-linux-muslgnueabi --without-zlib

make install DESTDIR=~/openwrt/package/utils/netdata

Resulting folder hierarchy

  • ~/openwrt/package/utils/netdata:

    • usr

      • local

        • etc --> contents to be placed in /etc

        • include --> contents to be placed in /usr/include

        • lib --> contents to be placed in /usr/lib

        • libexc --> contents to be placed in /usr/libexec

        • sbin --> contents to be placed in /usr/sbin

        • share --> contents to be placed in /usr/share

        • var --> contents to be placed in /tmp

(Last edited by JW0914 on 8 May 2016, 18:36)

That's the thing though, they claim it should work on any linux distro.  I've never cross-compiled before and there simply isn't enough relevant information as to how to compile stuff for OpenWRT.  According to the OpenWRT Cross Compile Wiki, once ./configure is ran, you should have a functional compilation and binary for openwrt.  Either that wiki is incomplete, or liberties have been taken with the assumption one reading has cross compiled before.

Does anyone know of a user who has cross compiled a program for OpenWRT before, as I'd like to know if the steps I took are the correct ones.

Have a look at the "Creating packages" wiki entry instead. It's much easier to create a package Makefile and let the build system handle the cross-compilation for you rather doing it manually in most cases. It looks like netdata has dependencies on bash (some of the scripts), zlib and node. You can specify those as dependencies to your package and the build system will handle the rest. You'll also need a PKG_FIXUP to run autoreconf (see the wiki).

You can start from one of the many package Makefiles in the Github packages feed.

I would recommend posting this in a separate topic on the forum, since there are more people reading there. This is also not specific to these routers.

leitec wrote:

That's the thing though, they claim it should work on any linux distro.  I've never cross-compiled before and there simply isn't enough relevant information as to how to compile stuff for OpenWRT.  According to the OpenWRT Cross Compile Wiki, once ./configure is ran, you should have a functional compilation and binary for openwrt.  Either that wiki is incomplete, or liberties have been taken with the assumption one reading has cross compiled before.

Does anyone know of a user who has cross compiled a program for OpenWRT before, as I'd like to know if the steps I took are the correct ones.

Have a look at the "Creating packages" wiki entry instead. It's much easier to create a package Makefile and let the build system handle the cross-compilation for you rather doing it manually in most cases. It looks like netdata has dependencies on bash (some of the scripts), zlib and node. You can specify those as dependencies to your package and the build system will handle the rest. You'll also need a PKG_FIXUP to run autoreconf (see the wiki).

You can start from one of the many package Makefiles in the Github packages feed.

I would recommend posting this in a separate topic on the forum, since there are more people reading there. This is also not specific to these routers.

Will do, thanks a bunch =]

@JW0914

Hi, please post the topic url here. I want to know to how to create packages:-)


@all how to enable HT40 on 2,4 GHz?

(Last edited by gsustek on 8 May 2016, 22:45)

sera wrote:

@gsustek and other who want to test

There is no sata trigger in Linus kernel. The triggers usbdev and netdev are openwrt additions so the same can be done for sata.

Reuse what you can. https://github.com/ebbes/linux-kirkwood … gger.patch basically implements the ide-bus activity led behaviour we know from long ago. Guess this is the desired behaviour.

Had to fix the patch so it would apply again and added some openwrt integration. The resulting patch can be found here: https://gist.github.com/anonymous/57f0a … cbbb595727

howto:
- apply patch
- run "make defconfig"
- enable the sata ledtrigger in menuconfig
- build and flash image
- add sata led config to /etc/config/system
- report back

A configuration example for the acs/shelby

config led 'sata'
        option name 'SATA'
        option sysfs 'shelby:white:sata'
        option trigger 'sata-disk'

sata led is off, even after your procedure.

And if you manually enable the trigger? Maybe I messed up the config?

echo sata-disk > /sys/class/leds/shelby\:white\:sata/trigger

You should see it blink while you actually write or read from the disk, unlike usbdev or netdev which are default on if plugged in.

Edit: scratch that, this board unlike the one I took the patch from doesn't use the sata marvel driver, so no events will be triggered. Should have the time to fix it tomorrow.

(Last edited by sera on 8 May 2016, 22:51)

sera wrote:

And if you manually enable the trigger? Maybe I messed up the config?

echo sata-disk > /sys/class/leds/shelby\:white\:sata/trigger

You should see it blink while you actually write or read from the disk, unlike usbdev or netdev which are default on if plugged in.

Edit: scratch that, this board unlike the one I took the patch from doesn't use the sata marvel driver, so no events will be triggered. Should have the time to fix it tomorrow.


nope: but is it all ok?
i haven't kmod-sata-trigger in my packages

gs@gs-xxxxx:~/arokh-r49166$ grep ledtrig .config
CONFIG_DEFAULT_kmod-ledtrig-usbdev=y
CONFIG_PACKAGE_kmod-ledtrig-default-on=m
CONFIG_PACKAGE_kmod-ledtrig-gpio=m
CONFIG_PACKAGE_kmod-ledtrig-heartbeat=m
CONFIG_PACKAGE_kmod-ledtrig-morse=m
CONFIG_PACKAGE_kmod-ledtrig-netdev=m
CONFIG_PACKAGE_kmod-ledtrig-netfilter=y
CONFIG_PACKAGE_kmod-ledtrig-oneshot=m
CONFIG_PACKAGE_kmod-ledtrig-sata-disk=y
CONFIG_PACKAGE_kmod-ledtrig-timer=m
# CONFIG_PACKAGE_kmod-ledtrig-transient is not set
CONFIG_PACKAGE_kmod-ledtrig-usbdev=y


opkg list|grep trig
iptables-mod-led - 1.4.21-2 - iptables extension for triggering a LED.  Targets: - LED
kmod-ipt-led - 4.4.6-1 - Netfilter target to trigger a LED when a network packet is matched.
kmod-ledtrig-default-on - 4.4.6-1 - Kernel module that allows LEDs to be initialised in the ON state
kmod-ledtrig-gpio - 4.4.6-1 - Kernel module that allows LEDs to be controlled by gpio events
kmod-ledtrig-heartbeat - 4.4.6-1 - LED Heartbeat Trigger
kmod-ledtrig-morse - 4.4.6-1 - Kernel module to show morse coded messages on LEDs
kmod-ledtrig-netdev - 4.4.6-1 - Kernel module to drive LEDs based on network activity
kmod-ledtrig-netfilter - 4.4.6-1 - Kernel module to flash LED when a particular packets passing through your machine.  For example to create an LED trigger for incoming SSH traffic: iptables -A INPUT -p tcp --dport 22 -j LED --led-trigger-id ssh --led-delay 1000 Then attach the new trigger to an LED on your system: echo netfilter-ssh > /sys/class/leds/<ledname>/trigger
kmod-ledtrig-oneshot - 4.4.6-1 - Kernel module that allows LEDs to be triggered by sporadic events in one-shot pulses
kmod-ledtrig-timer - 4.4.6-1 - Kernel module that allows LEDs to be controlled by a programmable timer via sysfs
kmod-ledtrig-usbdev - 4.4.6-1 - Kernel module to drive LEDs based on USB device presence/activity
lighttpd-mod-trigger_b4_dl - 1.4.38-1 - Trigger before download module
pingcheck - 0.1-1 - Checks by using "ping" (ICMP echo) wether a configured host (normally on the internet) can be reached via a specific interface. Then makes this information available via ubus and triggers "online" and "offline" scripts.
triggerhappy - 0.3.4-151001-1 - triggerhappy - handle input events and run configured programs The daemon thd can handle hotplugged input devices and is configured through simple configuration files in /etc/triggerhappy/triggers.d/.
root@1900acs ~# opkg list|grep ledtrig
kmod-ledtrig-default-on - 4.4.6-1 - Kernel module that allows LEDs to be initialised in the ON state
kmod-ledtrig-gpio - 4.4.6-1 - Kernel module that allows LEDs to be controlled by gpio events
kmod-ledtrig-heartbeat - 4.4.6-1 - LED Heartbeat Trigger
kmod-ledtrig-morse - 4.4.6-1 - Kernel module to show morse coded messages on LEDs
kmod-ledtrig-netdev - 4.4.6-1 - Kernel module to drive LEDs based on network activity
kmod-ledtrig-netfilter - 4.4.6-1 - Kernel module to flash LED when a particular packets passing through your machine.  For example to create an LED trigger for incoming SSH traffic: iptables -A INPUT -p tcp --dport 22 -j LED --led-trigger-id ssh --led-delay 1000 Then attach the new trigger to an LED on your system: echo netfilter-ssh > /sys/class/leds/<ledname>/trigger
kmod-ledtrig-oneshot - 4.4.6-1 - Kernel module that allows LEDs to be triggered by sporadic events in one-shot pulses
kmod-ledtrig-timer - 4.4.6-1 - Kernel module that allows LEDs to be controlled by a programmable timer via sysfs
kmod-ledtrig-usbdev - 4.4.6-1 - Kernel module to drive LEDs based on USB device presence/activity
root@1900acs ~# lsmod |grep led
leds_pca963x            4428  0
leds_tlc591xx           2745  0
ledtrig_usbdev          2403  0
regmap_i2c              2661  1 leds_tlc591xx
root@1900acs ~# lsmod |grep tri
ledtrig_usbdev          2403  0
xt_string                908  0