tbnv Posted February 16, 2015 Share Posted February 16, 2015 Hi, Is there a way to have a workflow for connecting to Bluetooth devices? I have a Bose SoundLink Mini that I'd like my Mac to connect to, via Alfred. That would be much easier than via the Bluetooth menu. Thanks! Link to comment
rice.shawn Posted February 16, 2015 Share Posted February 16, 2015 It's actually really hard to to do. The only things that you can really do from the command line with bluetooth is to turn it on and off. You can do some UI scripting that will, essentially, actually, do all the clicking for you. You can look at this stackoverflow question to see some scripts. Link to comment
mixterdee Posted March 11, 2015 Share Posted March 11, 2015 This is something i have been looking for too. I have a bluetooth connect workflow, but being able to connect/disconnect to separate bluetooth devices would be great. Link to comment
rice.shawn Posted March 12, 2015 Share Posted March 12, 2015 Apple has a nice utility to do this with Wifi connections, but there is no utility to do it with bluetooth connections. You can list devices with the blued command, but it doesn't allow you to connect / disconnect. LightBlue is a python library for OS X to interact with bluetooth connections, but it was written for 10.8 and hasn't been updated in two years. Some people might be able to get it to compile on Yosemite by following the suggestions in this issue. I haven't tried to install it on Yosemite. As I mentioned in the previous post, you can do this with UI scripting, but UI scripting is awful and not necessarily reliable. But, from everything that I've read, it's the only way to get it done. Look, again, at my previous post for a link with a sample script that will do the UI scripting for you. But there is no elegant way to accomplish this with a script filter that would check the individual devices on your computer. Link to comment
jbilsten Posted April 25, 2016 Share Posted April 25, 2016 Would love to know if there's any update on the potential to create a 'connect/disconnect' script for Bluetooth devices. Link to comment
rice.shawn Posted April 25, 2016 Share Posted April 25, 2016 Would love to know if there's any update on the potential to create a 'connect/disconnect' script for Bluetooth devices. I've looked fairly extensively, and I know of no tools that let us interface with the bluetooth controllers at this level. If someone has a good grasp of C and can parse through the lower-level bluetooth libraries, then they might be able to write a compiled tool that could do such a thing. Getting it to work across multiple versions of iOS and distribution would be a pain. The skill set is not one that I possess. I wouldn't hold out much hope. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now