Please correct me if I am wrong… (Going from memory and not looking at schematics, specs etc)
For most CANBUS stuff you have a controller and a transceiver. The transceiver handles the electrical connections to the bus and the controller does the heavy lifting for the protocol its self.
The Arduino DUE has the Controller for 2 ports built in but need the transceiver to work. I believe the Arduino Due uses the MCP2515 controller which is what the due_can driver is for. The transceiver is in the M2 interface board and doesn’t require any additional software to control.
Problem you will run into with the RPI is that it doesn’t come with a controller so you either have to add on a board with a controller such as the MCP2515 or build a software module to do it all yourself. If I understand correctly, if you write a software module to do it yourself you should obtain full unfettered access to the CANBUS but may take up significant processor time.
You could potentially pick up something like this for your RPI that provides 12 volts to your RPI and provides 2 complete canbus interfaces. To make it work with the M2 you could bypass the transceivers on this board and instead make the connections to the M2. Sort of a hack way of doing it but should work without requiring you to do a bunch of extra work
.
Nothing says you couldn’t use the pican or something similar to make a proof of concept and then from there build an add on board that would allow you to have just the controller on board once you know your setup works.
You may also not need the SMPS option if you are able to power the RPI from the M2. I actually have a non SMPS single channel PiCAN 2. Wish I had realized what the SMPS option was for when I bought it. (Allows power from the vehicle directly. )