I'm evaluating ble_app_uart (Central/Peripheral) but I don't understand how to disable the echo I have on the RTT USB VCP
When I send data from the UART, I got (PCA10056/10040) the data in both on the RTT USB VCP and on the UART
I would like to control separately the UART and the USB VCP.
I would like to be able to use NRF_LOG in parallel, let's say NRF_LOG_RAW_INFO()/NRF_LOG_GETCHAR() for the RTT USB VCP only and printf() for UART.
example: if I do: printf("Hello world"), I got "Hello world" on both the USB/VCP (Segger) and on the PuTTY (from the UART) on the Host
Is there any #define to set (perhaps in sdk_config.h)? Probably a combination of :
with the following I got the echo on the RTT(USB/VCP)
NRF_LOG_ENABLED=1, NRF_LOG_BACKEND_SERIAL_USES_UART=1, NRF_LOG_BACKEND_SERIAL_USES_RTT=1
In the following setting, the printf() outputs the "Hello world" on both the USB/VCP and on the UART PuTTY but the NRL_LOG_RAW_INFO() don't output anything
NRF_LOG_ENABLED=1, NRF_LOG_BACKEND_SERIAL_USES_UART=1, NRF_LOG_BACKEND_SERIAL_USES_RTT=0
Thanks in advance
NRF_LOG_ENABLED=1, NRF_LOG_BACKEND_SERIAL_USES_UART=0, NRF_LOG_BACKEND_SERIAL_USES_RTT=1 ?
Yes, I tried your setting and I got the following:
NRF_LOG_INFO("Hello word NRF LOG") => nothing on the both two PuTTY (USB/VCP & UART)
printf("Hello word printf") => I got the "Hello word printf" on both the two PuTTY (USB/VCP & UART)
I excepted to have:
"Hello word NRF LOG" on PuTTY USB/VCP
"Hello word printf" on PuTTY UART
Thanks for you fast reply Petter
Strange. Seems to be working fine here. Have you made any other changes to the project?
I re-do the test using SDK 13.0.7ca7556 with the ble_peripheral\pca10056_s140
the only modification I did was:
and adding in the main():
printf("Hello word -printf");
NRF_LOG_RAW_INFO("Hello word -NRF_LOG");
Hello word - printf
Hello word - printf
(the Hello word -NRF_LOG didn't output)
I expected to have only the ouput on PuTTY UART and nothing on the PuTTY USB/VCP
Sorry about my previous text mistake
Why would you set NRF_LOG_BACKEND_SERIAL_USES_RTT = 0? It should be 1. And NRF_LOG_BACKEND_SERIAL_USES_UART=0. Actually the ble_app_uart example should work like that out of the box. NRF_LOG_INFO() should appear on RTT and printf should appear on UART.