1

I am currently trying to create a React Native app that lets me connect to my OBD2 device and read data about my car from it. However, I am struggling to figure out the "reading data" step. I am able to connect to the device and see characteristics and services, but cannot read data from the characteristic. I've seen articles on running a set of commands to initialize the OBD, but I have no clue what I am doing wrong. These articles have said things such as:

  1. Set the command protocol to AUTO by running AT SP 0. By running AT DP, you should get AUTO.
  2. Convert the commands to base64.
  3. Use the "\r" return carriage at the end.
  4. Write to the characteristic and read the resulting value.

Could anyone with experience on this issue explain how I can use an ordinary BLE app to send a command (via write) and receive a command following (via read). I understand how to code the read/write, but not entirely sure how to implement this specifically with OBD2 devices.

Thank you for your time.

  • Did you pick up the _right_ characteristic for reading? It depends on the actual BLE hardware whether the OBD2 device choses one or two characteristics for implementing the serial protocol. You need to _probe_ for the actual WRITE and the NOTIFY/INDICATE characteristic. – DrMickeyLauer Sep 27 '21 at 08:02
  • 1
    I was using a library to convert to base64, and it turns out that the library was incorrect. I manually did it by hand and it worked, so I would recommend to make sure that the base64 outputs are correct in the future to save anyone time in the future. – Timothy Wilmot Nov 19 '21 at 00:11
  • Hi @TimothyWilmot. have you released your react-native OBD app? – vibu Sep 05 '22 at 06:18

0 Answers0