EDUP EP-RT2983 (AX1800) with netis N6 firmware - No LEDs

I flashed an EDUP EP-RT2983 with the netis N6 firmware, and it works with the given caveat that the ports are labelled LAN2-LAN4.

The only thing that seems to be missing is that the LEDs don’t light with the triggers. There’s no mention of that on the N6 page, does anyone have any suggestions on how to add support for the LEDs?

Good that it boots at all....
LEDs are of low priority - is wifi MAC and tx power correct (like in iw phy)?

Not 100% sure it's the same device...

Now you mention it, the MAC address did change - I’m using it as an AP and it didn’t get the IP address I’d allocated when it was stock firmware and I had to change my LAN’s DHCP allocation for the new address.

I don’t think the power is reported properly either:

Those issues do look the same.

I guess it’s not as simple as changing the LED definitions, because:

  • That patch mapped one of the LEDs (led-1) to gpio13
  • mt7621_netis_n6.dts already has led-1 on gpio13 for LED_FUNCTION_WPS
  • Adding an LED action for green:wps default-on doesn’t produce a light.

You have to explore gpio-s first - expose them, observe values, flip values, check which is right for led.

I installed gpiod-tools and started gpioset -c gpiochip1 -p 1s 20=1 etc but all I got was “Resource busy” on the ones I’d tried to associate with network activity etc, or hangs on the lines that weren’t being used by anything.

I suspect this is beyond my reverse-engineering abilities, and I’ll just live with the dead looking panel.

go to sys/class/gpio

echo all numbers to expose
read them all
and again
blinking ones will flip
ones at 1 should be turnes to zero - up to you - one per second with mobile camera filming or half at once like bisecting.
usually functional gpios are at start of block
now at one point wifi or usb or ethernet goes off
obviously dont touch those again.
then set them to one (except those being used by smth else...) using the previous algorithm.

good luck (and nice crashes)

I’m probably not doing it right (especially since I didn’t get any crashes).

I removed all the LED rules, and now the wifi light is flashing with what I could believe is traffic on one of the two phy interfaces).

With AI assistance, I arrived at this script, but no light-flashing or crashing happened, just the occasional “ash: write error: Resource busy”

for i in $(seq 512 608); do
  echo "GPIO $i"
  echo $i > /sys/class/gpio/export
  if [ -d /sys/class/gpio/gpio$i ]; then
    echo out > /sys/class/gpio/gpio$i/direction
    echo 1 > /sys/class/gpio/gpio$i/value
    echo "GPIO $i set to 1 - check LEDs"
    sleep 1
    echo 0 > /sys/class/gpio/gpio$i/value
    echo "GPIO $i set to 0 - check LEDs"
    sleep 1
  fi
done

Where did you get base number 512?

/sys/class/gpio contained gpiochip512, gpiochip544, gpiochip576

1 Like

That sounds about right.... (the for ... seq loop is OK)

Lets start more structured approach

Boot the device
Step 1 (encouraging you to try tu understand underlying logic, knowingly withholding details on howto)
EXPORT all gpios (nothing happened)

Step 2 : read all values
echo $i : cat /sys/class/gpio$i/value

Step 3 : set all pipes to output - then values that were 1 to 0 (use list of numbers ipo seq)

Step 4 : is it off ? now reboot, try half of those and so on until you find actual thing switching it off

Reading the value of all the exported gpios gives 0 for each of them.

I don’t seem to be able to export 516, or 525-531, I get ‘write error: Resource busy” ( I get the same message if I try to export a gpio that’s already been exported, but 516/525-531 don’t have entries in /sys/class/gpio).