BLE Peripheral to Central Data Transmission Issue

Hi,

We're planning to integrate ble_app_uart and ble_app_uart_c into our project. Before integration, we tested the ble_app_uart example code on one development board. After powering it up, we connected the board using the nRF Connect app and were able to send and receive data.

For the next test, we flashed ble_app_uart_c onto one development board for the central part and ble_app_uart onto another for the peripheral. Upon powering both boards, they connected via BLE, and we could send data from the central to the connected peripheral device. However, we couldn't send data from the peripheral to the central. What could be the issue?

When we turned off the central development board and connected the ble_app_uart-flashed peripheral board to the nRF Connect app, we were able to send and receive data between the app and the board.

Project Details:

  • SDK: nRF5 SDK 17.0.2
  • IDE: SEGGER Embedded Studio 5.42a
  • Controller: nRF52832
  • Development boards: PCA10040 NRF52832

Thank you for your support.

Best regards, SILTVM

Parents
  • Hi!

    However, we couldn't send data from the peripheral to the central. What could be the issue?

    Did you get any error code? Any logs to share, etc?

  • I am checking the log console outputs of ble_app_uart_c and ble_app_uart. Most of the functions return 0. I will share my log console output of ble_app_uart_c.

    app_uart_init : 0
    11:57:15.691 -> ble_db_discovery_init : 0
    11:57:15.691 ->  nrf_pwr_mgmt_init : 0
    11:57:15.691 -> nrf_sdh_enable_request : 0
    11:57:15.691 -> nrf_sdh_ble_default_cfg_set : 0
    11:57:15.691 -> nrf_sdh_ble_enable : 0
    11:57:15.691 -> ble_nus_c_init : 0
    11:57:15.691 -> BLE UART central example started.
    11:57:15.737 -> ble_nus_c_handles_assign : 0
    11:57:15.737 -> ble_db_discovery_start : 0
    11:57:16.064 -> enter in ble_nus_c_evt_handler
    11:57:16.064 -> discovery completeble_nus_c_handle_assign : 0
    11:57:16.111 -> ble_nus_c_tx_notif_enable :0
    11:57:16.111 -> connected to device with nordic uart servie 

    log console output of app_uart 

    APP_UART_FIFO_INIT : 0
    11:44:47.363 -> NRF_LOG_INIT : 0
    11:44:47.363 -> bsp_init : 0
    11:44:47.363 -> bsp_btn_ble_init : 0
    11:44:47.363 -> nrf_pwr_mgmt_init : 0
    11:44:47.363 -> nrf_sdh_enable_request : 0
    11:44:47.363 -> nrf_sdh_ble_default_cfg_set : 0
    11:44:47.363 -> nrf_sdh_ble_enable : 0
    11:44:47.363 ->  sd_ble_gap_device_name_set : 0
    11:44:47.363 ->  sd_ble_gap_ppcp_set : 0
    11:44:47.410 -> nrf_ble_gatt_init : 0
    11:44:47.410 -> nrf_ble_gatl lbn_bl0enter in on_conn_params_evt 
    11:44:51.206 -> Connected
    11:44:51.300 -> Data len is set to 0xF4(244)enyer in nus_data_handler
    11:46:19.685 -> enyer in nus_data_handler
    11:46:19.685 -> Received data from BLE NUS. Writing data on UART.r app_uart_put : 0
    11:46:19.685 -> r app_uart_put : 0
    11:46:19.685 -> 
    11:46:19.685 ->  app_uart_put : 0
    11:46:41.055 -> enyer in nus_data_handler
    11:46:41.055 -> Received data from BLE NUS. Writing data on UART.1 app_uart_put : 0
    11:46:41.102 -> 2 app_uart_put : 0
    11:46:41.102 -> 3 app_uart_put : 0
    11:46:41.102 -> 4 app_uart_put : 0
    11:46:41.102 -> 

    is there any  problem with sending data from peripherel app_uart example code flashed board.your response is more valuble for our development . 

  • I don't see any issues in the log. Return code 0 is NRF_SUCCESS.

  •  ,Yes, that's what I'm asking: Most of the functions return 0 after initialization. I think the issue is with taking UART data and sending it via BLE. Instead, I just checked a dummy response sent from the peripheral after receiving data from the central device, like 'data received'. It works. When an NUS data is received from the central device, the peripheral device sends a response back to the central device. 

Reply
  •  ,Yes, that's what I'm asking: Most of the functions return 0 after initialization. I think the issue is with taking UART data and sending it via BLE. Instead, I just checked a dummy response sent from the peripheral after receiving data from the central device, like 'data received'. It works. When an NUS data is received from the central device, the peripheral device sends a response back to the central device. 

Children
No Data
Related