How to change OBD protocol
reflexsa opened this issue · 5 comments
Firstly thanks for this, it was exactly what I was searching for.
I just wanted to ask how/where do I change the OBD protocol? I need to select "const char ISO_15765_11_BIT_500_KBAUD = '6';" to work reliably with my vehicle.
Apologies for the silly question!
The elm should automatically find and use the best protocol, but if you want to specify it yourself, you can do so in the begin()
function:
Lines 3 to 23 in e81f308
Thank you. For some reason when using my adapter with Torque for example I will get an 'engine check light' unless I specify the protocol. The actual error is communication to the gearbox so it seems that is somehow interfered with.
So would I just change the "const char &protocol" to 6 in the below?
bool ELM327::begin(Stream &stream, const bool &debug, const uint16_t &timeout, const char &protocol, const uint16_t &payloadLen, const byte &dataTimeout)
to:
bool ELM327::begin(Stream &stream, const bool &debug, const uint16_t &timeout, 6, const uint16_t &payloadLen, const byte &dataTimeout)
You would have to add the argument in the sketch kind of like this:
myELM327.begin(ELM_PORT, true, 2000, ISO_15765_11_BIT_500_KBAUD);
Thank you. I see, that does make sense. I'm hoping this will resolve my other issue where I just have a recurring response after the initial AT commands #241
Fixed in version 3.3.0.