[RFC][Help] Finishing MikroTik OmniTIK UPA-5HnD support

Dear devs,

I've been working recently on adding support to the MikroTik OmniTIK UPA-5HnD outdoor router. It is almost done, but there is a minor issue with the wifi MAC address stopping me from submitting the code.

Right now, I have the following:

  • Almost there:

    • Wireless working (but with the same MAC address as eth0)
  • Unsupported:

    • PoE passthrough controlled via ATtiny461a chip (keeps settings from stock firmware: auto on/force on/force off)
    • LEDs (same as PoE?)
    • Reset button (unable to find it)
  • Working:

    • Board/system detection
    • Serial console
    • NAND Storage
    • 1x Ethernet WAN (eth1, port 1) + 4x Ethernet LAN (eth0.1, ports 2-5)
    • USB
    • Sysupgrade

The following commit adds support to the device, based on the code already there for the similar RB750-ish devices: https://github.com/rogerpueyo/lede-source/commit/4036386aafe877e5bfe19dcd27f245f10d397d67.

With the current code, the Ethernet interfaces get the MAC addresses from the flash but the ath9k wireless doesn't:

  • eth0: base MAC address +0 :heavy_check_mark: (same as stock firmware)
  • eth1: base MAC address +1 :heavy_check_mark:
  • wlan0: base MAC address +0 ✘ (in stock firmware is base MAC address + 5)

Could anybody help me getting the right MAC address for the wireless interface? I've tried several things like adding offsets or copying initialization functions from other boards, but only ended up reading the next bytes from the flash, or getting a kernel compilation error.

Regarding the ATtiny461a chip that controls the PoE passthrough (circuit pads can be traced from chip to the Ethernet ports and to the LEDs), I have no clue on how to support it but, if it keeps the settings from the stock firmware, it seems fair enough as to not care too much about it. In particular, the "auto on" setting is able to detect whether a regular Ethernet card/switch port or a device demanding passive PoE is connected, and enable it accordingly.

Thanks for your help. Looking forward for your comments! :slight_smile:

Since it uses the same MCU for POE as RB750PBr2 aka Powerbox I can tell you that once you install LEDE POE wont work at all.
Even returning to stock does not bring POE back

Hi @robimarko,

Thanks for your reply. I have double-checked and the PoE settings are kept when booting a LEDE initramfs image via TFTP and also when flashing a sysupgrade image to NAND. Furthermore, going to stock firmware allows configuring them at will again.

Anyway, do you have any suggestion for the wlan0 MAC address issue?

Best,
Roger

Than despite using same MCU for POE behaviour is different.
Easiest way to see where WLAN MAC is to search you flash dump for it and then apply correct offset in code
I will take a look at your code

Hi Roger ... I have several of these I'd like to flash to OpenWRT. I'd like to help you finish this port, have a long history of firmware development.

Hi, @Totally_Lost ,

Thanks for your message. This thread is quite old, from 2017. Since then, the ar71xx target has been deprecated in favour of the ath79 one, so most of the work I did will barely be useful. However, generic support for MikroTik device is much more solid there now, so it should be pretty straightforward to add support for the device. The only issue would be, I guess, supporting the ATtiny461a that controls the PoE.

Would you like to give it a try? I can test it on my unit too.

Cheers!

Hi, @Totally_Lost ,

On a second check, I found out I already did that:

I'll go back to it and see what is missing.

Cheers!