I am trying to set up a port mirroring (test port) configuration on a BB-UBS-B-1 switch. Based on Table 5, section 2.3.2 of the BB-UBS-B-1 documentation, the port mirroring feature is supposed to be supported out-of-the-box on release of the BotBlox Switch Management software, which provides an option to set the mirroring. According to the website, this software has been deprecated and replaced with bloxoslite firmware, which, according to its documentation, does not expose an interface to set up port mirroring.
Can the deprecated BotBlox Switch Management still be used with BloxOsLite: v1.0.0+0 to set up the referenced feature and save this setup to EEPROM memory? Can the UART interface be used to set up the referenced feature via an undocumented command?
I would appreciate any information on the subject, since in case this feature is unimplemented, it would require me to manually set up the relevant registers for the Marvel IC by modifying the STM32 binary code, which I would like to avoid.
Unfortunately the current software (BloxOSLite) does not support Port Mirroring. This is a mistake in the datasheet that has now been fixed. I’m sorry for the confusion on that. It is possible to add it and we do plan to add this feature in the future but don’t have a timeline on that yet.
Can the deprecated BotBlox Switch Management still be used with BloxOsLite: v1.0.0+0 to set up the referenced feature and save this setup to EEPROM memory? Can the UART interface be used to set up the referenced feature via an undocumented command?
I guess you’re talking about the old software that used to run on SwitchBlox and SwitchBlox Nano (it was called BotBlox ARIES). This uses a different structure to BloxOSLite, for a different chipset entirely, so wouldn’t work on UbiSwitch.
Modifying the STM32 binary code wouldn’t be possible unfortunately.
Sorry about that 
Modifying the STM32 binary code wouldn’t be possible unfortunately.
May I ask for a clarification? Is there some form of secureboot enabled on the STM32 controller on the board?
The source code for BloxOSLite is not open, so it can’t be modified.
Thank you for the explanation. If I understand correctly, even though the source code is private, the license permits directly modifying machine code, yes?
Do you mean you intend to modify the binary hex flashed directly into the STM32? That would be very difficult, you’d be better off either working with on a solution or developing a new STM32 code from scratch.
Do you mean you intend to modify the binary hex flashed directly into the STM32?
Yes.
you’d be better off either working with [us] on a solution
It is very likely true, although you said you have no timeframe on this at the moment. In case you were planning to add this feature in the next half a month, I would wait for the relevant implementation and new software but since we have already acquired the modules for the project and have some timeframes of our own, we will have to also explore other solutions.
How would you modify the raw hex file on the STM32?
Well, I would try to convert the hex format back to arm assembly and then try to decompile it to understand where it is best to inject the register setting routine, after which I would convert modified assmebly back to hex. Why?
Have you done that before? Does it actually work?
No, not on STM32, but a state machine is a state machine after all, right?
I would have to search for detailed information on the hex format and search for some decompilers (depending on which compilers you have used to build the software) but ultimately, I do not expect there to be much deviations from normal disassembly and decompilation, other than the fact that this is bare metal (i.e. no elf, dynamic memory or other fancy stuff).
It runs ZephyrOS. It’s probably not going to be easy.
Is it just port mirroring you need, and is it static port mirroring?
It runs ZephyrOS
Yes it complicates this case.
Is it just port mirroring you need, and is it static port mirroring?
Yes, mirroring will be static, and this is the only thing we need that is missing. I do not yet know which registers in MDIO are responsible for this and if the current firmware touches them while running to set other config/options etc. but I will try to check with the 88E6390 documentation and after firmware analysis.
I will also ask the project manager about the possibility to avoid it or add another/replace the switch for this.
I have confirmed with the project manager that port mirroring on this board is currently omissible. It would be great to have port mirroring implemented on it in the future though, per documentation from the time of purchase.
Thank you for your time!
Yeah, I wish I could give you a timeline on this but unfortunately we have other development projects we’re aiming to finish first.
It will be relatively trivial for us to add it in future.