views:

780

answers:

3

Is there somewhere I can find example code for listing bluetooth devices natively, as quickly as possible, in Mac OS X? (I'm assuming this will entail Objective-C)

I'm trying to write a very simple terminal app that will scan for bluetooth devices at regular (specified) intervals and list the bluetooth network addresses (the hex digits) for every bluetooth device within range.

I have no experience in Objective-C (though I have all the basics of C) but I'm imagining this shouldn't be extermely difficult - does anyone have any tutorials or sites they've found useful in the past, or even a piece of code that does exactly what I'm looking for??

+1  A: 

The following Mac Dev Center reference maybe of interest to you. It is a little in depth but does have code examples.

Introduction to Bluetooth Device Access Guide

Brandon Bodnár
I couldn't find any code for device discovery - I'm a little tired so I'll have a better look later. Thanks!
JP
You know what, you are correct. It mentions the BluetoothUI framework for device discovery, but no examples on how to use it. I will continue looking and edit this post with what I find, since I am now interested in how to do this. It is too early for research. :)
Brandon Bodnár
Did you manage to find anything? I'm still hunting around for a solution with no luck!
JP
A: 

Don't know of any sample code, but you'll want to use the IOBluetoothDeviceInquiry class from the IOBluetooth framework. The Bluetooth Device Access Guide has a brief section on it.

tedge
A: 

you can do this with Gamekit Api, and btstack frame work...

but it is a big challenge .

all the best..

if u get the out put .. pls post ur experience . i am also looking that one.

jaleel