How can I read data output from Ruvvi tag

Hi
I’m using ruuvi tag on devkit with nrf52 DK. I’m testing some added sensors on the pinout of the devkit. I use nrf52 DK to reprogram ruuvi tag, I just wondering if there any way I can see data output on Putty(or other tools). like when I use nrf52 DK to check the output? I’m using SEGGER Embedded Studio.
Thanks,
Cindy

If you want to look at the advertising packets transmitted by the ruuvi you could consider using a raspberry Pi Zero W with the

hcitool

utility to read packets and

hcidump

to intercept them and output them in hex.

See documentation on hcidump here

This is the way the excellent RuuviCollector gets the data.

PS What sensors have you added?

You can use Segger tools to view RTT prints. https://www.segger.com/products/debug-probes/j-link/tools/rtt-viewer/ . Also Segger Embedded Studio will print the RTT prints to your debug console. Default Ruuvi Firmware doesn’t print anything to save space on release binaries.

1 Like

On linux you can also view the RTT prints from the command line.

In one terminal run:
JLinkExe

Then type:

connect

enter for default

S

enter for default speed

In another terminal run:

JLinkRTTClient

This will allow you to see the messages being printed.

Thanks for your reply osto,
I didn’t use default Ruuvi Firmware, I used Nordic SDK.
if I use nrf52 DK, I can see the data on Putty ok, but when I use ruuvi tag + devkit on top the nrf52 DK, I cant see data output from it. (but the led light on my own board works ok so I assume it means ruvvi tag is giving output signal to my board?)
Let me know if I wasn’t clear about the issue.
CIndy

You’re probably viewing UART output via PuTTY, the UART is not available through devkit and nRF52-DK. You’ll need to use the Segger RTT.

It’s my first time using RTT and it seems that my logs are not getting written to the RTTViewer. I tried connecting to RTT with the USB setting > SWD > 4000kHz, but nothing appears on it. Would you know the proper settings needed?

You need to configure sdk_config.h, be sure to disable BACKEND_UART if it is enabled. Below are the Ruuvi Driver settings used in sdk_config.h


Thanks! got it to work now! :smiley:

@otso
I got a similar result as Jappy_Sam did. but I’m sorry I didn’t fully get what I should change in sdk_config.h, would you mind to explain it a bit more?

Your sdk_config.h may or may not have these lines:

#define NRF_LOG_ENABLED 1
#define NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0
#define NRF_LOG_DEFERRED 0
#define NRF_LOG_BACKEND_RTT_ENABLED 1

You need to sure that if there already are those lines, they have right value and if they’re not there already you need to add them. You’ll also need to check that there is no
NRF_LOG_BACKEND_UART_ENABLED 1 in your sdk_config.h

Thanks for your help,
it works now!
Cindy

1 Like