Jakeler / ble-serial

"RFCOMM for BLE" a UART over Bluetooth low energy (4+) bridge for Linux, Mac and Windows
https://blog.ja-ke.tech/tags/#bluetooth
MIT License
251 stars 37 forks source link

Connection failed: Device not found #99

Closed pH-Valiu closed 4 months ago

pH-Valiu commented 4 months ago

I get the error: "Bluetooth connection failed. Device not found", although the device clearly exists as I managed to do ble-scan where it popped up and even managed to do a deep scan on it. (The name of the device is "Not Set")

Can anyone help me? grafik

Jakeler commented 4 months ago

Try with --address-type random

pH-Valiu commented 4 months ago

Thank you, this fixed it. Would you like to explain me why that made a difference?

Jakeler commented 4 months ago

The process to establish a connection can be different, depending on the type it first has to cryptographically derive the actual address. See: https://novelbits.io/bluetooth-address-privacy-ble/ In your case it's the random static type (0xFF is ..11).

I could probably make this parameter optional though, because the ble stack already knows which one it is when it detects the device/advertisement.

pH-Valiu commented 4 months ago

Thank you for the answer