1 00:00:00,000 --> 00:00:02,860 All righty, it's about 4.30 so I'll start. 2 00:00:02,940 --> 00:00:18,500 Hi everyone, my name is Varjits Jiva and I'm going to talk to you guys about how I got annoyed with a bunch of paywalls while I was trying to program my digital gauge cluster into my Cadillac ATS-V, figured it out, put it up on GitHub and helped a bunch of people. 3 00:00:18,820 --> 00:00:22,500 So I have 35 slides in 25 minutes so we're going to get going. 4 00:00:22,760 --> 00:00:30,200 So the overview for this talk, I'm going to introduce myself on the project, what project points made this possible, how the hell I figured it out. 5 00:00:30,200 --> 00:00:35,420 The high-level process results in the future of GM programming and open source. 6 00:00:35,720 --> 00:00:40,800 So an introduction to myself, I'm just a software engineer but I'm into cars. 7 00:00:40,800 --> 00:00:48,840 I grew up in the Fast and Furious era so I was into Japanese cars for a long time and I somehow ended up buying a Cadillac ATS-V earlier this year. 8 00:00:48,840 --> 00:00:52,660 It was a six-speed manual with 400 wheel horsepower and I love that thing. 9 00:00:52,660 --> 00:00:54,700 I fall more in love with it every single day. 10 00:00:54,700 --> 00:00:56,200 But I almost didn't buy it. 11 00:00:56,200 --> 00:00:56,940 Why? 12 00:00:57,020 --> 00:00:59,400 Because it came with a gauge cluster on the left. 13 00:00:59,400 --> 00:01:00,400 It's needles. 14 00:01:00,720 --> 00:01:05,020 2016 to 2019 this car was made and GM shipped it with needles. 15 00:01:05,020 --> 00:01:12,300 The rest of the fleet that they had had digital gauge clusters with the fancy stuff you see on the right but for my car they never made it. 16 00:01:12,300 --> 00:01:21,020 But I bought a bit the bullet and bought the car because turns out people were selling programming services to retrofit a digital gauge cluster into my car. 17 00:01:21,060 --> 00:01:25,780 So when I went into that there was one dude that paid me $350. 18 00:01:26,020 --> 00:01:27,320 Then you can do it. 19 00:01:27,760 --> 00:01:30,220 And this was the only guy doing it for a long time. 20 00:01:30,220 --> 00:01:33,380 Then some other dude showed up from the shadows of Facebook marketplace. 21 00:01:33,380 --> 00:01:35,040 It was like $250. 22 00:01:35,040 --> 00:01:36,160 I was like, huh? 23 00:01:36,160 --> 00:01:37,760 How did this guy figure it out? 24 00:01:37,800 --> 00:01:39,460 And then I look a little bit further. 25 00:01:39,460 --> 00:01:47,160 There's another guy on a Corvette forum that put a 2021 digital gauge cluster into his 2019 C7 Corvette. 26 00:01:47,300 --> 00:01:48,140 And I was like, huh? 27 00:01:48,140 --> 00:01:51,000 If those two people can figure it out then I should be able to. 28 00:01:51,000 --> 00:01:55,840 And then there's a couple of people selling courses and weird tools and all the sketchy websites. 29 00:01:55,840 --> 00:01:58,160 I don't want to pay any of these people any money. 30 00:01:58,160 --> 00:01:59,120 I just want to figure it out. 31 00:01:59,120 --> 00:02:01,100 I don't want to go bankrupt in the process too. 32 00:02:01,300 --> 00:02:05,020 So what project points actually made this possible? 33 00:02:05,380 --> 00:02:16,780 So first, the 12.3 inch gauge cluster I'm talking about, the fully digital one, was available in a whole bunch of Cadillac models of the same year but with different views and stuff like that. 34 00:02:16,780 --> 00:02:18,640 They just didn't ship it with my car. 35 00:02:18,740 --> 00:02:23,280 On top of that, the plug that was on the back of this thing was the same thing as my car. 36 00:02:23,280 --> 00:02:25,380 So that was already a good indication. 37 00:02:25,620 --> 00:02:37,580 Then the view that I want to see on this 12.3 inch cluster was the same thing that was available on a Cadillac CTS-V Sport, which was the same engines, 3.6 liter twin turbo with the gauges and everything. 38 00:02:37,760 --> 00:02:38,920 It's got what I needed. 39 00:02:39,040 --> 00:02:49,120 And then turns out that between the needle gauge cluster and the 12.3 inch digital one, the total set of configuration flags was the exact same between the two. 40 00:02:49,120 --> 00:02:55,340 So basically what I'm saying is this gauge cluster could have fit my car the whole time, but GM just decided to not ship it. 41 00:02:55,340 --> 00:02:57,580 So that's why this programming became a thing. 42 00:02:57,660 --> 00:02:59,380 And here's how I figured it out. 43 00:02:59,380 --> 00:03:00,580 And here's the funny thing. 44 00:03:00,580 --> 00:03:08,240 I've added a counter into these slides where people sell courses and tools on how to do this stuff. 45 00:03:08,240 --> 00:03:12,260 And that total ran up to over $1,000 just to do this one thing. 46 00:03:12,260 --> 00:03:16,980 So I'll show you through these slides, how much you get to save by just listening to the presentation. 47 00:03:17,240 --> 00:03:23,920 So from the beginning, let's say you're me, you have this car and you want to retrofit this cluster into that. 48 00:03:23,980 --> 00:03:31,260 So the programming advertisement, they'll tell you, get any of the 12.3 inch clusters from any of the car, any of the Cadillac cars from the same year. 49 00:03:31,360 --> 00:03:36,720 And then we'll program it to show the V cluster on there and what the correct red line and all this stuff. 50 00:03:36,720 --> 00:03:47,080 I was like, there's no way they made the graphics and stuff like that themselves. 51 00:03:47,080 --> 00:03:54,600 But was there a car that had the same basically engine and stuff that could show the right view? 52 00:03:54,600 --> 00:03:57,160 It was like, yeah, it was the Cadillac CTS Vsport. 53 00:03:57,160 --> 00:04:05,640 So I just had to get a 12.3 inch cluster, doesn't matter from what car, show that specific car's view and then put it into my car. 54 00:04:06,220 --> 00:04:11,760 So how do I make my cluster look like the one from the target vehicle? 55 00:04:12,120 --> 00:04:21,080 So I ended up buying a cluster from a 2017 Escalade and I had to make it show the view for the 2017 Cadillac CTS Vsport. 56 00:04:21,280 --> 00:04:24,520 So the first thing I did with this cluster was pop the back of it. 57 00:04:24,520 --> 00:04:29,660 If you see the middle chip right there, it's the middle to the little bit to the right, there's a silver one. 58 00:04:29,660 --> 00:04:31,940 That's a Texas Instruments ARM CPU. 59 00:04:31,940 --> 00:04:33,280 It was Linux based basically. 60 00:04:33,280 --> 00:04:36,440 So I'm looking at PNG files, whatever, all those graphics. 61 00:04:36,440 --> 00:04:39,240 So it's pretty straightforward, I guess, at that point. 62 00:04:39,240 --> 00:04:44,600 But the next three questions I had at this point were, one , can this cluster connect to my car? 63 00:04:44,600 --> 00:04:46,460 Two, are the right files on there? 64 00:04:46,460 --> 00:04:50,760 Do I have to somehow patch them to get the right gauge cluster to show up? 65 00:04:50,760 --> 00:04:56,140 And three, how do I configure the cluster to work with my car, with my specific feature set and stuff? 66 00:04:56,720 --> 00:05:05,660 So those three questions actually relate to the three steps of CAN bus module programming in GM. 67 00:05:05,660 --> 00:05:20,300 First, you have to configure authentication, then programming for like the general purpose firmware, software, whatever, and the setup and configuration to set the config flags according to what your car has. 68 00:05:20,760 --> 00:05:23,560 So the first thing, can I just plug and play this cluster? 69 00:05:23,560 --> 00:05:24,340 No. 70 00:05:24,340 --> 00:05:29,700 The first thing that you have to do is actually make sure that the cluster can authenticate with the rest of the CAN bus. 71 00:05:29,800 --> 00:05:36,160 And it does that with two specific pieces of information, which is the VIN number and the security pin, which is derived from the VIN number. 72 00:05:36,360 --> 00:05:40,240 So all I had to do was program those onto the cluster. 73 00:05:40,240 --> 00:05:41,300 But how do you do that? 74 00:05:41,300 --> 00:05:42,640 I looked in the back of the thing. 75 00:05:42,640 --> 00:05:48,240 And if anyone in here has ever touched a gauge cluster before, usually this kind of information is stored on an EEPROM chip. 76 00:05:48,240 --> 00:05:56,820 So I already had one of the best this market is a CH341A EEPROM programmer, which is like $5 on AliExpress. 77 00:05:56,820 --> 00:06:00,580 And it turns out that the chip that was holding this was an I2C24C16. 78 00:06:01,180 --> 00:06:05,780 People were selling a tool that can do this programming for $100. 79 00:06:05,780 --> 00:06:08,360 I figured it out for $5 and I read the chip. 80 00:06:08,400 --> 00:06:10,220 So what I did was I read it immediately. 81 00:06:10,220 --> 00:06:13,100 I didn't even have to repin it, just read the chip, dumped it. 82 00:06:13,100 --> 00:06:18,340 And it turns out that in plain text, the first 17 digits was the VIN number. 83 00:06:18,340 --> 00:06:21,980 And there's a suspicious four digits right under, which is the security pin. 84 00:06:21,980 --> 00:06:27,160 All I did was set those to my values for my car, and immediately it worked. 85 00:06:27,160 --> 00:06:32,740 The first thing this picture shows is that the cluster works with my car. 86 00:06:32,740 --> 00:06:35,420 It's pulling values and stuff, but it's just not showing the right thing. 87 00:06:35,420 --> 00:06:41,140 And I know this worked because you could see that the mileage for the vehicle actually showed up there. 88 00:06:41,140 --> 00:06:46,380 In GM, the mileage for the car is actually not stored in the gauge cluster like other cars. 89 00:06:46,380 --> 00:06:49,500 It's actually stored in the body control module. 90 00:06:49,580 --> 00:06:57,400 And if your module fails to authenticate with that module because of the mismatch of the VIN and pin, then that mileage will actually show up as dash, dash, dash. 91 00:06:57,440 --> 00:07:02,640 So I know I got this right because I got the odometer to show up actually. 92 00:07:03,060 --> 00:07:03,760 So cool. 93 00:07:03,760 --> 00:07:05,280 I got it to connect to the car. 94 00:07:05,280 --> 00:07:08,260 Now, how do I make sure the right files and the graphics are on there? 95 00:07:08,260 --> 00:07:13,720 So now I'll talk a little bit about how GM programming actually works with the DO software called SPS2. 96 00:07:13,720 --> 00:07:18,380 I don't exactly remember what the acronym means, but that's basically the DO software. 97 00:07:18,380 --> 00:07:25,540 You get that, you get a subscription with that VIN number for your car, $45 for two years, not expensive. 98 00:07:25,540 --> 00:07:29,780 Then you get the dealer cable, $186, not a big deal either. 99 00:07:29,840 --> 00:07:39,460 So the programming step, what this does is that it loads the firmware, all the software, whatever it needs just to run the general purpose of this module. 100 00:07:39,860 --> 00:07:51,340 So there's even a step before this because in the world of GM programming, people can actually check what files are going to be loaded by the software into the modules before ahead of time. 101 00:07:51,400 --> 00:07:58,460 And surprisingly, there was a light version of this running on the internet open to the public, which is hosted by Opal. 102 00:07:58,460 --> 00:08:03,400 Turns out that GM has been selling their Canva system to a whole bunch of other manufacturers. 103 00:08:03,400 --> 00:08:05,800 One of them being Opal, Skoda, I think. 104 00:08:05,800 --> 00:08:08,300 And then I think a Chinese manufacturer, I don't remember. 105 00:08:08,460 --> 00:08:15,220 But it turns out I use this website just to check what programming files are going to be loaded into this module. 106 00:08:15,260 --> 00:08:20,240 And I did that by taking the VIN number from my donor Escalade cluster. 107 00:08:20,240 --> 00:08:25,360 I took the VIN number from a target car, which is the Cadillac CTS-V Sport. 108 00:08:25,360 --> 00:08:32,440 And I just ran the programming steps to just see what VIN number was going to come out. 109 00:08:32,440 --> 00:08:34,460 These numbers are actually called calibration numbers. 110 00:08:34,460 --> 00:08:35,280 That's how you know. 111 00:08:35,280 --> 00:08:40,340 It's a unique identifier in the GM world where they say this has this specific set of files in it. 112 00:08:40,340 --> 00:08:44,600 It turns out, though, that the number is the exact same in both of these cars. 113 00:08:44,600 --> 00:08:51,260 That means that my Escalade cluster already had the views that I needed for a CTS-V, which is a sports car. 114 00:08:51,260 --> 00:08:53,240 It was already on all these cars. 115 00:08:53,240 --> 00:08:55,300 I just had to be able to reveal it. 116 00:08:55,300 --> 00:08:56,580 And how do I do that? 117 00:08:56,580 --> 00:09:02,280 That gets to step number three, the setup and configuration of GM programming. 118 00:09:02,280 --> 00:09:06,400 So now I have to actually set the configuration values according to what I need. 119 00:09:06,400 --> 00:09:08,560 So a couple of slides here. 120 00:09:08,560 --> 00:09:13,800 This is actually some screen caps from when you actually go to get SPS-2 from ACDelco. 121 00:09:13,800 --> 00:09:17,720 You go to this website here, you sign up for your VIN number, you download the thing. 122 00:09:17,720 --> 00:09:20,680 It's a Java-based program. 123 00:09:21,020 --> 00:09:27,000 And you go into here, then you see right there instrument cluster, you go to set up a configuration, just run that. 124 00:09:27,640 --> 00:09:37,620 And it does a two-step process where it pulls the files from the GM servers, stores it on your computer, and then programs it against your car. 125 00:09:38,120 --> 00:09:43,720 And it turns out that they dumped all these files to your local C drive. 126 00:09:43,800 --> 00:09:46,520 So a couple of bonus slides here where you can save some money. 127 00:09:46,900 --> 00:09:47,860 $450. 128 00:09:47,860 --> 00:09:50,360 This one was $450, which is ridiculous. 129 00:09:51,580 --> 00:09:56,720 This is how to grab any BIN file or config files from SPS-2 for any vehicle. 130 00:09:56,720 --> 00:10:01,800 All you have to do is buy the VIN number for the car that you don't have in front of you. 131 00:10:02,080 --> 00:10:11,060 And then you just have to connect to your car, even though it doesn't have the right VIN number, and then just download and then run the programming for whatever you need for whatever module. 132 00:10:11,060 --> 00:10:13,180 It'll save the files to your computer. 133 00:10:13,280 --> 00:10:16,380 And then as soon as it's done downloading, yank the cable from your car. 134 00:10:16,380 --> 00:10:17,120 That's it. 135 00:10:17,120 --> 00:10:19,780 That's all I did to pull out these files from the car. 136 00:10:19,780 --> 00:10:23,920 And the thing is, people were advertising emulators online for this. 137 00:10:23,940 --> 00:10:30,920 This would have $450 just to do this when there's an override button right in front of you with a screen cap. 138 00:10:31,300 --> 00:10:34,700 And also those emulators get you banned from the GM server. 139 00:10:34,700 --> 00:10:39,180 So instead of paying $450, press an override button, which is ridiculous. 140 00:10:40,360 --> 00:10:47,420 Then another bonus slide, how to grab the security PIN for a VIN number from the car for a VIN number from GM. 141 00:10:48,240 --> 00:10:56,260 So what you do here is that you actually run a dummy configuration that's just kind of safe because it only sets configuration flags in your module. 142 00:10:56,260 --> 00:10:59,880 All I did was run that with a vehicle that I don't own. 143 00:10:59,980 --> 00:11:01,840 Well, I don't have access to it really. 144 00:11:01,880 --> 00:11:06,820 And then just running against my car, it'll just fail to authenticate with the module inside the car. 145 00:11:06,820 --> 00:11:09,060 So then it'll just bomb out, doesn't do anything. 146 00:11:09,060 --> 00:11:11,920 And then you go check inside the C drive over here. 147 00:11:12,020 --> 00:11:16,620 And there's a file right here called SPS tool bridge, toolbridge.log. 148 00:11:16,620 --> 00:11:20,920 Right there's the VIN number that I was attempted and the security PIN that was right there. 149 00:11:20,920 --> 00:11:24,100 So right then and there, you get it for free. 150 00:11:24,100 --> 00:11:25,220 Well, almost for free. 151 00:11:25,220 --> 00:11:32,080 There's also VIN to PIN services that you could buy online for $50 from some random website, or you can get it from GM directly using this method. 152 00:11:32,760 --> 00:11:42,120 Now, before I can explain what I did for the configuration flags, I have to explain two things, what a build code and RPO code is. 153 00:11:42,220 --> 00:11:52,860 So in those local files I was talking about earlier, there's a build record at BLD, which has your VIN number, chassis code, and then a bunch of things called RPO codes. 154 00:11:52,860 --> 00:11:56,060 These are build codes or like option codes for stuff in your car. 155 00:11:56,060 --> 00:11:59,840 Like, oh, if you have a digital cluster or this fancy suspension, whatever. 156 00:12:00,140 --> 00:12:05,860 Then there's an S3 file right there where ACDelco publishes every single RPO code that they've ever made for GM. 157 00:12:05,860 --> 00:12:07,260 And you can just look it up there. 158 00:12:07,380 --> 00:12:13,680 And the next file that was inside the C drive was an XML file that says something quite interesting. 159 00:12:13,680 --> 00:12:26,720 It turns out it is a logical mapping of P underscore whatever flag that says, set this flag to this value based on the existence of this RPO code and this chassis code in the car. 160 00:12:26,720 --> 00:12:39,220 So I looked through this and I knew that I wanted to get the gauge cluster from a CTS vSport, which has the chassis code of 6AL69 right there and the engine code. 161 00:12:39,360 --> 00:12:50,200 And turns out that right here, PDDH variant gets set to the value of 6 to get the V fancy graphic out. 162 00:12:50,200 --> 00:12:58,260 So all I did was edit this file to include my car, which is a 6AE47 chassis code with an engine code of LF4. 163 00:12:58,260 --> 00:13:04,920 I left the UDV in there and then edited my build record to have a UDV, which is for the 12.3 inch cluster. 164 00:13:04,920 --> 00:13:06,560 UDD is for the needle one, whatever. 165 00:13:06,560 --> 00:13:12,680 I just changed it just so that all the files that get enabled by this XML file will be for my car. 166 00:13:12,680 --> 00:13:14,180 So it fully works. 167 00:13:14,440 --> 00:13:17,740 And then as soon as I did that, saw this, ran to my car. 168 00:13:17,780 --> 00:13:19,840 Oh yeah, by the way, this would have cost an extra $350. 169 00:13:19,840 --> 00:13:22,160 We're at $950 right now already. 170 00:13:23,260 --> 00:13:24,700 Ran to my car. 171 00:13:24,820 --> 00:13:27,420 Press the configuration function. 172 00:13:27,420 --> 00:13:31,140 Turns out that also the cache files on here are not checksum. 173 00:13:31,140 --> 00:13:38,200 You could just edit the and GM will just, you know, detect the existence of the files, not even check anything else. 174 00:13:38,200 --> 00:13:40,800 You click, it'll just run with the files on your disk and then that's it. 175 00:13:40,800 --> 00:13:46,200 So I managed to click programs to this thing for free without paying anyone anything, which is fucking awesome. 176 00:13:46,660 --> 00:13:48,880 So tying this all together, high level process. 177 00:13:49,100 --> 00:13:50,720 There's a list of requirements right here. 178 00:13:50,720 --> 00:13:52,880 I'm not going to read this all out to you guys. 179 00:13:54,420 --> 00:13:56,220 High level programming steps. 180 00:13:56,360 --> 00:14:04,960 It's just setting up your Windows laptop, then running a cluster configuration with your OEM cluster just to get the RPO codes and the XML files out. 181 00:14:05,040 --> 00:14:13,940 Then you edit the EEPROM on the cluster, which I explained earlier, then also edit the cache files locally, and then just run the configuration again. 182 00:14:13,940 --> 00:14:14,880 And that's it. 183 00:14:15,140 --> 00:14:18,760 So the future of GM programming and open source. 184 00:14:19,500 --> 00:14:23,800 I posted this right away on GitHub and I posted it right away in the Cadillac forum. 185 00:14:23,800 --> 00:14:28,160 So a few people actually got to use this and fix their own problems, which was really nice. 186 00:14:28,160 --> 00:14:33,360 But the crazy thing is I don't understand how I had to spend a thousand dollars just to figure this out. 187 00:14:33,360 --> 00:14:39,840 And thank God I did not pay any of that money because for how complicated this process was, it really wasn't that complicated. 188 00:14:39,840 --> 00:14:45,520 Most of the stuff was just open to the public, open on your laptop, open on the internet. 189 00:14:45,520 --> 00:14:46,820 It didn't really make sense. 190 00:14:46,820 --> 00:14:57,640 So I hope that with this, that more people get into modifying their GM cars to do cool stuff like this without having to pay $350 and stuff like that to do this stuff. 191 00:14:57,720 --> 00:15:01,180 So I really hope that this helps maybe a couple of people. 192 00:15:01,380 --> 00:15:07,160 A big shout out to the DEF CON conference and the Car Hacking Village for selecting my talk. 193 00:15:07,160 --> 00:15:08,760 This is actually my first DEF CON ever. 194 00:15:08,760 --> 00:15:10,460 So being up on the stage is crazy. 195 00:15:10,460 --> 00:15:12,380 So thank you guys so much. 196 00:15:12,380 --> 00:15:13,260 And yeah.