PDA

View Full Version : Access to hardware & drivers without Objective-C?




cossie
Aug 27, 2007, 04:09 AM
Hi,

I'm interested in writing some simple applications that will let me control the bluetooth hardware in my MBP so I can communicate with software I wrote on my mobile phone.

I've seen a few tutorials and some examples of other people's projects that are all written using Obj-C. I'm not sure if I really want to spend the time learning Obj-C (I'll probably spend time with the basics) so I'm was wondering if it's possible to still access hardware / drivers using C or C++, as I've a few years experience with both.

Thanks,

Anthony



garethlewis2
Aug 27, 2007, 08:58 AM
I can guarantee you that the actual code that those examples are calling are written in C. They are most likely the Cocoa layer. There will be a much nastier lower layer written in C for the OS developers to use. Apart from that I cannot tell you where to start looking.

kainjow
Aug 27, 2007, 10:25 AM
The only reason the examples are written in Objective-C is because it is faster to whip up a simple GUI. But often a lot of Apple's examples use Carbon. Hardware access is through IOKit which is all C-based, so you can use it just fine in a Carbon app (or through a standard CLI app).

cossie
Aug 27, 2007, 05:22 PM
The only reason the examples are written in Objective-C is because it is faster to whip up a simple GUI. But often a lot of Apple's examples use Carbon. Hardware access is through IOKit which is all C-based, so you can use it just fine in a Carbon app (or through a standard CLI app).

CLI = Command Line Interface, right?

Thanks for the replies.

I'll start getting familiar with the IOKit and the developer notes for Bluetooth.