This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

App Uart Question

I'm using the Nordic as a BLE solution, and it is just passing along data through the UART to another chip through the UART. However, I'm not sure how to just pass the data along using the example UART application from the SDK.

I am basically using the SDK example as is, but I've removed the APP_UART_DATA_READY code from the uart_event_handle callback. Right now, I'm testing it without having any data being returned via the UART, but the UART will be a two-way communication channel.

My two main questions are:

  1. How do I differentiate between data sent from the main firmware via the UART and data received via the BLE destined for the UART?
  2. What exactly is the app_uart_fifo doing?
Parents
  • I'm sorry, but I still don't understand. The APP_UART_DATA_READY event is received in the uart_event_handle(), not nus_data_handler(). uart_event_handle() is triggered when data is sent over UART to the nRF51 peripheral, usually from a terminal on a PC, it will then call ble_nus_string_send() to send the data over BLE to the central device. nus_data_handler() is triggered when data is sent over BLE from the central to the nRF51 peripheral, it will call app_uart_put() to send the data over UART, usally to a terminal on a PC.

    You say you have removed the handling of the APP_UART_DATA_READY, which means that when data is sent over UART to the nRF51 peripheral, the data will not be sent over BLE to the central device.

    Is this the functionality you want? If not, what exactly do you want? Please try to be specific.

Reply
  • I'm sorry, but I still don't understand. The APP_UART_DATA_READY event is received in the uart_event_handle(), not nus_data_handler(). uart_event_handle() is triggered when data is sent over UART to the nRF51 peripheral, usually from a terminal on a PC, it will then call ble_nus_string_send() to send the data over BLE to the central device. nus_data_handler() is triggered when data is sent over BLE from the central to the nRF51 peripheral, it will call app_uart_put() to send the data over UART, usally to a terminal on a PC.

    You say you have removed the handling of the APP_UART_DATA_READY, which means that when data is sent over UART to the nRF51 peripheral, the data will not be sent over BLE to the central device.

    Is this the functionality you want? If not, what exactly do you want? Please try to be specific.

Children
No Data
Related