1

I think i've tried everything at this point, and nothing seems to work.

I'm using an ELM327 WiFi Dongle, connected it to the Pi, created a socat using:

sudo socat pty,link=/dev/ttyUSB0,waitslave tcp:192.168.0.10:35000

tried to bind it to rmcomm using:

sudo rfcomm bind 0 /dev/ttyUSB0

and then ran a simple python script:

import obd
connection = obd.OBD()
cmd = obd.commands.SPEED
response = connection.query(cmd)
print(response.value)
print(response.value.to("mph"))

All i receive is this error:

Traceback (most recent call last):
  File "mph.py", line 2, in <module>
    connection = obd.OBD() # auto-connects to USB or RF port
  File "/home/pi/.local/lib/python2.7/site-packages/obd/obd.py", line 64, in __init__
    check_voltage, start_low_power)  # initialize by connecting and loading sensors
  File "/home/pi/.local/lib/python2.7/site-packages/obd/obd.py", line 87, in __connect
    start_low_power)
  File "/home/pi/.local/lib/python2.7/site-packages/obd/elm327.py", line 144, in __init__
    if not self.set_baudrate(baudrate):
  File "/home/pi/.local/lib/python2.7/site-packages/obd/elm327.py", line 290, in set_baudrate
    return self.auto_baudrate()
  File "/home/pi/.local/lib/python2.7/site-packages/obd/elm327.py", line 320, in auto_baudrate
    response = self.__port.read(1024)
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 501, in read
    'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

Edit: I have tried adding a loop to the script, and starting the engine of the car, but it makes no difference. It did say No OBD-II adaptors found at one point, but it does not get that far now.

Edit 2: Tried running PyOBD-Pi, still no further, just returns this:

['/dev/rfcomm0']
Opening interface (serial port)
Interface successfully /dev/rfcomm0 opened
Connecting to ECU...
Got nothing
  • Hi Tomas, the dongle is currently connected, but the python script says 'No OBD-II adaptors found' – Michael Davison Jun 24 at 19:45
  • Just tried an infinite loop, and tried starting the cars engine, still no luck. – Michael Davison Jun 24 at 19:54
  • I can get it working with my XCode app on iOS, so I know the dongle works, but only just started using Python, google says try using a Bluetooth dongle, but I already have a WiFi one, so I would rather use that if I can. – Michael Davison Jun 24 at 20:02
  • My experience is that unless the car is running, the dongle is off, even if it is connected and there is battery power on the bus. – Tomas By Jun 24 at 20:12
  • I've started the engine and still got nothing back :/ – Michael Davison Jun 24 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.