views:

5574

answers:

3

I want to connect iphone to a printer via bluetooth, but I don't find any class about bluetooth in iPhone 3.0 SDK. Do I need to join "Made for iPod and Works with iPhone Licensing Program" to get the SDK? Or is it possible to do this without joining the program?

A: 

You might want to check into the GameKit. I just used it to connect two iPod's via bluetooth. Apple has done all the hard work and with just a few lines of code, you can have the iPod searching for bluetooth devices. If you do your own Wifi networking, you can even make the iPod/ iPhone search for the printer using either bluetooth or wifi relatively easy.

Josh Bradley
GameKit cannot be used for this. Bluetooth is available to developers via the ExternalAccessory framework, but all accessories require an Apple-specific chip. You can't just talk to any bluetooth device.
Nathan de Vries
Actually, it's my understanding that Bonjour has been enabled over Bluetooth in 3.0 in the same way that it is supported over WiFi. While GameKit is restricted to peer-to-peer communications between devices, it might be possible to discover the printer using lower-level Bonjour, if the printer has support for that.
Brad Larson
+1  A: 

Even if you join the MFi/WWi developer program, it's impossible to connect your iPhone to an arbitrary printer. The printer would need to built specifically for iPhone compatibility and incorporate an Apple-specific chip. The program is intended for device manufacturers to build iPod/iPhone specific devices, not for independent developers or device manufacturers with existing bluetooth products.

Nathan de Vries
A: 

"and incorporate an Apple-specific chip"

Rubbish! Bluetooth is Bluetooth is Bluetooth. What is needed is for proper Bluetooth support on the iPhone.

Apple (for whatever reason) has decided not to allow this. Since the SDK sandboxes applications from interacting with the hardware at this level, getting direct access to standard Bluetooth services is not possible without a jailbreak. Also, not all Bluetooth devices are created equal; there are many different versions, speeds, and protocols that devices may implement
rpetrich