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

Mesh app to log on SERIAL instead of RTT

Hi, 

is there a simple way to enable serial logging instead of rtt in a mesh application for nrf52840DK, as example in the light switch server or client mesh applications? 

My objective is to enable logging over serial instead of rtt for mesh applications running on nrf52840DK. I proceeded by steps, starting from *sdk_coexist* examples withouth success:

1. I tried first to run both the sdk_coexist examples(ble_app_uart and ble_app_proximity) on a nrf52DK(only version pca10040 is provided in SDK :-(, but even if they compile and NRF_LOG_INFO instruction works as expected by printing data on serial port, then they both fail when initializing the mesh, like in the picture below:

2. Then I tried to include nrf logging libraries in the *light switch server* example for nrf52840DK(pca10056). I included "nrf_log.h", "nrf_log_ctrl.h" and "nrf_log_default_backends.h" and initialized with NRF_LOG_INIT, like in the picture, below. In this case mesh works fine, log with _LOG method still works fine, but log over Serial with NRF_LOG_INFO doesn't work:

Is there an easy way to enable LOG OVER SERIAL, INSTEAD OF RTT for light_switch_server mesh example?

Thank you a lot,

Giovanni

Related