This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Aggrelator sample code can support 1M, 2M and coded phy at the same time?

I have one nRF52840 DK 1(PCA10056 V1.0) programed the ble_aggrelator sample code, have 2 pcs nRF52840 dongle(PCA10059 V1.0) programed  supported the 1M phy and coded phy sample code. There is another nRF52840 DK 2 (PCA10056 V1.0) programed the ble_ periphera sample code.

I tested and found the 2 Pcs dongle and one 54840 DK can connect to the Aggrelator , can be seen from UART terminal is two 1M phy devices and one coded phy device.

But when I pressed the button 2 of nRF52840 DK 2 and execute update phy to 2M mode found never succeeded, the UART terminal have been no 2M phy device.

From the log information the operation of updating 2M phy is executed.

My question : Aggrelator can not support three types phy at the same time?

Parents
  • Hi

    The aggregator should be able to support all three phys at the same time, yes. This is a key feature of the SoftDevice. 

    I recently made significant changes to this example to update it to the latest SDK and SoftDevice, and during this work I didn't test if the switch to 2M feature still worked. It is possible I have made some change to the aggregator example that prevents this from working. 

    I will test this feature myself, and see if I can reproduce the problem that you are seeing. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Did you reproduce this problem when you tested?

    Best regards,
    Devin

  • Hi Devin

    Sorry for the slow response.

    I was able to reproduce the problem. The switch from 1M to 2M works, but the PHY status wasn't properly updated on the aggregator side so it seemed like nothing would happen. 

    I have now updated the aggregator code to properly update the link status when the PHY is changed. 

    All that was needed was to add the following code to the BLE event handler in main.c:

    case BLE_GAP_EVT_PHY_UPDATE:
    {
      ble_gap_evt_phy_update_t phy_update = p_ble_evt->evt.gap_evt.params.phy_update;
      if(phy_update.status == BLE_HCI_STATUS_CODE_SUCCESS)
      {
        NRF_LOG_INFO("PHY updated: %i, %i", phy_update.tx_phy, phy_update.rx_phy);
        app_aggregator_phy_update(p_ble_evt->evt.gap_evt.conn_handle, phy_update.tx_phy, phy_update.rx_phy);
      }
    } break;

    Best regards
    Torbjørn

Reply
  • Hi Devin

    Sorry for the slow response.

    I was able to reproduce the problem. The switch from 1M to 2M works, but the PHY status wasn't properly updated on the aggregator side so it seemed like nothing would happen. 

    I have now updated the aggregator code to properly update the link status when the PHY is changed. 

    All that was needed was to add the following code to the BLE event handler in main.c:

    case BLE_GAP_EVT_PHY_UPDATE:
    {
      ble_gap_evt_phy_update_t phy_update = p_ble_evt->evt.gap_evt.params.phy_update;
      if(phy_update.status == BLE_HCI_STATUS_CODE_SUCCESS)
      {
        NRF_LOG_INFO("PHY updated: %i, %i", phy_update.tx_phy, phy_update.rx_phy);
        app_aggregator_phy_update(p_ble_evt->evt.gap_evt.conn_handle, phy_update.tx_phy, phy_update.rx_phy);
      }
    } break;

    Best regards
    Torbjørn

Children
Related