Page 1 of 1

OBD reconect

Posted: Sat Oct 16, 2021 8:23 pm
by igalr.3
I am connecting the Freematics ONE+ to my obd port of the car it receives power turns on and waiting in the loop .

if (!connected) {
digitalWrite(PIN_LED, LOW);
Serial.print("Connecting to OBD...");

if (obd.init()) {
Serial.println("OK");
digitalWrite(PIN_LED, HIGH);
connected = true;

sys.buzzer(2000);
delay(100);
sys.buzzer(0);
delay(100);
sys.buzzer(2000);
delay(100);
sys.buzzer(0);

} else {
Serial.println();
}
return;
}

After turning the key to on position it continues and everything is ok.
when i turn the key to off , the Freematics ONE+ disconects from obd and not connectcing until i take it out of the obd plug and insert it back.

if (obd.errors > 2) {
Serial.println("OBD disconnected");
connected = false;
obd.reset();
digitalWrite(PIN_LED, LOW);
sys.buzzer(1000);
delay(100);
sys.buzzer(0);
}

Any idea on how to proceed ?

Re: OBD reconect

Posted: Sat Oct 16, 2021 8:26 pm
by stanley
When key is off, OBD PIDs are not accessible. You have to use sniffing mode to listen for traffic.

Re: OBD reconect

Posted: Sat Oct 16, 2021 8:31 pm
by igalr.3
the problem is that when i turn the key back to on it doesn't reconect

Re: OBD reconect

Posted: Sat Oct 16, 2021 8:33 pm
by igalr.3
the problem is that when i turn the key to on it doesn't reconnect.

only if i pull the frematics out of the obd

Re: OBD reconect

Posted: Tue Oct 19, 2021 11:56 am
by stanley
Are you using your own code?