Question about changing communication speed by 2 Mbps

hi

I changed the communication speed to 2Mbps by referring to the link below.

( Pheripheral )

- Link :  How to use 2MBPS mode to get max throughput 

case BLE_GAP_EVT_CONNECTED:
            ...
            // The already included stuff.
            ...
            
            ble_gap_phys_t const phys =
            {
                .rx_phys = BLE_GAP_PHY_2MBPS,
                .tx_phys = BLE_GAP_PHY_2MBPS,
            };
            err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
            APP_ERROR_CHECK(err_code);
            
            break;
        
        case ...:

By the way, I changed the default 1Mbps to 2Mbps, but I'm at a loss as to how to check.

So, just in case, I try to connect with Central, which is 1Mbps, and it works. Is it correct that it is normally changed to 2Mbps?

  • Hi David,

    The documentation for sd_ble_gap_phy_update() states:

    This function is used to initiate or respond to a PHY Update Procedure. It will always generate a BLE_GAP_EVT_PHY_UPDATE event if successfully executed. If this function is used to initiate a PHY Update procedure and the only option provided in ble_gap_phys_t::tx_phys and ble_gap_phys_t::rx_phys is the currently active PHYs in the respective directions, the SoftDevice will generate a BLE_GAP_EVT_PHY_UPDATE with the current PHYs set and will not initiate the procedure in the Link Layer.

    You can therefore see if the BLE_GAP_EVT_PHY_UPDATE is generated and what PHYs that are set.

    regards

    Jared 

  • hi. Jared

    With your help, I confirmed that BLE_GAP_EVT_PHY_UPDATE is set to 2Mbps.

    thank you so much.

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {
         case BLE_GAP_EVT_PHY_UPDATE :

               printf("HPY 2Mbps set\n\r");  

               break;    
    }
    Additionally, I set it to 2Mbps in Peripheral as above.
    However, the connected Central did not set any speed. Still, the connection works fine and the communication works fine. Then, is it true that the Central operates well regardless of the peripheral's 1Mbps or 2Mbps?
    Additionally, I monitored the communication using Wireshark.
    When monitoring CH 37, 38, 39, LE 2M is not observed...
    What's wrong?
  • Hi,

    You need to check what status the BLE_GAP_EVT_PHY_UPDATE event returns:

    As you can see from the message sequence chart, it might return not supported if the central does not support that PHY,

    If you have a sniffer trace that shows where the PHY update is sent to the central then please upload it here,

    I can take a look at it,

    regards

    Jared 

Related