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
  2. Bluetooth connection

NUS (Nordic UART Service)

Introduction

Nordic Uart Service emulates Universal Asynchronous Receiver Transmitter over Bluetooth. NUS has 2 characteristics, RX and TX. Central registers to TX notifications and once notification registration is acknowledged central can start writing to RX characteristic. Each characteristic accepts up to 20 byte payloads, interpretation of those payloads depends on application.

In development versions of firmware there is 120 second delay from starting of the connection in which the central must complete the registration process. If the deadline is not met, tag assumes that there is a software lockup and reboots. In production versions this deadline is 12 seconds.

The Ruuvi Firmware standard messages have a structure of 3 byte header and 8 byte payload. The header has a structure of destination, source and type. Last bit of the type is R / !W bit, if the last bit is set (odd number) the message is understood as a read command. The payload is defined by the header. Technical details

Service

UUID

Nordic UART Service

6E400001-B5A3-F393-E0A9-E50E24DCCA9E

Characteristic

UUID

Read

Write

Notify

RX

6E400002-B5A3-F393-E0A9-E50E24DCCA9E

X

TX

6E400003-B5A3-F393-E0A9-E50E24DCCA9E

X

X

PreviousDIS (Device Information Service)NextHeartbeat transmissions

Last updated 5 years ago