Some pre-purchase questions

I’m looking for a platform to help with GMLAN development, and I hope someone can answer a few questions about M2.

I assume that the M2 isn’t just a passive device, and acts as a node on the CAN bus which can send & receive request messages. I understand that the M2 is built on an Arduino Due, and when connected to a PC, it will identify as a serial programming port. The ARM microcontroller can be programmed with M2RET firmware, which creates a bridge between the serial port and the CAN bus.

Is M2RET forwarding the raw data like a UART, or is it providing some interpreting/formatting of CAN packets? Is the protocol documented? Can this interface match throughput speed of the CAN bus?

Is SavvyCAN the only software that supports the interface? I read that socketCAN support is being worked on which would allow the use Wireshark and other tools. What is the current state of this?

The M2RET readme says "… log all traffic to sdCard. Not stable at high bus loads just yet."
Is there any more information/updates about this?

I read that M2RET wasn’t passing extended (29bit) frames from the SWCAN bus. Is this still the case?

Thanks for reading.

Assuming you are talking about CANBUS/SWCAN

As far as I know everything works with this as it is now but Collin can probably tell more.

The firmware is on the M2 and can be used with anything you want to add support for since you have the source code. SavvyCAN is just one item that is designed to work with it right now. I hope to get it working for other protocols too but am limited on time right now.

Since you have access to the firmware it can forward just the raw data or filter it. Collin wrote most of the code so he can give exacting details but you certainly can access it directly.

I’ll try to answer all of your questions in order:

Is M2RET forwarding the raw data like a UART, or is it providing some interpreting/formatting of CAN packets?

Well, essentially it is just dumping the raw data out the serial port. That is, no attempt is made to interpret the CAN frames. They’re just passed as-is both directions. But, if you’re not in binary mode it does format the output for readability. If you are in binary mode it uses a special protocol to send the raw frames back and forth.

Is the protocol documented?

Kind of. I just pushed a document I had that specifies the protocol. It’s slightly out of date I think (and I do mean that, it isn’t terribly out of date). But, mostly it documents how the binary mode works. It’s pretty simplistic.

Can this interface match throughput speed of the CAN bus?

Easily. The SAM3X processor connects as a USB2 device at 480Mbs. The processor can’t really do 480Mbs but it can push significantly more bytes per second than it takes to send two saturated buses worth of frames down USB. I’ve seen very little evidence of dropped frames even at stupidly high bus loads.

Is SavvyCAN the only software that supports the interface? I read that socketCAN support is being worked on which would allow the use Wireshark and other tools. What is the current state of this?

Also kind of. SavvyCAN is the only program I know of that uses the binary comm protocol to M2RET and the other RET firmware (GVRET, TeensyRET). But, M2RET also supports LAWICEL. So, in theory you could use any LAWICEL compatible program. Since there is a LAWICEL driver for SocketCAN this means you should be able to use any socketcan program. But, that hasn’t been very well tested as of yet. So, the status is: it probably works but you might be the first one to actually try it on the M2.

The M2RET readme says "… log all traffic to sdCard. Not stable at high bus loads just yet."
Is there any more information/updates about this?

I never revisited this. Perhaps it works fine now, I don’t know. I never log to SDCard. I just hook it up to a laptop and save from there so testing has been limited for writing to the sdcard. I know back when I wrote that sometimes the firmware would lock up if using the sdcard to save a very heavily loaded bus. It might still do that.

I read that M2RET wasn’t passing extended (29bit) frames from the SWCAN bus. Is this still the case?

I believe we’ve gotten that fixed. There was a bug in the library that broke extended frames.

Thanks. I appreciate the answers.