How to Develop iPhone/iPad Accessories - xcode

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.

Related

Android Things and NFC

I'm running Android Things on a Raspberry Pi 3 Model B. I want to read NFC Tags, is it possible to do this? I've got like zero hardware knowledge about this stuff. All I know is how to write the necessary code.
A Raspberry Pi (or the other Dev kit) does not have NFC hardware. If you want to read NFC tags you need to get some hardware.
In addition to that, there is not user space driver for NFC, so you'd need to read it using a driver.
I only know of 2 chips that are sort of supported, both drivers are very limited. In fact, the simplest way to get them to work is to plug then into an Arduino and then communicate with the Arduino either using UART or I2C.
The best supported chip is RC-522. It reads mifare, but not sure how many other formats. You have a driver ported from arduino here: http://github.com/Galarzaa90/android-things-rc522
One of the important limitations is that it does not support card emulation.
I've had success with the ACR122U running over USB. It supports Mifare.

Third party devices with ios8 HomeKit Support?

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.

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.

Accessing an Ethernet or USB port

Good Afternoon,
This post is to ask for ideas on which programming language for Windows Vista you would suggest for accessing raw data from an Ethernet port or a USB port. My strength is in micro-controllers. I have a project underway where the 32-bit micro-controller is the last processing device in a software defined radio. The micro has the capability to output digitized signals over a USB port or an Ethernet port. I would like to use the PC as a plotting tool to display the raw digitized sound as a waveform on the screen and possibly play the sound on the sound card output. Also, I will be creating FFT spectrum data, either in the 32-bit micro or in the PC, if the software is fast enough, for spectrum display on my laptop.
I have past experience with older VB. In my last project, I used a simple basic program (JustBasic) to send control data via a USB/RS232 device to a micro-controller. This interface is certainly not fast enough for this project. Additional future features would be to use the Ethernet or USB to control real time features i.e. filter frequencies, FFT size and sample rates in the micro-controller. Any help is appreciated.
Microsoft provides the Raw Input API to get data straight from a USB device. You could use C# to access the port (see here), or any other .NET language. You could also use C or C++ (see here).

Writing a windows driver for an emulated input device

My application needs to behave as a virtual joystick (imagine dragging a square with the mouse and translating that to the output of an analog joystick) and send some keystrokes over the network to another computer where the driver would receive that input.
I only need to support XP, Vista and Win7.
Maybe it can be done without writing a driver. I tried sending keystrokes with SendKey() which seemed to work but don't know how to emulate an analog joystick.
I've downloaded the VDK and been reading everything I can find on the subject but there are lots of things I still don't understand. Can you please point me in the right direction?
Should I build a kernel-mode or user-mode driver?
Can my driver act as a server for an app on the network?
Do you know good tutorials / books / samples that can help me with this.
Thanks
First of all you will have to have some kind of interface between your computer (or the network) and the joystick device that is being controlled.
If it involves making custom hardware to control the analog joystick (like it controls pneumatics or hydraulics or something, not just a pc game joystick type thing), then yes, you will almost certainly need a driver to allow a network app to move (the robot arm, or whatever) will move that joystick.
If you are able to remove the physical joystick from the equation, maybe you can write software that emulates the input of wherever the joystick used to plug into (a joystick/serial port?), or emulates it completely (a reasonably simple driver could do this). You could do it completely without writing a driver if the joystick used a standard communication interface (like RS232) because libraries exist that will handle all that and you can set up virtual COM ports that will be indistinguishable to whatever you are trying to communicate with.
The best book you can buy on driver development at the moment is Developing Drivers with the Windows Driver Foundation
Rootkits: Subverting the Windows Kernel is another great book, but doesn't cover a lot of the newer WDF stuff. It has more of a security focus but has a few awesome chapters on device drivers with fully spoonfed examples, breaking it down in a really accessible way.
If it is only over the network, probably simple socket programming should be enough.

Resources