Mac Bluetooth programming question.

PinkyMacGodess

macrumors 601
Original poster
Mar 7, 2007
4,405
1,162
Midwest America.
I'm getting back into programming after taking way too long off.

I have this great idea for an app for OSx, but can't get past the first part. Using XCode, I have code that compiles on a peecee, but can't find the required header files, nor any documentation on what are the right alternatives for this OS.

It's looking for

C:
#include <bluetooth/RFCOMM.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
#include <bluetooth/sco.h>
Which sequentially bombs out. I was able to get bluetooth.h to work using iobluetooth.h (at least the header file is there), but after looking in the include directories, have struck out on anything remotely like the files I am looking for. Not even out of the gate, and I can't even get the sample code to compile. Maybe I'm out of my pay grade, but I'm just trying to see if I can get the OS to even see any Bluetooth devices, and will build on that later.

Is there some documentation on Bluetooth that I can't find? Apple's own samples are horrible btw.

Thanks for any light shed on this issue.
 

PinkyMacGodess

macrumors 601
Original poster
Mar 7, 2007
4,405
1,162
Midwest America.
Mac sdks for Bluetooth are completely different from windows.
See https://developer.apple.com/documentation/corebluetooth
I knew there would be issues. There always are. Maybe I should have made that clearer. I was looking for some idea on where to look for the info. I have googled my fingers raw, and haven't come up with anything much. I don't have a PC to do this on, so...

Thank you for the link. I hadn't actually seen that one. I've seen so many other pages in their developer site, but not that one. Much appreciated.

Oh, footnote: I did get the heart rate monitor sample code to compile. It uses Cocoa, and wants BTLE capability that my main development system doesn't support. I'm looking for a dongle, or will need to switch to my MacBook. Cheers...