Change TX power of iBeacon advertising

Hi everyone,

We recently started to add the iBeacon broadcasting to our own BLE project that runs on an nRF5340. It is based on the code from the sample of the SDK (we currently use v2.9.0) located at "ncs\v2.9.0\zephyr\samples\bluetooth\ibeacon".

Is there a way to change the tx power of this specific advertisement? From what I found this is all handled by the bluetooth subsystem on the netcore.

Thank you and best regards,

Alex

Parents
  • Hi Alex,

    You can change the Tx power of a specific advertising set (or a specific connection for that matter) by using a HCI command as demonstrated in the HCI Power Control sample. This approach works on the nRF5340 as well, but you need to make sure to build the network core image (ipc_radio) with support for dynamic power control.

    To use this sample on the nRF5340 application core you can add two small configuration files:

    sysbuild.conf:

    SB_CONFIG_NETCORE_IPC_RADIO=y
    SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y

    sysbuild/ipc_radio.conf:

    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    CONFIG_BT_CTLR_CONN_RSSI=y

    When adding to your own application, you will need the same configurations.

    (You can also remove two configurations you put in ipc_radio.conf from the prj.conf, as they are only relevant for the BT Controller on the network core, and not for the host that runs on the application core).

  • Hi Einar,

    thank you for your quick reply. I'll take a look at the sample code and merge it into our project.

    Many thanks,

    Alex

Reply Children
No Data
Related