Beta M2 Dev - Telemetry/analytics

Posting as per the directions on Kickstarter. :slight_smile: I don’t really have a specific project in mind, but have wanted to get in to car hacking for a long time. I have some embedded development experience (mostly with blinky LED projects) and lots of database/enterprise development experience, but haven’t fooled with CAN or car-related programming at all yet.

Ideas I wanted to fool around with:

  • Logging general engine data out to a cloud service (I’ve got some xbee modules I can use for the networking)
  • Visualizations (in-dash maybe? could use a RaspberryPi with a simple node.js UI or something to drive my head unit’s LCD)
  • Debugging weird maintenance stuff (battery/charging system in my car flakes out every once and a while, would be nice if I can get access to power draw data over time)

I’ll probably get some more inspiration after I start tinkering and get a better feel for what’s even possible, but the above is where I’m planning to start. :slight_smile:

These are some of the same things I’d like to hack on to start with. I drive a Nissan Leaf so there is plenty of technical stats I can read out (I would love to plot power draw/regen on a map for example). The head unit is nearly useless so it’d be really awesome if I could hack into it for use as a display too.

I’ve just received my M2 BETA unit and have similar goals. My plan is to setup the M2 of GVRET and Savvy CAN to get started. Any suggestions for better CAN software would be appreciated.

I’d say SavvyCan is a great place to start. Collin (author of both SavvyCan and GVRET) has forked his code to work with M2’s hardware (called M2RET) and will be adding functionality for things like LIN later.

Here is that repo:

Have access to Gen 5/6 Camaros, which I plan to look at controlling their interior lighting and media systems remotely (phone/wifi). Also things like remote start, roll windows up/down, lock/unlock, etc. Just basic hacking stuff. I am building a ESP8266 based interface board in the XBee form factor with a web app for control.

Going to make an assumption here since it has carried through at least as far as 2013 in all GM vehicles I am aware of. You will want to pursue the GMLAN and NOT CANBUS to be able to tinker with “convienience” features. I could be wrong so feel free to poke around but if you are working on 2010+ GM vehicles you will want to look at the GMLAN first. It should be available on Pin 1 of the ODBII port and is Single Wire Can. Which may or may not be supported at this time.

“GMLAN” is just GM’s trademark/name for the CAN that they use.

I dont know why they dont just call it CAN, because thats literally all it is…its not anything special/unique and it conforms to all of the universal SAE CAN specs…I guess they just wanted to give it their own cool name.

High speed GMLAN is 500k dual wire 11-bit CAN

Low-speed GMLAN is 33.33k single wire CAN…mixed 11-bit and 29-bit messages.

Mid-speed GMLAN is 125k dual-wire CAN. I dont know if mid-speed GMLAN is 11-bit or 29-bit, never worked with it.

yes, the Macchina supports single-wire CAN via the MCP2515 CAN controller chip on the board there, and the TH8056 SWCAN transceiver chip.

Just make sure you set it to 33.3k and you’re good to go with low speed GMLAN.

So SWCAN IS truly CANBUS but just uses different hardware so all normal CANBUS utilities should still work? Funny thing is GMLAN is the name they used for J1850 as well. So one needs to be careful when saying GMLAN about which protocol actually referring to.

No… They never called J1850 “GMLAN”…

J1850 is called “Class 2” in GM speak.

I have heard GMLAN being used to reference the data bus since ODBI times back in the mid 1990’s. It was again used to refer to the j1850 databus and more recently with the SWLAN databus. Not sure if my OEM documentation refers to it that way but I have heard that term used to describe the GM databus for a long time.

Strangest thing I have heard and maybe this is a local thing but when GM switched to CANBUS for some reason mechanics and mobile installers refer to it when gm went “digital”.

Although that could be in reference to the OnStar system . I have heard it from many different sources locally both from dealers and third parties.

I think you’re mistaken, or misinformed.

I 100% guarantee GM has never cross referenced J1850/Class 2, and GMLAN/SWCAN in any official factory documentation.

GM didnt introduce CAN until 2004ish. I think the Cadillac XLR was the first implementation of GMLAN for powertrain. (body still used Class 2 though).

You might be confused because there are plenty of mid/late-2000’s GM vehicles that used GMLAN/CAN for powertrain/chassis, but still used the older J1850/Class 2 for the body/interior…

There is so much misinformation and confusion out there on GM electrical architecture and databus communications use that I could literally write a book…

There is no cut and dry as to which vehicles use which protocols, especially based on year.

You have some vehicles that went full GMLAN for body/interior and chassis/powertrain as early as 2005 (the chevy malibu was the first 100% GMLAN/CAN vehicle)…then fast forward to 2013, the C6 Corvette still used J1850 Class 2 for body/interior stuff… (but used CAN for powertrain/chassis). The BCM in the C6 vette was the gateway between J1850 class 2 and CAN (GMLAN).

You can use the terms “GMLAN” and “CAN” interchangeably…theyre the exact same thing, just by a different name. SWCAN and low-speed GMLAN are the same thing as well. And BOTH of those things are CAN, regardless of speed and regardless of dual wire or single wire.

Misinformed. As I mentioned, I don’t recall seeing it in GM literature. I just have heard of others using that terminology. Are you saying GMLAN is actually the high speed databus? I have only heard it related to the low speed SWCAN bus. So getting more confused… When doing research back as far as ALDL I have seen the GMLAN term being thrown around as a generic term.

Good to know. Thanks for the clarification.

Did you know they still used ALDL until recently? Apparently the GTO was using ALDL for the instrument cluster since there is a bunch of information on tying into the cluster using ALDL and customizing them. They built an ALDL adapter by using a modified TTL -> USB adapter. So technically the M2 could likely be used for ALDL stuff as well since the I/O lines are good to 12volts as long as they can handle 8192 baud…

Yeah, like I said, theres so much misinformation and incorrect info out there its hard to tell whats wrong and whats right.

GMLAN is GM’s generic name for any “CAN-based” databus…whether its high speed or low speed or mid-speed.

GM differentiates the multiple busses by calling them “high speed GMLAN” “low speed GMLAN” or “mid speed GMLAN”.

As I said before…


High speed GMLAN = dual wire CAN, 500k speed, 11 bit.

Mid speed GMLAN = dual wire CAN, 125k speed, 11-bit

Low speed GMLAN = single wire CAN, 33.3k speed, 11 bit or 29 bit.


Class 2 = J1850 VPW, 10.4 k speed.

When you consider ALDL was 8k baud it doesn’t sound like Class 2 would be much faster.

Yes, the GTO was the oddball application where they kept 8192 ALDL around very late…

because the 04-06 GTO was basically a Holden monaro, and GM europe/australia engineering teams sometimes had different preferences over which databus they used vehicles…compared to USA, where 8192 ALDL basically disappeared in the mid-90’s when J1850 Class 2 was introduced.

Same with KWP2000, that was something pre-CAN that GM used a lot overseas, but i dont think they ever used it in any US vehicle.

It wasnt until CAN (GMLAN) showed up that all of the other hodgepodge of databusses disappeared and was replaced with a common CAN (GMLAN) standard of communications in GM vehicles.

Class 2 might not be “that” much faster (8192 vs 10400)…but it uses a much more advanced and efficient hardware layer/message protocol than ALDL.

ALDL is basically a ghetto-rigged slightly hacked version of regular RS232 serial…like early-1980’s tech. It was never really intended to be an automotive communications protocol/standard.

Im 98% sure ALDL requires master/slaves, its a request-driven network. Very inefficient, regardless of actual baud. its like playing telephone.

J1850 is a multi-master bus, anyone can talk whenever they want, they dont have to go through a “master” node first, etc… think of it as an open round-table discussion. So much better. J1850 is actually very similar to CAN as far as message structure/software layer goes. Just a different hardware layer, and the header is 3 bytes…vs CAN (which is either 2 bytes or 4 bytes)

I am interested in building an “automatic” like datalogger to start.

I have a and the support on that forum is hit or miss so I also hope to help build a much more active community around the M2.