IPhone Bluetooth Connectivity to external hardware device over ATCommand or any other way

126 views Asked by At

I am working on bluetooth connectivity As I have to connect one hardware device (Like OBDii) but I don't know, how it is possible.

Hardware device(Which is attached to the vehicle) will send ATCommand and we need to have interpreted that command and device will display the full report to user related to that vehicle.

I quite aware that it is possible using android device but not sure about iphone. How it works and which framework will use for the same?

What specification/profile is required for that bluetooth hardware device ?

is that possible to communication with that ELD hardware device ?

2

There are 2 answers

4
Dario On

First of all you need to connect your Device via Bluetooth to the OBD. Apple Developer Bluetooth

When you have created the connection with another device (like obd) you can send and receive message (like Android i think).

The AT commands are for talk with the ELM327 and configure it:

AT SP 0 //Set protocol to AUTO

AT Z //Reset ELM and show version

etc etc

But for talk to the car you must use PIDs that are different to AT commands:

01 0C //Speed or rpm don't remember

01 0D //Speed or rpm

01 51 //Type of fuel

03 00 //show trouble code

Where 01 is Mode 1 (show real time data) and 03 is mode 3 (show pending trouble code)

Pids and mode

0
DrMickeyLauer On

On iOS, you will have to use a Bluetooth 4.0 compliant OBD2 adapter, as iOS does not support the serial Bluetooth 3 profile. The proper framework to use is CoreBluetooth, which is a pretty straightforward implementation of the Bluetooth 4.0 spec.