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

Problem detecting 128-bit service w/ 16-bit char using pc-ble-driver

I use pc-ble-driver-master/hrc as central to  connect the target device which runs with modified ble_app_uart hex.

I can discover service and characteristic correctly, but the characteristic descriptor is not.

Only one descriptor(0x2803) can be found. Actually I want match the cccd UUID (0x2902) which can be found when use nrfConnect to connect 

#------------------------------------------------------------------------------------------------------------------------------------#

Received descriptor discovery response, descriptor count: 1
Handle: 0x000D, UUID: 0x2803

#-----------------------------------------------------------------------------------------------------------------------------------#

Parents
  • Hello,

    Can you describe what you do to find what you have already found?

    Are you sure that the characteristic you are looking at has notifications?

    It is notifications you are looking for, right? Have you tried to enable notifications like it is done in the ble_app_uart_c example?

    When discovery is complete, in the ble_nus_c_evt_handler(), it calls ble_nus_c_tx_notif_enable(p_ble_nus):

    static void ble_nus_c_evt_handler(ble_nus_c_t * p_ble_nus_c, ble_nus_c_evt_t const * p_ble_nus_evt)
    {
        ret_code_t err_code;
    
        switch (p_ble_nus_evt->evt_type)
        {
            case BLE_NUS_C_EVT_DISCOVERY_COMPLETE:
                NRF_LOG_INFO("Discovery complete.");
                err_code = ble_nus_c_handles_assign(p_ble_nus_c, p_ble_nus_evt->conn_handle, &p_ble_nus_evt->handles);
                APP_ERROR_CHECK(err_code);
    
                err_code = ble_nus_c_tx_notif_enable(p_ble_nus_c);
                APP_ERROR_CHECK(err_code);
                NRF_LOG_INFO("Connected to device with Nordic UART Service.");
                break;
    
            case BLE_NUS_C_EVT_NUS_TX_EVT:
                ble_nus_chars_received_uart_print(p_ble_nus_evt->p_data, p_ble_nus_evt->data_len);
                break;
    
            case BLE_NUS_C_EVT_DISCONNECTED:
                NRF_LOG_INFO("Disconnected.");
                scan_start();
                break;
        }
    }

    BR,

    Edvin

  • Another part made me confused is that the service handle range is from 0x000b to 0xffff, is this normal?

Reply Children
Related