mobilebluetoothmarmalade

How to use bluetooth in Marmalade SDK?


I'm writing a mobile application on Marmalade SDK. How can I connect to other device via bluetooth?


Solution

  • https://answers.madewithmarmalade.com/questions/7285/bluetooth-support.html

    No, Marmalade doesn't have a Bluetooth API. However, you could write an extension to do it.

    iOS has a CoreBluetooth API that allows you to interact with devices supporting the Bluetooth 4 Low Energy GATT profile - this is only supported from iOS 5/iPhone 4S/iPad3 and up, and will only interoperate with Bluetooth 4 LE capable peripherals exposing a GATT service. For earlier iOS devices, the only option is to use Apple's proprietary iAP protocol, which means you can't "talk" to generic Bluetooth devices - only those that implement iAP.

    Android on the other hand offers Bluetooth 2.x + EDR connectivity. A number of profiles (e.g. RFCOMM, A2DP) are supported. However, Android doesn't have an API for Bluetooth 4 LE yet.

    So, currently, the situation, from a cross-platform point of view, is quite fragmented and it isn't straightforward to implement a one-size-fits all Bluetooth connectivity solution.