I'm trying to completely understand extended advertisements and what is possible when initiating a connection to a device advertising using extended advertisements. I'm using an nRF52840-QIAAC0 with SDK15 and S140 6.1.0. I have a device advertising BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED with the primary PHY set to BLE_GAP_PHY_1MBPS and the secondary PHY set to BLE_GAP_PHY_2MBPS.
The documentation for ble_gap_adv_params_t::secondary_phy states: "If @ref ble_gap_adv_properties_t::type is an extended advertising type and connectable, this is the PHY that will be used to establish a connection and send AUX_ADV_IND packets on." So with my configuration I would assume the connection would be established on the 2Mbps PHY. So on the initiator side I set ble_gap_scan_params_t::scan_phys to BLE_GAP_PHY_2MBPS, but when I call sd_ble_gap_connect I get a SOFTDEVICE: ASSERTION FAILED error. Should this work?
According to the ble_gap_scan_params_t::scan_phys documentation it seems like it should: "When used with @ref sd_ble_gap_connect, the bitfield indicates the PHYs on where a connection may be initiated. If scan_phys contains @ref BLE_GAP_PHY_1MBPS and/or @ref BLE_GAP_PHY_2MBPS, the primary scan PHY is @ref BLE_GAP_PHY_1MBPS."
If I set scan_phys to BLE_GAP_PHY_1MBPS it works and the connection is established, but I'm not sure what PHY I'm actually connected on. I would expect it to be 2Mbps, but I'm not sure. Is there anyway to find out the current PHY for a connection?
Thanks,
John