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

Distinguishing between 1MPHY and CODED PHY connections

Hi

Is there a way to tell that when a connection occurs if it occurred over 1M or 125kbps modulation? From what we can see, the ble_evt->gap_evt->connected does not contain any parameter that specifies the PHY over which the connection occurred.

An example where this may be needed is as follows:- we are connecting to a remote device that is advertising over CODED PHY. However, the remote device can set its secondary PHY to 1MPHY, therefore when we connect to it, the connection will occur over 1MPHY even though the scanning and advertising occurred over CODED PHY. From our testing, the only way we could see this was through a sniffer that showed that connection request and connection response packets were occurring over 1MPHY.

We are using the nRF52840 with softdevice S140 v6.1.0 and SDK15.0.0.

Thanks

Youssif

  • Hi Yossif, 

    unfortunately the S140 SoftDevice does not provide any information regarding which PHY that was used during the connection procedure. This feature that we have on our list. If you only want to connect on CODED PHY then you will have to only scan on CODED. Once you have made the connection with the remote peer on coded, you can start advertising on 1M.

    If you want to check which the established connection is using, then you can initiate a PHY update request by calling sd_ble_gap_phy_update with the wanted PHY setting. You will then get the BLE_GAP_EVT_PHY_UPDATE once the PHY update has been finished, along with the ble_gap_evt_phy_update_t struct, which contains the fields tx_phy and rx_phy that specify which PHYs that are used for the connection.

    Best regards

    Bjørn

     

Related