World wide free shipping on orders over 100€ - PayPal and Stripe payments - Made in Finland

Debugging RuuviTag

It is said that every non-trivial piece of software can be shortened by at least one line of code and the software has at least one bug in it. While the base version of Ruuvi firmware known as “Weather Station” is widely tested with over 2500 users and over 10 000 devices in the field (at the time of writing), introducing new features introduces new bugs.
In general most of these bugs can be analyzed by printing out the relevant variables using NRF_LOG macros sprinkled over the code. To enable these logs, you must set in NRF_LOG_ENABLE 1 in SDK Config file of your project.


To actually read the logs you’ll need the Ruuvi Developer Shield. Once you have RuuviTag connected to the dev shield and the dev shield you can run RTT Viewer available in Segger J-Link software pack to view the log prints.


However, Segger RTT Viewer is not available for Linux. If you’re developing on Linux, you’ll need to take some additional steps to view the log output. Run JLinkExe and connect to your RuuviTag (device NRF52832_XXAA, interface SWD) and then open JLinkRTTClient.

RuuviTag debugging
JLink Connection to RuuviTag

There are cases where printing debug messages just does not cut it. When you need to step through the code and analyze each step to find what is causing the bug, GNU project debugger GDB is an invaluable tool.

To connect GDB you need to connect JLinkDGBServer to the board first with JLinkGDBServer -If SWD -Speed 4000 -Device Cortex-M4. Then you’ll want to start GDB and load debug symbols from your file with arm-none-eabi-gdb _build/test_drivers.out . Replace the .out file to match your application. Finally, Connect GDB Client to GDB Server with target extended localhost:2331 in GDB client.

RuuviTag Debugging
GDB Connected

Featured Products

Find the right products for your measuring needs
  • RuuviTag sensor measures temperature, air humidity, air pressure and motionIn stock
    Made in Europe, Finland. Not approved to Australia (lithium...
    Read more

    RuuviTag Sensor (4in1)

    39,90
  • Ruuvi KitIn stock
    Every Ruuvi Gateway product is shipped with...
    Read more

    Ruuvi Sensor Measurement Kit

    339,00
  • Ruuvi GatewayIn stock
    Note! Every Ruuvi Gateway product is shipped with a...
    Read more

    Ruuvi Gateway Router

    199,00
  • RuuviTag Pro 3in1 measures temperature, air humidity and motionIn stock
    Made in Europe, Finland. Worldwide free shipping on orders over...
    Read more

    RuuviTag Pro Sensor

    49,9055,90
    This product has multiple variants. The options may be chosen on the product page