0

Hello guys my problem is i cant recieve any data from OBD II to Raspberry Pi 3B+

Here the materials that i use:

Raspberry pi 3B+
ELM327 -> OBD II
Operating System of Raspberry Pi -> https://medium.com/@aadeshshah/pre-installed-and-pre-configured-raspbian-with-opencv-4-1-0-for-raspberry-pi-3-model-b-b-9c307b9a993a

Here the following step that i do:

Step 1: From sudo nano /etc/systemd/system/dbus-org.bluez.service i add

ExecStart=/usr/lib/bluetooth/bluetoothd -C
ExecStartPost=/usr/bin/sdptool add SP

Step 2:Reload the configuration file and Restart the service

sudo systemctl daemon-reload
sudo systemctl restart bluetooth.service

Step 3:Pairing

bluetoothctl

power on
power on
agent on
default-agent
scan on
scan off pair
trust
quit

Step 4: Stablish connection

sudo rfcomm connect rfcomm0

Waiting for connection on channel 1 Connection from XX:XX:XX:XX:XX:XX to /dev/rfcomm0 Press CTRL-C for hangup

It connect but when i run screen /dev/rfcomm0 it can't recieve any data and also when i use cat /dev/rfcomm0 no data posted

This are the tutorial that i use https://www.youtube.com/watch?v=DABytIdutKk i change bind to connect command and its work but when i run screen /dev/rfcomm0 i cant get any data

I use the command atz but its just hang up

  • Hi @rika Salvador, Ah, let me see. (1) Rpi3/4 stretch/buster BlueZ5x is still buggy. I have wasted 10+ hours struggling to make a reliable setup. Search this forum for "Bluez" for more details. (2) I would suggest to first try this: SparkFun OBD-II UART - https://www.sparkfun.com/products/9555. – tlfong01 Nov 17 '19 at 02:17
  • And if you are using an UART OBD2, you can talk ELM using terminal emulator such as these: RpiCuteCom or Win10RealTerm: (1) https://imgur.com/gallery/naolpGP, (2) https://raspberrypi.stackexchange.com/questions/105405/reading-r232-serial-from-usb-on-pi-zero – tlfong01 Nov 17 '19 at 02:27
  • @tlfong01 thank you for your response, but it is possible to talk to the OBD II by enabling the UART in the raspberry pi?? because some of the projects that I work on is GPS tracking which talk by use UART communication protocol, but the serial is /dev/ttyAMA0 here's the link ::https://sparklers-the-makers.github.io/blog/robotics/use-neo-6m-module-with-raspberry-pi/ – Erika Salvador Nov 17 '19 at 03:01
  • Well, an UART device is an UART device. If device talks/hand shakes RS232/serial/ "AT", "OK", then it is 90% likely you are OK. I did once talk UART with GPS modules, along with many other UART modules including several configs of BlueTooth 4 serial module, RF433MHz serial module (RF12B), and so on. You might like to read my answer to the following question: Rpi UART to GPS Module Connection Problem https://raspberrypi.stackexchange.com/questions/98840/rpi-uart-to-gps-module-connection-problem. For the AMA/Serial/USB device confusion, please read my two references on RpiCuteCom above. – tlfong01 Nov 17 '19 at 03:17
  • @tlfong01 Ok, thank you – Erika Salvador Nov 17 '19 at 03:21
  • Actually in the last couple of years, I have been answering UART device related questions now and then, here and there in a couple of other forums. The following is another recent answer (read the very long chat record!), on UART FPV 433MHz module, with the OP sharing his experience, you might find useful: https://raspberrypi.stackexchange.com/questions/105223/how-can-rpi4b-use-uart-to-read-and-analyze-received-data-at-a-3dr-fpv-air-radio. Good luck to your project and cheers. – tlfong01 Nov 17 '19 at 03:23
  • What is OBD II? You added `ExecStart=` to a Unit. Except with `Type=oneshot` you cannot have a second `ExecStart=` in addition to the existing. – Ingo Nov 17 '19 at 21:22

0 Answers0