0
\$\begingroup\$

I am VERY new to electronics, but I love this world. My first project is to read CAN bus data from my 2008 Ford Taurus. I got a MCP2515 CAN Bus Module with a TJA1050 Receiver, and an Arduino.

I hooked everything up, and used the mcp_can library by coryjfowler. I took an old diagnostic tool's OBD cable and cut it, opened it, soldered 2 wires to pin 6 and 14. I then tried it on the car (completely dead battery, had to jump it) and I did get data as soon as I jumped it (key not even in ignition). But this data looks... fake? I mean I don't know what I'm seeing but I even started the car and the same data seems to keep repeating. When I remove key, I still see data although I'm guessing that's normal...

I'm not sure what I did wrong, not sure how to figure out what I did wrong... The only idea I have is that I don't have a shared ground but I don't think that's... necessary?

Here's a sample of what my data looks like (it keeps repeating this pattern, even when the car is fully on):

2025-10-24 11:44:48.220 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.222 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.226 E,0xF4BA6FB,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.240 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.242 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.243 S,0x363,0,DATA 2025-10-24 11:44:48.244 E,0x1A21DE7A,2,RTR 2025-10-24 11:44:48.246 S,0x33B,7,DATA,67 67 67 6C 67 67 67 2025-10-24 11:44:48.248 S,0x33B,7,DATA,67 67 67 67 67 67 6C 2025-10-24 11:44:48.250 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.252 S,0x33B,7,DATA,00 00 00 00 00 00 00 2025-10-24 11:44:48.254 E,0xF4BA6FB,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.256 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.258 S,0x33B,7,DATA,67 67 67 67 67 67 67 2025-10-24 11:44:48.259 S,0x363,0,DATA 

Here is the code that runs on the Arduino:

#include <mcp_can.h> #include <SPI.h> MCP_CAN CAN0(10); // CS pin 10 void setup() { Serial.begin(115200); if (CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_8MHZ) != CAN_OK) { Serial.println("Error Initializing MCP2515..."); while (1); } else { Serial.println("MCP2515 Initialized Successfully!"); } CAN0.setMode(MCP_LISTENONLY); Serial.println("Sniffer ready..."); } void loop() { if (CAN0.checkReceive() == CAN_MSGAVAIL) { unsigned long rawId; byte dlc; byte data[8]; if (CAN0.readMsgBuf(&rawId, &dlc, data) != CAN_OK) return; if (dlc > 8) return; bool isExt = rawId & 0x80000000UL; bool isRTR = rawId & 0x40000000UL; unsigned long cleanId = rawId & 0x1FFFFFFFUL; Serial.print(isExt ? 'E' : 'S'); Serial.print(",0x"); Serial.print(cleanId, HEX); Serial.print(','); Serial.print(dlc); Serial.print(','); Serial.print(isRTR ? "RTR" : "DATA"); if (!isRTR && dlc > 0) { Serial.print(','); for (byte i = 0; i < dlc; i++) { if (i) Serial.print(' '); if (data[i] < 16) Serial.print('0'); Serial.print(data[i], HEX); } } Serial.println(); } } ``` 
\$\endgroup\$
8
  • \$\begingroup\$ Why do you think that the data you are getting is wrong? What data do you expect? \$\endgroup\$ Commented Oct 24 at 20:38
  • \$\begingroup\$ Well to be completely honest, I am not 100% sure. But I am expecting different IDs with different data (not just 00s or 67s or 6Cs). The actual log file of my capture is much much bigger (5-10 minutes) and it looks the same. During that timeframe (5-10 mins) I had the car with ignition on, turned the car ON and then off. I'd assume a bunch of different "frames" should be flowing through that CAN bus? Not sure, but yeah... Seems odd. \$\endgroup\$ Commented Oct 24 at 20:43
  • 1
    \$\begingroup\$ So you might need to revise your expectation. If for example the CAN messages mean „Hey, my engine is still OK, and the front lights, too“ then it could be fine to see those same messages over and over again, right? \$\endgroup\$ Commented Oct 24 at 20:53
  • \$\begingroup\$ Yeah I guess so. I'll try the other CAN bus on pins 3/11 and see if behavior is similar. But I find it hard to believe to only see <10 unique frames on a CAN bus while the whole car is starting. Just seems odd to me, and from what I've heard I'm supposed to be flooded by different frames (I am flooded, just not by different frames!). (It's also literally my first time doing anything hardware related, I come with an offensive cybersecurity specialist background and I know damn well I most likely screwed up something!) \$\endgroup\$ Commented Oct 24 at 21:00
  • \$\begingroup\$ Why do you think a shared ground is not necessary? I’d suggest connecting the gnd as they are required with CAN. \$\endgroup\$ Commented Oct 25 at 1:25

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.