LE Coded Phy on 52840 DK

Hello everyone,

I am trying to use a nrf52840 dk as an external bluetooth module on my Linux PC to be able to communicate via LE Coded Phy. I have the problem that the devices signal, I want to communicate with, is very week. I cannot change that so I want to try to use coded Phy to get a more stable connection. 

I am a bit confused hover which example I schould use for my 52840 dk. As I understood it the hci_uart example should do the trick to turn my dk into a bluetooth dongle for my linux. This seems to work for normal 1M Phy scans, but not for coded Phy. 

Also, what do I need to change for my firmware in my week signal device so it also operates in coded phy? 

I use the standard advertising function currently:

err = bt_le_adv_start(BT_LE_ADV_CONN_SLOW, ad, ARRAY_SIZE(ad), sd,
                  ARRAY_SIZE(sd));
I am working with the nrf SDK 2.4.0
Thanks in advance!
Paul
  • Hi Paul,

    To enable Coded PHY support for hci_uart sample you need to add following options to prj.conf file:

    CONFIG_BT_CTLR_PHY_CODED=y
    CONFIG_BT_CTLR_ADV_EXT=y
    CONFIG_BT_EXT_ADV=y

    Also bt_le_adv_start cannot be used with Coded PHY. You must switch to extended advertising using bt_le_ext_adv_create() with the BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED options. The BT_LE_ADV_OPT_CODED option causes both primary and secondary advertising to use LE Coded PHY, and connections will also be established on Coded PHY.

    You can check below project which is a good example how to use Coded PHY:

    Bluetooth: Peripheral Heart Rate Monitor with Coded PHY

    Also please note that LE Coded PHY requires Coded PHY support on both sides, the dongle (controller) and the peripheral device.

    The sample is already in SDK and you can check the source code. Below is the prj.conf file of the sample:


    Best regards,
    Ressa

Related