1 year ago.

Is it possible to advertise connectable using coded phy?

Hi guys,

As in Mbed OS 5.13.4, is it possible to advertise and connect using coded PHY?

I've tried to specifically configure on LE_CODED phy, the advertising only appears on the 1M PHY.

I've tried the central example from Nordic SDK long range demo and it is able to scan and connect its long range demo pair but failed to find adv on the coded PHY. And I can find the advertising on BLE 4 1M phy using my iPhone 7!

I then tried to change the legacy mode to false but this caused assert failure - /* these types can only be used with legacy PDUs */ MBED_ASSERT((_advType != advertising_type_t::CONNECTABLE_UNDIRECTED) && (_advType != advertising_type_t::CONNECTABLE_DIRECTED));

Am I missing anything here?

Thanks for your attention,

Carl

Not sure why the above assertion is imposed - I commented it out then used legacy mode false with coded phy and I can see connectable advertising on coded PHY! I can even connect to it using Nordic long range demo central! The issue is the connection is not stable - every a couple of minutes it drops out. Is this a bug again? The assertion seems to block this configuration, so I assume it is a known issue?

posted by Lichang Che 30 Aug 2019

After tweaking with connection parameters, the scan and connection work OK now! Hooray!

posted by Lichang Che 30 Aug 2019

1 Answer

1 year ago.

Carl,

I have also been attempting to use the coded phy using mbed, (my testing has been using mbed 5.13.1 with Cordio and Laird BL654 modules on custom PCBs on both central and server sides)

For several days I have been guessing at how to turn on the the Coded phy, but have not been able to get any improvements over the "out of the box" 350 feet of the BLE before phy coding was attempted.

I have been using basically 3 calls to attempt to turn it on, but haven't seen any distance improvement.

I found an example of someone who was able to get longer distances using non-mbed code by setting the legacy_pdu to 0. When I call the equivalent adv_parameters.setUseLegacyPDU(false) I get the same assert as you did above.

QUESTIONS

1. Were you using Cordio?

2. Have you tested your results to verify that you are seeing extended distances once you have turned on the Coded Phy?

3. Did you leave legacy PDU = ON or OFF? (did you leave the ASSERT commented out?)

4. What connections parameter did you "tweak" to get the connection to be stable?

Yes, I'm using Cordio.

I have not tested using Mbed OS yet but did test coded phy using Nordic long range demo. There is a good chance it should work as the Nordic long range demo, I believe.

I'm using legacy off - You need to comment out those assert - otherwise it blocks one of the important feature where you should be able to advertise on coded phy.

Don't get radio activity too dense.

Hope those help, Carl

posted by Lichang Che 12 Sep 2019