P1 enable SWCAN

Hi there!

So finally, P1 arrived today. I’ve set up everything as the documentation says, but I can’t get SWCAN working. How should I enable it?
Searched the forum, but found nothing just to flash a new image.

Thanks! :slight_smile:

Hey @Bence98007 - we’re planning on posting some instructions to the docs soon.

In the meantime, take a look at this posting:

@Entropy512 has a good summary of what needs to be done to enable SWCAN.

BTW, Josh, sorry I didn’t reply recently to your last PM, I’ve been busy with other things. I’ll try to get back to you once I resume working on my projects.

@Bence98007 since the biggest user of SWCAN is GM, what vehicle do you have? Just as an FYI, newer GM vehicles have a firewall between the infotainment networks and the rest of the vehicle that can interfere with certain use cases when plugged into the OBD port. The firewall is intended to keep the infotainment system from interfering with vehicle operations, but also prevents devices on the “secure/clean” side from executing commands that the telematics system issues (such as remote start/precondition).

Its an Opel Ampera (Chevy Volt) so yep. What firewall are you talking about, where is it and any known methods to bypass?

Thanks, I’ve done that, still can’t get any communication on SWCAN. I’m trying with a P1, candump cmd, but can’t see traffic there :frowning:

It’s called the Serial Data Gateway Module (SDGM) - most Volts didn’t have it, only newer ones did (not sure which model year it cut in), all Bolts have it to my knowledge.

It won’t prevent you from seeing traffic, it will only result in the car ignoring commands sent on the bus that aren’t supposed to originate there. In the case of a Bolt, all OnStar commands are supposed to originate on the “dirty” buses, so injecting them on the “clean” buses (which is what are wired to the OBD port) results in them getting ignored.

The workaround is to splice into harnesses on the “dirty” side of the SDGM - I haven’t gotten around to figuring out the best way to do this which is why my projects have been on hold for a bit.

However in your case, if you’re not seeing any traffic something else is wrong. You will see traffic on SWCAN even if you are on the wrong side of the module, you just may be limited in what useful things you can do. (In general, there are quite a few things possible on older Volts that aren’t possible on Bolts, such as putting the windows down when the vehicle is running.)

Did you set up the SWCAN PHY via the GPIOs? If you don’t set the two GPIOs correctly you’ll see no traffic. I’m not sure if my other post states which GPIOs. Unfortunately, I’m on vacation at the moment so it’ll be a bit over a week before I can grab the Python script I was using to set up the PHY. (you can use the Adafruit BBIO Python libraries, or I think initially I tried /sys/class/gpio/* - again, I don’t have much of my notes/documentation and won’t until I get home.)

Edit: I did state which GPIOs it was. P2_6 and P2_18 must be set HIGH. If you do not do this you won’t see traffic. You also, of course, have to set the appropriate bitrate. I forget what that was, if you don’t figure it out by the time I get home I’ll dig it up then.

Thanks for the reply Entropy!
Well, I have a 2013 Facelift Ampera, so it’s a newer model.
I couldn’t find out how to set tha GPIO to HIGH. I found the gpios in the /sys/class/gpio, but idk where to set it to HIGH :frowning: If You could help me out with that, I owe You a beer for sure :slight_smile:

Anyone knows a documentation about how to enable the SWCAN on P1? I couldn’t make it work…

EDIT:
Tried to figure out the correct pin settings, so I tried to set P2_6 and P2_18 to HIGH with command:
config-pin P2_18 hi
But it returns:

I just dont have that P2_6 and P2_18, what can cause this?
image

As someone else mentioned, the DTB overlay forces it to be an output, you need something in /sys/class/gpio.

I’m back from vacation, I’ll find and post my Python script which sets up the GPIOs using Adafruit BBIO tonight.