Skip to content
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

Couldn't connect to OBD scanner (stucked) #233

Open
gianluca-tursi opened this issue Mar 6, 2024 · 18 comments
Open

Couldn't connect to OBD scanner (stucked) #233

gianluca-tursi opened this issue Mar 6, 2024 · 18 comments
Assignees
Labels
question Further information is requested

Comments

@gianluca-tursi
Copy link

hello thanks for your work! i'm currently stucked. I have uploaded this sketch:
ESP32_Bluetooth_Serial
ESP32_test

but i receive the message "Couldn't connect to OBD scanner"

i have this hardware:
esp32 titigo with display .> https://www.amazon.it/ICQUANZX-T-Display-Sviluppo-Bluetooth-Arduino/dp/B07VNG9D52
odbII -> https://www.amazon.it/bluetooth-Diagnostic-diagnostica-Problema-guastiCompatibile/dp/B0CKHCSQ5C/

i saw that the pin is 1234, and the name os OBDII

but i receive this message "Couldn't connect to OBD scanner"

i don't know how to fix it.
thanks a lot

@gianluca-tursi gianluca-tursi added the question Further information is requested label Mar 6, 2024
@jimwhitelaw
Copy link
Collaborator

Note that in both the examples you list, the code to set the Blutetooth PIN is commented out by default. Did you enable it?

@gianluca-tursi
Copy link
Author

Note that in both the examples you list, the code to set the Blutetooth PIN is commented out by default. Did you enable it?

yes thanks, i have enabled it

@jimwhitelaw
Copy link
Collaborator

OK, in that case, it will be helpful if you can post the full serial output from the device so we can see everything that is happening. Are you able to connect to the ELM device with another app, on a phone for instance?

@gianluca-tursi
Copy link
Author

OK, in that case, it will be helpful if you can post the full serial output from the device so we can see everything that is happening. Are you able to connect to the ELM device with another app, on a phone for instance?

i think i can connect the odb with my phone, but how i can get the "full serial output from the device" ? what is it exactly?

@jimwhitelaw
Copy link
Collaborator

Assuming you're using Arduino IDE: https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-serial-monitor/

@gianluca-tursi
Copy link
Author

Assuming you're using Arduino IDE: https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-serial-monitor/

yes i currently using arduino IDE for mac

@gianluca-tursi
Copy link
Author

OK, in that case, it will be helpful if you can post the full serial output from the device so we can see everything that is happening. Are you able to connect to the ELM device with another app, on a phone for instance?

i think i can connect the odb with my phone, but how i can get the "full serial output from the device" ? what is it exactly?

some help with this?

@PowerBroker2
Copy link
Owner

There's a chance you already have a phone or laptop that is already connected to the OBD2 scanner and won't let the ESP connect. Try turning off all other BT devices when using the ESP. Also, you might not need the PIN (my scanner(s) never needed a PIN, while others do). Lastly, you might try different bauds. Other than that, you might need to buy another OBD2 scanner.

@gianluca-tursi
Copy link
Author

There's a chance you already have a phone or laptop that is already connected to the OBD2 scanner and won't let the ESP connect. Try turning off all other BT devices when using the ESP. Also, you might not need the PIN (my scanner(s) never needed a PIN, while others do). Lastly, you might try different bauds. Other than that, you might need to buy another OBD2 scanner.

i had tried the odb2 with my phone and it request the 1234 pin, then i cancelled the connection between phone and odb2. i tried different bauds (not all ). do you know a link of a specific odb2 that works?
other two question, there is a sketch to connect the odb2 with macaddress ? (i found only with odb2 name in your examples).

otherwise i have other odb2 with wifi connect..maybe i can try with that one

@PowerBroker2
Copy link
Owner

I use this one and it works like a charm

@gianluca-tursi
Copy link
Author

UPDATE: maybe i have connect with the Vgate iCar Pro Bluetooth 4.0 (BLE) OBD2, Bluetooth 4.0 per iOS e Android:

but i see some loop in te serial monitor with these messages:

Received char: D
Received char: \r
Received char: \r
Received char: >

Delimiter found.
All chars received: STOPPED
ELM responded with error "STOPPED"
Setting protocol via AT SP %c did not work
Connected to ELM327

any idea?
i use ESP32_Bluetooth_Serial example sketch

@PowerBroker2
Copy link
Owner

If your OBD2 scanner is BLE, then it isn't supported by this lib, unfortunately

@gianluca-tursi
Copy link
Author

If your OBD2 scanner is BLE, then it isn't supported by this lib, unfortunately

it has two different bluetooth channl, one ble one classic with two different name...i was trying the connection with the classic

@gianluca-tursi
Copy link
Author

@PowerBroker2 i think that i'am connected, but i tried this example sketch: ESP32_Check_Voltage

and i see that warning in the serial monitor:

Received char: >

Delimiter found.
All chars received: 11.3V
Battery Voltage: 11.30
ASSERT_WARN(1 8), in lc_task.c at line 1410ASSERT_WARN(1 8), in lc_task.c at line 1410Clearing input serial buffer
Sending the following command/query: AT RV

why that?
thanks for your help

@jimwhitelaw
Copy link
Collaborator

We’ve seen instances of that before. The ELMduino code is ok, but unfortunately it triggers a bug in an older version of the ESP-IDF (the framework library). See issue #226.

@jimwhitelaw
Copy link
Collaborator

@gianluca-tursi I recently made a change that attempts to fix that ASSERT_WARN bug. I can't test it myself as I'm unable to reproduce that error with any of the ESP32 devices I have. Are you able to get the latest update and run your code again to see if the issue is resolved? (Note, the change is not in the latest release 3.2.5 as it's untested, so don't download that, clone or download the latest from master branch).

@gianluca-tursi
Copy link
Author

@gianluca-tursi I recently made a change that attempts to fix that ASSERT_WARN bug. I can't test it myself as I'm unable to reproduce that error with any of the ESP32 devices I have. Are you able to get the latest update and run your code again to see if the issue is resolved? (Note, the change is not in the latest release 3.2.5 as it's untested, so don't download that, clone or download the latest from master branch).

yes i can do it, i need to download the branch from your link https://github.com/PowerBroker2/ELMduino/archive/refs/heads/master.zip then i need to substitute the file in my arduino library and compile the sketch?

@jimwhitelaw
Copy link
Collaborator

@gianluca-tursi I meant to confirm this and forgot about it, sorry. Yes, your test plan is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants