Bluetooth Low Energy with iOS 6 - ios6

I'm trying to make a new app that talks to a bluetooth low energy chip. I have never played around with bluetooth or BLE before, so I'm trying to learn as much as I can about it. I know that I have to implement Apple's Core Bluetooth framework, and from there I have a few very basic questions.
Is the code for writing apps with classic bluetooth the same as apps with BLE, or are they different?
What's the deal with AT commands, I tried reading a bit into it but are those something I have to mix with Objective-C while making a call to the device?
Central and peripheral. I noticed that when you are making two devices talk to each other, one has to be central and one peripheral. Lets say I make an app that turns on a light via a bluetooth low energy chip. Would the iPhone be the peripheral, and the chip / light be the central?

Bluetooth "classic" and Bluetooth Low Energy don't work the same way. Bluetooth Low Energy works with Peripheral->Service(s)->Characteristic(s) (it's like a tree)...
There are a few videos at the WWDC 2012 session (from the Portal iOS Developers) dealing with Bluetooth Low Energy and the CoreBluetooth.framework.
There is also sample code (CoreBluetooth Temperature Sensor) from Apple.
Apps to play with and free : LightBlue & BLE Utility, which can convert them into Peripheral/Central and interact...

Related

Communicating with a Bluetooth device from UEFI code

Is it possible to communicate with a mobile device supporting Bluetooth LE from UEFI of a system? UEFI specification 2.6 adds support for Bluetooth but I dont see any new laptops supporting it and also the specification doesnt say anything about Bluetooth LE.
This feature is possible. However, its not related to UEFI Mode but this feature has to be embedded into the bluetooth chip itself. This feature is generally known as Headless mode of Bluetooth Chip.
The Bluetooth chips contain two firmwares. One firmware for general BT functionality and the other firmware contain a lite Bluetooth stack which contain a very cut down version of Bluetooth stack which can support BLE feature. So, when your laptop either gets shutdown or goes to sleep, your BT chip goes into headless mode and start advertising itself to other BLE device. Other ble device like mobile can see this and can connect to it and start your laptop.
This feature is however, not present in any laptop known to me. But you find a good example of this in Samsung's smart TV. You can switch on your TV from samsung mobile using ble.

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?
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.

Connecting an Adobe AIR mobile app to Arduino wirelessly - what are the options?

Is there a way to connect an Adobe AIR mobile app to an Arduino hardware wirelessly with no pc or router?
either with bluetooth or directly to an Xbee piece connected to the Arduino?
I need both iOS and android solutions
thanx
You could use the Native Extensions for Adobe AIR (ANE) for iOS and Android, although it means you might have to do a bit of C coding (or at least have basic understanding of the C programming language). A couple of projects have been created for either Bluetooth or Arduino connection using ANE already.
There is an ANE based project called as3-arduino-connector on Google Code, which gives you an ActionScript 3 API and mimics the Arduino serial port.
Another useful project might be AirNativeiOS-Bluetooth, an AIR Native Extension to add Bluetooth support for iOS apps. A corresponding project for Android is Bluetooth ANE, although the website mentions that it's early beta only, not ready for production.
Digi International has a Wi-Fi XBee now; that might be a good option since Android and iOS devices have Wi-Fi already. The more commonly used XBee modules (Series 1 and 2) use 802.15.4 networking (instead of Wi-Fi's 802.11).
I haven't used one yet, personally, so I don't know how you access the serial port connected to the Arduino. It might be possible to telnet to the XBee and send/receive data from Arduino.

Arduino computer mouse/input device

I have successfully talked to the computer from an Arduino via serial USB port and I had the idea that I could make a keyboard or mouse with the arduino. Say I wanted to translate the computer's mouse 1 pixel to the left. What message would I have to send over the serial line in order to achieve this?
Google is a wonderful thing. "use arduino as mouse" returns 1.7 million hits. The third hit on the list takes you to the Arduino Playground for an example using the new Leonardo board.
Note:
The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
Assuming you don't have that board, here is another site for some other specific boards and yet another that is log for a project including hardware and software for older boards.
Hope this helps (and is a better answer to the question).
You would have to reconfigure the USB interface chip to appear as a USB HID endpoint.

Connect Bluetooth device to an unknown device

Is it possible to connect a Bluetooth device to an unknown device? I thought all Bluetooth devices had to be paired with another Bluetooth device before they could be used together. Someone mentioned a possible application where a Bluetooth device (most likely a Windows Mobile phone as the iPhone SDK doesn't support Bluetooth connections) can be used to say read electric meters in a given area. I thought the phone would have to be paired with each meter before any other communication could take place. Is this correct? Can the phone receive arbitrary data from a Bluetooth provider before they are paired?
You don't have to have security set up (no pin code) so you could have a bluetooth device that is always discoverable and will always connect/pair. So this could be used for the 'read a meter' type application.
Also, in Bluetooth 2.1, you have Extended Inquiry data so you could get the meter reading by having the meter encode the reading into the Extended Inquiry response. Then you don't even have to connect/pair. Just have a device that does an inquiry and gets the data that way.
There are some new standards coming for BlueTooth for Low Energy devices that would basically act like sensors, which are specifically targeted at this type of application.
There is more info then you could possibly want at www.bluetooth.org
If you know the MAC address of a bluetooth device and it is connectable you can talk to it directly.

Resources