Customising a bluetooth Zephyr sample

Hi,

I am currently developing with the nRF52 DK (nRF52832 SoC) and the nRF52833 DK (nRf52833 SoC). I have built and flashed the Bluetooth: Peripheral HT sample from Zephyr to both boards successfully. I have tested the application with an Android mobile phone and receive temperature measurements as expected. I would like to customise the source code of this sample application in 2 specific ways:

1. How do I change the TX power?

2. How do I change the PHY to use Coded PHY (S = 8)? I know that this can only be done for the nRF52833.

Thanks,

Adam

  • Hi Simon,

    1. Thank you - I have a few questions/issues regarding this:

    A. What is the definition of a dependency with regards to a .conf file?

    B. Must the dependency be added into the prj.conf file? If so, this does not solve the problem. There is an error when setting CONFIG_HAS_HW_NRF_RADIO_TX_PWR_HIGH=y. This seems to be an issue that was also identified in this post but no clear answer was suggested.

    C. Are you sure it is possible to configure the TX power using the prj.conf alone (this would be most convenient) or do additional functions need to be used in the source code?

    2. I am referring to the snippet that you posted -  can I add this create_advertising_coded function into the source code in addition to the existing advertising functions in the Bluetooth: Peripheral HT sample

    Thanks again for the assistance,

    Adam

  • Hi

    A) When a config has "dependencies" it is dependent on those listed configurations to be valid in a project. I'm not sure how much of a definition you're looking for to be honest.

    C) Okay, I double checked this on my end, and there seems to be a known issue here, that was just recently added to the main branch. So if you're using NCS version 2.0.2 or older these BT_CTLR_TX_PWR won't work properly, and you have to use the dynamic TX power control. Sorry about that. So either update to the main branch or use the dynamic power control.

    2. As long as you also enable the necessary configs, CONFIG_BT_CTLR_PHY_CODED=y CONFIG_BT_EXT_ADV=y, I believe so. But make sure that you don't have any other "bt_le_adv_param" structs in the sample that can overwrite or conflict with this.

    Best regards,

    Simon

Related