The Nordic nRF51822 SDK supports two serial communication modes: raw and fifo.
There are two macros used to initialize each mode:
APP_UART_INIT(P_COMM_PARAMS, EVT_HANDLER, IRQ_PRIO, ERR_CODE) APP_UART_FIFO_INIT(P_COMM_PARAMS, RX_BUF_SIZE, TX_BUF_SIZE, EVT_HANDLER, IRQ_PRIO, ERR_CODE)
Once initialized you can use “app_uart_put()” to send a character and “app_uart_get()” to get a character.
If you initialize with APP_UART_FIFO_INIT() macro, but link your application to app_uart.c instead of app_uart_fifo.c everything will compile fine.
You could send some text using app_uart_put in your main() function, but when you get some BLE data received event and try to use it… you will get troubles!
Only the first character will be sent to UART, nothing else…
I spent much time trying to figure-out why it was not working, finally I found someone with same problem and he give a hint:
Just linking to app_uart_fifo.c instead of app_uart.c fixed the issue!