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

    Can you upload the full advertising_init() and advertising_start() functions in your application so I can have a look?

    error code 7 does indeed mean that you have an invalid parameter somewhere, so one or more of your m_adv_params. are not set correctly. For example, what is your interval set to? This must be between 0x0020 and 0x4000 to be valid.

    Best regards,

    Simon

  • Functions you wanted to check:

    static void advertising_init(void)
    {
        uint32_t               err_code;
        ble_advertising_init_t init;
    
        memset(&init, 0, sizeof(init));
    
        init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
        init.advdata.include_appearance = false;
        init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    
        init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
        init.srdata.uuids_complete.p_uuids  = m_adv_uuids;
    
        init.config.ble_adv_fast_enabled  = true;
        init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
        init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;
        init.evt_handler = on_adv_evt;
    
        init.config.ble_adv_primary_phy      = BLE_GAP_PHY_2MBPS; 
        init.config.ble_adv_secondary_phy    = BLE_GAP_PHY_2MBPS; 
        init.config.ble_adv_extended_enabled = true;             
       
    
        err_code = ble_advertising_init(&m_advertising, &init);
        APP_ERROR_CHECK(err_code);
    
        ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
    }

    static void advertising_start(void)
    {
        uint32_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
        printf("err_code: %d\r\n",err_code); nrf_delay_ms(500);
        APP_ERROR_CHECK(err_code);
    }
    

    I am still getting error_code:7

Reply
  • Functions you wanted to check:

    static void advertising_init(void)
    {
        uint32_t               err_code;
        ble_advertising_init_t init;
    
        memset(&init, 0, sizeof(init));
    
        init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
        init.advdata.include_appearance = false;
        init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    
        init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
        init.srdata.uuids_complete.p_uuids  = m_adv_uuids;
    
        init.config.ble_adv_fast_enabled  = true;
        init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
        init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;
        init.evt_handler = on_adv_evt;
    
        init.config.ble_adv_primary_phy      = BLE_GAP_PHY_2MBPS; 
        init.config.ble_adv_secondary_phy    = BLE_GAP_PHY_2MBPS; 
        init.config.ble_adv_extended_enabled = true;             
       
    
        err_code = ble_advertising_init(&m_advertising, &init);
        APP_ERROR_CHECK(err_code);
    
        ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
    }

    static void advertising_start(void)
    {
        uint32_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
        printf("err_code: %d\r\n",err_code); nrf_delay_ms(500);
        APP_ERROR_CHECK(err_code);
    }
    

    I am still getting error_code:7

Children
No Data
Related