brendan-w / python-OBD

OBD-II serial module for reading engine data
GNU General Public License v2.0
1.02k stars 360 forks source link

Failed to set baudrate, but working with Tuner SW #214

Open gg974 opened 3 years ago

gg974 commented 3 years ago

Car: Honda Civic FD1 R18A1 2008

Hello,

I'm trying to connect to car via KTuner OBD2 elm327 module. I keep getting baudrate set errors. Debug:

connection = obd.OBD(ports[0], fast=False, timeout=2)

[obd.obd] ======================= python-OBD (v0.7.1) ======================= [obd.obd] Explicit port defined [obd.elm327] Initializing ELM327: PORT=.\COM5 BAUD=auto PROTOCOL=auto ['\.\COM5'] [obd.elm327] Response from baud 38400: b'' [obd.elm327] Response from baud 9600: b'' [obd.elm327] Response from baud 230400: b'' [obd.elm327] Response from baud 115200: b'' [obd.elm327] Response from baud 57600: b'' [obd.elm327] Response from baud 19200: b'' [obd.elm327] Failed to choose baud [obd.elm327] closing port [obd.elm327] write: b'ATZ\r' [obd.elm327] Failed to set baudrate [obd.obd] Closing connection [obd.obd] Cannot load commands: No connection to car [obd.obd] ===================================================================

I've tried access via both USB and Bluetooth and result is the same. Also tried to set baudrate, protocol, fast f/t parms, but same everytime.

I don't know, but I think this car has CAN 29/500 protocol, I've tried to set it to protocol=7 but no luck.

If I tried to connect via KTuner SW it's all working, I think there's nothing wrong with ELM or connection.

Unfortunately I'm new to this and I don't know how to continue. Hopefully anyone knows what's the issue?

gg974 commented 3 years ago

Is this the issue? That it is not checking 500k baudrate at all? Can I add 500000 into it? Currently trying on Win10...

Thank you!

Once pyserial supports non-standard baud rates on platforms other

# than Linux, we'll add 500K to this list.
#
# We check the two default baud rates first, then go fastest to
# slowest, on the theory that anyone who's using a slow baud rate is
# going to be less picky about the time required to detect it.
**_TRY_BAUDS = [38400, 9600, 230400, 115200, 57600, 19200]**

def __init__(self, portname, baudrate, protocol, timeout,
gg974 commented 3 years ago

Hi, I tried Raspbery in VMware player v16 and it actually got connection on 500K bitrate, however now has error "failed to read port". Is this something to do with virtual machine now (I've enabled share of USB port)...?

Is this stuff even working with Win10 or VM...?

Any help here please or is this "forum" dead...?