Not able to receive data from the custom service.

Hi,

I created a custom service in accordance with NUS service. I am able to assign all handles, subscribe to notifications. But I am not able to read any data from the device.

//My event handler
static void ble_b24_dp_evt_handler(ble_b24_dp_t * p_ble_b24_dp, ble_b24_dp_evt_t * p_ble_b24_dp_evt)
{
    ret_code_t err_code;
    uint32_t ret_val;


    switch (p_ble_b24_dp_evt->evt_type)
    {
        case BLE_B24_DP_EVT_DISCOVERY_COMPLETE:
              NRF_LOG_INFO("Data service discovered");
              err_code = ble_b24_dp_handles_assign(p_ble_b24_dp, p_ble_b24_dp_evt->conn_handle, &p_ble_b24_dp_evt->handles);
              APP_ERROR_CHECK(err_code);

            err_code = ble_b24_dp_tx_notif_enable(p_ble_b24_dp);
            APP_ERROR_CHECK(err_code);
            break;

            ble_nus_chars_received_uart_print(p_ble_b24_dp_evt->p_data, p_ble_b24_dp_evt->data_len);
            break;
        
        case BLE_B24_DP_EVT_B24_TX_EVT:
              NRF_LOG_INFO("data received");
            break;

        case BLE_B24_DP_EVT_DISCONNECTED:
            NRF_LOG_INFO("Disconnected");
            scan_start();
            break;
    }
}

I am not able to receive BLE_B24_DP_EVT_B24_TX_EVT  .

Parents Reply
  • Hey, thanks for the resource. 

    I went through the resources, it doesn't talk about the service from the Central side.

    I am using a custom device named B24 from Mantracourt Electronics. I am trying to get the data from the B24 device to my Central. I am able to connect and write to some of the characteristics, but not able to read the data from the device. I have followed along the NUS to create my own service.

    I am using SDK 17.1.0

Children
Related