Skip to content

Conversation

GoliathLabs
Copy link
Contributor

@GoliathLabs GoliathLabs commented Jun 23, 2025

  • Must be flashable from vendor firmware
    • Web interface
    • TFTP
    • Other:
  • Must support upgrade mechanism
    • Must have working sysupgrade
      • Must keep/forget configuration (sysupgrade [-n], firstboot)
    • Gluon profile name matches autoupdater image name
      (lua -e 'print(require("platform_info").get_image_name())') --> comfast-cf-ew71-v2
  • Reset/WPS/... button must return device into config mode
  • Primary MAC address should match address on device label (or packaging)
    (https://gluon.readthedocs.io/en/latest/dev/hardware.html#hardware-support-in-packages)
    Uses br-client MAC (https://map.ffmuc.net/#!/en/map/e0e1a90c7529)
    • When re-adding a device that was supported by an earlier version of Gluon, a
      factory reset must be performed before checking the primary MAC address, as
      the setting from the old version is not reset otherwise.
  • Wired network
    • should support all network ports on the device
    • must have correct port assignment (WAN/LAN)
      • if there are multiple ports but no WAN port:
        • the PoE input should be WAN, all other ports LAN
        • otherwise the first port should be declared as WAN, all other ports LAN
  • Wireless network (if applicable)
    • Association with AP must be possible on all radios
    • Association with 802.11s mesh must work on all radios
    • AP+mesh mode must work in parallel on all radios
  • LED mapping
    • Power/system LED
    • Radio LEDs
      • Should map to their respective radio
      • Should show activity
        Doesn't blink
    • Switch port LEDs
      • Should map to their respective port (or switch, if only one led present)
      • Should show link state and activity
        Partically: LAN does blink
  • Outdoor devices only:
    • Added board name to is_outdoor_device function in package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua
  • Cellular devices only:
    • Added board name to is_cellular_device function in package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua
    • Added board name with modem setup function setup_ncm_qmi to package/gluon-core/luasrc/lib/gluon/upgrade/250-cellular
  • Docs:
    • Added Device to docs/user/supported_devices.rst

@github-actions github-actions bot added 3. topic: docs Topic: Documentation 3. topic: hardware Topic: Hardware Support 3. topic: package Topic: Gluon Packages labels Jun 23, 2025
@blocktrron
Copy link
Member

Is there a MAC label on the device and does it match to any interface on a regular OpenWrt release?

@blocktrron blocktrron added the 2. status: waiting-on-author Waiting on some action from the author label Jun 24, 2025
@GoliathLabs
Copy link
Contributor Author

Is there a MAC label on the device and does it match to any interface on a regular OpenWrt release?

Yes, it matches eth1 which would be the WAN interface

@AiyionPrime
Copy link
Member

@GoliathLabs Do I understand correctly:

When you flash a regular OpenWrt 24.10 image, the Label-MAC matches WAN.
But when you flash your gluon build, the primary MAC does not match WAN anymore, but br-client?

GoliathLabs and others added 2 commits July 14, 2025 15:18
Co-authored-by: Jan-Niklas Burfeind <[email protected]>
Co-authored-by: Jan-Niklas Burfeind <[email protected]>
@GoliathLabs
Copy link
Contributor Author

@AiyionPrime

My bad apparently.

The WAN interface is eth1, and its MAC address (e0:e1:a9:0c:75:27) doesn't align with what’s expected based on the packaging (which corresponds to eth0 and br-lan).

At least the interfaces are consistent across both OpenWrt & Gluon. I suppose I'd need to patch the primary MAC.

Here's the relevant output of ip a from OpenWrt:

root@OpenWrt:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP qlen 1000
    link/ether e0:e1:a9:0c:75:26 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether e0:e1:a9:0c:75:27 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.251/24 brd 192.168.2.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 redacted/64 scope global dynamic noprefixroute
       valid_lft 7189sec preferred_lft 3589sec
    inet6 redacted/64 scope global dynamic noprefixroute
       valid_lft 7189sec preferred_lft 1215sec
    inet6 fe80::e2e1:a9ff:fe0c:7527/64 scope link
       valid_lft forever preferred_lft forever
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether e0:e1:a9:0c:75:26 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 2003:c3:170e:99fc::1/62 scope global dynamic noprefixroute
       valid_lft 7189sec preferred_lft 3589sec
    inet6 fd5a:53ca:fdaa::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::e2e1:a9ff:fe0c:7526/64 scope link
       valid_lft forever preferred_lft forever

On Gluon, the MAC addresses are consistent with the OpenWrt config:

eth0: e0:e1:a9:0c:75:26
eth1: e0:e1:a9:0c:75:27
br-client: e0:e1:a9:0c:75:29
br-wan: e0:e1:a9:0c:75:27 (matches eth1) (WAN)

bat0, client0, etc. are bridged and use a derivative of these base MACs.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto kernel_lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-client state UP group default qlen 1000
    link/ether e0:e1:a9:0c:75:26 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-wan state UP group default qlen 1000
    link/ether e0:e1:a9:0c:75:27 brd ff:ff:ff:ff:ff:ff
4: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 72:e2:43:29:5e:0b brd ff:ff:ff:ff:ff:ff
5: br-client: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether e0:e1:a9:0c:75:29 brd ff:ff:ff:ff:ff:ff
    inet6 2001:678:e68:10c:e2e1:a9ff:fe0c:7529/64 scope global dynamic noprefixroute
       valid_lft 7106sec preferred_lft 3506sec
    inet6 2001:678:ed0:10c:e2e1:a9ff:fe0c:7529/64 scope global dynamic noprefixroute
       valid_lft 7190sec preferred_lft 3590sec
    inet6 fd62:f45c:4d09:10c:e2e1:a9ff:fe0c:7529/64 scope global dynamic noprefixroute
       valid_lft 86288sec preferred_lft 14288sec
    inet6 fe80::e2e1:a9ff:fe0c:7529/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
6: br-wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether e0:e1:a9:0c:75:27 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.251/24 brd 192.168.2.255 scope global br-wan
       valid_lft forever preferred_lft forever
    inet6 redacted/64 scope global dynamic noprefixroute
       valid_lft 6975sec preferred_lft 3375sec
    inet6 redacted/64 scope global dynamic noprefixroute
       valid_lft 6975sec preferred_lft 1575sec
    inet6 redacted/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
7: local-port@local-node: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-client state UP group default qlen 1000
    link/ether e0:e1:a9:0c:75:29 brd ff:ff:ff:ff:ff:ff
8: local-node@local-port: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 16:41:95:40:f7:dc brd ff:ff:ff:ff:ff:ff
    inet 10.80.224.1/21 brd 10.80.231.255 scope global local-node
       valid_lft forever preferred_lft forever
    inet6 fd62:f45c:4d09:10c::1/128 scope global deprecated
       valid_lft forever preferred_lft 0sec
    inet6 fe80::1441:95ff:fe40:f7dc/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
9: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-client state UNKNOWN group default qlen 1000
    link/ether e0:e1:a9:0c:75:29 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e2e1:a9ff:fe0c:7529/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
10: primary0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1532 qdisc noqueue master bat0 state UNKNOWN group default qlen 1000
    link/ether 2a:39:77:af:3a:63 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2839:77ff:feaf:3a63/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
11: client0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-client state UP group default qlen 1000
    link/ether 2a:39:77:af:3a:60 brd ff:ff:ff:ff:ff:ff permaddr e0:e1:a9:0c:75:29
12: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc noqueue master bat0 state UP group default qlen 1000
    link/ether 2a:39:77:af:3a:61 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2839:77ff:feaf:3a61/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
13: wg_mesh_vpn: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none
    inet6 fe80::2b7:e2ff:feec:286b/64 scope link
       valid_lft forever preferred_lft forever
14: mesh-vpn: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1350 qdisc noqueue master bat0 state UNKNOWN group default qlen 1000
    link/ether 2a:39:77:af:3a:67 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2839:77ff:feaf:3a67/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever

@AiyionPrime
Copy link
Member

I hope I got it now:
The label mac matches your lan interface, but currently your wan mac gets reported as primary.

@GoliathLabs Have you tried registering your device in this section?
https://github.com/freifunk-gluon/gluon/blob/main/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac#L75-L79

@AiyionPrime
Copy link
Member

regarding the LED: what does ls /sys/class/leds/ yield?

@GoliathLabs
Copy link
Contributor Author

@AiyionPrime I've patched the primary MAC.

regarding the LED: what does ls /sys/class/leds/ yield?

root@ffmuc-e0e1a90c7529:~# ls /sys/class/leds/
ath9k-phy0  blue:lan    blue:wan    blue:wlan

When adding support, I've used both openwrt/openwrt#2822 and the vendors sources (fall513/openwrt@1e1e29e) as per openwrt/openwrt#14459

@AiyionPrime
Copy link
Member

@AiyionPrime I've patched the primary MAC.

Successfully, I hope? :)

regarding the LED: what does ls /sys/class/leds/ yield?

root@ffmuc-e0e1a90c7529:~# ls /sys/class/leds/
ath9k-phy0  blue:lan    blue:wan    blue:wlan

Bummer. There was a similar case a few years back,
you can use another LED for the purpose of blinking in config mode, if the power LED is unavailable like it's the case with your device.

Given your options please use blue:wlan for this.
Prepend the ath79-generic section before the nand one.

https://github.com/herbetom/gluon/blob/main/package/gluon-setup-mode/luasrc/usr/lib/lua/gluon/setup-mode.lua#L7-L11

If you did that, please let me know if the wifi LED does than show the blinking pattern in setup-mode.

@AiyionPrime
Copy link
Member

AiyionPrime commented Jul 18, 2025

Regarding the non blinking wifi LED I'm a bit lost, I am afraid.
Wild guesses include:

  • the device is dualband and the LED is bound to one of the radios; while testing you connected to the other
  • your openwrt commit remarks the wifi LED was "dim" and assessed it as a hatware fault of your unit, which could be wrong (the last suggestion of mine should show, whether the LED can be controlled at all via software)
  • there's a trigger missing in openwrt

Maybe you're lucky and @neocturne has an idea in the next days.

@GoliathLabs
Copy link
Contributor Author

GoliathLabs commented Jul 18, 2025

@AiyionPrime I went and tried to verify my initial OpenWrt PR findings. Yes, the WAN and WLAN LEDs are so dim that you can't really see them. However, you can control them via GPIO. The pin layout seems different to the DTS provided by the vendor.

leds {
	compatible = "gpio-leds";

	pinctrl-names = "default";
	pinctrl-0 = <&jtag_disable_pins>;

	lan {
		function = LED_FUNCTION_LAN;
		color = <LED_COLOR_ID_BLUE>;
		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
	};

	led_wan: wan {
		function = LED_FUNCTION_WAN;
		color = <LED_COLOR_ID_BLUE>;
		gpios = <&gpio 0 GPIO_ACTIVE_LOW>;  // was gpio 11
	};

	wlan {
		function = LED_FUNCTION_WLAN;
		color = <LED_COLOR_ID_BLUE>;
		gpios = <&gpio 12 GPIO_ACTIVE_LOW>; // was gpio 14
		linux,default-trigger = "phy0tpt";
	};
};

I initially used that file as a reference for my dts fall513/openwrt@1e1e29e#diff-9fa411a30a8c939a511db1a30ad8a9d99a93a994fea950bb75efb929667dff9c. Maybe I misinterpreted the vendor config?

@GoliathLabs
Copy link
Contributor Author

It seems like the power led can't be software controlled. Tried all GPIO pins but I can't switch the LED

@AiyionPrime
Copy link
Member

It seems like the power led can't be software controlled. Tried all GPIO pins but I can't switch the LED

Maybe I phrased that poorly.
Your test output already showed that you cant control it.
Thats why I suggested to use the wifi LED for the setup mode.

@GoliathLabs
Copy link
Contributor Author

I've provided a patch for the LED GPIO mapping (openwrt/openwrt#19665).

I've also included your WLAN LED patch for setup mode. I'll test this out in the coming days.

@AiyionPrime
Copy link
Member

Congrats on the merge :)

@GoliathLabs
Copy link
Contributor Author

Congrats on the merge :)

Thank you!

As I haven't worked with OpenWrt patches in Gluon yet, do you know how I can incorporate the patch into my Gluon testing? This would allow us to have proper LED mapping in the tests until the PR is backported.

@AiyionPrime
Copy link
Member

Did you prepare a backport in OpenWRT already?
That would be step one :)

@GoliathLabs
Copy link
Contributor Author

Did you prepare a backport in OpenWRT already? That would be step one :)

Not yet :/ I suppose that would work by preparing a PR with my changes against 24.10? Or should I cherry-pick the merged commit and open a PR with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0. type: question 2. status: waiting-on-author Waiting on some action from the author 3. topic: docs Topic: Documentation 3. topic: hardware Topic: Hardware Support 3. topic: package Topic: Gluon Packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants