Hurricos / realtek-poe

5 stars 10 forks source link

Clean-up schema when no middleman MCU is used, e.g. on BR200-WP #29

Open Hurricos opened 1 year ago

Hurricos commented 1 year ago

Turns out realtek-poe works on any Broadcom PSE platform; @CHKDSK88 found that it works on the BR200-WP, a P1011-based, 5-port (2 of which are PSE) switch+AP by Aerohive incorporating a BCM59103. See that issue for more details.

On that platform, we identify a non-existing STM MCU:

root@OpenWrt:/# ubus call poe info
{
        "firmware": "v64.18",
        "mcu": "ST Micro ST32F100 Microcontroller",
        "budget": 170.000000,
        "consumption": 2.100000,
        :

I'm sure we're gathering this info from one of the data-gathering frames; I'll be curious (once I get my hands on a BR200-WP) to see what we're getting when we request details about the microcontroller.

This issue may break out into a general "support for different Broadcom PSE setups", but frankly given how well the BR200-WP works, I'd be hesitant to change much.

mrnuke commented 1 year ago

We're getting system info from CMD 0x20. Documented here

  • ID: 20

  • Request: (empty)
  • Reply: [mode] [max_ports] [port_map] [device_id] [version] [mcu_type] [system_status] [version_ext]

Field | Size | Description -- | -- | -- mode | 1 |   max_ports | 1 | Maximum number of supported ports port_map | 1 | Lowest bit indicates port mapping is set device_id | 2 | e011=BCM59011 e111=BCM59111 e121=BCM59121 version | 1 | PoE firmware version, see also 'version_ext'. Full firmware version is 'version.version_ext' mcu_type | 1 | 00="ST Micro ST32F100" 01="Nuvoton M05xx LAN" 02="ST Micro STF030C8" 03="Nuvoton M058SAN" 04="Nuvoton NUC122" system_status | 1 | System status flags. Bit 0: Config modified, system is running with unsaved configuration changes Bit 2: Set if the "remote enable" signal is active Bit 3: Output pairing enabled version_ext | 1 | Extended firmware version, see also 'version'