How to initialize and read OBD-II data over bluetooth?

Inquiry and support for Freematics products
Post Reply
dgobaud
Posts: 5
Joined: Sat Aug 01, 2015 3:09 pm

How to initialize and read OBD-II data over bluetooth?

Post by dgobaud »

Hi, I'm connecting to the data logger over bluetooth and see service ffe0 with charactertistic ffe1 and descriptors 2901 and 2902. I've done some research and it seems to start reading OBD data I need to initialize it with a series of commands such as ATZ etc. Some questions:

1. What do I write ATZ and other commands to? I've tried writing to ffe1 but I get this error

{"serviceUuid":"ffe0","name":"HMSoft","error":"write","message":"Error Domain=CBErrorDomain Code=0 \"Unknown error.\" UserInfo=0x14d76d90 {NSLocalizedDescription=Unknown error.}","address":"A6097B51-1ACA-417C-B6C4-70198F6674BA","characteristicUuid":"ffe1"}

2. Where is there good documentation on how to do this?

Thanks!
dgobaud
Posts: 5
Joined: Sat Aug 01, 2015 3:09 pm

Re: How to initialize and read OBD-II data over bluetooth?

Post by dgobaud »

I've been able to start reading data over blueetooth by subscribing to the ffe1 characteristic but I can't figure out how to interpret the data. Any advice? Thanks!
dgobaud
Posts: 5
Joined: Sat Aug 01, 2015 3:09 pm

Re: How to initialize and read OBD-II data over bluetooth?

Post by dgobaud »

I think I found the format https://github.com/stanleyhuangyc/Ardui ... gger.h#L96 would be great if there was better documentation explaining this. is there documentation somewhere?
dgobaud
Posts: 5
Joined: Sat Aug 01, 2015 3:09 pm

Re: How to initialize and read OBD-II data over bluetooth?

Post by dgobaud »

That ended up being correct. Using this Cordova Bluetooth LE plugin https://github.com/randdusing/BluetoothLE we were able to make an iOS app that connects to do OBD-2 data logger and printout values with the below javascript

https://gist.github.com/anonymous/fa1e5a7ea09238ae2d96
Post Reply