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

how to enable 2mbps

Hello everybody.

I have two boards. I have been trying to build a communication between my boards for a time. I could not manage to have 2mbps data transfer rate. 

Boards                    : nRF52832 DK(PCA10040) and nRF52840 Dongle(PCA10059)
SDK version           : 15.3.0
SoftDevice Version : 6.1.1
SoftDevices            : s132 for PCA10040 and s140 for PCA10059
Examples               : ble_app_uart and ble_app_uart_c

1-) How can I enable 2mbps data transfer rate ? I have tried various methods like sending PHY updating requests etc. But I guess I am doing something wrong. What is the correct way to do it?
2-) Let's say I managed to have 2mbps data transfer rate. How can I test it ? How to verify that I am having 2mbps data transfer rate ?

Sincerely.

Parents
  • Hi, in order to activate 2Mbps phy, you coud get an ordinary 1 Mbps example. Then, after a ble connection is established, in the ble event handler 'on_connect' like event you just call something like this

    m_test_params.phys.tx_phys = BLE_GAP_PHY_2MBPS;
    m_test_params.phys.rx_phys = BLE_GAP_PHY_2MBPS;                        
    err_code = sd_ble_gap_phy_update(m_conn_handle, &m_test_params.phys);
    And the trick is done.. 
    You can add BLE_GAP_EVT_PHY_UPDATE (and not BLE_GAP_EVT_PHY_UPDATE_REQUEST in this case)
    in you ble_evt_handler so to get a confirmation about the phy modification, that has been initiated when calling sd_ble_gap_phy_update
    To sum up, about using 2Mbps phy, according to my tests now it could be achieved without using a special flag set during advertisement phase, but after the ble connection is established, I just call in the ble device sd_ble_gap_phy_update. So this command notifies the host that the device wants to change phy, if the host just agrees BLE_GAP_EVT_PHY_UPDATE is generated from the device ble stack. So that device knows if what has requested has gone ok. 
    The Nordic Sniffer tool shows a change in the used phy
    Maybe there is another procedure, and a device can indeed advertise its 2M capabilities,
    then BLE_GAP_EVT_PHY_UPDATE_REQUEST is generated, to finish phy modification in this case (sd_ble_gap_phy_update is used to finish the procedure in this case).
    But I couldn't find an example of that.
    Hope that Nordic can provide a very simple explanation about this point.
Reply
  • Hi, in order to activate 2Mbps phy, you coud get an ordinary 1 Mbps example. Then, after a ble connection is established, in the ble event handler 'on_connect' like event you just call something like this

    m_test_params.phys.tx_phys = BLE_GAP_PHY_2MBPS;
    m_test_params.phys.rx_phys = BLE_GAP_PHY_2MBPS;                        
    err_code = sd_ble_gap_phy_update(m_conn_handle, &m_test_params.phys);
    And the trick is done.. 
    You can add BLE_GAP_EVT_PHY_UPDATE (and not BLE_GAP_EVT_PHY_UPDATE_REQUEST in this case)
    in you ble_evt_handler so to get a confirmation about the phy modification, that has been initiated when calling sd_ble_gap_phy_update
    To sum up, about using 2Mbps phy, according to my tests now it could be achieved without using a special flag set during advertisement phase, but after the ble connection is established, I just call in the ble device sd_ble_gap_phy_update. So this command notifies the host that the device wants to change phy, if the host just agrees BLE_GAP_EVT_PHY_UPDATE is generated from the device ble stack. So that device knows if what has requested has gone ok. 
    The Nordic Sniffer tool shows a change in the used phy
    Maybe there is another procedure, and a device can indeed advertise its 2M capabilities,
    then BLE_GAP_EVT_PHY_UPDATE_REQUEST is generated, to finish phy modification in this case (sd_ble_gap_phy_update is used to finish the procedure in this case).
    But I couldn't find an example of that.
    Hope that Nordic can provide a very simple explanation about this point.
Children
Related