Replies: 1 comment
-
After some more experimenting, it seems like the problem is that calling https://docs.rs/bluer/latest/bluer/struct.Device.html#method.connect initiates pairing/bonding. With an Android BLE central connecting to a macOS peripheral, if the Android device bonds first, it can't enumerate macOS's services afterwards. But if it connects without bonding, then tries to read an encrypted characteristic, the bonding process triggers automatically and everything works as desired. So, is there a way in I tried to use https://docs.rs/bluer/latest/bluer/struct.Adapter.html#method.connect_device, but I get an error like |
Beta Was this translation helpful? Give feedback.
-
Using Mint 22, 6.8.0-49-generic kernel, on a ThinkPad T14s, though I've also tried this on Mint 21 with a USB Bluetooth adapter. I've been testing with my own code, then when that didn't work, the
gatt_client.rs
example andgattcat.rs
.When my Linux device is acting as a central, it can scan for a particular GATT service UUID, find the M1 MacBook Pro (running Sequoia 15.1) acting as a peripheral and advertising that service, and pair with it. But after they're paired, the Linux device can't enumerate any services. I've seen similar issues where the response was that just because a peripheral advertises a service doesn't mean that it's serving it from a GATT server. True, but in this case, Android and Windows devices can pair with this MBP peripheral and read from/write to the service. And this Linux device can pair/read/write with Android, iOS, Windows, and other Linux devices, so I do think it's an issue between these particular stacks. I've run
bluetoothd -d
, read syslog andjournalctl -u bluetooth
, read the macOS Console, but haven't found any solid reason why this is failing. Please let me know if there's anything else I can try, thanks.Beta Was this translation helpful? Give feedback.
All reactions