-
Notifications
You must be signed in to change notification settings - Fork 126
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
ESP32 successful connection using Mac address #265
Comments
While in ESP32 Setup function, following code may be written for connection. Serial.println("The device started in master mode, make sure remote BT device is on!");
//SerialBT.setPin(pin);
connected1 = SerialBT.connect(address, sec_mask, role);
if (connected1) {
Serial.println("Connected to ELM327 Bluetooth Succesfully!");
} else {
while (!SerialBT.connected(10000)) {
Serial.println("Failed to connect. Make sure remote device is available and in range, then restart app.");
}
}
if (!myELM327.begin(ELM_PORT, DEBUG))
{
Serial.println("Couldn't connect to OBD scanner");
oled.println("Couldn't connect to OBD scanner");
//delay(10000);
if (HALT_ON_FAIL)
while (1);
}
Serial.println("Connected to ELM327"); |
link for code |
@MFAISALREHMAN |
@MFAISALREHMAN |
I have made lil changes to suit my need but it did connect to esp32 very fast. you have to copy the folder content below i am sharing to this location ( C:\Users\DELL153000\Documents\Arduino\libraries) of pc. The esp32 i am using is Wroom 32 dev kit |
I am not familiar with pull request, but i change lil bit the ELM327::initializeELM in order to connect to ESP32 (may be Chinese version), e.g the timeout of 30000 is more for searching protocol. Mine esp32 disconnects in 9 second. In 9s, esp timeout, if a request for PID is not sent. |
Do you still use v2.0.17 of the esp32 board manager or have you updated to v3.x? Thanks |
I did not update any firmware of esp32, i am using the stock version that was delivered to me. You can tell me where to check the boot manager. |
Hello
ESP32 board does not connect with OBDII string name. Previously i used to connect with HC-05 and Nano but HC-05 is fragile.
Now I tried (some 100 tries) with esp32 and following code worked.
Consequently the ELMDuino library Initialize funtion was changed as following
The text was updated successfully, but these errors were encountered: