-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strange output after connection #7
Comments
Also, I wanted to add that it may be occurring with PID 0101. When looking in ELM327.py, there's a string of coding for PID 0101. This was displayed in the terminal before the error. I could only find a few integer references to possible base 16 when reviewing the ELM327.py. Unfortunately, as stated before, this is well beyond my expertise, lol. Perhaps the following code is causing the issue??:
|
I’ll post a debug readout shortly |
I had the same exact issue and error message as WhoAmI-cslim. I have tried this code with two different OBD II scanners with two separate vehicles (Kia and Jeep) and I get this same error. I did not see a resolution posted here or on any other site. I was able to find one -- see below. Note that I can use a terminal program like screen and send any of the AT commands (like atz, or atsp0, or 010C) and get back a valid response. So I knew the issue was internal to this program. The response to 0101 (which is when the program fails) is 41010007E500 followed by 410100040000. Line 396 of the module ELM327.py is the issue. This line is trying to invoke int(Response[:2], 16), which causes the error that prevents the program from completing the connection process. Above the section of code you have listed above, there is a call to self.PruneData. That routine basically removes the first 5 characters of each of the two lines and then combines those lines. So the result should have been to create 0007E50000040000 (striking 4101 from each line and then combine them as a single string). However, both of my devices issue the command "SEARCHING...". So the PruneData return value is Response = "CHING...0007E50000040000." This results in an error since Response has an invalid Hex value. I changed EM327.py by adding the following before line 396 (ResultVal1=int(Response[:2],16)): I saved an rerun the program. It now successfully completes that process. |
Hello EddieRadarHughes, I'm currently getting this project started, and I have the same error as you two, I see your solution but I don't understand where exactly to place it, I see it's line 396 (ResultVal1 =int(Response[:2],16)):
|
else: |
@EddieRadarHughes |
else: is this so? I understood after that it was before line 396 lol |
First and foremost, absolutely love this project! I am able to successfully connect to my ODBII bluetooth adapter.
When I initiate your software, it loads and states that is connecting to the CAN BUS; however, it never connects. When i close the software, there are the following errors in the terminal:
"invalid literal for int() with base 16: 'CH' "
I'm not that great with Python otherwise I'd inspect the code myself. Is this a quick fix item?
The text was updated successfully, but these errors were encountered: