Skip to content

Linux central to Mac connection problems #438

Open
@Frank-Buss

Description

@Frank-Buss

Describe the bug
When using this test application:
ble-chat.zip
and running it on Mac with "cargo run -- peripheral" and on Linux Debian with "cargo run -- central", I get this output on Linux:

[2025-06-26T17:38:08Z INFO  ble_chat::central] Starting BLE Chat Central, looking for device: 'BLE_Chat_Device'
[2025-06-26T17:38:08Z INFO  ble_chat::central] ✅ Using adapter: hci0 (usb:v1D6Bp0246d0552)
[2025-06-26T17:38:08Z INFO  ble_chat::central] 🔍 Scanning for device with service UUID...
[2025-06-26T17:38:09Z INFO  ble_chat::central] 🎯 Found device with our service: '(unknown)' (14:98:77:76:2C:E8)
[2025-06-26T17:38:09Z INFO  ble_chat::central] 🔗 Connecting to peripheral...
Error: Connection failed: Timeout waiting for reply

I have to connect manually first to the peripheral with this command:

sudo hcitool lecc 14:98:77:76:2C:E8

and then the Rust program can connect to it as well.

Also after starting the Rust program a few times, sometimes I get this message:

Error: Bluetooth operation failed: Failed to register advertisement

This persists then for any subsequent start, until I restart the bluetooth service:

sudo systemctl restart bluetooth

Then the Rust program works again.

Expected behavior
I expect that I don't need to use the hcitool program or restart the bluetooth service.

Actual behavior
I need to use the hcitool program and sometimes restart the bluetooth service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions