Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to disconnect a connection to a bluetooth device through an Applescript. Please note that I don't want to disable or enable bluetooth, I just want to disable one specific connection.

share|improve this question

Bluetooth functionality isn't made available through the Mac OS APIs (System Events being the chief one for things like this). You should be able to do this with GUI scripting (a great intro can be found on the Mac OS X automation site), but this is a really wonky way of doing it and is error-prone (unexpected dialog windows being the single biggest problem).

share|improve this answer

Not sure if this will work, my bluetooth has been b0rk3d for quite some time, but

man networksetup

You should be able to say something like

networksetup -getInfo <interface>

and then you could use the vast array of tragically randomly capitalized switches to work your will upon your bluetooth device, which should be a network interface.


You want to disable one connection, and one connection alone?

/sbin/ipfw -q add deny ip from <bluetooth interface> to [any|]
share|improve this answer
I don't think this is the correct way. I'm not talking about a bluetooth PAN or something like this. I refer to a simple bluetooth connection between a Human-Input Device (HID) and my Macbook. – the-kenny Feb 15 '11 at 7:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.