GL-MT3000 buttons and LEDs

I've got some questions about the buttons and LEDs on the MT3000 -- it's running 23.05.3 (stable release).

First the button... There is a reset button which is a momentary pushbutton. It appears as reset.

Mon May  6 19:18:55 2024 user.notice root: the button was reset and the action was pressed
Mon May  6 19:18:55 2024 user.warn slide-switch[4365]: load_switch_data: board "glinet,gl-mt3000" not found in /usr/share/slide-switch/switch-data.json
Mon May  6 19:18:55 2024 daemon.info procd: - shutdown -
Mon May  6 19:18:55 2024 user.notice root: the button was reset and the action was released
Mon May  6 19:18:55 2024 user.warn slide-switch[4384]: load_switch_data: board "glinet,gl-mt3000" not found in /usr/share/slide-switch/switch-data.json
Mon May  6 19:18:55 2024 user.warn slide-switch[4444]: load_switch_data: board "glinet,gl-mt3000" not found in /usr/share/slide-switch/switch-data.json
Mon May  6 19:18:55 2024 daemon.err hostapd: rmdir[ctrl_interface=/var/run/hostapd]: Permission denied
Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.

Pressing the reset button results in an immediate reboot. There are no current entries for hotplug button actions in /etc/config/system or anywhere else I can find, so I'm not sure if why this button is actually firing off a reboot action.

So my first question is this: Does anyone know where this button's action assignment is located? I'd like to reassign the button do do other things, but I'm assuming the current action will take precedence if I just try to add an entry in /etc/config/system.

Next, the LEDs:

root@OpenWrt:/sys/class/leds# ls
blue:run      mt76-phy0     mt76-phy1     white:system

The blue and white LEDs are obvious -- those are on the front of the device. But I don't see any other LEDs anywhere on the device, including the two Ethernet ports. It's possible to set the mt76-phy0 and mt76-phy1 LED triggers, brightness settings, and other things, but there are no LEDs that I could find (at least from the outside -- I didn't open the device to look at the board).

So the other questions... Are those LEDs externally visible? If so, what am I missing? If not, are they on the board (visible when the case is open)? And if not, why are there definitions for these LEDs if they're not populated?

Finally, there is a two position slide switch which shows up as BTN_0 -- that one is pretty obvious.

Mon May  6 19:18:49 2024 user.notice root: the button was BTN_0 and the action was pressed
Mon May  6 19:18:49 2024 user.warn slide-switch[4327]: load_switch_data: board "glinet,gl-mt3000" not found in /usr/share/slide-switch/switch-data.json
Mon May  6 19:18:51 2024 user.notice root: the button was BTN_0 and the action was released
Mon May  6 19:18:51 2024 user.warn slide-switch[4349]: load_switch_data: board "glinet,gl-mt3000" not found in /usr/share/slide-switch/switch-data.json

While it doesn't really matter functionally, the switch-data.json file is indeed missing a profile (key/value pair) for this device. Is this a known issue and is there already a PR for it? I haven't found it in a quick search, but I might have missed it.

It's defined in /etc/rc.button/reset.
See https://openwrt.org/docs/guide-user/hardware/hardware.button#procd_buttons

1 Like

Thanks! That's indeed it.

Funny thing though... I literally just found it there before I looked back at this thread and was about to say "nevermind, I found it!" :slight_smile:

1 Like

I have those LEDs in /sys/class/leds on my MT6000 as well.
They are defined by the MT76 driver, regardless of the physical availability.

There are devices, where those LEDs are populated on the PCB (Bananapi-R3).

1 Like

Awesome. Thanks!!

Sorry, I kept digging :smiley:

So if we would like to get rid of those LED devices, we would need to explicitly disable those LED in the DTS of our devices, if I read the code correctly...

But I don't see a single device in the tree doing that.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.