I have an OBD simulator connected to serial port of my raspberry pi. So I am just trying to read any response from the device. The commands are a bit different than the standard OBD commands. So I write a basic code like this:
import serial
ser=serial.Serial('/dev/ttyS0', 115200, timeout = 1)
ser.write(b"SI\r")
while True:
response = ser.readline()
print ("read data:", response)
But the only output is an empty bit data : b' '
I am also not sure that ttyS0 is the correct port or not. There is also ttyAMA0 port but the output is still b' '.
Any advice is appreciated.