Oscar McDonald
Oscar McDonald

Reputation: 55

How to get device Bluetooth address on OS X?

I've looked over the IOBluetooth framework what feels like a dozen times, but I can't for the life of me find a way to retrieve the Bluetooth device address for the current device. I've written an application that scans for devices in range utilizing IOBluetoothDeviceInquiry, but this doesn't seem to offer up the address of the device doing the scanning.

How might this be accomplished programatically? (Without opening up System Profiler)

Upvotes: 4

Views: 1937

Answers (1)

LaC
LaC

Reputation: 12824

[[IOBluetoothHostController defaultController] addressAsString]

or getAddress: if you want a BluetoothDeviceAddress.

Upvotes: 7

Related Questions