Gemini gave me some code to help get the phy when a connection is updated which does compile but there is an error warning in vs code. Here is the code:
here is the error warning:
I also see this with phy info:
Here is the error warning:
Gemini gave me some code to help get the phy when a connection is updated which does compile but there is an error warning in vs code. Here is the code:
here is the error warning:
I also see this with phy info:
Here is the error warning:
if it compiles you should not have to worry.VSCODE might not see that CONFIG_BT_USER_PHY_UPDATE is set and therefore cant see phy in the struct
As mackz says, the struct member for the PHY update callback is only included if the CONFIG_BT_USER_PHY_UPDATE symbol is set in your project configuration. You can also see this here: https://github.com/zephyrproject-rtos/zephyr/blob/6f0b8c14212da486479903b1444dc8f94061c207/include/bluetooth/conn.h#L887
Here is an example that registers this callback to monitor the PHY negotiations: