Windows bluetooth integration

Can be supported in C using sockets and native libraries
Bluetooth support is relatively easy to add.

1. Include "Ws2bth.h"
2. Modify socket calls in SocketLayer.cpp, refer to http://msdn.microsoft.com/en-us/library/aa362928%28v=vs.85%29.aspx
3. Source example
4. There is also an API from Broadcom for Windows although I'm not sure what the difference is between that and the native Windows system calls.

Linux bluetooth integration

Can be supported in C using the BlueZ library Linux uses the BlueZ library to interface with Bluetooth devices. There is a great resource on BlueZ here: http://people.csail.mit.edu/albert/bluez-intro/.

Mac bluetooth integration

Indirectly send through IOBluetoothL2CAPChannelRef?
Mac Bluetooth support is supported through the IOBluetooth library, written in Objective-C. C equivalents are available by suffixing Ref to the name, for example IOBluetoothObjectRef contains the interface in C. You are expected to create instances of IOBluetoothL2CAPChannel which represent a communication channel. L2CAP is an unreliable communications channel. The equivalent reliable communications channel uses RFCOMM The full framework of methods It doesn't appear to be possible to get direct socket access to Bluetooth on the Mac. However, it may be possible to use RakNet and IOBluetoothL2CAPChannel together by using RakNet's SocketLayer::SetSocketLayerOverride(), and thereby changing RakNet's sendto and recvfrom calls to use IOBluetoothL2CAPChannel instead.

iPhone bluetooth integration

Bluetooth exposed through Gamekit The only interface for Bluetooth communications is through the higher level framework GameKit. Gamekit uses Objective-C. Similar to the Mac, it may be possible to indirectly send through RakNet using SocketLayer::SetSocketLayerOverride() through the sendData:toPeers method exposed by GKSession, and sending that data unreliabily.

Android bluetooth integration

BlueZ used for underlying support, however not accessible to implementation

- Android uses BlueZ (w/ l2cap, etc.) as the underlying Bluetooth API (at the Linux OS level, underneath the Android Dalvik VM). All of the Android SDK (Java) Bluetooth classes end up using this API. The Android NDK cross-compiler provides access to many of the Android system's underlying libraries. However, Bluetooth does NOT appear to be exposed by the NDK. I.e.: The NDK's headers do not include Bluetooth-specific headers, tokens, etc. (I performed a find-in-files on the NDK headers and other files for various Bluetooth related/specific tokens like: BTPROTO_RFCOMM, l2cap, etc.)
- For a list of supported native libraries, see: http://developer.android.com/sdk/ndk/overview.html
- There is indication in the forums and stackoverflow that Bluetooth cannot be accessed directly via the NDK (see: http://groups.google.com/group/android-ndk/browse_thread/thread/bd0834426b4264b9 and http://groups.google.com/group/android-ndk/browse_thread/thread/a2e3b5133f4a7a4b and http://groups.google.com/group/android-ndk/msg/fe9b846a7ee37ba5 and accepted answer at http://stackoverflow.com/questions/4205468/create-an-android-rfcomm-socket-without-any-input-from-the-user-how)
- It looks like Bluetooth support via the NDK was possible at one point via a hack involving the HTC released BlueZ sources: http://blog.blackwhale.at/2009/08/android-bluetooth-on-steroids-with-the-ndk-and-bluez/
- A possible work around is to use the Android SDK's Java Bluetooth libraries for discovery, establishing connections, etc. and delegating the actual communications streams to RakNet by passing the in/out streams to RakNet via a JNI bridge.

See Also

Index Autopatcher CloudComputing ConnectionGraph2 CrashReporter ReplicaManager3 FullyConnectedMesh2 NATPunchthrough PacketLogger ReadyEvent RPC3 TeamBalancer SQLite3LoggerPlugin