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

How to pair ELM327 with password? #53

Open
naamah75 opened this issue Feb 23, 2025 · 14 comments
Open

How to pair ELM327 with password? #53

naamah75 opened this issue Feb 23, 2025 · 14 comments
Labels
enhancement New feature or request

Comments

@naamah75
Copy link

naamah75 commented Feb 23, 2025

How do I pair an ELM327 bluetooth adapter that asks for a PIN?
A Bluetooth information section on the Info page would also be useful

@adlerre
Copy link
Owner

adlerre commented Feb 23, 2025

This is not currently supported. However, it is possible to implement it.
Which dongle should be used? (to get one)

@naamah75
Copy link
Author

naamah75 commented Feb 23, 2025

I don't remember the model well, but it is a common ELM327 of those of which you can find plenty on Amazon. I did a short search, again on Amazon and it seems that they all require a PIN like 1234 or 0000

@naamah75
Copy link
Author

naamah75 commented Feb 23, 2025

Do you think that such a modification, which is very crude, would be fine

if (!serialBt.begin("OBD2MQTT", true)) { Serial.println("========== serialBT failed!"); ESP.restart(); } serialBt.setPin("1234");

... into the obd.cpp

@adlerre
Copy link
Owner

adlerre commented Feb 23, 2025

I don't remember the model well, but it is a common ELM327 of those of which you can find plenty on Amazon. I did a short search, again on Amazon and it seems that they all require a PIN like 1234 or 0000

I have tested some, but none required a pin.

Do you think that such a modification, which is very crude, would be fine

if (!serialBt.begin("OBD2MQTT", true)) { Serial.println("========== serialBT failed!"); ESP.restart(); } serialBt.setPin("1234");

... into the obd.cpp

Yes, this would work. But I would add this to settings page and set if not empty.

@naamah75
Copy link
Author

Perfect! So could you recommend some model of adapter that you have tried and does not require pins? in any case as soon as I have a way, if you want, I will write you the model of my ELM327 adapter

Yes, implementing the configuration on the home screen looks good and that's what I was trying to do, but it's your code! And surely you will be better, it takes me much longer to understand where to put my hands

@adlerre
Copy link
Owner

adlerre commented Feb 23, 2025

Perfect! So could you recommend some model of adapter that you have tried and does not require pins? in any case as soon as I have a way, if you want, I will write you the model of my ELM327 adapter

https://www.amazon.de/dp/B0BG4W6MLD
https://www.amazon.de/dp/B0D474RC4W

@naamah75
Copy link
Author

Thank you for your patience, you were very kind. Do you think you can change the PIN in the settings in the near future?

@naamah75
Copy link
Author

naamah75 commented Feb 23, 2025

IMG-20250223-WA0010.jpeg

Screenshot_20250223_222710.jpg

@adlerre adlerre added the enhancement New feature or request label Feb 24, 2025
@adlerre adlerre linked a pull request Feb 24, 2025 that will close this issue
@naamah75
Copy link
Author

the modification i made doesn't work, the device is detected with its mac address, but with name "0" instead of "OBDII"... i don't know if this can help. Anyway the bluetooth connection doesn't happen. If i can help you with the tests let me know!

I don't remember the model well, but it is a common ELM327 of those of which you can find plenty on Amazon. I did a short search, again on Amazon and it seems that they all require a PIN like 1234 or 0000

I have tested some, but none required a pin.

Do you think that such a modification, which is very crude, would be fine
if (!serialBt.begin("OBD2MQTT", true)) { Serial.println("========== serialBT failed!"); ESP.restart(); } serialBt.setPin("1234");
... into the obd.cpp

Yes, this would work. But I would add this to settings page and set if not empty.

@adlerre
Copy link
Owner

adlerre commented Feb 24, 2025

Have you tested with PR #54? Can you provide some logs?

@naamah75
Copy link
Author

naamah75 commented Feb 24, 2025

Hi, sorry for the delay, but I only had the chance to try the bt-pin branch now.
I had some compilation problems with PlatformIO on Windows due to problems related to the git parameter environment to publish the version on the main page and then to compile the UI and transfer it to the LittleFS partition, if you want I'll post the solution I found; anyway I did it in the end.
Setting the PIN and saving the options works at program level, but I imagine you've tried this too. Unfortunately, however, the bluetooth does not connect to the ELM327 adapter.

Here are the logs of a couple of attempts I made...

First I set the bluetooth device name and MAC address directly in the settings page. The strange thing I noticed is that the MAC address is correct, while the name is displayed as "0" instead of "OBDII" (which I saved in the settings):

Start modem... 
Initializing modem... 
Modem Name: A7670E-FASE
Modem Info: Manufacturer: SIMCOM INCORPORATED Model: A7670E-FASE Revision: A7670M7_V1.11.1 IMEI: 862771076817991
Waiting for network......success 
Network connected 
Connecting to TM......success 
GPRS connected 
IP Address: 10.6.7.213
Enabling GPS/GNSS/GLONASS......success 
scanned for services, found 0
connecting to 00:0d:18:a0:4e:35 - 0
Couldn't connect to OBD scanner - Phase 1 
Restarting OBD connect. 
scanned for services, found 0
connecting to 00:0d:18:a0:4e:35 - 0
Couldn't connect to OBD scanner - Phase 1 
Disconnected

As a second test I deleted the device name and MAC address and let it search for devices, and I noticed that the ELM327 bluetooth adapter I have is not detected.

Initializing modem... 
Modem Name: A7670E-FASE
Modem Info: Manufacturer: SIMCOM INCORPORATED Model: A7670E-FASE Revision: A7670M7_V1.11.1 IMEI: 862771076817991
Waiting for network......success 
Network connected 
Connecting to TM......success 
GPRS connected 
IP Address: 10.6.207.130
Enabling GPS/GNSS/GLONASS......success 
Discover Bluetooth devices... 
>>>>>>>>>>>Found a new device: Name: OPPO A17, Address: 74:86:69:ae:d6:44, cod: 0x5a020c, rssi: -83
>>>>>>>>>>>Found a new device: Name: CITROEN, Address: 48:f0:7b:da:bb:1b, cod: 0x360408, rssi: -43
Stopping discover...stopped 
Search device: OBDII
Couldn't connect to OBD scanner - Phase 1 
Disconnected

Can I help you with some more attempts?

@naamah75
Copy link
Author

naamah75 commented Feb 25, 2025

This is not currently supported. However, it is possible to implement it. Which dongle should be used? (to get one)

For this model the manufacturer states that you must enter the PIN:
Vgate iCar Pro Bluetooth 4.0 (BLE)

For the model you suggested, which does not use a PIN, however, I read that you have to press the power button every time and it does not start automatically with the car; is that so?
Vgate iCar2 BLE 4.0

Googling a bit I noticed conflicting opinions of users who said that for the same, for some users the PIN was required and for other users not; I discovered that the discriminating thing for many is the operating system of the smartphone, it seems that the pairing for Apple is very often without PIN (I use android)

for example in this video, which if I'm not mistaken is from the adapter we were talking about, the user enters a PIN:
Youtube VGATE iCar2 Bluetooth 3.0 ELM327 OBD2

@adlerre
Copy link
Owner

adlerre commented Feb 26, 2025

For this model the manufacturer states that you must enter the PIN: Vgate iCar Pro Bluetooth 4.0 (BLE)

I haven't tested, but I think it's not required.

For the model you suggested, which does not use a PIN, however, I read that you have to press the power button every time and it does not start automatically with the car; is that so? Vgate iCar2 BLE 4.0

I used this this device without any issues, no pin required and it's not required to press the power button on any use. I think you must power on, only on low battery.

Googling a bit I noticed conflicting opinions of users who said that for the same, for some users the PIN was required and for other users not; I discovered that the discriminating thing for many is the operating system of the smartphone, it seems that the pairing for Apple is very often without PIN (I use android)

https://www.amazon.de/dp/B0BG4W6MLD using this since months, without any issues. No pin, no button press is needed. The button is only required to pair the dongle. Switches dongle in visible mode.

@adlerre
Copy link
Owner

adlerre commented Feb 26, 2025

Can I help you with some more attempts?

Not really, because you did everything I would have done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants