LogoLogo
  • Ruuvi Developer Documentation
  • Ruuvi Hardware
    • RuuviTag B
    • RuuviTag Pro
    • Ruuvi Gateway
    • Ruuvi DevShield
    • Ruuvi Connector Kit
    • TMP 117 External Sensor
  • Ruuvi Connector System
    • Introduction
    • Expansion boards
    • Cables
    • Connectors
  • Ruuvi Sensor Firmware
    • 1.2.12
    • 2.5.9
    • 3.X
      • 3.x Sensors
      • 3.x Heartbeat
    • Device Firmware Update (DFU)
  • Ruuvi Gateway Firmware
    • GW Getting Started
    • GW Web-UI
      • Greeting window
      • Internet connection settings
        • Connection via Wi-Fi
        • Connection via Ethernet
      • Software update
      • Automatic configuration download
      • Automatic updates
      • Access Settings from LAN
      • Cloud Options
        • Backend: HTTP(s)
        • Backend: MQTT(s)
        • Backend: Statistics
      • Time Synchronisation Options
      • Bluetooth Scanning Settings
      • Configuration completion
      • Authentication when accessing from LAN
    • GW Install custom firmware
    • GW nRF52811 Firmware
      • GW nRF52811 selftest
      • GW nRF52811 scanning
      • GW nRF52811 repeating
      • GW nRF52811 UART communication
  • GW ESP32 Firmware
    • GW ESP32 WiFi Hotspot
    • GW ESP32 Button
    • GW ESP32 LED
    • GW ESP32 HTTP Client
    • GW ESP32 MQTT client
  • GW Data formats
    • HTTP: Time-stamped data from Bluetooth-sensors
    • HTTP: Data from Bluetooth-sensors without timestamps
    • MQTT: Time-stamped data from Bluetooth-sensors
    • MQTT: Data from Bluetooth-sensors without timestamps
    • HTTP GET /history (with timestamps) and decoding
    • HTTP: Gateway status
    • Gateway configuration
  • GW Examples
    • Polling mode
    • Poll endpoint "/metrics"
    • Configuration update via API
    • Firmware update via API
    • Configuration download from a remote server via API
    • MQTT examples
    • Home Assistant
    • MQTT+AWS IoT Core
  • Communicate with RuuviTag devices via Bluetooth
    • Bluetooth advertisements
      • Data format 3 (RAWv1)
      • Data format 4 (URL)
      • Data format 5 (RAWv2)
      • Data format C5 (Cut-RAWv2)
      • Data format 8 (Encrypted environmental)
    • Bluetooth connection
      • DIS (Device Information Service)
      • NUS (Nordic UART Service)
        • Heartbeat transmissions
        • Read logged history
    • Real Time Transfer (RTT)
  • Communicate with Ruuvi Cloud
    • Ruuvi Cloud
      • User API
      • Gateway API
      • Internal API
      • Alerts
      • Cloud stored app settings
  • Ruuvi Community projects
    • Integrations
Powered by GitBook
On this page
Edit on GitHub
  1. Communicate with RuuviTag devices via Bluetooth

Real Time Transfer (RTT)

Lifecycle: In production

PreviousRead logged historyNextRuuvi Cloud

Last updated 5 years ago

RuuviTags are nRF52-based devices. The programming is done over Serial Wire Debug (SWD) interface through nRF52 devkit. The RuuviTag can be interfaced to nRF52-DK either through or a .

The Real-Time Transfer is Segger's technology for printing UART-like messages from the attached Cortex-M device. Test versions of Ruuvi Firmware print out the logs via RTT which can be useful for example when developing your own applications which communicate over GATT.

Connecting the hardware

First you'll need to connect your PC to nRF52-DK via USB-micro cable, then you'll need to connect the nRF52-DK to Ruuvi via devkit or the Tag-Connect cable. nRF52-DK autodetects an external target and programs it, but if there is an issue with connection you can get errors from the software or program the nRF52 onboard the nRF52-DK. You can cut the power measurement jumper on nRF52-DK to be sure to not accidentally connect to the wrong nRF52.

If you get a Tag-Connect cable, be sure to get the 10-pin connector Cortex-M no-legs version or you'll need to solder the wires to pins on DK as above.

Software connection

JLinkExe has to be started first, commands are

  • connect

  • Device -> NRF52832_XXAA

  • Interface -> s (SWD)

  • Speed -> 4000 (kHz)

  • Restart program and halt -> r

  • Once JLinkRTTViewer is connected, go -> g

JLinkRTTClient will connect automatically to the JLinkExe session, just start JLinkRTTClient and start the firmware program on JLinkExe with g.

You'll need to install. On Windows you can use JLinkRTTViewer which has a GUI for connecting to device and storing the logs to a file, on Linux and Mac OSX you have to use JLinkExe to connect to the Ruuvi and JLinkRTTClient to view the logs.

Segger software and documentation pack
Ruuvi Devshield
Tag-Connect cable
RuuviTag zip-tied to devkit with soldered wires for debugging.
Programming a RuuviTag with DK and Tag-connect cable
JLinkExe connected to Ruuvi
RTT Logs