Raspberry Pi 3 with M2 Base Board



I recently bought a M2 base board without the DUE processor board, I wanted to test the board with my Pi 3,
Any idea if this is possible and how can I make the wirings from Pi 3 to the M2 board and also my Vehicle only supports KWP Fast and LIN, I wanted to know if there are any Linux utilities available like SocketCAN for KWP Fast and LIN ?


You need a break out board. I am doing this currently with my M2 interface board and the J1850VPW for a project I am working on.

The reason in my case is there is a Mega library that already works and it will work with the M2 Interface board. I will be converting the driver in my case to work on the M2 but it is nice to be able to use the Library as is temporarily until I get that worked in.

You may want to check out the PocketBeagle Beta board project for an easier way to accomplish this. While a Pocket Beagle is not the same thing it does do the same sort of thing.

One of my goals for my summer of programming is to build the M2 stock hardware to support Lawicel 2.0. Lawicel 1 is the protocol that specifies the SocketCAN protocol. Lawicel 2.0 allows for similar action for any other protocol. However no utilities that I am aware of CURRENTLY support anything other than CANBUS unless custom built.

Once the M2 base software is able to communicate full Lawicel 2.0 it will be much easier to modify the current open source software to support it. But not something that will be done this week for sure.



I do not have a pocket beagle, but do own a Esp8266 and Chipkit Max 32 (Arduino compatible) board.
Can the existing libraries that you have written for M2 Interface board be used with any of these ?


Well not that I have written but you can connect to the pins on the interface board and use the breakout board. From there you are on your own to find libraries. If you have a Due compatible board then probably can use all of the M2 libraries. If not then no, you will have to adapt ones that are compatible with your device.

As an example. I have an Arduino Mega connected to one of my interface boards right now to play around with some libraries I hope to translate to the M2.


Cool. I would be interested to see the outcome as my chipkit max 32 is arduino mega form factor. Let me explore on how to modify the M2 libraries to be compliant with my chipkit board.


We have been discussing getting LIN and any other protocols working with Linux as part of the Pocket Beagle project.

So far it sounds like SW CAN will be easy as it is close enough to CAN.

There is an existing SLLIN library, so LIN should be doable.

The other protocols are probably going to require something custom.


Once I am comfortable with where the M2 libraries are I planned to move onto the Linux stuff. As I want to gain experience building new drivers and Lawicel 2.0 supports all other protocols it seems like a decent plan. But it appears my work with the M2 will be extensive this summer if I can actually accomplish what I want to. So while I would like to I don’t know that “I” personally can do anything with it at this time although it would be cool to have a board to play with.


If possible, could you please share the pics of how you wired the Mega with the breakout board ?


Just is connected to the ground, +3.3Vin, vpw and j1850 + Nothing fancy. The VPW and J1850 + connected to the Mega pins. Depends on what sketch your running. This was done as a test to see if the board would work in 4x and is not a permanent mount. In a couple weeks I will be revamping the current M2 VPW driver. The Mega is SIGNIFICANTLY slower than the Due.

If you have the break out board those pins are pretty obvious. The Ground and +3.3vin connect to a 3.3 out and ground on the Mega. The other pins depend on what your using.


“The VPW and J1850+”, how are you reading it from your Mega, does the PIN outs from breakout board should be read using SPI ? If possible could you please share your sample sketch ? I have a breakout board and trying to figure out ways to read it Chipkit Max32(mega form factor). Sorry for being so naive.


They are directly read. You need to incorporate the protocol directly for J1850VPW. I can not share the Sketch I have as it is under development and it is not mine. You would be better off using the M2 board and the current VPW library. I will be developing the M2 driver further by the end of the month. I only mentioned the Mega setup as it shows the M2 will do it and it was more of a proof of concept. The Mega sketch as is right now will read the PCM Bin at 4x speed. One of my first projects this summer will be to get the M2 working fully with 4x and interrupt driven. But this is going off target for the original topic.


After a long time, I am reopening the thread. I was busy for quite sometime and couldn’t work on this.
Coming to the issue, I wired my Chipkit Max32 (Arduino Mega form factor) to the breakout board and used the library from https://github.com/iwanders/OBD9141 and tested out with a live vehicle, but I am NOT receiving any signals from the ECU, My Car uses KWP FAST protocol (which I confirmed with a ELM device) and following are the pin connections between the Arduino and breakout board.

Arduino Board Breakout Board

TX -> RX
RX -> TX
Pin 8 (always HIGH) -> K-SLP

Any clues on the issue ?