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

Cannot get notifications data on BLE_NUS_C_EVT_NUS_RX_EVT

Hi,

I am trying to change an example code on ble_app_uart_c (Central) SDK10.0.0 s130.

I have changed already peripheral example and I can see notification data if I connect to peripheral (ble_app_uart) via IOS LightBlue app.

But I could not get the same data via Central example, what I am missing?

Peripheral sends 20bytes via ble_nus_string_send after check:

if (p_ble_evt->evt.gatts_evt.params.write.handle == m_nus.rx_handles.cccd_handle) {

From Central I can see only:

Connected to target
[DB]: Starting discovery of service with UUID 0x1 for Connection handle 0
[DB]: Discovery of service with UUID 0x1 completed with success for Connectionhandle 0
The device has the device RX characteristic
The device has the device TX characteristic

Any help would be greatly appreciated.

Vitaliy

Parents
  • I changed only SCAN_WINDOW and made it the same as SCAN_INTERVAL.

    Now I realize that Central actually receives sometimes data from Peripheral but not always:

    The device has the device TX characteristic
    p_ble_evt : 55
    p_ble_evt : 56
    Received RX_EVT
    0123456@ABC`p_ble_evt : 56
    

    Maybe there is nothing wrong with Central but with Peripheral...?

    Peripheral side transfers 20 bytes data after it receives the event:

    case BLE_GATTS_EVT_WRITE:						
    `if (p_ble_evt->evt.gatts_evt.params.write.handle == m_nus.rx_handles.cccd_handle) {
    #sending 20 bytes of data
       ble_nus_string_send(&m_nus, data_array, data_size);
       sd_ble_gap_disconnect(m_conn_handle,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
    }`
    
Reply
  • I changed only SCAN_WINDOW and made it the same as SCAN_INTERVAL.

    Now I realize that Central actually receives sometimes data from Peripheral but not always:

    The device has the device TX characteristic
    p_ble_evt : 55
    p_ble_evt : 56
    Received RX_EVT
    0123456@ABC`p_ble_evt : 56
    

    Maybe there is nothing wrong with Central but with Peripheral...?

    Peripheral side transfers 20 bytes data after it receives the event:

    case BLE_GATTS_EVT_WRITE:						
    `if (p_ble_evt->evt.gatts_evt.params.write.handle == m_nus.rx_handles.cccd_handle) {
    #sending 20 bytes of data
       ble_nus_string_send(&m_nus, data_array, data_size);
       sd_ble_gap_disconnect(m_conn_handle,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
    }`
    
Children
No Data
Related