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

nRF connect 2.6.2 for pc attribute value conversion to string.

Hey, I use nrf52 dk with nrf5 usb dongle. I am using this ble_app_uart__saadc_timer_driven__scan_mode example, I think it is working just fine, but the values are in hex-format right?

 Here is a screenshot from log in nrf connect pc:

So, I am having hard time understading how the adc values are put in that message. The example uses 4 inputs and prints the values in termite just fine.

Also, why I can't open the log file. When I press the putton on nrf connect pc -app it does nothing at all. Is the log file saved somewhere?

I tried to use sprintf (picture below) to make sent values to string but it had no effect.

Parents
  • Hi,

    nRF Connect lists the hexadecimal values of the bytes sent. For instance for the values on the bottom row of your screenshot, "31-39-38-00-C3-00-C6-00", the first four values correspond to the ASCII characters 1, 9, 8, <NUL>. So this is mostly a question about how to interpret the data (and how to encode it.) Termite, for instance, will display the ASCII characters representing the bytes it receives over UART. (And similar for sending.)

    The log file button should open the log file in a default text editor. Default log file location on Windows is "%APPDATA%\nrfconnect\pc-nrfconnect-ble\logs".

    Regards,
    Terje

Reply
  • Hi,

    nRF Connect lists the hexadecimal values of the bytes sent. For instance for the values on the bottom row of your screenshot, "31-39-38-00-C3-00-C6-00", the first four values correspond to the ASCII characters 1, 9, 8, <NUL>. So this is mostly a question about how to interpret the data (and how to encode it.) Termite, for instance, will display the ASCII characters representing the bytes it receives over UART. (And similar for sending.)

    The log file button should open the log file in a default text editor. Default log file location on Windows is "%APPDATA%\nrfconnect\pc-nrfconnect-ble\logs".

    Regards,
    Terje

Children
Related