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

ble_thread_dyn_mtd_coap_cli ERROR 19 / 0x13

Hey dear Devzone,

I am trying out some Thread and BLE dynamical examples on my nRF52840's but running into some problems using the " ble_thread_dyn_mtd_coap_cli " example. All boards are running the soft device added with the Thread_SDK. Specifically the one found in : /components/softdevice/s140/hex/s140_nrf52840_5.0.0-2.alpha_softdevice.hex.

Currently I have 2 CoAP servers, 1 CoAP client all which are running without dynamic protocol. Then I have 1 running the ble_thread_dyn_mtd_coap_cli dynamic example.

The dynamic device gets added to the mesh network as a End Device: role 2. Once I connect to that board using the nRF toolbox (newest version downloaded from PlayStore) I get the following error and message in the debug terminal :

<error> ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.
<info> app: Connected
<info> app: Data len is set to 0x3D(61)
<error> app: ERROR 19 [Unknown error code]

I can retrace it back to this event on the BLE_EVT_HANDLER :

 case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST:
{
    ble_gap_data_length_params_t dl_params;

    // Clearing the struct will effectivly set members to @ref BLE_GAP_DATA_LENGTH_AUTO
    memset(&dl_params, 0, sizeof(ble_gap_data_length_params_t));
    err_code = sd_ble_gap_data_length_update(p_ble_evt->evt.gap_evt.conn_handle, &dl_params, NULL);
    APP_ERROR_CHECK(err_code);
} break;

For now I have not been able to get BLE + Thread running concurrently with the "ble_thread_dyn_mtd_coap_cli" example.

Can someone help me with this?

Some other random things I have tried: But while using the "ble_thread_dyn_template" example I have been able to have success. I can change the device name for example.

Parents
  • Hello,

    Thank you for raising this issue.

    Can you try to remove the entire case (BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST) from ble_evt_handler?

    We will investigate this issue but it looks like some mobile phones act differently to others when it comes to data length negotiations.

  • To make sure scanning does not occupy the whole radio should I add a timeout for that ? Could you give a estimation about how I should set the scanning variables?

    These are the values I have set it to now:

    #define SCAN_INTERVAL             0x00A0                                /**< Determines scan interval in units of 0.625 millisecond. */
    #define SCAN_WINDOW               0x0050                                /**< Determines scan window in units of 0.625 millisecond. */
    #define SCAN_TIMEOUT              0x0000                               /**< Timeout when scanning. 0x0000 disables timeout. */
    
Reply
  • To make sure scanning does not occupy the whole radio should I add a timeout for that ? Could you give a estimation about how I should set the scanning variables?

    These are the values I have set it to now:

    #define SCAN_INTERVAL             0x00A0                                /**< Determines scan interval in units of 0.625 millisecond. */
    #define SCAN_WINDOW               0x0050                                /**< Determines scan window in units of 0.625 millisecond. */
    #define SCAN_TIMEOUT              0x0000                               /**< Timeout when scanning. 0x0000 disables timeout. */
    
Children
No Data
Related