Hello,
For a proprietary application that doesn't require full Bluetooth compatibility, I am trying to setup an advertisement on the primary channels, using coded PHY 125 kbps. I am using nRF52840 and softdevice SD140 from SDK Version_nRF5_SDK_17.1.0_ddde560.
My code is based on ble_app_beacon example from SDK. Using the parameters below in the advertising_init function the my code is running fine, but using default PHY at 1Mbps which is not what I need.
m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED; m_adv_params.p_peer_addr = NULL; // Undirected advertisement. m_adv_params.filter_policy = BLE_GAP_ADV_FP_ANY; m_adv_params.interval = NON_CONNECTABLE_ADV_INTERVAL; m_adv_params.duration = 0; // Never time out.
I could only make it work using coded PHY by adding these lines:
m_adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED; m_adv_params.primary_phy = BLE_GAP_PHY_CODED; //BLE_GAP_PHY_1MBPS / BLE_GAP_PHY_CODED / BLE_GAP_PHY_AUTO m_adv_params.secondary_phy = BLE_GAP_PHY_CODED;
but now the advertisement is using the full featured "extended advertisement" and I don't want this. I need to minimize the battery drain.
If I drop the first line, the code crashes. According to google bard, the SDK V17 doesn't allow this implementation
According to g. bard:
As of this writing (January 2024), CODED PHY advertising with simple advertising is not supported in any publicly released version of SoftDevice. Nordic Semiconductor is currently working on a new version of SoftDevice that will include this feature, but there is no ETA for its release.
Once the new SoftDevice becomes available, you will need to upgrade your Segger SDK and firmware to the latest version to use CODED PHY advertising with simple advertising.
Is this statement true? is there a way to force legacy advertisement (not extended) on primary channels only?
Thanks in advance for any hint.