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.

  • 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.

  • Hi

    A timeout would point to the connection not communicating for a while, either due to poor reception or just that the application doesn't do anything. Since you're using the Sniffer, I assume you can see there that the devices indeed are communicating over the Coded PHY before doing this sd_ble_gap_phy_update() but I really think you should be able to see successful transmissions on the Coded PHY for more than 200m. Can you show me your advertising initialization or upload your sniffer trace so I can take a look at it?

    Best regards,

    Simon

  • Hi Simon, Thanks for coming back. 

    Sorry for the long silence. I've got some problem with this website. It takes forever to load this page and just realised I need to close my browser and reopen it for it to work for some strange reason.

    Will try to get some sniffer trace for you. Isn't the code I shown at the top the advertising initialization?

    We went out to the open field and conducted the Nordic long range test below.

    https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/testing-long-range-coded-phy-with-nordic-solution-it-simply-works-922075585

    We managed to get CodedPHY adv at 475m, which is better than what we could with our firmware at 200m.

    One thing I forgot to mentioned is that in addition to the nRF52840 DK, we also have a nRF52DK board stacked on top of it propagating Bluetooth 4.2 radio protocol. Will that affect/decrease the range of Coded PHY on the 52840 DK?

    Also comparing the bluetooth parameters we have with the Nordic long range example, we are using datalength of 251 and the example datalength is 27.
    Do you know if these bluetooth parameters have an effect on the range as well?

  • I'm sorry you have trouble with the DevZone. You can try deleting your browser cookies to see if that helps with the loading times of DevZone pages. 

    This other DK or 52 device (on top of the 840 DK) also doing BLE transmissions is indeed likely to affect the range you'll be able to achieve over Coded PHY, as they transmit on similar frequencies they're bound to affect each others performance I'm afraid. I don't think the data length will affect your range, just the transmission time between each event, since Coded PHY transmissions take ~8 times longer than transmissions on the other PHYs.

    Best regards,

    Simon

  • Thank you Simon, at least now we have more understanding why we don't see the extended range possible with Coded PHY.

    One more thing, in our setup, we have this nRF52840 DK siting in between 2 other DKs communicating back and forth between them. This middle DK establishes 2M connection with one DK and Coded PHY with the other DK.

    Do you think as a result of this setup/configuration, we get reduced range as well with the Coded PHY link since the radio on the middle DK is shared/multiplexed between talking on 2M to one and Coded PHY to the other?

Related