Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. gatt

gatt

BSD-3-ClauseGo

A Go package for building Bluetooth Low Energy peripherals and clients using the GATT protocol.

GitHubGitHub
1.2k stars286 forks0 contributors

What is gatt?

Gatt is a Go package that provides a Bluetooth Low Energy GATT (Generic Attribute Profile) implementation for building BLE peripherals and clients. It allows developers to create services, characteristics, and descriptors, handle connections, and perform BLE operations on Linux and macOS systems. The package solves the need for a native Go solution to interact with BLE devices without relying on external node.js libraries.

Target Audience

Go developers working on IoT projects, embedded systems, or applications that require Bluetooth Low Energy communication, such as wearable devices, sensors, or smart home peripherals.

Value Proposition

Developers choose Gatt because it offers a pure Go implementation with cross-platform support, low-level hardware access on Linux, and a straightforward API that mirrors BLE concepts. It's particularly valuable for those who prefer Go's performance and simplicity over node.js alternatives like bleno or noble.

Overview

Gatt is a Go package for building Bluetooth Low Energy peripherals

Use Cases

Best For

  • Creating custom BLE peripheral devices like sensors or beacons
  • Building BLE client applications that scan and connect to peripherals
  • Developing IoT prototypes with Go on Linux or macOS
  • Implementing GATT servers for wearables or smart devices
  • Cross-compiling BLE applications for ARM-based embedded systems
  • Experimenting with BLE services and characteristics in a controlled environment

Not Ideal For

  • Projects targeting Windows or mobile platforms beyond Linux and macOS
  • Applications needing concurrent Bluetooth device access shared with other system services
  • Teams seeking a high-level BLE abstraction with pre-built common profiles and services
  • Environments where running with root privileges or setting Linux capabilities is not feasible

Pros & Cons

Pros

Cross-Platform Compatibility

Supports both Linux and macOS with platform-specific options, enabling development on common operating systems without external dependencies.

Low-Level Linux Control

Uses HCI_CHANNEL_USER for exclusive device access, avoiding interference from system Bluetooth services and allowing fine-grained hardware management.

Idiomatic Go API

Provides a clean, Go-native interface for managing GATT services and characteristics, making it intuitive for developers familiar with Go conventions.

Comprehensive Examples

Includes sample code like server.go and discoverer.go that demonstrate both peripheral and central functionalities, offering practical starting points.

Cons

Administrative Overhead

On Linux, programs must be run as root or have specific capabilities set, adding deployment complexity and security risks.

OS X Feature Gaps

The macOS version lacks support for subscribing to indications, as noted in issue #32, limiting certain BLE operations.

Exclusive Device Lock

Locks the BLE device when in use, preventing other applications from accessing it concurrently, which can be restrictive in multi-service environments.

Frequently Asked Questions

Quick Stats

Stars1,166
Forks286
Contributors0
Open Issues38
Last commit3 years ago
CreatedSince 2014

Tags

#iot#embedded-systems#wireless-communication#go-library#bluetooth-low-energy#cross-platform

Built With

G
Go

Included in

Go169.1k
Auto-fetched 4 hours ago

Related Projects

gobotgobot

Golang framework for robotics, drones, and the Internet of Things (IoT)

Stars9,401
Forks1,061
Last commit3 months ago
flogoflogo

Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.

Stars2,495
Forks294
Last commit2 years ago
ekuiperekuiper

Lightweight data stream processing engine for IoT edge

Stars1,698
Forks452
Last commit2 days ago
rulegorulego

⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.

Stars1,497
Forks144
Last commit5 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub