https://github.com/leso-kn/pebble-le
A library to talk to Pebble Smartwatches via Bluetooth Low Energy (BLE).
https://github.com/leso-kn/pebble-le
ble bluetooth-low-energy c-library cmake pebble pebble-smartwatch pkg-config
Last synced: 2 months ago
JSON representation
A library to talk to Pebble Smartwatches via Bluetooth Low Energy (BLE).
- Host: GitHub
- URL: https://github.com/leso-kn/pebble-le
- Owner: leso-kn
- License: mit
- Created: 2023-04-04T02:09:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-31T01:28:59.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T00:28:46.908Z (2 months ago)
- Topics: ble, bluetooth-low-energy, c-library, cmake, pebble, pebble-smartwatch, pkg-config
- Language: C++
- Homepage: https://pebble-le.readthedocs.io
- Size: 114 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://repology.org/project/pebble-le/versions) [](LICENSE)
# `libpebble-le`

_A library to talk to Pebble Smartwatches via Bluetooth Low Energy (BLE)._
[](https://repology.org/project/pebble-le/versions)
## Design
This library mimics the API syntax of the on-watch [AppMessage API](https://developer.rebble.io/developer.pebble.com/docs/c/Foundation/AppMessage/index.html).
The backend currently uses the BlueZ v5.48+ D-Bus API (Linux).
## Usage
See [example/main.cpp](example/main.cpp) for example usage.
## License
libpebble-le is licensed under the MIT License.
Internally it uses [Binc](https://github.com/weliem/bluez_inc) and [SimpleBLE](https://github.com/OpenBluetoothToolbox/SimpleBLE) which are both licensed under the MIT License as well.
Credits also go to [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge) (AGPL-3.0), which provided major insights into the pebble communications protocol, [pebble-proto.h](src/pebble-proto.h) uses some data structures from Gadgetbridge.
## Changelog
### v0.3.0
* Documentation
* Added docs generation via Doxygen
* New C API and Example pages in Sphinx format
* Documentation is now available at [ReadTheDocs.org](https://pebble-le.readthedocs.org/)
* Bluetooth address now indicated in watch connectivity callback### v0.2.2
* Fixed GATT server communication after watch reconnect
### v0.2.1
* Fixed crash upon watch disconnect in optimized build
### v0.2.0
* New: Support for sending/receiving large messages (packet chunking)
* [Breaking change] [AppMessageInboxReceived](include/pebble-le/pebble-types.h#L66): Pass UUID of the sending watch-app to the user
* [AppMessageInboxReceived](include/pebble-le/pebble-types.h#L66): Pass the bluetooth address of the sending watch to the user
* Internal rebase upon [Binc](https://github.com/weliem/bluez_inc)
* Removed dbus_gatt dependency
* Internally handle PPoGATT v1 window negotiation
* Internally handle PING packets
* Several protocol fixes
* Stability improvements
* More documentation_Many thanks to the [Rebble dev team](https://github.com/pebble-dev/mobile-app/blob/master/android/app/src/main/kotlin/io/rebble/cobble/bluetooth) for providing an excellent reference implementation, that was very useful during the development of this release!_
### v0.1.0
* Initial version of the library
* Connect and disconnect to and from watch
* Scanning and pairing
* Send and receive [AppMessages](https://developer.rebble.io/developer.pebble.com/docs/c/Foundation/AppMessage/index.html)
* Pebble dict-implementation currently doesn't parse incoming dictionaries and only supports byte arrays for outgoing messages
* Callbacks for connectivity events and incoming AppMessages
* Optional communication logging (disabled by default)
* [Basic example program](example/main.cpp) to demonstrate the API usage---
Created by [Lesosoftware](https://github.com/leso-kn) in 2023