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

Queued Writes example problems

Hi guys, i'm trying experimental_ble_app_queued_writes out. I have some strange behavior. The qwr service is

  • 6e400001-b5a3-f393-e0a9-e50e24dcca9e but the characteristic is

  • 00000002-0000-1000-8000-00805f9b34fb.

Is this normal? Should it not be 6e400002-b5a3-f393-e0a9-e50e24dcca9e? I can't write to the characteristic.

  • FormerMember
    0 FormerMember

    Yes, you are right, the correct UUID for the queued write characteristic is 6e400002-b5a3-f393-e0a9-e50e24dcca9e. The currently used characteristic UUID is the Bluetooth SIG base UUID, and it's a bug that that UUID is being used for this characteristic.

    To obtain using the UART UUID, the uuid_type parameter should be added to the characteristic. In nrf_ble_qwrs.c --> nrf_ble_qwrs_init(), the setup of the characteristic should look like the following:

    uint32_t nrf_ble_qwrs_init(nrf_ble_qwrs_init_t *p_qwrs_init, nrf_ble_qwrs_t *p_qwrs)
    {
        ....
        //Add Long characteristic
        ble_add_char_params_t add_char_params;
    
        memset(&add_char_params, 0, sizeof(add_char_params));
        add_char_params.uuid               = BLE_UUID_QWRS_LONG_CHARACTERISTIC;
    	add_char_params.uuid_type	 =  p_qwrs->uuid_type; //todo: add this line to use correct base UUID
        add_char_params.max_len            = BLE_QWRS_MAX_LONG_CHAR_LEN;
        add_char_params.init_len           = 0;
        add_char_params.char_props.write   = true;
        add_char_params.write_access       = SEC_OPEN;
        add_char_params.is_defered_write   = true;
    
        err_code = characteristic_add(p_qwrs->service_handle,
                              &add_char_params,
                              &p_qwrs->long_charact_handles);
    
        ...
    }
    
Related