I am trying to communicate with a ELM327 device using PySerial. However I am not able to read any data from the device. Here is the results of what I have tried in the terminal interpreter.
>>> import serial
>>> ELM327 = serial.Serial('/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0', 38400, timeout=5)
>>> ELM327.write(b'AT Z\r\n')
6
>>> ELM327.read()
b''
>>> ELM327.write(b'AT RV\r\n');
7
>>> ELM327.read()
b''
>>> ELM327.write(b'AT\r\n');
4
>>> ELM327.read()
b''
I have tried the same by changing the device to /dev/ttyUSB0
but get exactly the same results. I am running this as the super user as well. I also tried swapping out the \r\n
with just \r
and \n
respectively. It is a ELM327 v1.5a device I'm trying to connect to. Any insight is much appreciated.