brendan-w / python-OBD

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

Stuck on "Initializing ELM327: PORT=\.\COM3 BAUD=auto PROTOCOL=auto" #208

Open Jdrinkwater1 opened 4 years ago

Jdrinkwater1 commented 4 years ago

I am trying to connect to a Bluetooth obd2 reader and I am getting stuck on Initializing ELM327: PORT=.\COM3 BAUD=auto PROTOCOL=auto. Not sure why this is happening. I can connect to it with scan tool, so it must be something that I am doing.

Here is a part of my code

`print("Test")

ports = obd.scan_serial()

print(ports) obd.logger.setLevel(obd.logging.DEBUG)

connection = obd.OBD(ports[2])

print("test")

connect = obd.Async (fast=False)

print("test")

rpm = obd.commands.RPM

throttlePos = obd.commands.THROTTLE_POS`

ormopl commented 3 years ago

The same here. Tried with various protocols, bauds and adapters. No response from a car, while other application using the same adapters works fine.

VicDominguez commented 3 years ago

I am trying to connect to a Bluetooth obd2 reader and I am getting stuck on Initializing ELM327: PORT=.\COM3 BAUD=auto PROTOCOL=auto. Not sure why this is happening. I can connect to it with scan tool, so it must be something that I am doing.

Here is a part of my code

`print("Test")

ports = obd.scan_serial()

print(ports) obd.logger.setLevel(obd.logging.DEBUG)

connection = obd.OBD(ports[2])

print("test")

connect = obd.Async (fast=False)

print("test")

rpm = obd.commands.RPM

throttlePos = obd.commands.THROTTLE_POS`

Could you upload your console output? And other data, like car model. I had a similar bug days before and maybe is similar to my failure

Jdrinkwater1 commented 3 years ago

Screenshot 2021-01-06 110240

Also the car is a 2008 Mercury Milan

VicDominguez commented 3 years ago

Screenshot 2021-01-06 110240

Also the car is a 2008 Mercury Milan

Are you sure that these port works? It's look like python-OBD and ELM327 doesn't communicate.. If you don't specify any port python-OBD checks all ports. If AT commands doesn't work, the problem isn't on the car. You can check your ELM327 using tools like ELM327 FG Tester

austinlg96 commented 3 years ago

Some additional data:

I've got an OBDLink MX+ connected to my Windows 10 computer over bluetooth

It seems to add two different COM ports to my computer, one of which hangs like the OP and one of which works successfully. I've even had trouble using a keyboard interrupt to break out of the hang and have resorted to just killing the shell.

(Note: I also wasn't able to get it working with \\.\\COMn, I had to adjust the code to use just COMn. Unfortunately I'm not certain if this is a bug or if something is different/unique to my situation.)