Communicate iOS with ODB 2 - ios

I need to create an app read info from the ODB2 device installed in a car and show the data to the user but in a "funny" way. So I need to read the data and connect the phone to internet simultaneously.
I found this questions:How to communicate with OBD II using bluetooth or wifi using iphone , but is from 2014, maybe now there is something.
I've been looking for an ODB2 device that can communicates with iOS via Bluetooth.
I found a couple of devices that can do the trick (like viecar or bluedriver), but using their own apps. Also, I found some devices that can talk with iOS via WiFi, but it would be annoying to be connecting your device to WiFi, then turning off WiFi and using mobile data again...
So my questions is:
Is it there any way to communicates via bluetooth with an ODB2 devices? Or better said, is it there any ODB2 device that can be used via Bluetooth with iOS?

Related

Connecting an iPhone app to a PC app via Bluetooth

I am currently researching the possibilities of connecting an iPhone app to a windows app via Bluetooth.
The Windows App is written in C# and uses Serial ports to transfer Data. Windows allow me to connect a serial port to Bluetooth. This setup allows communication via Serial over Bluetooth.
I know this setup works because I have managed to communicate with this setup from an Android phone.
I don't seem to be able to do the same with an iPhone 5s (I can't even seem to pair the iPhone to the Windows PC). I haven't been able to test this with a more recent iPhone, but I don't expect it to work either since it's an Apple device with a Windows machine.
I've done some research regarding the possibilities of connecting an iPhone to something else (like a PC) over Bluetooth, and it doesn't seem to be possible.
I have found this SO answer which seems to say that I cannot use Bluetooth Classic to connect an iPhone to a PC.
Since I can't seem to be able to use Bluetooth Classic, I have also tried to use BLE, but I haven't worked out how to simulate the PC as a "peripheral device" to connect to it from the iPhone. I don't even know if that's possible.
So basically my questions are:
1) Is it possible to communicate via Bluetooth between an iPhone and a PC?
2) Would it be possible to use some sort of adapter for the iPhone to connect to the PC (For example, an Arduino with a Bluetooth chip, acting as a BLE peripheral, and sending the data to the PC?)
3) What alternative would I have to this? I know WiFi might work, but I am uncertain if the PC running the app will be network enabled when the project goes live.
You can connect an iPhone with PC over Bluetooth using BLE.
I tried with Linux machine (Ubuntu 16.04 with BLE dongle 4.0) which acts as BLE Peripheral and iPhone 8 with BLE 5.0 as central application. Both could able to successfully communicate using custom GATT service that we developed. The throughput i observed here was 2.5 kiloBytes per sec.
If you are so specific on Windows to act as BLE Peripheral, then i believe there are apps available in Windows store to download which enables Windows PC to act as peripheral. Once peripheral mode is enabled, you can always communicate to this over BLE using iPhone [recommended latest phones]. But you need to try this out.

Use bluetooth in iOS application

I'm currently digging my through the nest of using Bluetooth in my iOS application and I find it quite hard to find the information I'm looking for.
Can I turn on Bluetooth from within my app or does the user have to do it manually?
Can I use the basic Bluetooth fetaures (such as Discovery, connecting and Sending Data) with other devices running Bluetooth < 4.0 (classic)
AFAIK CoreBluetooth Framework can only be used to communicate with devices running Bluetooth 4.0+. Which framework is used to communicate with Bluetooth < 4.0 devices?
Is it possible to use Bluetooth in such a way that Apple will reject my App on App Store? And which ways would that be?
Is there a difference between paired and unparied communication? Can one communicate with another device without being paried? Can pairing be initated from an app?
To give some Context to my question: I'm currently developing a part of a Home Automation Application where the App needs to communicate with an embedded device which does not yet have Wifi. It has not been decided which Bluetooth version will run on the embedded device. The same functionality will be implemented in an Android application.
Thankful for some input from some with Bluetooth experience for iOS.
you cannot turn on Bluetooth from your app. The user must do it using settings or the control center.
unless you device is MFi certified you can only communicate with Bluetooth Low Energy devices
the external accessory framework is used to communicate with MFi devices that use "classic" Bluetooth
I am not aware of any use of Core Bluetooth that will lead to app rejection. If your app supports an MFi accessory that isn't associated with your company then your app will be rejected.
you can initiate bonding (commonly known as pairing but it is actually different) by requiring encryption for an attribute. Once the bonding is complete there is no difference in how you transfer data, but the data will be encrypted over the air.

Does iOS Multipeer connectivity work with non-smartphone devices?

Our guys in the field use equipment that have wifi and Bluetooth connectivity. One of our users has been using a non-iPhone (I guess Android) to transfer files between his phone and the equipment through Bluetooth. However, in switching our users to iPhones to use other enterprise apps we have discovered what some of you already know: iOS's Bluetooth connectivity is severely limited (i.e. no SPP protocol).
The equipment also communicates via wifi, so I was wondering if it's possible to create an app using iOS Multipeer connectivity to solve the Bluetooth problem. All I am finding about this, though, doesn't show anything but phone-to-phone multipeer connections, and not phone-to-machine multipeer connections.
At this point I know nothing about how the field equipment works; that's something I'll have to learn if we decide to pursue this. But assuming that it is capable of discovering wifi networks, would it be able to see the iPhone's network without needing any special software?
Or would I be wasting my time trying to figure this out?
Thanks!
If the equipment is using Bluetooth SPP then unless it is MFi certified you can pretty much forget about connecting to it from iOS. Multipeer connectivity won't do it, that's for sure.
WiFi may be a possibility - you need to get the iPhone and the equipment on the same WiFi network - you can't do this via an app though - you would need to use the WiFi settings in iOS - You will need to learn more about the equipment to see if that is possible.
Short answer: no. Only iOS 7.0+ or MacOS Yosemite+
MultipeerConnectivity is a framework for iOS and Mac OS. To send data using it, you need both devices to have iOS or MacOS with MultipeerConnectivity. You don't have any network-related parameters like "I prefer using bluetooth or wi-fi", it was designed to "just work out of box with simple goal - discover and connect other devices with MultipeerConnectivity.
It means that you can't send data from iPhone with MC to Android or Symbian or old iPhone with iOS <7 etc.
Before iOS7 you could use GameKit, but the logic is the same: both peers need to use GameKit.
If your custom equipment does not have iOS - you need to use lower-level API, and your options include generic Bonjour (NSNetService on iOS device and something Bonjour-compatible on custom device) or CoreBluetooth (obviously bluetooth-only, no wi-fi peer-to-peer) on the lowest level, using sockets and so on.

Is there an API that lets one sync an iOS app with its OSX counterpart via USB?

I am developing an iOS app, which may need to sync a large amount of data with its OSX counterpart app, and for the use case in which the app would be used there may not be an internet connection available to connect either of the devices (iOS device & Mac).
Is there an official apple api that lets one sync data between an iOS app, and its OSX counterpart, without having to use the internet or iCloud ?
As far as I can tell, short of joining the MFI program, there isn't a way.
If you don't mind the user dragging some documents around, then you can create documents which can be accessed via iTunes: http://www.raywenderlich.com/1948/itunes-tutorial-for-ios-how-to-integrate-itunes-file-sharing-with-your-ios-app
What makes you think you need an Internet connection for WiFi?
If you are close enough for a USB cable, just create a WiFi network from the Mac (WiFi icon in the menu bar, "Create connection..."). Use bonjour to discover services, and then the apps can talk to each other.

ExternalAcessory Framework for iOS: using the iphone as a usb device

I'm looking into the iOS sdk for examples of the ExternalAccessory framework to use the iphone/ipad as an USB device that can be plugged into a PC or Mac and present as external device (like a midi controller or something else)
The App i want to create requires connecting to a host (PC or Mac) the iphone via USB or bluetooth and present to the host a functionality. How can i implement this?
You'll probably have an easier time connecting via WiFi. You need to be part of the Apple Made for iPhone program, which is not easy to get into, to use Bluetooth or the dock connector to talk to peripherals. There's no such restriction on the use of WiFi. Also, you'll find a lot more helpful examples of connecting via WiFi on the web.
CoreMIDI is the appropriate API for emulating a MIDI device, which may be possible over USB using Apples Camera Connection kit.

Resources