toy / blueutil

CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …
https://github.com/toy/blueutil
Other
969 stars 52 forks source link

How to add favorite? #81

Closed mattdee closed 2 months ago

mattdee commented 11 months ago

I attempt to add all my device to favorites with the following script:

for i in $(blueutil --paired | awk '{print $2}' | sed 's/,//g')                                                                                                                                                                                  
do
blueutil --add-favourite $i
blueutil --favourites
done

How do I add a device to favorites?

Thanks, Matt

toy commented 11 months ago

This doesn't change output of blueutil --favourites? Can you check contents of ~/Library/Preferences/ByHost/com.apple.Bluetooth.*.plist? There should be an array for key FavoriteDevices. Also given that favourite devices are not supported from GUI since some OS version, maybe they are not really working from some version.

m-graf commented 2 months ago

Not the OP – but I am also having this issue.

➞ blueutil --info 00-1f-20-27-7c-1a address: 00-1f-20-27-7c-1a, connected (master, -51 dBm), not favourite, paired, name: "Logitech MX Revolution Mouse", recent access date: 2024-05-08 18:01:43 +0000 ➞ blueutil --add-favourite 00-1f-20-27-7c-1a ➞ blueutil --favourites

toy commented 2 months ago

@mattdee @m-graf Unfortunately the favourites logic is apparently deprecated and is not working since some version of osx (probably Monterey), I've documented it in the tool in v2.10.0