Freematics ONE OBD not working

Inquiry and support for Freematics products
Post Reply
juliuslt
Posts: 4
Joined: Sat Jul 24, 2021 3:47 am

Freematics ONE OBD not working

Post by juliuslt »

Hello. I have a Freematics ONE and Freematics ONE+ Model H. The OBD connection works perfectly fine on my one+, however, it fails to connect on the freematics one with the same car. Function obd.init() always returns False.

Here is my code, am I doing something wrong? I tried the original datalogger code, I got the OBD: FAIL on it also. By the way, I tried with specifying the protocol in init() function, and without it. Both returns false.

Code: Select all

#include <FreematicsONE.h>

COBDSPI obd;
bool connected = false;
int value;

void setup()
{
  Serial.begin(115200);

  while(!obd.begin()) Serial.println("Failed to begin");
  Serial.println("OBD init.");
  
  while (!connected) {
    Serial.print("Connecting to OBD...");
    if (obd.init(PROTO_CAN_11B_500K)) {
      Serial.println("OK");
      connected = true;
    } else {
      Serial.println("Failed to connect to OBD.");
    }
  }
}

void loop()
{
  delay(5000);
}
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Freematics ONE OBD not working

Post by stanley »

Could you uncomment the following line in FreematicsONE.cpp and compile again so more information will be output to serial to help find out the cause.

Code: Select all

#define DEBUG Serial
Post Reply