Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an ELM327 / obdkey OBD-II adapter Objective-C programming guide?

I'd like to start coding against an ELM327 based automotive OBD-II Bluetooth adapter in iOS/Objective-C. Is there a guide/primer on how to get started?

I would imagine the ELM327 adapter is a serial device... I can probably figure out how to establish a Bluetooth connection with the phone, but I haven't any idea where to start with sending/receiving OBD-II messages to/from it.

Is there a pre-existing API for this device?

like image 438
NoCarrier Avatar asked Mar 22 '11 21:03

NoCarrier


1 Answers

If you need some OBDKey specific commands let me know. As an example, to access the RPM data, issue the following commands

ATZ\r
ATSP0\r
0100\r
010C\r

These instructions will initialise the OBDKey interface, set the protocol search on to automatic, initialise communcations with the engine managment ECU and send the mode 1 PID 0C command to request engine speed (RPM) data. The value returned in response to the 010C command is actually four time the real engine speed value.

Using sockets and streams in iOS / Objective-C is the best way to set up communications to the OBDKey WLAN (the default IP address is 192.168.0.74, port 23).

like image 67
obdkey Avatar answered Oct 18 '22 21:10

obdkey