Comments (8)
I don't know is neither a correct solution and nor it's for your case, but I had the same problem and I've fixed reversing:
ELM_PORT.setPin("1234");
ELM_PORT.begin("OBDII", true);
like this:
ELM_PORT.begin("OBDII", true);
ELM_PORT.setPin("1234");
It can be helpfull for someone!
from elmduino.
I've never tried to connect to any bluetooth device via MAC address on an ESP32 - you'll have to do some researching on your own to make sure you're doing that correctly. That being said, here is an example sketch that apparently works using the MAC address.
Did you try using the Bluetooth Serial ESP32 example? If so, what were the results? If not, please try it. You shouldn't need the MAC address, only the Bluetooth device name. Also ensure that all other devices previously connected to the ELM327 are turned off before trying to connect via Arduino. Also note that you might have to try other bauds than what the example provides.
from elmduino.
The Bluetooth Serial ESP32 example was working fine, with Android Serial BT Terminal. Sending to ESP and sending from ESP to the App was successful. I have now entered the MAC address correctly like shown in the https://forum.arduino.cc/index.php?topic=617795.msg4679253#msg4679253 example. This is the result:
[I][BluetoothSerial.cpp:510] _init_bt(): device name set [I][BluetoothSerial.cpp:225] esp_spp_cb(): ESP_SPP_INIT_EVT [I][BluetoothSerial.cpp:722] connect(): master : remoteAddress [I][BluetoothSerial.cpp:290] esp_spp_cb(): ESP_SPP_DISCOVERY_COMP_EVT [I][BluetoothSerial.cpp:292] esp_spp_cb(): ESP_SPP_DISCOVERY_COMP_EVT: spp connect to remote [I][BluetoothSerial.cpp:314] esp_spp_cb(): ESP_SPP_CL_INIT_EVT [I][BluetoothSerial.cpp:298] esp_spp_cb(): ESP_SPP_OPEN_EVT Connected to ELM327 ASSERT_WARN(1 8), in lc_task.c at line 5054Received: ERROR: ELM_TIMEOUT Received: ERROR: ELM_TIMEOUT Received: ERROR: ELM_TIMEOUT Received: ERROR: ELM_TIMEOUT
It says connectet, then time out, seems to be:
Also note that you might have to try other bauds than what the example provides.
Do you mean I have to change the baud rate DEBUG_PORT.begin(115200); of cause also in the IDE serial monitor? Do I have also change the upload speed to the new value? All values to 9600 ?
Thanks for helping,
from elmduino.
The Bluetooth Serial ESP32 example was working fine, with Android Serial BT Terminal.
No, I mean the example without any serial terminal, just the Arduino: This one
from elmduino.
Thanks, have now used your example 1:1 and this is the result:
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[I][BluetoothSerial.cpp:510] _init_bt(): device name set
[I][BluetoothSerial.cpp:225] esp_spp_cb(): ESP_SPP_INIT_EVT
[I][BluetoothSerial.cpp:702] connect(): master : remoteName
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:327] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:329] esp_bt_gap_cb(): Scanned device: 23:32:17:05:88:45
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : OBDII : 32
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:379] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
Couldn't connect to OBD scanner - Phase 2
Have also tried with PIN 1234 enabled and 9600 baud - no success.
The discovered MAC address above is correct, the resolved name OBDII too, in reference to the fetched data by using Android "serial Bluetooth terminal" Device list of Bluetooth classic.
from elmduino.
What happens if you comment out the line where you set the PIN? Most ELM327 dongles don't need that for connection. If commenting that line out doesn't fix your problem, your ESP32 is most likely defective.
from elmduino.
With disabled PIN the problem is not solved. What ESP32 board are you using wand where have you buy it?
from elmduino.
https://www.amazon.com/gp/product/B0718T232Z/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
from elmduino.
Related Issues (20)
- ELM_TIMEOUT only when using eSPI library for TFT Display HOT 1
- Value returned by supportedPIDS_xx_xx() methods is off by one bit. HOT 4
- Issue in getting the value of oilTemp() HOT 1
- Custom PIDs HOT 14
- set a special pisd of ELMDUINO with header HOT 9
- Setting Protocol not working correctly HOT 6
- Problem querying data with ESP32 HOT 5
- custom pid no response HOT 1
- Sending false Command? HOT 5
- Custom PID for KM since last DPF regeneration HOT 2
- Crash on calling batteryVoltage() HOT 7
- ELM327::isPidSupported Error
- Custom PID, how it works HOT 9
- PID 70: Boost pressure control (Service 01) HOT 1
- Problem with flashing RPM value on OLED when using latest version of ELMduino HOT 8
- ESP32 not connecting to ELM327 HOT 5
- Protocol Data Point HOT 4
- Couldn't connect to OBD scanner (stucked) HOT 18
- First time Bluetooth pairing between ESP32 and ELM327 HOT 1
- custom pid for DPF HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elmduino.