OBD reconect

Inquiry and support for Freematics products
Post Reply
igalr.3
Posts: 3
Joined: Sat Oct 16, 2021 8:13 pm

OBD reconect

Post 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 ?
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: OBD reconect

Post by stanley »

When key is off, OBD PIDs are not accessible. You have to use sniffing mode to listen for traffic.
igalr.3
Posts: 3
Joined: Sat Oct 16, 2021 8:13 pm

Re: OBD reconect

Post by igalr.3 »

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

Re: OBD reconect

Post 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
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: OBD reconect

Post by stanley »

Are you using your own code?
Post Reply