Capture the complete CAN frame in binary?

The computer I am working with outputs in 2.0b, so it uses the 29bit identifier. I would like to inspect the entire can frame so decipher what is what.


The hardware is capable but I don't have a car or other CAN device that uses 29bit IDs at the moment. I'm working on getting some unused CAN testing hardware from a friend at GM to help develop 29bit compatible firmware.

If you're up for it you could check out the MCP2515 datasheet and give it a go. :)

ya I have been reading the data sheet, and making some tweaks tot he mcp2515 lib. We will see how it goes :).

I have a side project starting in about a week with a ECU that uses 29bit ID's also. I was wondering how the CBT would handle the extended frames. Please keep us updated on what you find.

I have modified the firmware to support 29-bit messages. I deliberated between making everyone use 32-bit longs in the serial API and so forth or keeping it a choice in the code. For now it is a choice is the code determined by a SUPPORTS_29BIT preprocessor definition. Can I commit this back to github so others can also use it?

@synaptic‌ commit that shizz :). Or post your changes up in this thread.

Forked and committed my modifications which support 29-bit messages, and added a pull request ( . From commit log: "Modify preprocessor def SUPPORTS_29BIT to 1 to enable. Not extensively tested yet, but filtering 11-bit messages under 29-bit mode works. Check out the new docs in SerialCommand.h for serial API usage."

I re-merged and re-committed the 29-bit extension code to github. Someone pointed out that my first fork had a few regression errors. Now the pull request points to a more stable codebase that can be pulled.

Awesome, I am out of town for a week or so, but once I am back I will check it out.

Finally did some testing on 29-bit identifier messages. They show up in the log when no filters are applied (030101), but do not show up when filters are applied (03010108XXXXXXXX). I think the problem is down in CANBus.cpp/setFilter(), maybe in how I'm writing the registers or setting up the mask? If anybody knows how the MCP2515 works, please feel free to debug or make suggestions for how to fix it.


Awesome work! Started a new branch for testing this and fixing the filters. See comments on github

I downloaded the 29Bit branch but get a bunch of errors when I verify. What am I missing??


Arduino: 1.6.1 (Windows XP), Board: "CANBus Triple"

In file included from CANBusTriple.ino:31:0:

SerialCommand.h:109:5: error: 'IDENTIFIER_INT' does not name a type

 IDENTIFIER_INT btMessageIdFilters[][2];


SerialCommand.h: In member function 'void SerialCommand::setBluetoothFilter()':

SerialCommand.h:350:7: error: 'btMessageIdFilters' was not declared in this scope

   btMessageIdFilters[cmd[0]][0] = (cmd[1] << 8)+cmd[2];


In file included from CANBusTriple.ino:31:0:

SerialCommand.h: In member function 'void SerialCommand::logCommand()':

SerialCommand.h:410:73: error: no matching function for call to 'CANBus::setFilter(int, int, int)'

     bus.setFilter( 0x00, (cmd[2]<<8) + cmd[3], (cmd[4]<<8) + cmd[5] );


SerialCommand.h:410:73: note: candidate is:

In file included from CANBusTriple.ino:11:0:

C:\Arduino\hardware\arduino\avr\libraries\CANBus\src/CANBus.h:200:10: note: void CANBus::setFilter(int, int)

 void setFilter(int, int);


C:\Arduino\hardware\arduino\avr\libraries\CANBus\src/CANBus.h:200:10: note: candidate expects 2 arguments, 3 provided

In file included from CANBusTriple.ino:32:0:

ServiceCall.h: At global scope:

ServiceCall.h:27:5: error: 'IDENTIFIER_INT' does not name a type



In file included from CANBusTriple.ino:32:0:

ServiceCall.h: In member function 'void ServiceCall::setFilterPids()':

ServiceCall.h:203:7: error: 'filterPids' was not declared in this scope

   filterPids[ii] = IDENTIFIER_INT ((cbt_settings.pids[i].txd[0] << 8) + cbt_settings.pids[i].txd[1]) + 0x08;


ServiceCall.h:203:104: error: 'IDENTIFIER_INT' was not declared in this scope

   filterPids[ii] = IDENTIFIER_INT ((cbt_settings.pids[i].txd[0] << 8) + cbt_settings.pids[i].txd[1]) + 0x08;


In file included from CANBusTriple.ino:34:0:

Naptime.h: At global scope:

Naptime.h:19:5: error: 'IDENTIFIER_INT' does not name a type



Naptime.h: In constructor 'Naptime::Naptime(SerialCommand*)':

Naptime.h:32:3: error: 'resetId' was not declared in this scope

resetId = 0;


Naptime.h: In constructor 'Naptime::Naptime(int, SerialCommand*)':

Naptime.h:43:3: error: 'resetId' was not declared in this scope

resetId = resetMessageId;


Naptime.h: In member function 'virtual void Naptime::tick()':

Naptime.h:87:32: error: 'resetId' was not declared in this scope

 busses[0].setFilter( 0x00, resetId, resetId );


Naptime.h: In member function 'virtual Message Naptime::process(Message)':

Naptime.h:188:23: error: 'resetId' is not a member of 'Naptime'

if( msg.frame_id == Naptime::resetId )


CANBusTriple.ino: In function 'boolean sendMessage(Message, CANBus)':

CANBusTriple.ino:224:68: error: 'class Message' has no member named 'ide'

CANBusTriple.ino:228:68: error: 'class Message' has no member named 'ide'

CANBusTriple.ino:232:68: error: 'class Message' has no member named 'ide'

CANBusTriple.ino: In function 'void readBus(CANBus)':

CANBusTriple.ino:264:73: error: 'class Message' has no member named 'ide'

CANBusTriple.ino:276:73: error: 'class Message' has no member named 'ide'

Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

I too am curious to know what became of 29 bit processing.


It's building for me, I was doing some tests with it last week. Still waiting on some new CAN tools to properly verify the code as I don't have a vehicle that uses extended message ids.

What version of Arduino are you using?

I'm running ver 1.6.1 on XP.

Tried several things related to file directories and such, with no luck. Had fixed previous compiling issues that way. However with the limited time I have to mess with it, hard to debug. Would love to get this one going since my main uses are 29bit related.

Anyone gets time to help me debug this please let me know and I'll make time to collaborate.

Works great, Have it reading 29bit on can1 and sending out modified data 11 bit on can 3. Great work!

How about his Derek. Could you compile a 29bit version with the Windows Wireshark output settings like before and just post it for download? I've thought about having someone do that for me until we get this bug figured out. Really like to get this running.

@KidTurbo: I had the same issue. If you used the standard version first uninstall Arduino, delete everything and start over. This worked for me...

@KidTurbo: Holding the 'Shift' Key and clicking compile to recompile the libraries might work as well...

Thanks @Reto I'll give that a try and post up my results. I upgraded my windows version but that alone didn't do it.

Looks like your connection to CANBus Triple was lost, please wait while we try to reconnect.