Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_app_uart

   HI EVERYBODY

              The SDK14.2.0 ble_app_uart' NRF_LOG_INFO() fuction can not printf data.how to make it work? i modify the sdk_config.h file as follow,but it still not work.

                   #ifndef NRF_LOG_BACKEND_RTT_ENABLED
                    #define NRF_LOG_BACKEND_RTT_ENABLED 0
                    #endif

                     #ifndef NRF_LOG_ENABLED
                    #define NRF_LOG_ENABLED 1
                     #endif

  • Hello,

    In the ble_app_uart example, the NRF_LOG is only targeting the RTT backend. You can view the log in J-Link RTT Viewer (but you have to set #define NRF_LOG_BACKEND_RTT_ENABLED 1.

    If you want to enable the logging on the UART, you can either use printf(), or you must enable the UART backend like it is done in e.g. the ble_app_hrs example.

    BR,

    Edvin

Related