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

How to get my NRF_LOG, from macOS or iOS App or Win WM (DEV KIT NRF52)

Hello team,

I got a DEV KIT NRF52 And I'd like to get all my LOG : NRF_LOG_* ( NRF_LOG_INFO… ) From my USB interface Serial:

/dev/tty.usbmodem1421

I made sure that I activated sdk_config.h :

  • NRF_LOG_ENABLED 1
  • NRF_LOG_BACKEND_SERIAL_USES_RTT 1
  • NRF_LOG_BACKEND_SERIAL_USES_UART 1

I try a simple:

NRF_LOG_INFO("HELLO WORLD !\r\n");

In my function, which I invoke

I connect to tty via:

screen /dev/tty.usbmodem1421

Here's what I get some strange characters:

/2éé&2… 

NOT my “HELLO WORLD” or whatever

I probably do not use the right method or the right program, If you could enlighten me to do it most ideally,

Thank you for your support

Parents
  • Hi Hung Bui,

    Thank you, indeed I had not thought about the conflict of USES_RTT and USES_UART

    With USES_UART only and by adding nrf_log_backend_serial.c in my project and let UART_BAUDRATE to 30801920 (115200 baud) and let pins matching at it was (UART_TX_PIN 6, UART_RX_PIN 8, UART_RTS_PIN 5, UART_CTS_PIN 7) I get all the logs of my app running on my NRF52!

    Thank you for your quick support

Reply
  • Hi Hung Bui,

    Thank you, indeed I had not thought about the conflict of USES_RTT and USES_UART

    With USES_UART only and by adding nrf_log_backend_serial.c in my project and let UART_BAUDRATE to 30801920 (115200 baud) and let pins matching at it was (UART_TX_PIN 6, UART_RX_PIN 8, UART_RTS_PIN 5, UART_CTS_PIN 7) I get all the logs of my app running on my NRF52!

    Thank you for your quick support

Children
No Data
Related