This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE - PHY definitions

Hi,

While developing an app which will connection to an IOS device via BLE - I've noticed an event called BLE_GAP_EVT_PHY_UPDATE_REQUEST.

I understand that this event is executed when my peer is requesting to update physical layer.

In my app - I'm updating rx_phys and tx_phys to BLE_GAP_PHY_AUTO, which means that it will be updated according to my peer definitions.

However - I couldn't understand what are my applications parameters, by default, assuming I didn't change them.

Can you please explain?

Thanks!

  • Hi,

    So for the sd_ble_gap_phy_update() documentation, we have:

    If ble_gap_phys_t::tx_phys or ble_gap_phys_t::rx_phys is BLE_GAP_PHY_AUTO, then the stack will select PHYs based on the peer's PHY preferences and the local link configuration. The PHY Update procedure will for this case result in a PHY combination that respects the time constraints configured with sd_ble_cfg_set and the current link layer data length.

    Example: If you are using S140, it supports 1M PHY, 2M PHY and Coded PHY. So if there is no time constraints, it will set preferred PHY to true for all the PHYs  (1M PHY, 2M PHY and Coded PHY). If there are time constraints, i.e. you have set the value of NRF_SDH_BLE_GAP_EVENT_LENGTH in sdk_config.h to a low value(e.g. below 6), then there is no time to send a Coded PHY packet, and it will then set preferred PHY to 1M and 2M PHYs.

    Also, some SoftDevices variants does not support Coded PHY, e.g. S112, and then it will only set preferred PHY to 1M and 2M PHY, and not Coded PHY.

  • Hi, thanks for your answer!

    I still don't understand how can I know what is my defined PHY, before my peer has requested to update.  I do use S140. What is the default?

    In addition - does PHY update has any effect on my PHY in future connections? Or does it reset on every connection?

    Thanks!

  • Roei said:
    What is the default?

     1M is the default. (unless you do extended advertising with secondary PHY set to something else).

    Roei said:

    In addition - does PHY update has any effect on my PHY in future connections? Or does it reset on every connection?

    It resets.