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.

Thanks.  Do you know which irqs to use to split 2.4 and 5g WiFi between the two cups?

Run /cat/proc/interrupts and see the first column, as that is the irq (interrupt).  87 and 88 are wifi 2.4/5ghz and 26 and 27 are WAN, Ethernet

You can see below how I've split the 2.


root@OpenWrt:~# cat /proc/interrupts
           CPU0       CPU1
16:   51885549   51772134  armada_370_xp_irq   5  armada_370_xp_per_cpu_tick
18:   18184268          0  armada_370_xp_irq  31  mv64xxx_i2c
19:         21          0  armada_370_xp_irq  41  serial
25:          0          0  armada_370_xp_irq  45  ehci_hcd:usb1
26:   25719594          0  armada_370_xp_irq   8  mvneta
27:         43   36398761  armada_370_xp_irq  10  mvneta
28:          0          0  armada_370_xp_irq  55  f10a0000.sata
29:      28832          0  armada_370_xp_irq 113  f10d0000.nand
69:          0          0  f1018140.gpio   0  gpio_keys
70:          0          0  f1018140.gpio   1  gpio_keys
87:        399  143545126  armada_370_xp_irq  59  mwlwifi
88:   67892084          0  armada_370_xp_irq  60  mwlwifi
89:          2          0  armada_370_xp_irq  51  f1060900.xor
90:          2          0  armada_370_xp_irq  52  f1060900.xor
91:          2          0  armada_370_xp_irq  94  f10f0900.xor
92:          2          0  armada_370_xp_irq  95  f10f0900.xor
93:      68138          0  armada_370_xp_msi_irq   0  xhci_hcd
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0          0  Timer broadcast interrupts
IPI2:    2581900     237453  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:   12875125   11279615  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:          0          0  IRQ work interrupts
IPI7:          0          0  completion interrupts
Err:          0

The last testing I did was with RC2, and there was a huge processing difference between cpu0 and cpu1.

RC2 - Doing testing with gigabit WAN interface, downloading around 700mbps through NAT, CPU0 90%+- and CPU1 30%+-

RC3 there seems to be some improvement. I'll continue testing this morning.

gufus wrote:

Automatic fan control

RC3 - Mamba
Runs as a daemon, MUCH FASTER than a cron job

start/stop

/etc/init.d/fan_control start
/etc/init.d/fan_control stop

fan_control

#!/bin/sh /etc/rc.common

# put in /etc/init.d/fan_control

START=99

PIDFILE=/var/run/fan_monitor_pid

start() {
    start-stop-daemon -b -S -x /usr/sbin/fan_monitor -m -p $PIDFILE
}

stop() {
    start-stop-daemon -K -p $PIDFILE
}

fan_monitor

#!/bin/sh

# put in /usr/sbin/fan_monitor
# fan_monitor
# Utility script to monitor temperatures and turn on/off/run the fan in accordance
# with the original Belkin specs.

INTERVAL=5 # Poll every 5 seconds

# The fan will turn on if any of these temperatures is exceeded
CPU_ON=60000    # Belkin default is 85
DDR_ON=60000    # Belkin default is 65
WIFI_ON=65000   # Belkin default is 105

# The fan will run at reduced speed if any of these temperatures are below these values
CPU_MID=55000     # Belkin sets no default
DDR_MID=55000     # Belkin sets no default
WIFI_MID=60000    # Belkin sets no default

# The fan will turn off if all of the temperatures are below these values
CPU_OFF=50000     # Belkin default is 80
DDR_OFF=50000     # Belkin default is 60
WIFI_OFF=55000    # Belkin default is 100

old_pwm=-1

fan_set() {
    if [ "$1" -eq 2 ]; then
        pwm=255
    elif [ "$1" -eq 1 ]; then
        pwm=128
    elif [ "$1" -eq 0 ]; then
        pwm=0
    fi
    if [ "$pwm" -ne "$old_pwm" ]; then
        echo "Setting fan PWM to: $pwm"
        echo "$pwm" > /sys/devices/pwm_fan/hwmon/hwmon0/pwm1
        old_pwm=$pwm
    fi
}

# Turn fan to reduced speed when exiting
trap "{ fan_set 1; exit; }" SIGINT SIGTERM

# Main fan control loop
while :
do
    cpu=`cat /sys/class/hwmon/hwmon2/temp1_input`
    ddr=`cat /sys/class/hwmon/hwmon1/temp1_input`
    wifi=`cat /sys/class/hwmon/hwmon1/temp2_input`

    if [ "$cpu" -ge $CPU_ON -o "$ddr" -ge $DDR_ON -o "$wifi" -ge $WIFI_ON ]
    then
        fan_set 2
    elif [ "$cpu" -le $CPU_OFF -a "$ddr" -le $DDR_OFF -a "$wifi" -le $WIFI_OFF ]
    then
        fan_set 0
    elif [ "$cpu" -le $CPU_MID -a "$ddr" -le $DDR_MID -a "$wifi" -le $WIFI_MID ]
    then
        fan_set 1
    fi

    sleep $INTERVAL
done

how come this is not included in trunk? I see that trunk is still using the old fan sctrl script. Is this something that will make its way to trunk?

Results are in... It looks like RC3 has closed the gap. Testing shows, best Outside interface performance with NAT is with affinity left alone.

Downloading 10GigaByte video File from NAS on Internet.

Test 1

-- Affinity set to Default -- both Wifi and Ethernet interrupts go to CPU0

CPU0
cpuo
CPU1
cpu1
Mbps download on WAN
mbps-InPut

Test 2

# split wifi and ethernet on two different processors
echo 2 > /proc/irq/87/smp_affinity
echo 2 > /proc/irq/27/smp_affinity

CPU0
cpuo
CPU1
cpu1
Mbps download on WAN
mbps-InPut

My assessment of the 2 tests.......

On RC3 RAW download speed through NAT is, on average, 124mbps faster with affinity left alone. This test was repeated 3 times with the same results.

I'm going to set affinity back to default, but if I start getting lock-ups again, the affinity script will be re-instated.

(Last edited by davidc502 on 15 Aug 2015, 19:56)

One thing to think about with the above test ---- it's just raw download throughput. There are many other factors that need to be tested.....

Example: I have 2 FireTV boxes running on 5Ghz wifi, and with wifi and eithernet contending interrupts from core0, will my firetv boxes notice a slowdown while connecting or doing other things? I don't know, and will be watching other aspects from the 1900ac over the coming weeks.

(Last edited by davidc502 on 15 Aug 2015, 19:55)

alirz wrote:

how come this is not included in trunk? I see that trunk is still using the old fan sctrl script. Is this something that will make its way to trunk?

Nope.

Why? Because it's my script, not openwrt's script. I'm just share-ing it.

BTY, If you just want the fan to turn on/off use this code.

fan_monitor

#!/bin/sh

# put in /usr/sbin/fan_monitor
# fan_monitor
# Utility script to monitor temperatures and turn on/off the fan in accordance
# with the original Belkin specs.

INTERVAL=3 # Poll every 3 seconds

# The fan will turn on if any of these temperatures is exceeded
CPU_ON=60   # Belkin default is 85
DDR_ON=60   # Belkin default is 65
WIFI_ON=70  # Belkin default is 105

# The fan will turn off if all of the temperatures are below these values
CPU_OFF=80  # Belkin default is 80
DDR_OFF=60  # Belkin default is 60
WIFI_OFF=70 # Belkin default is 100

old_pwm=-1

fan_set() {
    if $1; then
        pwm=255
    else
        pwm=0
    fi
    if [ "$pwm" -ne "$old_pwm" ]; then
        echo "Setting fan PWM to: $pwm"
        echo "$pwm" > /sys/devices/pwm_fan/hwmon/hwmon0/pwm1
        old_pwm=$pwm
    fi
}

# Turn fan on when exiting
trap "{ fan_set true; exit; }" SIGINT SIGTERM

# Main fan control loop
while true
do
    cpu=`cat /sys/class/hwmon/hwmon2/temp1_input`
    ddr=`cat /sys/class/hwmon/hwmon1/temp1_input`
    wifi=`cat /sys/class/hwmon/hwmon1/temp2_input`

# Divide by 1000 to get temp values in C
    cpu=`expr $cpu / 1000`
    ddr=`expr $ddr / 1000`
    wifi=`expr $wifi / 1000`

    if [ "$cpu" -ge $CPU_ON \
        -o "$ddr" -ge $DDR_ON \
        -o "$wifi" -ge $WIFI_ON ]
    then
        fan_set true
    elif [ "$cpu" -le $CPU_OFF \
        -a "$ddr" -le $DDR_OFF \
        -a "$wifi" -le $WIFI_OFF ]
    then
        fan_set false
    fi

    sleep $INTERVAL &
    wait %1
done

(Last edited by gufus on 16 Aug 2015, 00:16)

gonzlobo wrote:

Evidently I missed the day we discussed updating only the Marvell s/w. Is it simple to add it to RC3?

file is at:
https://github.com/kaloz/mwlwifi/blob/3 … n?raw=true

get it onto your router then place it in:
/lib/firmware/mwlwifi/

I rebooted afterwards.

Just updated to latest trunk r46605 .
I notice that opkg.conf has no software sources. instead opkg seems to be pulling the feeds based on the sources in
/rom/etc/opkg/distfeeds.conf


Is this the new normal?

(Last edited by alirz on 16 Aug 2015, 00:19)

Try the following

rm /etc/opkg.conf ; cp /rom/etc/opkg.conf /etc/opkg.conf ; opkg update

Thanks.

Something like this? scp 88W8864.bin root@192.168.0.1:/lib/firmware/wmlwifi. It seemed to copy, but I'm not sure it did since the file names were identical.

DavidMcWRT wrote:
gonzlobo wrote:

Evidently I missed the day we discussed updating only the Marvell s/w. Is it simple to add it to RC3?

file is at:
https://github.com/kaloz/mwlwifi/blob/3 … n?raw=true

get it onto your router then place it in:
/lib/firmware/mwlwifi/

I rebooted afterwards.

(Last edited by gonzlobo on 16 Aug 2015, 01:16)

Try WinSCP

gonzlobo wrote:

Thanks.

Something like this? scp 88W8864.bin root@192.168.0.1:/lib/firmware/wmlwifi. It seemed to copy, but I'm not sure it did since the file names were identical.

DavidMcWRT wrote:
gonzlobo wrote:

Evidently I missed the day we discussed updating only the Marvell s/w. Is it simple to add it to RC3?

file is at:
https://github.com/kaloz/mwlwifi/blob/3 … n?raw=true

get it onto your router then place it in:
/lib/firmware/mwlwifi/

I rebooted afterwards.

After a reboot it will be copyed into /overlay (which openwrt uses)

Just look at the date

see here
https://forum.openwrt.org/viewtopic.php … 38#p285238

BTY

the 1st flash is in /rom see the date and size difference

root@AC1900M:~# ls -l /rom/lib/firmware/mwlwifi/88W8864.bin
-rwxr-xr-x    1 root     root        116208 Jun 22 05:23 /rom/lib/firmware/mwlwifi/88W8864.bin
root@AC1900M:~#

(Last edited by gufus on 16 Aug 2015, 02:06)

Thanks gufus. I have teh correct file.

gufus wrote:
gonzlobo wrote:

Thanks.

Something like this? scp 88W8864.bin root@192.168.0.1:/lib/firmware/wmlwifi. It seemed to copy, but I'm not sure it did since the file names were identical.

DavidMcWRT wrote:

file is at:
https://github.com/kaloz/mwlwifi/blob/3 … n?raw=true

get it onto your router then place it in:
/lib/firmware/mwlwifi/

I rebooted afterwards.

After a reboot it will be copyed into /overlay (which openwrt uses)

Just look at the date

see here
https://forum.openwrt.org/viewtopic.php … 38#p285238

BTY

the 1st flash is in /rom see the date and size difference

root@AC1900M:~# ls -l /rom/lib/firmware/mwlwifi/88W8864.bin
-rwxr-xr-x    1 root     root        116208 Jun 22 05:23 /rom/lib/firmware/mwlwifi/88W8864.bin
root@AC1900M:~#

Please pardon me for going here a bit off-topic, but people here are utmost helpful, that's why I'm posting in this thread.

I would like to update "iftop". The current package is "1.0pre2", but there is "1.0pre4" with the capability to save output to a textfile (I would like to log all connections for later analysis).

Any hints for me? Many thanks!

gufus wrote:

Automatic fan control

Thanks for these scripts, they're working great at my end.  Much nicer than the cron job.

davidc502 wrote:

Try the following

rm /etc/opkg.conf ; cp /rom/etc/opkg.conf /etc/opkg.conf ; opkg update


Looks like the two files are the same.

-------------------------------------------------------------------------------------------------------------------------
root@OpenWrt:/home/ali# cat /rom/etc/opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay


root@OpenWrt:/home/ali# cat /etc/opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

-------------------------------------------------------------------------------------------------------------------------

However the software sources are in : /etc/opkg/distfeeds.conf

If i copy the contents of that in /etc/opkg.conf. i get duplicate errors:

-------------------------------------------------------------------------------------------------------------------------
root@OpenWrt:/home/ali# opkg update
Downloading http://downloads.openwrt.org/snapshots/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_base.
Downloading http://downloads.openwrt.org/snapshots/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_luci.
Downloading http://downloads.openwrt.org/snapshots/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_management.
Downloading http://downloads.openwrt.org/snapshots/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_packages.
Downloading http://downloads.openwrt.org/snapshots/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_routing.
Downloading http://downloads.openwrt.org/snapshots/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_telephony.
Collected errors:
* opkg_conf_parse_file: Duplicate src declaration (chaos_calmer_base http://downloads.openwrt.org/snapshots/ … ges/base). Skipping.
* opkg_conf_parse_file: Duplicate src declaration (chaos_calmer_luci http://downloads.openwrt.org/snapshots/ … ges/luci). Skipping.
* opkg_conf_parse_file: Duplicate src declaration (chaos_calmer_management http://downloads.openwrt.org/snapshots/ … nagement). Skipping.
* opkg_conf_parse_file: Duplicate src declaration (chaos_calmer_packages http://downloads.openwrt.org/snapshots/ … packages). Skipping.
* opkg_conf_parse_file: Duplicate src declaration (chaos_calmer_routing http://downloads.openwrt.org/snapshots/ … /routing). Skipping.
* opkg_conf_parse_file: Duplicate src declaration (chaos_calmer_telephony http://downloads.openwrt.org/snapshots/ … elephony). Skipping.
-------------------------------------------------------------------------------------------------------------------------

So for now, i will leave /etc/opkg.conf empty as opkg update and software installation does work fine that way. it simlply uses the feeds from /etc/opkg/distfeeds.conf .

New behaviour?

Has anyone been able to get collectd_thermal  or collectd_sensors to show in luci statistics? Or is it even possible? At one point I had info show in /var/rrd/OpenWrt/ but I could not find a way for luci to display even after modifying /etc/config/luci_statistics.
TIA.

(Last edited by northbound on 16 Aug 2015, 19:43)

northbound wrote:

Has anyone been able to get collectd_thermal  or collectd_sensors to show in luci statistics? Or is it even possible? At one point I had info show in /var/rrd/OpenWrt/ but I could not find a way for luci to display even after modifying /etc/config/luci_statistics.
TIA.

I would also be interested in that. I have installed the modules, but now I don't know how to get it show-up. I wanted to activate also "Ping", but that didn't work either...

Strange

Something blew a gasket

The WAN LED is blinking and no internet

I took the vpn tunnel down

It says LAN/eth0 WAN/eth1 is up, I have my assigned ISP IP and went back to the ISP DNS's  it's all there

Still no internet

Putin my backup router, works.. so modem is working

Any ideas?

ps:

I guess I could try flashing back to OEM and see what happens

(Last edited by gufus on 17 Aug 2015, 00:23)

gufus wrote:

Strange

Something blew a gasket

The WAN LED is blinking and no internet

I took the vpn tunnel down

It says LAN/eth0 WAN/eth1 is up, I have my assigned ISP IP and went back to the ISP DNS's  it's all there

Still no internet

Putin my backup router, works.. so modem is working

Any ideas?

ps:

I guess I could try flashing back to OEM and see what happens

Well? What happened? Did you get back up and running?

Looks like MCWRT 2.0 is out! I thought chadster wasn't working on it anymore. Anything new exciting new there?

@northbound

You could try a simple reboot.

nitroshift

nitroshift wrote:

@northbound

You could try a simple reboot.

nitroshift

Uh, that was gufus that had the problem smile

alirz wrote:

Looks like MCWRT 2.0 is out! I thought chadster wasn't working on it anymore. Anything new exciting new there?

Where is it/where did you see it?

Sorry, posts 7001 to 7000 are missing from our archive.