So, today I'm just going to go through real quickly about the Vehicle Hacking Villages badge that is for sale this year. Basically, here's a picture of the badge that shows some of the features that the badge has. Basically, the hardware highlights are, you know, there are four independently controllable RGB LEDs. LEDs? I'm just talking to the microphone. I don't know if it's coming out here. Okay, so the story is, there's no projector, so you aren't going to be able to see anything that I'm talking about. But we have to record this so that DEF CON can put it online. So, if you want something, my opinion is, if you want to get something valuable out of it, just come over to the Automotive Hacking Village. I'm going to be doing this talk again this afternoon. I believe it's at 3 o'clock over there. I'll also be doing it tomorrow morning. But. I'll be over there all day, all day tomorrow. Just come and grab me. We can go through it. We can do an ad hoc. If everybody in here wants me to just do it right after this, we can. Right? Assuming that there's a free spot, we can do it. So, this is kind of like a technicality here. If there was a projector, you'd be able to see. So, can you guys hear the audio okay through this? Okay. So, basically, there are four independently controllable LEDs. There's a 128 by 128 color LCD on the badge. Along with two more push buttons. And then, as far as I.O. goes, there's a USB port that can be talked. And I'll talk about that later. There are two independent CAN channels on the badge. I also break out the single wire debug Cortex header. So, if one wanted to blank this and use it as kind of an evaluation board, feel free. And then, also, I provide some pin headers for native I.O. Most important. Go to carhackingvillage.com and get the SDK. The SDK has lots of documentation. I wanted to provide enough documentation this year so that, you know, you aren't forced to use Windows, for example. Let's say you wanted to use Linux and try to use the USB port, et cetera. I give you all the information about the protocols, the Windows tools that we're going to talk about coming up here. Use to program the badge. I gave the full source code for those. So, I wanted to try to make it easy for Linux users and Mac users to use the badge this year. Basically, the badge, in a nutshell, is fully scriptable. Basically, you don't need to, you know, write raw C code, per se, to control everything that you see on the badge and to have the badge do what you need it to do. So, the scripting language that I use, just like Lash, is called Pawn. It's C-like. It's interpreted. And it's designed to run very quickly in embedded targets. It's my opinion that it's easier to write than using, you know, traditional embedded C, et cetera. And here's some information here as far as where Pawn came from and who created it, et cetera. The documentation is excellent for the language, by the way. Some more nuts and bolts. And you can read into this more as you explore Pawn on your computer. It looks like C, but there are some weird things. Semicolons are optional. There's only one real type, and that's a cell. The other one out of here is, you know, there's really no linking phase. So, basically, you just chain multiple scripts together using Pawn includes. There aren't any prototypes for functions, et cetera. So, when you look at Pawn on the badge, basically, Pawn, by itself, is the interpreter. But there are libraries that Pawn comes with, much like how there are standard libraries with C, to do core operations. These things are basically implemented through what Pawn calls native extensions. So, basically, what that means is in the Pawn land, a function is called in the Pawn world. And that maps down to something that's been implemented in C on the target. So, you know, some of these standard libraries, there's stuff in there for strings. There's stuff in there for floating point operations, et cetera. Again, the SDK has all the documentation in it, if you get it. But, more importantly, the badge has a lot of native extensions that have been created by myself to do things like control the LCD, control the LEDs, manipulate the CAN bus, et cetera. And that's where the... That's where the real power comes in. So, of course, you have to start with the hello world. So, here it is in Pawn. Looks a lot like C, as you can tell. Some of the more syntactic stuff, like, you know, main's not returning a type. It's not accepting any arguments. You don't have to put void in there. There's no semicolon after the printf, et cetera. But, you know, this script will run on the badge. And, you know, when using the badge, when you're using the right tools, you will see hello world come out of the console. So, as I mentioned before, the SDK. Download it. There's tons of great information in there. I think you'll find that it's incredibly easy to customize the badge. Even if you don't use the badge for doing CAN bus stuff, the tools that I provide, et cetera, let's say you just wanted the lights to change colors differently, or you wanted to put your own bitmaps on the LCD, should be incredibly easy for you to do that. So, I'm really excited to see how people customize this badge once they start getting into this SDK, because I think this year I tried to make the badge as accessible as possible. Last year it was accessible, but you needed an FTDI, you know, USB to UR converter. It was a little clunky. This year, in my opinion, it's very streamlined. There are lots of options. There are lots of examples. In fact, what the badge does right out of the box with the LEDs and the bitmaps being shown, that's a script that's in the include or in the example files as well. So, you could go in and just modify that if you wanted to change something. Compiling scripts. We'll talk about this a little bit more at the Village, and there are lots of readmes in the SDK on how to do this. But, basically, you invoke a binary called PawnCC. And you pass it your script. And out from that comes an AMX file. That's basically Pawn's intermediate compiled bytecode. Then, also in the SDK, there's a utility that I call qcm.exe that basically talks to the badge and loads the AMX file. So, this is a .NET application. It's a Windows application. It's very, I think, pretty intuitive to use. I mean, there are two buttons at the top of it. One says load script. So, you click on script. And you click on load script. You point it at the AMX file. Kaboom. Down to the badge it goes. And it instantly runs. Again, as I mentioned before, to help non-Windows users out, I've included the full source code for this application in the SDK with the intention of somebody being able to easily see how to talk to the badge by analyzing that source code and then creating something else, either a different script, potentially a Python script or a Perl script or something like that on Linux. So, with Pawn, one of the biggest powers, I'm just going to go through this really quickly, there's this concept of event handlers. And this is what makes Pawn so powerful in the badge because think of it as there are asynchronous callbacks that occur in the interpreter. So, they're kind of like interrupt service routines. Or something like that to where when events happen outside of the interpreter, these routines are instantly called. So, this lends itself very nicely to handling like timer expirations or a CAN message has arrived for a particular filter on a particular channel, et cetera, et cetera. Look at the examples. You'll see a lot of what I'm talking about. Timers. Again, look at the SDK. But I basically go through here and show a little bit about how timers are set up. You can see it's a very small script to kick a timer off that expires after 250 milliseconds. In main, we start the timer and we have this callback that starts with the at sign that where the timer expires, we're going to get something out of the console that says timer expired. Console routines. This example basically shows what happens when data is received over USB from the Windows PC. It basically calls a, say, circuitous callback called host RX. It passes the data. And all this example does is just print the data out in hexadecimal format. CAN interfaces. So, again, look at the SDK for this to really dig into it. I'll go to the example. If we look at the main routine at the bottom again, we initialize the CAN channel to 500 kilobits. We configure a filter. For that channel, let's say it's the filters at 7 E0 hex is the CAN ID. And in the same way as the previous example, whenever we receive a message for this CAN channel and this filter, we get this callback that starts with the at sign. And in this example, what we do is we print that data out, but we also transmit the same message out using QCM CAN TX on a different CAN channel. So this example kind of shows a real rudimentary gateway. We're receiving 7 E0, and we're forwarding on a different CAN channel, 7 E8, for example. I'm not going to spend a lot of time on the state machine stuff. Lots of examples to look at. Again, the badge PON specifics. This is also in readmes in the SDK. Basically, this is talking about some of the limitations of the badge stuff and also some of the stuff that is in the badge. As I mentioned, look at the examples folder. I've included all of the PON documentation that's available on this PON website in there as well. But if you want to look at it more in depth, feel free to look at the website. And here's my email address if you want to contact me. Feel free to contact me any time about PON, the badge, other systems that I make that basically use this system that are more robust, etc. I welcome the comments and look forward to any questions. With that, thank you very much.