How gokulshiva77/bluez-sample-dbus works
This is a menu-driven Linux Bluetooth application using BlueZ over D-Bus. The user workflow runs from menu commands through the application orchestrator to adapter discovery and device lifecycle management, then to pairing, device/profile connections, and SPP data transfer. Supporting branches handle authentication and profile registration, while ObjectManager signals feed discovered-device events into the registry. The map follows documented capabilities and shown references; unsampled implementation details are omitted, and broader BlueZ interactions are based on README statements.
Main entry points: Application.cpp Application · ProfileManager.cpp Profile registration · DeviceManager.cpp Device registry · Menu.cpp Interactive menu
Components 20
User interface
- Interactive menu
Src/Menu/Menu.cpp
Application orchestration
- Application
Src/Application.cpp
Bluetooth management
- Adapter control
Src/Adapter/Adapter.cpp - Adapter D-Bus proxy
Src/Adapter/AdapterProxy.cpp - Object monitoring
Src/ObjectManager/ObjectManagerProxy.cpp - Device registry
Src/DeviceManager/DeviceManager.cpp - Device operations
Src/Device/Device.cpp - Device D-Bus proxy
Src/Device/DeviceProxy.cpp - Agent registration
Src/AgentManager/AgentManager.cpp - Agent manager proxy
Src/AgentManager/AgentManagerProxy.cpp - Pairing agent
Src/Agent/Agent.cpp - Agent D-Bus callbacks
Src/Agent/AgentProxy.cpp
Profiles and data
- Profile registration
Src/ProfileManager/ProfileManager.cpp - Profile manager proxy
Src/ProfileManager/ProfileManagerProxy.cpp - SPP profile
Src/Profile/ProfileProxy.cpp - SPP data handler
Src/SPPHandler/SPPHandler.cpp
Shared support
- Device properties
Inc/DeviceHelper.h - Logging
Src/Logger/Logger.cpp
Other components
- User
- BlueZ D-Bus service
Connections 25
- User → Interactive menu: uses
- Interactive menu → Application: invokes operations
- Application → Adapter control: controls discovery
- Application → Object monitoring: starts monitoring
- Object monitoring → Device registry: forwards device events
- Device registry → Device operations: creates and manages
Src/DeviceManager/DeviceManager.cpp - Device operations → Device D-Bus proxy: uses D-Bus proxy
- Device D-Bus proxy → Device properties: uses property model
- Application → Device registry: manages devices
- Application → Agent registration: starts registration
- Application → Pairing agent: manages pairing
- Agent registration → Agent manager proxy: uses manager proxy
- Pairing agent → Agent D-Bus callbacks: uses agent proxy
- Application → Profile registration: registers SPP
- Profile registration → Profile manager proxy: registers profiles
- Profile registration → SPP profile: manages profile
- SPP profile → SPP data handler: uses data handler
- Adapter control → Adapter D-Bus proxy: uses D-Bus proxy
- Adapter D-Bus proxy → BlueZ D-Bus service: controls adapter
- Device D-Bus proxy → BlueZ D-Bus service: device operations
- Object monitoring → BlueZ D-Bus service: monitors object events
- Agent registration → BlueZ D-Bus service: registers agent
- Profile registration → BlueZ D-Bus service: registers profile
- Interactive menu → Logging: logs activity
Src/Menu/Menu.cpp - Device registry → Logging: logs lifecycle
Src/DeviceManager/DeviceManager.cpp