1

I'm looking to create a web application that can show car metrics and help the user improve his car performance. After some basic googling i came to know about OBD. I've seen about the android apps that use OBD but I've come across any thing that says OBD can be used along with Web Apps. Can any over here tell me if we can use a OBD with web Apps.

Any help on how to use OBD in web Apps is appreciated.

Thanks in advance.

Strikers
  • 4,698
  • 2
  • 28
  • 58

3 Answers3

3

OBD-II dongles can be accessed by Bluetooth, RS-232 or Wi-Fi. All suggestions here are not made by experience, so results can vary.

Straight from the browser, RS-232 is not possible, as far as I'm aware of that.

For bluetooth, you might need to do some research in Bluetooh Web API's. They are fairly new, so won't be supported for all devices/browsers etc.

For wi-fi, have a look into websockets to make the connection. Just try to make a connection and send your usual OBD-II commands.

For more information on OBD-II, Wikipedia has a nice page on some available PIDs and how to convert/decode the answers. You also have a look into my library, that contains the same information and decode-functionality, but you will have to read some code for that.

Eric Smekens
  • 1,602
  • 20
  • 32
  • Hi Eric i've figured out how to use it with web apps. I need a list of formula to decode the output of the OBD. Can please give me link for that or can you give me the info – Strikers Nov 19 '14 at 13:35
  • Added some links in the last paragraph. – Eric Smekens Nov 19 '14 at 18:32
  • Eric, I've seen them and tried, but in my output i'm getting unexpected new line chars text and '>' symbols, they are making your functions return wrong outputs – Strikers Nov 20 '14 at 02:35
  • http://elmelectronics.com/ELM327/AT_Commands.pdf There are some commands you can alter the output with, for example, 'L0' will turn linefeeds off, which are the newline and the > charachter I think. Just have a look through the list, and the rest you will have to parse. – Eric Smekens Nov 20 '14 at 17:18
  • Eric, i've a question, Can I write to OBD asynchronously – Strikers Nov 21 '14 at 14:34
  • The OBD-II protocol is really serial, you request a command, and when you have received the command, you can send another one. (You can also send before receiving, but then this command will wait in the buffer of the OBD-II device. (Not completely sure, may depend on device you are using.) – Eric Smekens Nov 28 '14 at 07:31
  • @EricSmekens I'm connecting to a OBD2 wifi adapter using this [Cordova plugin](https://github.com/parsonsmatt/WifiWizard). Would I be able to send a request to the plugin for the VIN over a web socket from client side of my [ionic](http://ionicframework.com/) application? – Brad W Sep 10 '15 at 18:40
  • @BradW I think that is possible. I would recommend to try it and make a little prototype, and if you run into some errors or things that don't work, open a new question for it. – Eric Smekens Sep 28 '15 at 07:19
  • The WiFi version will not work because you will need to communicate with the device using a raw TCP socket (not HTTP, and not WebSockets). No modern browser supports TCPSocket as of 2020. – Brandon Ros Feb 21 '20 at 04:55
1

I am working on a BLE version of the elm327 adapter that can be used with web bluetooth.

To do this simply replace the hc series bluetooth transceiver in the elm327 adapter with an hm-10 ble transceiver.

After setting the baud rate you can then use custom bluetooth descriptors to send and receive the serial data from the adapter

Justin
  • 33
  • 5
0

My ELM327 WiFi device does not support websockets. I am communicating with it using this Cordova plugin. This plugin provides TCP client sockets for Android and iOS.

A good example on how to use the APIs exposed through this plugin can be found here.

Jeroen
  • 49
  • 4
  • Jeroen thanks for your answer but I figured out the solution my self. My OBD is bluetooth enabled one. – Strikers Nov 09 '15 at 12:36