> For the complete documentation index, see [llms.txt](https://docs.ruuvi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ruuvi.com/communication/development-real-time-transfer.md).

# Real Time Transfer (RTT)

Lifecycle: In production

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 [Ruuvi Devshield](https://shop.ruuvi.com/product/devkit/) or a [Tag-Connect cable](http://www.tag-connect.com/TC2030-CTX-NL).

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.

![RuuviTag zip-tied to devkit with soldered wires for debugging.](https://1423309131-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LsPjfnhNj3v37AZtF-d%2Fuploads%2Fgit-blob-4fe0d9a95b7747fe2e5bf28cbab881a926815d5a%2Fimage%20\(3\).png?alt=media)

![Programming a RuuviTag with DK and Tag-connect cable](https://1423309131-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LsPjfnhNj3v37AZtF-d%2Fuploads%2Fgit-blob-9f51c6006c4870f71437a206cb551a17b1daa04c%2Fimage%20\(6\)%20\(1\).png?alt=media)

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**

You'll need to install[ Segger software and documentation pack](https://www.segger.com/downloads/jlink/). 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.

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*

![JLinkExe connected to Ruuvi](https://1423309131-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LsPjfnhNj3v37AZtF-d%2Fuploads%2Fgit-blob-1009c2e0847fb3a27e7e2aff9ee364c17f6b0ab8%2Fimage.png?alt=media)

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

![RTT Logs](https://1423309131-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LsPjfnhNj3v37AZtF-d%2Fuploads%2Fgit-blob-0941268ccca96c9060514f77ea86f842942ade78%2Fimage.png?alt=media)
