GL-iNet AX1800 new router - OpenWrt support?

Is this on my new base code?

Itā€™s not the current one. I couldnā€™t compile the FULLCONENAT two days ago. Now I havenā€™t compiled the new one. Iā€™ll try to compile it again when you finish building it.

I rebased as of last night and today. However trying to get the Data Plane and SSDK to compile now.

Looking forward to your successful completion.

Seems the SSDK issue was a me issue recompiling again now if it work will let you know.

Update Everything is working i am now making a new compile run now for snapshots.
It should be available tomorrow with a new config.buildinfo file.

@mansour will you be able to make a package source for your script so i can then include it into the repo? Or can you make it detect the board so it only runs on the AXT1800.

What is the difference between ipq-wifi-glinet_gl-ax1800 and ath11k-vbdf-ipq6018, ath11k-firmware-ipq6018, which one should I use to compile?

Use the vbdf version as it will download all ipq6028 board-2.bin files then will use the correct one for the hardware.

Compile vbdf with WIFI?

New Snapshot is uploaded so now you can look at the config.buildinfo

config.buildinfo

Yes this means there is a new image release over at R23155

WARNING!: AXT1800 fan doesn't spin however the GPIO461 is present as is the pwm1 in hwmon0. Will look into fixing this.

[quote="mansour, post:456, topic:105163"]

The new script is as follows

fan_control

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

START=99
STOP=01

USE_PROCD=1

start_service() {
    echo "Starting fan monitor instance..."
    procd_open_instance
    procd_set_param command /usr/sbin/fan_monitor
    procd_set_param respawn
    procd_set_param respawn_delay 5
    procd_close_instance
}

start() {
    board_id=$(cat /tmp/sysinfo/board_name)

    case "$board_id" in
        "glient,gl-axt1800")
            start_service
            ;;
        *)
            echo "Unsupported board. Fan control not available."
            ;;
    esac
}

stop() {
    board_id=$(cat /tmp/sysinfo/board_name)

    case "$board_id" in
        "glient,gl-axt1800")
            echo "Stopping fan monitor instance..."
            procd_kill_instance
            ;;
        *)
            echo "Unsupported board. Fan control not available."
            ;;
    esac
}

reload() {
    board_id=$(cat /tmp/sysinfo/board_name)

    case "$board_id" in
        "glient,gl-axt1800")
            echo "Reloading fan monitor instance..."
            procd_reload_instance
            ;;
        *)
            echo "Unsupported board. Fan control not available."
            ;;
    esac
}

fan_monitor

#!/bin/sh

DEBUG_MODE=false

get_temperature() {
    temperature=$(cat /sys/devices/virtual/thermal/thermal_zone0/temp)
    temperature=$((temperature/1000))
    echo "$temperature"
}

set_fan_speed() {
    echo "$1" > /sys/devices/virtual/thermal/cooling_device0/cur_state
}

compare_temperatures() {
    awk -v a="$1" -v b="$2" 'BEGIN{print(a>b)}'
}

calculate_fan_speed() {
    local temperature=$1
    local fan_speed=0

    if [ "$(compare_temperatures $temperature 70)" = "1" ]; then
        fan_speed=255
    elif [ "$(compare_temperatures $temperature 66)" = "1" ]; then
        fan_speed=220
    elif [ "$(compare_temperatures $temperature 62)" = "1" ]; then
        fan_speed=185
    elif [ "$(compare_temperatures $temperature 58)" = "1" ]; then
        fan_speed=150
    elif [ "$(compare_temperatures $temperature 54)" = "1" ]; then
        fan_speed=115
    elif [ "$(compare_temperatures $temperature 50)" = "1" ]; then
        fan_speed=95
    elif [ "$(compare_temperatures $temperature 48)" = "1" ]; then
        fan_speed=80
    elif [ "$(compare_temperatures $temperature 46)" = "1" ]; then
        fan_speed=60
    elif [ "$(compare_temperatures $temperature 45)" = "1" ]; then
        fan_speed=30
    else
        fan_speed=0
    fi

    echo "$fan_speed"
}

set_max_fan_speed() {
    set_fan_speed 255
}

handle_termination() {
    set_max_fan_speed
    exit 0
}

trap handle_termination SIGINT SIGTERM

monitor_fan() {
    while true; do
        temperature=$(get_temperature)
        fan_speed=$(calculate_fan_speed $temperature)

        set_fan_speed $fan_speed

        if [ "$DEBUG_MODE" = true ]; then
            echo "Temperature: $temperatureĀ°C, Fan Speed: $(cat /sys/devices/virtual/thermal/cooling_device0/cur_state)"
        fi

        sleep 15
    done
}

monitor_fan
1 Like

New build, with Fan Control for the AXT1800.

Download

Link: R21361

GL-AX1800 (Flint)
Whats working :

  • LAN
  • WAN
  • WiFi
  • USB
  • Reset Button
  • WPS/Sync (Assigned as WPS)

Whats not working:

  • Please let me know

GL-AXT1800 (Slate AX)
Whats Working:

  • LAN
  • WAN
  • WiFi
  • SDCARD
  • USB
  • FAN (Please read further down)
  • Toogle (Assigned as WPS)

Whats not working:

  • Fan_control doesn't start on boot known issue open ssh and execute /etc/init.d/fan_control start

Important!: The fan control now controls the fan speed to the following temp markers and fan speed.

Temp = Percentage (Value in cur_state)
45c = 0% (0) Fan speed
58c = 50% (128) Fan speed
85c = 100% (254) Fan speed

The fan tuning will be required and over time it will be adjusted. However for now it should be sane enough. The fan_monitor in /usr/sbin/ is where the fan speeds and temp markers are at and can be edited with vim If you have a suggestion that is better please let me know.

Testing
What needs to be checked:

  • Fan works correctly after running /etc/init.d/fan_control start in SSH
  • WiFi is stable (Speedtests and logs please)
  • VPN Performance (Speedtest please and logs , OpenVPN and Wireshark)

Thanks to @anomeome for the fan script!

Solutions

  • Fan boots at 100% ssh or open Terminal in LUCI then issue echo "0" > /sys/devices/virtual/thermal/cooling_device0/cur_state " this stop the fan but allow the monitor to continue controlling the fan.
2 Likes

Good work! Thanks for sharing.

new build INCOMING!!!!!!!!!!!!!!!!!!!!!!! with a better fan curve setup so yes the fan will spin from 45c up but it will not hit 100% fan speed until either you kill the fan_monitor process or it hits 70c.

1 Like

New build, with Fan Control for the AXT1800.

Download

Link: R21362

GL-AX1800 (Flint)
Whats working :

  • LAN
  • WAN
  • WiFi
  • USB
  • Reset Button
  • WPS/Sync (Assigned as WPS)

Whats not working:

  • Please let me know

GL-AXT1800 (Slate AX)
Whats Working:

  • LAN
  • WAN
  • WiFi
  • SDCARD
  • USB
  • FAN (Please read further down)
  • Toogle (Assigned as WPS)

Whats not working:

  • Fan_control doesn't start on boot known issue open ssh and execute /etc/init.d/fan_control enable and then /etc/init.d/fan_control start

Important!: The fan control now controls the fan speed between 45c to 70c via an 8 step fan curve. If the process is killed the fan will go to 100% unless you issue /etc/init.d/fan_control disable and reboot to which the fan will remain off.

The fan tuning will be required and over time it will be adjusted.

However you can adjust the fan curve by editing /usr/sbin/fan_monitor you can also set DEBUG_MODE=false to DEBUG_MODE=true and run the script in ssh and it will show both the temps and fan speed as an output.

Testing
What needs to be checked:

  • Fan works correctly after running /etc/init.d/fan_control enable and then /etc/init.d/fan_control start in SSH
  • WiFi is stable (Speedtests and logs please)
  • VPN Performance (Speedtest please and logs , OpenVPN and Wiregaurd)

Thanks to @anomeome for the fan script idea.

4 Likes

Robimarko updated the 6.1 kernel support of ipq60xx series, are you interested in supporting it?

2 Likes

Possibly later let's.make sure 5.15 is working correctly first after all 6.x is bleeding edge.

1 Like

I take it there are no issues to report?

Been using latest build for a few days. Just needed to install a couple of extra packages to get my iPhone to tether the internet. Seems to be working quite well so far. No issues to report apart from AdGuard home freezing every once in awhile. But I think thatā€™s a problem with AdGuard Home and memory constrains of the axt1800. But itā€™s been solid so far :+1:

1 Like

Thank you for the update, any issues with wireless both in performance and stability? As that's my main worry.

Glad it's working well though.