otPlatRadioSetTransmitPower on STM32WB5MM with BLE/Thread dynamic stack v1.24.0
Hi,
I'm working on a product based on the STM32WB5MMG module, running the BLE + Thread dynamic concurrent CPU2 binary (stm32wb5x_BLE_Thread_dynamic_fw.bin v1.24.0, FUS 2.2.0). Our boards are Thread routers.
The 802.15.4 link margin is too low for us. Two boards 1 m apart see each other around -85 / -88 dBm, so I'd like to raise the Thread TX power. BLE is set to +6 dBm with aci_hal_set_tx_power_level(1, 0x1F) and works fine. For Thread we never set anything, so it runs at the stack default. The SMPS is not enabled in our code, so the chip is powered in bypass at 3.3 V.
I tried otPlatRadioSetTransmitPower(NULL, x):
- called at Thread start on both boards with 6, -6, -20 and 0x1F: the boards don't attach to each other anymore. Remove the call, reflash, and everything works again.
- 6 on one board only, at the end of our Thread init (before BLE advertising starts): the board attaches and goes up to router, and it receives the multicast CoAP messages from the other board. But the other board never gets its unicast replies, and after a while it ends up leader on its own. It looks like what this board transmits can't be received anymore.
- otPlatRadioGetTransmitPower always returns 0 with no error, whatever I set before.
I found an older answer here saying the value is in dBm, limited to -21..+6, so calling it with 6 should be fine. That's not what I see with the dynamic binary.
A few questions:
- Is otPlatRadioSetTransmitPower supported with the dynamic concurrent binary? Is the value really dBm, or a PA level index like the BLE one?
- Does it have to be called at a specific moment (before/after otThreadSetEnabled, or with BLE idle)?
- In dynamic mode, does the BLE TX power setting also affect the 802.15.4 radio?
- Why would the getter always return 0? Is there another way to read the TX power actually used?
- With the SMPS in bypass at 3.3 V, should +6 dBm be reachable on 802.15.4 with the WB5MM, or do you recommend enabling the SMPS at a specific voltage?
Thanks!
