Troubleshooting & Diagnostics
Symptom first. Most of what is here is real BlueZ or real device behavior that the desktop stubs do not reproduce — so "it worked on Windows" is expected and not itself a clue.
Table of Contents
Nothing Happens After a Request
A Device Never Appears in Discovery
A Pairing Prompt Appears on the Wrong Adapter
An Android Phone Asks for a PIN
No Volume Controls, or Volume Does Nothing
An Audio Profile Will Not Connect
Metadata Works but There Is No Sound
Connection State Is Wrong After a Restart
A Second Adapter Behaves Like the First
A Feature Works on One Platform and Not the Other
Diagnostics First
Three log groups are available through the standard Ahsoka logger, on BluetoothLogGroups:
| Constant | Value | Covers |
|---|---|---|
BluetoothLogGroups.Classic |
Services.Bluetooth |
Classic service, adapters, profiles |
BluetoothLogGroups.BLE |
Services.BLE |
BLE service, GATT, advertising |
BluetoothLogGroups.BlueZ |
BlueZ |
The D-Bus layer |
Raise the Bluetooth groups before chasing anything. BlueZ in particular shows the D-Bus traffic, which is
usually where the real answer is.
Reading the log on a display
Use the Console view in the OpenPV Developer Toolkit. That is the intended way to read a target's journal, and it shows the log this extension actually writes to.
Important
Do not reach for journalctl -u Ahsoka.Bluetooth.service. That unit is bluetoothd itself, and it
produces very little that is useful. The extension's own logging — every Services.Bluetooth,
Services.BLE, and BlueZ message — goes through the Ahsoka service host, not through the bluetoothd
unit, so filtering on that unit hides exactly what you want to see.
If you would rather run it yourself over SSH, this is the equivalent of what the Toolkit's Console view runs:
journalctl _SYSTEMD_UNIT=Ahsoka.Application.service + _SYSTEMD_UNIT=Ahsoka.UserInterface.service + _SYSTEMD_UNIT=Ahsoka.Services.service -f --lines=all -o short-monotonic -a --no-pager --no-hostname
Worth keeping as a script on the target.
What a device disclosed at pairing
A device can pair successfully and still disclose no service records. The property dump at pairing shows it:
UUIDs String[] 00001200-0000-1000-8000-00805f9b34fb
Supported Profiles Int32 0x0000:
Supported Profiles 0x0000 means the device answered SDP with nothing usable, so no profile can be
negotiated with it yet. Connecting the device makes it disclose its records, after which its profiles
appear on the next paired-device query.
btmon
btmon is a live Bluetooth trace and is not ours. It is the ground truth for "did the device actually
send anything?" — when you cannot tell whether a problem is this extension's or the remote device's, btmon
decides it.
Unit state
systemctl status Ahsoka.Bluetooth.service Ahsoka.Obex.service confirms bluetoothd and obexd are up. Neither
is enabled at boot — enabling an adapter or starting the BLE stack starts them, and obexd follows bluetoothd
through Wants and BindsTo. Use this to check whether they are running; use the Console view to read
what the extension logged.
Add Ahsoka.Audio.service to that list when audio is involved. It belongs to the Audio extension, and a
report of "not-found" means that extension is not part of the application — see
An Audio Profile Will Not Connect.
Nothing Happens After a Request
Almost always a callback registered too late.
Client requests are fire-and-forget; results arrive as notifications. Notifications only flow once the client is started — and although a client starts itself on its first call, anything that happened before the callback was registered is gone. So the request can succeed while you never hear the answer.
Check in order:
- Was the notification callback registered before the client started? Registering after the first
request means the notifications that request provoked were already delivered to nobody. Register first,
then call
Start()explicitly so the start point is yours rather than incidental. - For a profile client, does the adapter declare that profile in
SupportedProfileServiceTypes? A profile service that does not exist reports nothing, and there is no error — see Configuration Reference. - Are you checking the right message-id enum? Connection state lives in
BluetoothProfileMessageTypes.Ids, not the profile's own enum, and comparing across enums needsEnumToInt().
Also: are you waiting for an adapter that will never come up? On the desktop stack the device-ready
notification never fires, so an application that enables adapters in response to it hangs. Check
config.Stack == SupportedBluetoothStack.StackDesktop and enable eagerly.
A Device Never Appears in Discovery
Most likely the Class of Device filter.
allowedDeviceClasses on the adapter suppresses non-matching devices before your application sees them. A
device that is genuinely nearby and genuinely discoverable will simply never be reported.
Confirm with btmon that the device is advertising, then check the filter. An empty list means no filtering
at all, which is a useful way to prove the filter is the cause.
If it appears but you then reject it yourself, check your own classification: a discovered device's
profile flags are not authoritative until it is paired. Filtering a discovery list on
SupportedProfiles will drop devices that do in fact support the profile. Classify discovery results by
Class of Device.
Headset Buttons Never Arrive
A missing uinput/evdev node, and it is a platform problem rather than a code one.
When bluetoothd is AVRCP Target, incoming passthrough commands from a headset are not delivered to the
registered media player over D-Bus. BlueZ injects them into a Linux uinput device named
<device name> (AVRCP). The extension opens that node and turns key events into
AvrcpMediaButtonPressed, so if the node does not exist, no buttons arrive.
Diagnose on the target, with the headset connected:
cat /proc/bus/input/devices | grep -A5 AVRCP
| Result | Meaning |
|---|---|
A (AVRCP) node is listed |
The path exists; look at the extension's BlueZ log next |
| No node at all | The kernel uinput module is missing — the Console view will show a uinput init failure from bluetoothd |
Two further notes if the node exists but attribution looks wrong. Every AVCTP connection gets a node,
including the phone's — so a node existing is not proof it is the headset's. And the node's phys field
carries the local adapter's MAC address in lowercase, not the remote device's; uniq is empty. That is
how the extension keeps one adapter's listener off another's node.
Separately, not every headset sends every button. Jog-dial headsets commonly send play and pause as distinct codes and no stop, rewind, or fast-forward at all. Absent buttons are not necessarily broken buttons.
A Pairing Prompt Appears on the Wrong Adapter
An OBEX session that did not pin its source adapter.
When a device is paired to more than one adapter, obexd will pick an adapter itself unless the session
explicitly names one. Picking the wrong one produces a phantom pairing prompt on an adapter the user was not
interacting with.
Every OBEX session the extension creates pins Source to its own adapter's address, so this should not
happen in shipped code. It is documented because the symptom looks exactly like a pairing bug and sends
people to the wrong place. If you see it, the OBEX-based paths — MAP, phonebook, album art — are where to
look, not the pairing code.
An Android Phone Asks for a PIN
It wants the six-digit passkey shown on the display.
When a phone pairs by passkey entry, Android asks for it in its PIN dialog — "Enter PIN to pair", with a hint
to try 0000 or 1234. Ignore the hint and type all six digits of the passkey on the display. Entering 0000 or
1234 fails the pairing, which arrives as PairingCanceled on BLE and as a failed PairingComplete on
Classic.
If the display shows no passkey, the application is not handling PairingRequested with DisplayOnly set —
see BLE Overview or
Adapters, Discovery & Pairing.
No Album Art
Album art is the most fragile part of AudioSink, and there are three independent causes.
- BlueZ
Experimental = trueis required. Album art is fetched over an OBEX/BIP session, which is gated behind the experimental flag inbluetooth.conf. Without it, everything else about AudioSink works and art never arrives. The gating shows up in the Console view. - The phone must expose a BIP image handle. Not all do, and not for all tracks.
- It arrives late. Art comes well after the track metadata, over a separate session. An application
that expects it alongside
AvrcpPlayerInfoChangedwill look broken when it is merely early.
Always ship a placeholder image and never block your UI on art. Prefer AlbumArtInfo.AlbumArt and fall back
to Thumbnail.
MAP Returns No Messages
If history comes back empty, the folder really is empty — there is no push-only device, and an empty result is not a symptom by itself.
Folder navigation is the one thing that can produce a spurious empty result. Folder paths must be walked
one segment at a time; passing a multi-segment path such as telecom/msg/inbox as a single value returns Bad
Request on Android and, worse, silently returns zero messages on iOS. The extension navigates per segment, so
this is handled for you — but it is why an empty inbox is worth a second look rather than a special case in
your UI.
Other MAP symptoms:
| Symptom | Likely cause |
|---|---|
| Nothing at all, on any phone | obexd is not running, or the profile never reached StateConnected |
| Mark-read or delete appears to do nothing | The phone accepted it and did not reflect it. Re-read to confirm; do not assume your view and the phone's agree. |
| Very slow history load | Expected on a phone with long history. Lower maxPerFolder and show progress. |
Test against both iOS and Android. MAP has more per-device variation than any other profile here.
No Volume Controls, or Volume Does Nothing
The device does not support AVRCP absolute volume, and you cannot enable it.
VolumeInfo.AbsoluteVolumeSupported tells you whether it was negotiated. When it is false, SetVolume and
SetHeadsetVolume have nothing to write, and showing a slider that does nothing is worse than showing none.
Drive the visibility of your volume UI from that flag — the demo panels add and remove their volume
buttons on exactly this.
Real headsets that fall in this category are common. A headset whose volume is a physical knob typically adjusts its own output locally and puts nothing on the Bluetooth wire — no absolute volume, and no passthrough volume keys either. There is nothing to read and nothing to set.
Relative VolumeUp / VolumeDown presses from a headset are report-only by design. See
Audio Source for why they are not relayed onward.
An Audio Profile Will Not Connect
The Audio extension is not in the application.
The A2DP profiles depend on the platform's audio server, and starting it belongs to the Audio extension —
Ahsoka.Extensions.AudioManager and its Ahsoka.Audio.service. This extension does not start it.
Ahsoka.Bluetooth.service declares Wants=Ahsoka.Audio.service, which brings the audio stack up when that
unit is installed and does nothing at all when it is not.
So an application that never added the Audio extension has no audio server, and AudioSink or AudioSource connection attempts can fail or leave a transport that carries nothing. Every other profile — MAP, PBAP, SPP — is unaffected.
Check it on the target:
systemctl status Ahsoka.Audio.service
A "not-found" unit means the Audio extension was never deployed. Add it on the Extensions tab of the OpenPV
Developer Toolkit and reference the Ahsoka.Extensions.AudioManager package in your project, then
redeploy. Both are required — the package reference alone will not deploy the unit, and the Toolkit entry
alone leaves the application unable to publish.
Metadata Works but There Is No Sound
A connected phone's audio is MediaRelay's job. Everything else about audio is the Audio extension's.
MediaRelay carries a connected phone's audio to the headset routed to it, or to the cabin when it has no
headset. So start there: check the relay has the route you expect with MediaRelay.GetHeadsetRoute, and that
the phone is actually playing — a paused phone has no audio to carry. See
Carrying the Audio.
For anything else, this extension manages the A2DP transport and nothing more: it negotiates the
connection and tells you about it. Mixing, output selection, and platform volume are the domain of
Ahsoka.Extensions.AudioManager and its Ahsoka.Audio.service.
So if control and metadata work — buttons land, track info updates, connection state is correct — the control path this extension owns is fine. Once you have ruled out the relay's route, take it to the Audio extension's documentation and configuration. The same goes for "let the user pick the output device": there is no API for it here, because output selection is not this extension's concern.
Ahsoka.Bluetooth.service declares Wants=Ahsoka.Audio.service and After=Ahsoka.Audio.service, so the
audio stack is brought up by the Audio extension before Bluetooth starts — provided that extension is part
of the application. If audio is not working at all, on any source, check that Ahsoka.Audio.service is
running before looking at anything Bluetooth-related. See
An Audio Profile Will Not Connect if the unit does not exist.
Connection State Is Wrong After a Restart
Expected, and the fix is at shutdown rather than startup.
Profile connection state is push-only and is never replayed on subscribe. An application that starts while a device is still connected has no way to learn about that connection, and there is no state query to fall back on.
The fix is to disable your adapters during shutdown so links are severed and the next run genuinely starts empty. See There Is No State Query.
A Second Adapter Behaves Like the First
A missing adapter-index check.
A profile service spans every adapter, so its notifications reach every subscriber regardless of which
adapter the event came from. Per-adapter objects must ignore notifications whose
DeviceInfo.AdapterIndex — or payload AdapterIndex — is not their own.
This is the classic multi-adapter bug and it is silent with one adapter configured. Key your state by adapter index from the start.
A related one: a headset paired to two adapters may auto-connect to either, and both work. Do not assume it will pick the adapter you last used; read the index off the notification.
BLE Is Not Discoverable
Check in this order:
- Are you on the desktop stack? The BLE desktop implementation is a stub. It does not advertise and does not serve GATT — a phone will never find it. BLE needs real hardware.
- Did the stack actually start?
StackStartedreports failure as well as success. CheckBLEConnectionNotification.State == BLEConnectionState.ClientReady. - Were services registered after
ClientReady? Registering earlier fails. - Is the service set to advertise?
[BLEService(name, uuid, isPrimary, advertise)]— the fourth argument. A service withadvertisefalse is reachable but not advertised. - Has the advertisement overflowed? Packets are tight. The local name from
StartStack, every advertised service UUID, and any[BLEManufactureData]payload compete for the same budget. If advertising stopped working right after you added data, shorten the name or trim the payload.
A Feature Works on One Platform and Not the Other
First: is the feature Bluetooth Classic? If so, there is nothing to diagnose — Classic is OpenView Pro only. Multi-adapter support, device discovery, the Classic pairing flow, and every Classic profile service are unavailable on Select by design. See Supported & Not Supported.
That makes this section really about BLE differing between Pro and Select. For that:
It is not the BlueZ version, and it is not the configuration. Both platforms run BlueZ 5.84, and the
installer puts the same tuned bluetooth.conf and the same bluetoothd plugin exclusions on both, so a
capability or setting present on one is present on the other. Rule both out and move on.
Check hardware instead. Different radio module, different antenna, different USB enumeration. btmon on
both shows whether the two are even seeing the same traffic, and the Console view on each will show any
differing plugin-load or gating messages.