10

I am working on a major product release for my company. We are designing a new device that we would like to integrate into an iOS app. (FYI, we have recently been accepted into the Apple MFi program so we are past that step.)

What we desire is to create a hardware/software eco-system where our users can start our iPad app (yes, it is specific to the iPad and the not iPhone or iPod Touch devices) and the application will automatically discover and link up with any close-proximity hardware that we've developed.

This means that I will need to implement some form of device connection process on both the iPad and within the hardware.

Is there any way to code automatic connectivity to a Bluetooth device from within an iOS application?

I am aware of the Core Bluetooth Framework which has this capability, however, it only works with the new iPhone 4S. That's not an option.

I've also researched about the External Accessory Framework, which can be used to connect to external devices whether they are connected via the iPod port or Bluetooth. This is an option but, if my understanding is correct, our hardware must already be paired with iPad before the iOS software can connect to it. This is less than preferable because although many of our devices may not be in immediate vicinity at one point in time, our customers could potentially own 100's devices that they may desire to connect to with our software.

What are my reasonable options or alternatives? The end goal is to provide a very easy means for our users to be able to connect to our devices, from within our software, on an iPad.

NOTE: I MUST NOT jailbreak the iPad or break any Apple TOS agreements.

UPDATE (3-7-2012) I saw today that the 'New iPad' (as it is being officially called) will be Bluetooth 4.0 capable. I assume this means that this iPad device will be able to use the Core Bluetooth Framework. This doesn't immediately solve my problem because we do want remain compatible with at least the "last generation" iPad device, but this is worth pointing out for others who may be looking for such an answer.

RLH
  • 15,230
  • 22
  • 98
  • 182
  • I wonder if you'll get any replies, as all of this is (as usually) under NDA terms. And for the "Made for iPad" logo: this reminds ne of the old Intel 486 cpu's with an imprint "Compatible with Windows" :-) – ott-- Feb 03 '12 at 21:07
  • Yes, practically everything you can do to develop hardware for an iOS device is covered under an NDA. However, in this case I'm talking about communicating with a device from iOS. I would imagine that there may be options which can be discussed because the software written for an iOS device is not covered under the MFi agreements since they are strictly related to the development of the hardware. – RLH Feb 03 '12 at 21:19
  • I slightly modified this question so that it's clear that I'm not looking for answers of how to do this from the hardware side. My question is specific to iOS software connectivity options. What can I do from within my iOS project to easily connect to Bluetooth hardware that I can control. – RLH Feb 06 '12 at 17:09
  • I thought bluetooth devices always had to be paired; like PS3 controllers and hands-free headsets. – Almo Feb 08 '12 at 13:53
  • @Almo- Yes, that is correct, but to pair a BT device with an iOS device, you must go to the Settings->General->Bluetooth screen, search for the device and tap on it to initiate the connection. Assuming full control of the connectivity software and hardware, you could automate this entire process. I am looking for the simplest and easiest way to do this so that this process is the most "hassle free" for our customers, since they may have to do this quite often, especially across multiple iOS devices. This ability is available on the iPhone 4S with Bluetooth LE devices. – RLH Feb 08 '12 at 14:04

2 Answers2

1

One of your alternatives would be going WiFi (AdHoc or Infrastructure) with Bonjour. For example you would be able to detect the device nearby (if it is maintaining it's own AdHoc then by SSID; if it's in infrastructure network then by service being announced). One big drawback would be that you couldn't connect directly (from app) to the device's network - user would have to do it manually.

As for BT: big drawback is lack of a serial protocol (not implemented in iPhone/iPod/iPad).

Rok Jarc
  • 18,765
  • 9
  • 69
  • 124
  • We need this Bluetooth mechanism as a secondary means of communication for various reasons. The hardware that we develop can connect to a local network and, in fact, our current product version does. However, not all customers have the ability to network their devices due to physical, location constraints (WiFi or hardwired.) Also, this app will have a super-user mode for our support technicians. They will also use this app, or similar one, to connect to our devices, troubleshoot any problems. From experience, our techs need the simplest means possible to connect to these devices. – RLH Feb 09 '12 at 19:59
  • A, ok. When you were asking about alternatives i didn't see that it has to be BT. The problem with iOS devices is that they support (at best) only HFP 1.5,PBAP,A2DP,AVRCP,PAN,HID profiles (http://support.apple.com/kb/HT3647)... this is as much as i can say without breaching NDA – Rok Jarc Feb 09 '12 at 20:12
  • you could make a device discoverable via BT and then go for BT audio modem (and an in-code-modem on the iOS side) but this is like reinventing the wheel – Rok Jarc Feb 09 '12 at 20:14
  • other option that pops into mind is (since you're already a member of MFi) is to develop a dongle for iPad. but you're probably trying to avoid this option – Rok Jarc Feb 09 '12 at 20:20
  • Yes, the dongle is also less than preferable. Imagine, our devices could be in locked closets or even in ceilings, behind acoustic tiles. They will all be accessible, but part of the benefit of bluetooth for us is that you don't have to be able to touch the device. – RLH Feb 09 '12 at 20:28
  • You mentioned an in-code-modem. This may be hard to implement, but if it solves the problem, I'd like to know more. I have no clue about what you're talking about. Would you happen to have any further information? – RLH Feb 09 '12 at 20:29
  • I never had the time to really dig into this. But what i ment is a BT audio substitute for Serial Port Profile: on hardware side you deal with audio signals from BT module (FSK or similiar modem) - on iOS side you do the same but in code.... As for dongle it's not neccessary that you have to connect to your device by wire. Dongle would be physically connected to iPad and wirelessly (could be BT SPP) to your device. Don't forget: any locked (metal, grouded or not) closets are out of the question for any kind of RF. – Rok Jarc Feb 09 '12 at 20:46
  • "Dongle would be physically connected to iPad and wirelessly (could be BT SPP) to your device." Good point. I'll have to see if that is an option, but that might I am skeptic. As always, hardware cost is very important too. If an external BT module for the iPad cost to much (and I'm guessing it will) then that will be scrapped. Ultimately, this questions is a bit of a "hail-mary". We want this to be dead simple, but if we must instruct our customers to go to the bloody settings screen to pair their iPads with their devices, then that's what we will do. It is a bit of a nuisance. – RLH Feb 09 '12 at 21:03
  • It's time to start a petition for Apple to implement BT serial port profile :) – Rok Jarc Feb 09 '12 at 21:16
1

You cannot connect an iOS device to a bluetooth device without pairing first. It is purposely built that way by Apple to reduce the likelihood that someone could connect a bluetooth device without the user knowing about it. If pairing each device is unacceptable (and it sounds like it is), and you don't want to develop a dongle, the only remaining path I can see is to make your devices capable of relaying data between them like a mesh network. That way the user would only have to pair with a single device, and that paired unit would relay communications between the other devices and the iPad.

RyanR
  • 7,728
  • 1
  • 25
  • 39