ble

command module
v0.0.0-...-efdff95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 3 Imported by: 0

README

go-bluetooth

Golang bluetooth client based on bluez DBus interfaces

See here for reference https://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc

Status

The code is still unstable but mostly working. The API and code is of alpha quality and may change without notice

Features

  • Discovery
  • Adapter support
  • Device support (SensorTag example)
  • GATT Service and characteristics interface
  • Adapter on/off via rfkill
  • Handle systemd bluetooth.service unit
  • Expose hciconfig basic API
  • Expose bluetooth services via bluez DBus API

Usage

Check in main.go or in examples/ for an initial overview of the API

Setup

Tested with

  • golang 1.8 (minimum v1.6)
  • bluez bluetooth v5.43 (Note this version is the minimum supported one!)
  • ubuntu 16.10 kernel 4.8.0-27-generic
  • raspbian and hypirot (debian 8) armv7 4.4.x

See in scripts/ how to upgrade bluez to 5.43

Give access to hciconfig to any user (may have security implications)

sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hciconfig`

Todo

  • Refactor DBus interface implementation
  • Add Device read / write
  • Add unit tests
  • Add Travis integration
  • Add and generate docs with examples

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL