Revert back to Coded PHY connection when 2M is not possible because of distance.

Hi,

I have 2 nrf52840 DK boards advertising on coded PHY mode. Once connected the connection is updated (using sd_ble_gap_phy_update()) to use 2M mode. No problem in doing so.

However, I have a situation or use case where after the successful update to 2M mode, but because of the distance between the 2 boards is too far for 2M mode to continue, I would like the connection to revert back down to coded PHY. Is that even possible in the first place? If it is possible, what are steps required to revert back to coded PHY.

In my testing,

I tried walking around to find the distance that is too far for 2M communication but still possible with Coded PHY. 

What I find is that they always connect on coded and then updated to 2M. When the distance is too far apart, there is no connection at all even on coded PHY. 

I can't find a distance/case where they connect on coded PHY but fail to update to 2M because of distance.

Some may say why not just connect on coded PHY and forget about 2M. My case is we want to use 2M whenever possilbe and auto revert down to coded PHY when physical distance does not allow 2M mode.

Your help is very much appreciated.

Parents
  • Hi

    I think the L2CAP fragment CRC errors indicate lower sensitivity and thus more packets failing to reach their destination correctly, but as long as you still get the data you're transmitting as expected this shouldn't be anything to worry about.

    When the devices are connected in Coded PHY I agree that you should be able to sustain a connection over more than 200 meters. Are you able to see the disconnect reason between the two devices when disconnecting in Coded PHY? I think we need to find the reason for the disconnect to determine why you're not able to attain longer ranges with Coded PHY than 2MBPS PHY.

    If you have a connection running on the Coded PHY I agree that you should be able to do a sd_ble_gap_phy_update(), but it might fail, or disconnect right away when the devices are too far apart to sustain a connection on the 2MBPS PHY.

    Best regards,

    Simon

Reply
  • Hi

    I think the L2CAP fragment CRC errors indicate lower sensitivity and thus more packets failing to reach their destination correctly, but as long as you still get the data you're transmitting as expected this shouldn't be anything to worry about.

    When the devices are connected in Coded PHY I agree that you should be able to sustain a connection over more than 200 meters. Are you able to see the disconnect reason between the two devices when disconnecting in Coded PHY? I think we need to find the reason for the disconnect to determine why you're not able to attain longer ranges with Coded PHY than 2MBPS PHY.

    If you have a connection running on the Coded PHY I agree that you should be able to do a sd_ble_gap_phy_update(), but it might fail, or disconnect right away when the devices are too far apart to sustain a connection on the 2MBPS PHY.

    Best regards,

    Simon

Children
  • Hi Simon,

    Are you able to see the disconnect reason between the two devices when disconnecting in Coded PHY?

    The reason is HCI status code is 0x08 Connection Timeout.

    If you have a connection running on the Coded PHY I agree that you should be able to do a sd_ble_gap_phy_update(), but it might fail, or disconnect right away when the devices are too far apart to sustain a connection on the 2MBPS PHY.

    Thanks for the confirmation, however I have yet to make the update fail / disconnect right away.

Related