https://github.com/mark2b/bluez-connect
bluez-connect is a Go package for building BLE peripherals and centrals for Linux devices
https://github.com/mark2b/bluez-connect
ble bluez bluez-dbus go golang raspberry-pi
Last synced: about 1 month ago
JSON representation
bluez-connect is a Go package for building BLE peripherals and centrals for Linux devices
- Host: GitHub
- URL: https://github.com/mark2b/bluez-connect
- Owner: mark2b
- License: mit
- Created: 2018-04-11T06:57:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-18T15:47:04.000Z (about 3 years ago)
- Last Synced: 2025-11-15T17:35:33.726Z (7 months ago)
- Topics: ble, bluez, bluez-dbus, go, golang, raspberry-pi
- Language: Go
- Homepage:
- Size: 121 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# bluez-connect = GATT of BlueZ
## Package provides a Bluetooth Low Energy GATT implementation over linux BlueZ API.
**bluez-connect** communicates with BlueZ over D-Bus (linux message bus system).
This package was developed as part of IoT project in order to add GATT capability to Raspberry Pi like devices. Package was tested against BlueZ 5.46
Because this package mostly makes sense for Linux / arm devices, build environment is adopted to such platform.
In other words ```GOOS=linux GOARCH=arm```
## Usage
Please see [godoc.org](http://godoc.org/github.com/mark2b/bluez-connect) for documentation. (Not ready yet)
## Examples
### Peripheral example
This example creates and advertizes, **Echo** service with single **Echo** characteristic with Read / Write capabilities.
Build and run
```
GOOS=linux GOARCH=arm go build examples/server/server-example.go
# Copy to target device
./server-example
```
### Central example
This example is only template. You need to replace Service and Characteristics by real ones you want to connect.
Build and run
```
GOOS=linux GOARCH=arm go build examples/client/client-example.go
# Copy to target device
./client-example
```
Package release under a [MIT license](./LICENSE.md).