BLE Coded PHY: how to determine used data rate

Hello,

I'm trying to determine the actual used data rate for the coded PHY but cannot find the corresponding API / data structure / enums.

Am I missing something?  Can someone give me a pointer?

Regards

Hardy

Parents Reply Children
  • Hello Hardy,

    I guess you could say s=2 support was introduced in this release since it did add support for receiving packets with this encoding. There is no Softdevice API to query what PHY is currently in use, but this should be easy to monitor from the app. The connection will always be established with the same PHY used by the advertiser, and the PHY can't be updated without triggering the BLE_GAP_PHY_UPDATE event (PHY Update Procedure).

    Regards,

    Vidar

  • Hello Vidar,

    concerning the used PHY: if one offers a PHY via primary/secondary_phy in the adv params one does not automatically know which PHY is being used, right?

    Problem here are the connection parameters, the device offers the central which could lead to impossible combinations.  E.g. 6 packets/event on a 12ms connection interval if PHY_CODED has been selected.

    How to "code" around?

    Kind regards

    Hardy

  • Hello Hardy,

    The connection is always established with the same PHY depending on how the advertiser is configured. The initiator will use your secondary_phy to initiate the connection if you do extended advertising. The primary phy is used otherwise.

    rgrr2 said:
    Problem here are the connection parameters, the device offers the central which could lead to impossible combinations.  E.g. 6 packets/event on a 12ms connection interval if PHY_CODED has been selected.

    Do you want to have a longer interval if coded PHY is used? Please note that the number of packets you can send per connection event (i.e. even length) is not a connection paramter like the interval is. The number of packets you can send depends on what the central support, max. event length on the peripheral, and packet loss (event will end early if there is packet loss).

    Kind regards,

    Vidar

  • Hello Vidar,

    as far as I understood, one can specify multiply PHYs for the secondary.  So used PHY is not clear.

    Number of packets is a connection optimization which I would like to set to 6 (central supports this) if 1MBps PHY is used and to two if PHY_CODED is used.

    Also the connection interval has to be set accordingly, especially if you have power constraints, so that a maximum of 10ms radio time is allowed in a certain interval.

    So... how to determine used PHY?

    Thanks & kind regards

    Hardy

  • Hello Hardy,

    Do you have an existing application that switches between multiple PHYs? You can't specify multiple secondary PHYs for a single adv. set nor does the softdevice support configuration of multiple sets.

    I would recommend you try the nRF Sniffer for Bluetooth LE if you want to check what happens on-air.

    Kind regards,

    Vidar

Related