Open godbout opened 2 years ago
disconnect not working for me either, even if i pass --notify. Monterey 12.1 Beta (21C5039b)
I am also experiencing this issue. Adding notify simply makes it say that it was successful in disconnecting. when checking the devices in settings it becomes apparent this is not the case.
Works fine for connecting. However will not connect if bluetooth is disabled. Spawns error saying failed to enable bluetooth.
As a workaround in the meantime I am just completely disabling bluetooth. Not ideal, no but if you don't need it for other things, it works.
Here's what I use for disabling bluetooth: blueutil Link: https://github.com/toy/blueutil
(Disable): blueutil -p 0 (Enable): blueutil -p 1
--------Debug Info-------- Monterey 12.0.1 2018 MacBook Pro 15" Intel Core i7, 2.6 GHz 1 TB 16GB RAM
BluetoothConnector Version: 2.0.0
As a workaround in the meantime I am just completely disabling bluetooth. Not ideal, no but if you don't need it for other things, it works.
Here's what I use for disabling bluetooth: blueutil Link: https://github.com/toy/blueutil
Good tip there about blueutil, also I found something for you on their issues page - instead of disabling bluetooth you can use their disconnect function which I can confirm is working if you use the following syntax (replace 24-d0-df-85-28-62 with your device's MAC):
blueutil --disconnect '24-d0-df-85-28-62' --wait-disconnect '24-d0-df-85-28-62'
Hopefully this info may assist BluetoothConnector devs with a workaround for their tool also
Wow thanks for the tip! It works! I think I tried that a while back and must not have been doing it properly.
Ouch, same issue here. Hope a fix is discovered - use this all the time in Alfred...
edit: I made a small patch to fix compilation error, #21 but even compiling with latest tools (using M1 Mac Mini on 12.1 / Xcode 13.2.1) did not fix this issue. I looked at the code and can't see anything obviously wrong, so maybe just a bug in IOBluetooth
Didn't mean to close this issue. I could reproduce. Not sure what's causing the problem here though. IOBluetoothDevice
's closeConnection()
just doesn't seem to do what it's supposed to do (and returns kIOReturnSuccess
!)
What Bluetooth devices are you folks having issues with? Is it AirPods? I just tried with macOS 12.3 (the first beta, build 21E5196i) and after disconnecting with BluetoothConnector my AirPods would often reconnect. Once I disabled the AirPods' automatic connection feature, --disconnect
seems to work perfectly.
Might be because Apple fixed a but with Core Bluetooth in macOS 12.3, of it's an issue that only applies to AirPods and disabling the automatic connection fixes it (when "Connect to This Mac" is set to "When Last Connected to This Mac" in the Bluetooth settings).
in my case AirPods (Pro) yeah.
for me it was Logitech Z337 speakers
@lapfelix I double checked, but already had my AirPods set to only reconnect when last connected. Just re-tested on 12.2.
Okay that's good news then, it means 12.3 probably fixes the issue everyone's been encountering with disconnections.
I am now on 12.3 Beta (21E5196i) and blueutil was still experiencing the disconnect bug unless I passed the --wait-disconnect stuff as per the workaround, so possiblynot fixed by 12.3 as hoped.
I could test with bluetoothconnector but have run out of time for today
some people seem to have the issue still on 12.3.1. anybody here? works fine for me.
hi am on Monterey 12.5.1 (21G83) and needed the mentioned workaround or it wouldn't disconnect
On 12.6.1 no disconnect whether passing --notify or not.
The blueutil --disconnect --wait-disconnect is working.
on ventura 13.0 still doesn't work.
to toggle connection with bluetooth device i used automator, BluetoothConnector and blueutil.
blueutil's disconnect works
if i'm not wrong now in my case on 13.2 (but probably 13.1 too) nothing works anymore 😂️ connection or disconnection.
if i'm not wrong now in my case on 13.2 (but probably 13.1 too) nothing works anymore 😂️ connection or disconnection.
Blueutil was updated in January and (dis-)connecting works for me on 13.2.1 in case anybody is still looking for a (currently working) solution.
weird, i know. but it seems to be the case. whether passing the
--disconnect
flag or not. adding--notify
fixes it, but, well, notification.