Third party devices with ios8 HomeKit Support? - ios8

I already have an home automation ios app. I can able to control devices that are configured in my home. I can able to access my device via local and remote network.
I just read apple's new ios8 HomeKit support. I want to integrate HomeKit compatibility into my app.I heard HAP(Home Accessory protocol) supported devices can only able to communicate with HomeKit Framework. Also apple said there is a bridge for third party devices to communicate with HomeKit. There is not much information about hardware protocols or procedures, how to use bridge between third party device and HomeKit ?
Is my HomeKit bridge is a real hardware?
Also i have doubts on communicating with configured accessories. Because apple HomeKit Framework have commands like "startExecutingActionSet" to perform one or multiple task , but how this commands works with our Existing commands protocols defined in ios app.
I am new to hardware engineering . So please give me a simple example of communication between apple's homekit via bridge with my Hardware device.
Thanks in advance...

A HomeKit bridge is a piece of hardware that receives HK style commands from an iDevice and translated them into the specific protocol for the target devices in your home. Phillips Hue have one of these. Apple have a protocol that the hardware manufacturers need to conform to and you need to be signed up to their MFi program to get that protocol. However someone seems to have reverse engineered the specs and you can use their code to write your own software bridge. That's what I'm doing.
In HomeKit you do not talk directly to the devices. That's pretty much the main point of HomeKit. So that each developer doesn't need to know each device's specific protocol you just trigger iOS to do the talking for a predefined action. I believe you can also add triggers and action sets by building up a group of actions that you want to happen and firing of the event. E.g. Turn off all accessories in the garage when I go inside. You don't need to know how to turn off each one, you just tell iOS to run the Off command on each device and it knows the rest. Or at least it does for the ones that have signed up to the MFi program and can listen to HomeKit commands.

Related

How to Develop iPhone/iPad Accessories

I want to create hardware accessory for iPhone and iPad but there is very less resources out there. I am not a programmer or engineer. My concept is very simple building a number pad connected through lightning cable. It will have 6x4 keys layout, in this 4 keys can be customize as per need means key a will work as copy(command+c)key b will work as paste(command+v) this keys can be customised in diffrent kind of shortcuts. I dont want a blueetoth connectivity.
Do I need a arduino or raspberry pi kind of device to program and test run a functional prototype?
What kind of cable do I need to sue to communicate with the device?
What kind of programming langauge do i need to learn?
Do I need to first register for Mfi program or I can do it after I develop the product?
As far as I'm aware, you'll need to join MFI for developing Lightning accessories.
However, you don't need Apple's permission for designing and building your own Bluetooth LE (Bluetooth 4.0) accessories. You should be able to do what you want by programming a Bluetooth LE capable microcontroller to act as a HID device that sends the key events you want. I've not done this specific type of project myself and I'm far from an expert on embedded stuff, but Adafruit have a bunch of resources and development boards on Bluetooth LE using Arduinos and other dev boards. I believe they even have something that already acts as a HID device. I'd start researching in that direction.
Another option is to program a microcontroller to act as a standard USB HID keyboard device, and plug that into the iDevice using the Lightning to USB Camera adapter. iPads recognise standard USB keyboards without needing MFI approval, but you do need to use Apple's adapter. Note that the adapter allows the USB device to draw very little power (50mA I think) so it will not work with any device that requires more. The USB3 version of the adapter has an extra power input and so allows you to attach a USB device that draws more than that.

Connect with moto 360 without android wear app

I am trying to develop basic applications on my moto 360 (synchronizing messages and notifications, sending sensors data..) connected with a mobile phone. My problem is that I wish not to install android wear application on the mobile phone and I would like to know if there is a way not to do so.
Thank you for your help !
It's probably possible, but it's actively discouraged. From the Wear communication API docs:
Warning: Because these APIs are designed for communication between handhelds and wearables, these are the only APIs you should use to set up communication between these devices. For instance, don't try to open low-level sockets to create a communication channel.
Given that a Wear device runs (nearly) full Android, I expect it's possible to roll your own communications layer using low-level Bluetooth, Wifi, or some such. But the correct answer is "Don't".
I will try to be as specific as possible here :
You mentioned that you don't want to install the Android Wear application on you mobile. If this is the case, then your watch still needs to be paired with some phone if its running AW < 2 [which Moto 360 is, for now]. Without this, you will not be able to get the watch out of factory mode (unless you flash it with an already paired watch' data). Even then, it will not communicate with the phone since it's not paired with it.
If instead, your question was about opening up a low-level bluetooth socket with a mobile phone, or any bluetooth enabled device in general (atleast those that implement RFCOMM functionality), then yes, this is still possible, as long as you can sideload apps to your watch. In order to do this, you have to implement a BluetoothServerSocket or a BluetoothSocket, depending if you want your watch to be a client or a server. In either case, you can open a two-way communication socket, with throughput upto 50KBps, in real world scenarios.

Is Serial Port Profile (SPP) supported on iOS 7 over Bluetooth Low Energy (v4.0)?

Can I use Serial Port Profile (SPP) to communicate with iOS devices over Bluetooth Low Energy (v4.0) without the need for MFi Chip?
If you're designing something from scratch (rather than trying to interface to an existing SPP-enabled device), there is a possible solution.
Laird Technologies make a Bluetooth Low Energy Module (BL600), which can be loaded with a virtual serial port application. This creates a service which is similar to the SPP; at the remote end it can just be treated as a plain serial port (albeit rather low speed). You could roll your own service to do something similar on other devices.
It's not the most elegant solution, but seems to work okay, and far easier than trying to get MFi certification.
If you cannot control the peripheral's protocol choice:
The Serial Port Profile (SPP) is still supported by Bluetooth 4.0. However, Bluetooth 4.0 Low Energy uses different pysical and link layer protocols that are not backwards compatible with older Bluetooth standards. Current iOS and Android devices use "dual mode" interfaces that support the backward compatible part of BT 4.0 and the Low Energy standard.
Bluetooth 4.0 Low Energy does not support SPP whereas regular Bluetooth 4.0 does!
I found a Cordova/Phonegap Plugin on GitHub that might serve as a source of inspiration for you. They advertise to support SPP on iOS and Android alike.
If you are in control of the peripheral, i.e. you implement the peripheral's software:
Bluetooth 4.0 Low Energy communication makes use of the Generic ATTribute Protocol. Based on GATT there exist a number of profiles but no serial port profile.
The good news is that implementing your own proprietary serial port profile on iOS, Android and your device is fairly simple. The API instructions for your BTLE module/SoC should provide some examples for existing profiles.
As soon as you see how simple implementing your own profile is, you will probably choose to go for a more use case specific profile which will save you lots of power on your (battery powered?) peripheral.
Just to clear up John Parsons comment from Feb 16th - the BL600 is definitely not discontinued whatsoever.
vSP works well for a low level, low throughput data connectivity using BLE for iOS devices, as well as Android. Video showing the solution working to an iPad are at this link and full source code is available for the iOS application as well http://www.lairdtech.com/Support-Center/Technical-Library/Videos/VSP-Bridge-Command/#.UwYvzGJ_s1w
There are no MFi requirements for BLE connectivity on iOS.
MFi is only relevant to Classic Bluetooth data connections to / from iOS devices, where you need to use Apple's iAP protocol, be a MFi licensee, use an external Apple Authentication IC and pay a royalty to Apple.
NO,you can't. BLE not support SPP.
No, you can't. In general, it's important to remember that any Bluetooth Classic profile isn't necessarily applicable for Bluetooth Low Energy. With BLE however, you can easily create your own custom service/profile, specially tailored towards your particular application. As far as I know, all BLE communication with iOS is currently allowed without participating in the MFi. You can also take a look at this page for further information on SPP and BLE.
I'm searching for SPP for iOS myself and found a German supplier, lintech.de, that has products for "Bluetooth meets Apple" claiming to support/emulate SSP, apparently using their own embedded software layer combined with iAP. "BlueMFI software communicate with APPLE devices using the iAP (iPod Accessory Protocol) and manage the data communication with the Apple authentication chip...BlueMFI software is designed to run on a variety of hardware platforms (Bluetooth modules), and interested users can obtain the relevant evaluation kits. LinTech’s Bluetooth modules with BlueMFI software not only support the APPLE iAP protocol via Bluetooth, but they are also able to communicate with standard Bluetooth devices." Haven't tried this yet, just exploring and sharing.
I won't say SPP is directly supported under iOS 7, Apple says no. Won't argue :)
But...
I use connectblue modules OBS421 and OBS425 on a data collection project.
BLE modules have SPP profile enabled and I transmit data from my sensors to the iOS devices using BTLE module in SPP mode.
Works pretty fine under iOS 6 and 7
That said, I was having trouble with MFi bluetooth devices under iPhone 5S, that's why I moved to BTLE.
Drawback with BTLE, it's limited to 20 bytes at a time.
I had to adjust hardware and software, but was easy.
You have programmable chips such as Bluegiga BL112 that are doing the job. It is the cable replacement code.
I'm integrating it actually for both iOS and Android 4.3. It works at least on the demo board.

Windows Phone 7 External Communication

From what I've read online in forums and blogs, Windows Phone 7 has no support for bluetooth serial. There also does not seem to be any support for communication with accessories through USB. Can someone give me a definitive answer as to whether or not Windows Phone 7 can do any sort of command and control for external accessories? I've used bluetooth serial on Android as well as the iOS external accessory framework. I would imagine there would be some level of support for external accessory communication in the Windows Phone 7 platform.
I can confirm that there is no Bluetooth/External Accessory API exposed as part of the SDK. There may be a private API available to select parties (though I'm not familiar with any apps that do so), so it might be worth contacting Microsoft.
Keep in mind that, even if you find a private/internal API you won't be able to call it (even via reflection) and it would be caught during the certification process anyway.
If it's not possible to communicate with the accessory via Sockets/HTTP then I'm afraid you're out of luck for now.

Printing to a bluetooth printer using iPhone

I wasn't able to find a clean answer on this, is there or is there not a way to connect my iPhone to a bluetooth printer to execute some printing tasks?
I'm developing the app myself, so what framework could possibly do this? i read that Apple's External Accessory Framework handles bluetooth communication, but is it possible to print using that framework?
Thanks!
Since this question is 2 years old, things change and this was the first result for what I was looking for I decided to submit this answer after some "research".
From the SAME Apple Technical Q&A
Note: Bluetooth low energy accessories do not interface with the
External Accessory framework and are not required to be MFi compliant.
Instead, apps use the CoreBluetooth framework to communicate with
Bluetooth low energy accessories from iOS or OS X.
So, it may have not been possible 2 years ago, but it is possible now.
Edit: As the accepted answer points out, things are different since I posted this answer in 2010. The answer is left for posterity.
From an Apple Technical Q&A:
The External Accessory framework is designed to allow iPhone OS applications to communicate only with hardware accessories that are developed under Apple's Made For iPod (MFi) and Works With iPhone licensee program. MFi compliant accessories can be implemented as wired devices, meaning they plug in to the iPhone or iPod touch's 30-pin connector, or as wireless devices, whereby they use Bluetooth as the communication channel. Either way, an application that uses the External Accessory framework will not be notified of an accessory's presence unless the accessory identifies itself as being MFi compliant, i.e., it was specifically designed to interface with an iPhone OS application.
More information about developing MFi accessories can be found here.

Resources