Skip to content

A simple example of monitoring Bluetooth messages over the DBus interface on Linux using Bluez

Notifications You must be signed in to change notification settings

JohnGrime/BluezExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DBus Bluez monitoring example

This is a simple example of monitoring Bluetooth-related data over DBus using Bluez on Linux.

Access to the DBus interface comes as standard in gio, which is easily available via apt, e.g.:

sudo apt install libgio3.0-cil-dev

The code can be built using g++ and pkg-config, e.g.:

g++ -std=c++14 -Wall -Wextra -pedantic -O2 $(pkg-config --cflags gio-2.0) example.cpp DBusBluez.cpp $(pkg-config --libs gio-2.0) -o bluez

The example program will listen for ObjectManager messages for an optional period until quitting (e.g., ./a.out 10 will run for 10 seconds and then quit). If no period is specified, the program runs continually until interrupted.

About

A simple example of monitoring Bluetooth messages over the DBus interface on Linux using Bluez

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages