has anyone came across can2.0b eff frames. trying to use canutils to dump eff frames.
ive been into mopar stuff for a bit and this is the first time ive come across this, its on a 2013 dodge dart.
ive been able to sniff the ECU on the bench of my 14 charger, and various other dodge models but this one is the first ive seen with Extended frame format.
ive tested with an arduino and mpc2515 library and have been able to receive the extended frames. im trying my hand at wrting a skectch for the carloop but im not getting any data or maybe am not coding it right lol iv’e seen a sample on here and just want to be able to use canutils first to determine what id’s i need to look at. any help much appreciated. the crazy part is i can connect a cheap elm327 and request vin and it works. but if i connect the carloop (socketcan sketch) i dont see any data flowing by which leads me to belive i need to setup EFF with carloop receive filter.
#include "OBDMessage.h"
#include <carloop.h>
#include <application.h>
SYSTEM_THREAD(ENABLED);
Carloop<CarloopRevision2> carloop;
void setup() {
CANChannel can(CAN_D1_D2);
//can.addFilter(0, 0, CAN_FILTER_EXTENDED);
Serial.begin(115200);
can.begin(500000 , CAN_FILTER_EXTENDED);
}
void loop() {
tester();
CANMessage message;
if (carloop.can().receive(message)) {
Serial.println("ID;");
Serial.print(message.id);
Serial.println("message data: ");
Serial.print(message.data[0]);
Serial.print(message.data[1]);
Serial.print(message.data[2]);
Serial.print(message.data[3]);
Serial.print(message.data[4]);
Serial.print(message.data[5]);
Serial.print(message.data[6]);
Serial.print(message.data[7]);
}
}
void tester() {
CANMessage message;
OBDMessage obd;
unsigned long start = millis();
unsigned long timeout = 200; // ms
while(millis() - start < timeout) {
if (carloop.can().receive(message)) {
if (message.id >= 0x0814F001 ){
// Serial.println("Got reply from ECU");
// Add the data to our OBD message
bool needsFlowControl = obd.addMessageData(message);
if (needsFlowControl) {
// Sending flow control
CANMessage flowControl = obd.flowControlMessage();
carloop.can().transmit(flowControl);
// Serial.println("Sent flow control");
}
// Use the data when the message is complete
if (obd.complete()) {
String vin = "";
// VIN is 17 character and can be left-padded with zeros
for (int i = obd.size() - 200; i < obd.size(); i++) {
vin += String((char)obd.data()[i]);
}
Serial.println(vin);
if (Particle.connected()) {
Particle.publish("BCC", vin, PRIVATE);
}
obd.clear();
//Serial.println("Done");
return;
}
}
}
}
Serial.println("NO DATA RECEVIED!!!");
if (Particle.connected()) {
Particle.publish("NO DATA RECEVIED!!!", PRIVATE);
}
}