Empty CAN Messages

New comer here, tried to build the Blynk demo however I was getting zero responses that didnt make much sense, so I went for the even more basic minimal carloop example where I just read and printed the CAN messages, however what i got was still empty payload …any idea how i can proceed with this?
Output from serial monitor:

Battery voltage: 5.522343 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.325117 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.510742 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.446933 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.423730 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.493340 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.394726 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.603555 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.267109 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.684765 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.296113 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.406328 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.655762 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.673164 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.400527 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.307715 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.696367 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.412128 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.203300 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.284512 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.296113 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.255508 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.528144 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.644160 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.122089 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.504941 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.342519 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.597754 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.354121 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error
Battery voltage: 5.354121 CAN messages: 0 GPS ********** *********** ********** ******** 0 chars, 0 checksum error

Code :

// This #include statement was automatically added by the Particle IDE.
#include <carloop.h>

/* Minimal Carloop example app
*

  • Reads battery voltage, counts CAN messages and report GPS position to
  • USB serial once per second
  • Copyright 2016 Julien Vanier
  • Distributed under the MIT license. See LICENSE.txt for more details.
    */

#include “application.h”
#include “carloop.h”

void updateCanMessageCount();
void printValuesAtInterval();
void printValues();
void printFloat(float val, bool valid, int len, int prec);
void printDateTime(TinyGPSDate &d, TinyGPSTime &t);

Carloop carloop;

int canMessageCount = 0;

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

void loop()
{
carloop.update();
updateCanMessageCount();
printValuesAtInterval();
}

void updateCanMessageCount()
{
CANMessage message;
while(carloop.can().receive(message))
{
canMessageCount++;
}
}

void printValuesAtInterval() {
static const unsigned long interval = 1000;

static unsigned long lastDisplay = 0;
if(millis() - lastDisplay < 1000)
{
    return;
}
lastDisplay = millis();
printValues();

}

void printValues()
{
auto &gps = carloop.gps();
// Ensure that the GPS state doesn’t change while printing
WITH_LOCK(gps) {
Serial.printf("Battery voltage: %12f ", carloop.battery());
Serial.printf(“CAN messages: %12d “, canMessageCount);
Serial.print(“GPS “);
printFloat(gps.location.lat(), gps.location.isValid(), 11, 6);
printFloat(gps.location.lng(), gps.location.isValid(), 12, 6);
printDateTime(gps.date, gps.time);
Serial.printf(”%6d chars, %d checksum error”, gps.charsProcessed(), gps.failedChecksum());
Serial.println(””);
}
}

void printFloat(float val, bool valid, int len, int prec)
{
if(!valid)
{
while(len-- > 1)
{
Serial.print(‘*’);
}
Serial.print(’ ');
}
else
{
char format[10];
snprintf(format, sizeof(format), “%%%d.%df”, len, prec);
Serial.printf(format, val);
}
}

void printDateTime(TinyGPSDate &d, TinyGPSTime &t)
{
if (!d.isValid())
{
Serial.print("********** “);
}
else
{
Serial.printf(”%02d/%02d/%02d ", d.month(), d.day(), d.year());
}

if (!t.isValid())
{
    Serial.print("******** ");
}
else
{
    Serial.printf("%02d:%02d:%02d ", t.hour(), t.minute(), t.second());
}

}

Add carloop.setCANSpeed(250000); before carloop.begin(); in setup(); to use a different speed like 250 kbit/s (the default is 500 kbit/s). try something like this. got this off the forum from @jvanierCarloop

  • 10 kbit/s
  • 20 kbit/s
  • 50 kbit/s
  • 100 kbit/s
  • 125 kbit/s
  • 250 kbit/s
  • 500 kbit/s
  • 800 kbit/s
  • 1 Mbit/s
1 Like

I tried all of the different possible speeds, and yet still didnt work, empty messages at all speeds.

your going to have to look at the pinout of your OBDII connector and see what pins are available. I know the carloop works on the standard pins 6 &14
that could be your problem.

@badr42,

Have you had any luck yet?

What microcontroller are you using with the Carloop, and have you checked to see that the system firmware is up to date?
If you have an Electron or Photon, you can find instructions at particle.io. If you have trouble with that, ask here or over on the particle forums (community.particle.io). If you have a Redbear Duo, you will need to check their forums; I don’t have one of those yet to know the details.

If that does not solve it, then we might need to look into the hardware, and possible raise a service request with carloop.io (I don’t actually work for them myself).