Ladies and gentlemen, The Dark Tangent. Excellent. I don't know, has anybody seen Joe yet? I hear he's giving a talk in here pretty soon. Yeah, he's on the FedEx truck. Yeah, I mean, I just saw him. He's around here somewhere. Yeah, so the badge, he's going to tell you a big, long badge story. And I'm just going to give you the really short version of it. But first, I want to welcome you guys to coming to DEF CON 17. Woo! Yeah. You guys made it. I was totally fearing that nobody would show up because of this whole economy thing. And instead, I got totally screwed. Like, too many of you guys showed up too quickly. And we ran out of everything. And as usual, we play. We plan to make a bunch of badges. And you know how last year it was kind of screwed up. We're thinking, okay, we'll just order them really early, like in January or February or something. So we design all these badges. And I come up with all these ideas. Is it going to be a mechanical puzzle? Is it going to be this multi-part badge? Is it going to be a mystery challenge? What's it going to be? Hey, Joe. I was just talking about your badge. And after a while, we settled on this kind of smoother, more sleek-looking badge, one that won't tear your shirt up and can run the whole weekend without having five pounds of batteries on it or bursting into flame. Close enough. Yeah. And so we came up with this design. And Joe showed it to me working. He did a lot of work on the triggers that trigger to move into different states. And I remember you called me in this. I was in a weird panic. I figured it out. I got it to work and not go super slow and eat all the battery. Well, anyway, it goes to China. And you'll see the nitty-gritty details. But our parts sat in Chinese customs for almost two and a half months. And, yeah, that's a big boo. And so I'm thinking, okay, there's still enough time. I'll just order all the parts all over again, enough parts to make another whole complete set of badges. So we order those up. And they get stuck. And they get stuck in customs. So now I have enough parts to make, like, you can guess what processor we're using next year on the badge. Not going to be a big secret. And then at the last, so then we were preparing to make these temporary last-minute badges. And all of a sudden, it clears customs. After sitting for, like, two and a half months, it clears customs. And then it races to the factory floor. Anyway, some of you guys have badges. The last 2,200 or 2,300 more just arrived at the RIV. And they're going to be starting to get probably handed out during this talk. And then I just learned, though, from Joe, it's totally fucking plagued. Another box is missing of another about 550. So we're going to hunt that down. And then once that last box is distributed, all the badges are out. And it's great. I've already heard the craziest shit about this badge. Did you know, Joe, that if you shine an ultraviolet or infrared light, it causes it to reset? Did you know that? And then if you touch the corner, supposedly, they synchronize, all Wendertwins style. It's like, I didn't design that. Did you design that? Yeah, that synchronizing thing, I think it's a rumor. But the infrared, whatever that was, ultraviolet, that's cool. I didn't know that. Neither did I. So I'm going to let Joe kick it off. We've got, you obviously survived Thursday. How many people here think Thursday was kind of an okay idea to start a little earlier? Yeah? Wait, scream, scream, scream, mumble. Don't overlap with flat hat. Well, okay. I had to give. Never. Whoa. Okay, so we're going to be doing that again next year, probably with some changes. I mean, we'll probably still start in the afternoon, but actually have it start properly. Also, how many people here are following the Twitter pound hashtag for DEF CON? Isn't that crazy? I find myself walking down the hallway in DEF CON looking at what's going on at DEF CON. I'm like, there's something seriously wrong here. But it's the only way I can find out where all the parties are. Also, dctv.defcon.org, if you haven't discovered that yet, you can reach it from outside the network or inside the network. You can upload your videos. Yes, somebody looks at them before we make them go live. So no goatee makes it through. Or maybe some, if the people like the goatee, really creative, artistic goatee. And there's also dc17.defcon.org, and that's going to replace our homepage. And that's this awesome scrolling schedule update quick video. We're going to have a cool feed, Twitter update, everything all on one page that we've created. So dc17.defcon.org is also up and running to get your info this weekend. So I got a couple new things there. And also we're going to be uploading each day a couple of videos of the key talks of the day. Maybe five or six we'll try to get up the next day. So the hottest talks, like maybe Joe, if he's cool. It has to be good. It has to be good, yeah. We'll upload that for the people who didn't make it. And then we'll get all the videos and everything online in probably a couple of months. So we have to have some incentive for you guys to buy videos to pay for the video recording. But if you can't afford it, you don't want it, just wait a couple of months, it'll all be available online for free. Also, all the content from the CD is uploaded. It's going to be linked in live today, and then any presentation updates will happen throughout the weekend. So if you need to download the new stuff, it'll be there in a couple of days. Okay, so enough delay. I'm going to kick it off. You're sending the tracking number for the last box? Okay, you do that first. That's more important. So without any further ado, any questions from anybody? I'll take one question from that guy. What's that? I don't know if I got enough badges for everybody because we don't preregister here at DEF CON. How many people signed up so far? How many people signed up? Yes, because there's no sign up for DEF CON. A lot. We just have to show up. How many temporary badges? Oh, now that I don't know. We made about 6,000 human badges right around there. He's got all the exact numbers, what, like 5844. And then we have over 500 helpers, staff, press, this, that, the other. And so we figured with the way that Black Hat tracked down and the way the economy was doing and other cons were doing that we were going to be down 20% or so, and I don't know if that's true now. It doesn't look like it. So I don't know where you guys came from, but that's a really good thing. We also played around with the scheduling of all the tracks to try to make human flow a little easier. So we're trying to get signs set up telling you which doors to go out of and which doors to come in to try to prevent the giant clusterfuck of between sessions. And then also we've got new organizers for CTF this year. Go check them out. I don't know if they sprung their surprise yet, but there was a little surprise there that we were keeping secret for the last four or five months. I don't know if they've sprung that trap yet or not, but I'm not going to let it out now. But go check out the CTF area. And then check out the VAX. Have you seen the VAX lab in there? Has anybody seen it? We've got a retrocomputing lab where these guys carted in a U-Haul full of VAX 1170s. We got the three-phase power in there. They got the lava lamps, the sideburns. They got it all going on. They've got the whole bean bag, everything. And just bring your 1170 zero-day and put it on the punch card. Because it's ripe for the root and you've just got to figure out how to punch those cards. So they got that there. It's a really cool retro lounge right next to the Team Fortress 2 video game contest. So we've got some really cool shit this year. Thanks for coming. Here's Kingpin. All right. Has it been a year already? I feel like we were just up here doing this. How's everyone doing? Good, yeah? Are you as excited as I am? You are. I don't know if you are. All right. Well, my name is Joe Grand. Some of you guys might know me. Some of you guys might not. I'm an electrical engineer, hardware hacker, and new daddy for those of you that were here last year. Thank you. Yeah. For those of you that were here last year, know that my wife was extremely pregnant when I was up here giving the talk. And she called. And I'm like, oh, my God, she's going into labor right now. But she wasn't. But eventually she did. And made one of those. So that's Ben. He will be here one of these years. And he's probably going to start designing the badges when I get tired of it. Or when Dark Tangent gets tired of me. But, yeah, so a lot of people have asked me about that. So he's here. And he's already playing with phones. And he likes computers. So he's nine months old, by the way. All right. So here we go. The making the DEF CON 17 badge yet again. I'm just going to run through a bunch of stuff. Introduction to what the badge does. Give you a little bit of info. But I'm not giving you everything this year. And Wired Magazine isn't either. So it's up to you guys to figure out. And hopefully you're going to find a lot of fun stuff with it. I'll go through some hardware design, firmware stuff, manufacturing issues that we ran into. I don't know. Some other things. But first a haiku. Two years ago, I think it was two years ago, I wrote a poem. And I decided to write another because I missed writing poems. So here we go. This is in the program. It might give you a little idea of what this badge is about. But yeah. Check it out. It's really a haiku. I think I might try to live stream you, Joe. Oh, wait. He wants to live stream me. You want a haiku. Whatever that means. I don't know. Okay. Should I wait? You should wait. Okay. So let's see. What else? How many of you guys are actually wearing real badges right now? Yeah. All right. Cool. So you all came yesterday. Because there's about 5,000 people in line outside. And only, I guess, 2,500 are getting badges. Okay. There you go. Is that thing on yet? It's on. Okay. Are we live streaming? It's working. What's up to the internet? All right. So here's the haiku. It's a 5-7-5 format. DEF CON 17 haiku. Joe Grand, aka Kingpin, electronic badge. Audio input affects LED output. Sound and light combine. Upload new firmware with serial bootloader. Voltage reassigned. Puzzle of seven. Badge to badge interfacing using I2C. Hack badge for prizes. Clever modifications. Can you impress me? There we go. The end. There's some clues in there. All right. So I'm not showing the front of the badge because the back, I think, is more exciting. There's a few parts on this board. It's a lot simpler and a lot cleaner than previous badges. That goes along with the whole DEF CON theme for this year. Stark and simple and elegant. And that's what I was trying to go for here. So there's really three major parts. Microprocessor, microphone, RGB LED. And I'll show you some details of those. Here's the badge operation. This is all I'm going to say really about what each mode does, except the bootloader, which I'm going to talk about later. There's a bootloader mode when the badge first powers on. So if you want to hack the badge, load new firmware, you can do that in the first 10 seconds. Party mode. Quiet mode. Sleep mode. And maybe other modes. I'm going to start off with the timeline and talk about some of the customs issues. And I know Dark Tangent went over some of this, but there's probably a lot of people outside really pissed off. Which sucks to be them. But I don't know. I figure I'll explain it anyway. So we started this in December 2008 after recovering from the melee of DEF CON 16. We started this in December. Had some initial design. Some part selection. DT and I were on the phone a lot with Black Beetle, with Neil, the DEF CON artist. Trying to figure out what can we do? What cool stuff can we show off? Are there like new parts we can use? Or maybe Freescale wants to give us something really cool. So we just started picking out parts. Got an initial design going. January 2009, we already had prototype hardware set using the development boards. And I'll show you pictures of that later. And we were way ahead. I mean, everything was going smooth. No real technical problems. There were some challenges with designing the hardware, but that's all sort of standard. There was nothing that really kicked us in the ass. The goal for February was to go to Black Hat DC and meet up with Dark Tangent and show the prototype PCB design. So what you see now is actually design and completed in February. So we were like, yeah, we actually... I don't think I'm going to show the video because I haven't sanitized it. But DT Black Beetle and I received this package at Black Hat DC with all of the prototype badges. One of each. And we'd never seen it before. Only, you know, only showing screenshots of like the PCB design tool. So this package arrives. And we run into this supply closet in the middle of Black Hat DC. And there's, you know, people everywhere. And like three of us disappear into this little closet. And we shut the door. And DT pulls out his camera and he's taking a video. You weren't live streaming that, though. Taking a video. And like we're all opening, you know, each have a corner. And we're opening the envelope and stuff. And we pull them out. And we're like, oh, my God. Like these things are so cool. And we got all excited. Someone tries to come in. And Jeff's like, no. Slams the door shut. And it was awesome. And then we all walk out of there with smiles on our faces, which is a little bit weird. Sort of, you know, flushed in the face. But so we thought we were pretty much set. All I had to do at that point is write the firmware. Which could have been a problem because I kind of suck at coding. If you look at the source code, you'll see that. But we were pretty well set. So March comes around. We order all the components. We get the parts programmed. Totally set. April, I finished the firmware after meeting again with DT at Black Hat Amsterdam. He found a bunch of bugs in my code. So I had to go back and fix those grudgingly. And then May, we started shipping everything to China. We're like, there's no way anything could go wrong. We have so much time. And then, of course, we're waiting for components to arrive. Blah, blah, blah. Wait, wait, wait. And then July comes around. And the parts come through customs. And they were manufactured. And they arrived here one day earlier than they did last year. Except, yeah, I mean, my palms got just as sweaty. But they made them. Awesome. So let me just give you an example. This is the China versus UPS who sucks more contest. And yeah, okay. So this is like one portion of the entire process list or whatever you call it. Apparently, UPS only keeps on their database like the top 20 entries or something like that. The beginning of this is June 1st. So we're missing almost an entire month. We're missing a month of other crap that they're making excuses about and, you know, waiting for customs, documentation, abandoned package. Actually, right when I shipped the package, like two days afterwards on the thing, it said package exception, like returning to sender or something. I'm like, what? So I should have known right then that there was going to be big problems. So anyway, yeah, that was a big fail. So I don't really know who to blame. But I'm going to blame Chinese customs again. Yes, they're doing their job. But I just think they don't like DEF CON. And here's another one that this was the latest delivery. So you can see shipped May 21st, delivered July 22nd. What is it now? July 31st. So nine days to manufacture 6,700 badges and get them back here is pretty impressive. Oh, yeah. And then, okay. So I can't just pick on UPS. I'm going to pick on FedEx too. They get a little bit of a frown. I don't know if you can see that. But it says, delay beyond our control. Has anybody ever seen that excuse before on a shipping page? One person. Oh, thumbs down. Yeah. I mean, it's like their whole job is to deliver the package. They should be in control of the package the whole time. So this one was funny because we saw that. And this was during Black Hat. And we're like, oh, my God. So everything's done. And now the package is coming back from China. And there's some delay beyond our control. So I had a person call up FedEx. And they're like, oh, yeah, no, it's a weather problem. You know, bad weather in China. So I do a search for bad weather in China. And I didn't see anything. And the weather has to be really bad for airplanes not to take off. So I'm like, I don't know. That's just weird. So that was someone in the U.S. who called FedEx. I had the factory in China call FedEx. And I get an e-mail. And they said, oh, well, actually, the real truth is that the factory in China called FedEx. And it was that FedEx overpacked their airplane. And yours was one of the boxes they left off the plane. So sorry, it's not coming until the next day. So I don't know. That sounds like a delay within their control. Correct me if I'm wrong. But anyway, this stuff made it here a few days later than we had expected. But they're here. Is that on a napkin? No. It's on paper. Which I use a lot to write things down on. I also use a thing called a pen. It's sort of like this one but black. All right. So we're getting into a little bit of the hardware now. This is the final block diagram of what the system looks like. The free scale digital signal controller microprocessor. I'm going to get into the details of the major components on the next slide. But there's stuff like the microphones I mentioned, the RGB LED. We wanted to go with a CR2032 coin cell like we used for DEF CON 14 and DEF CON 15. We had to use two of them there. The battery last year was cool and big and awesome looking. But we wanted something a little more streamlined. So went back to the coin cell, which I like a lot. There's a bunch of other stuff on the badge that's cool. Different interfaces, JTAG serial bootloader, badge to badge communication. And I'll get into all of that. So free scale. The MC56F8006 digital signal controller. For those of you guys who have been here for the past few years, free scale has been one of the companies that have been just really, really helpful. And they love the hacker community, which is a shock to see a big company actually enjoy coming here and supporting this community. And we actually have one of the co-designers of the chip we're using here at DEF CON in the third row of the center column. So. So not only is free scale giving us discounts of stuff because they like the hacker community, their engineers are coming and enjoying DEF CON. And it turns out he's actually an old hacker from MIT from 1971 and he's a good lock picker and everything. So you never know where you're going to find good people. Anyway, I was talking to free scale and I said, all right, you know, it's time for DEF CON 17. What can you do? And they're like, well, we have this new part that's coming out. You know, it's really cool. We want to show it off. And we'll give it to you for really, really cheap. And I said, well, how cheap is really, really cheap? And they're like, well, how much do you want to pay? So I said, like, $1. And they said, okay. So, you know, for them it's just a cool way to show stuff off. And for us it's a cool way to experiment with new technologies. I've never worked with a digital signal controller or DSP before. So, you know, it's a great way to work with new things and experiment with new things using other people's money. So we got the part. The part actually hadn't even been released when we started designing with it. It was just released recently, I think in the past month or so-ish. So we started working with it in November 2008 or December 2008. And we had some alpha samples and some basic initial runs of the silicon. So it was cool. And we were encountering things that Freescale hadn't seen before. And they were sort of helping us and we were working together to, you know, put together some code. So it was actually really cool. The product page is up there now. There's all sorts of information up there. There's also information on the DEF CON CD. But it's just a really interesting part. And there's a lot of functionality and a lot of power and a lot of resources on the part that I'm not using. And that hopefully somebody here will take advantage of that. And, of course, for the batch hacking contest. This is a hard slide to see. But what's really cool about this part is typical microprocessors, you have a fixed set of what each pin does. Maybe it's an IO line. Maybe it's an A to D. Maybe it's a, I don't know, PWM output. But with this part, and actually the whole 56F family, a lot of the pins are completely interchangeable. So say, you know, pin 1 might support I2C, SPI, IO, and PWM. But then pin 4 might also support I2C and SPI. So if I want pin 1 to do something, I can point the module to another pin and use the similar module. So it's just very cool. Which let me actually, with the circuit board design, keep everything really simple. Make it really slick and route everything on the back side of the board. Because I could just move modules to work on other pins. That was fun. So there's all sorts of stuff on here that we're not using like an SPI or actually we're using the, yeah, no, SPI interface. There's a bunch of extra timers we're not using, A to Ds, delay blocks. Yeah, yeah, really cool stuff. But check it out. Check out all the data sheets. All right. So that's the microprocessor. We had that in place. We had the brains. We sort of knew what we were going to do. We wanted to have some kind of. LED do something with audio. So LED was our next thing to figure out. And it's not really that easy to just say, oh, we're going to use an LED and just grab an LED. We had to find something that looked cool, that was affordable, that actually would work with CR2032 so it didn't draw too much current. So there's just a bunch of pictures and, like, I put together some prototype things to send over to DT so he could evaluate it with his people. And we settled on a king bright part. And this one's really cool because it's rear mounting. So if you look on your badge and you realize that the LED isn't on the front of the badge. Like, if you look at most products, LEDs are just mounted right on the top of the board. In this case, it's rear mounting. So we don't have to put anything on the front side of the board. I'd never seen that before. That was sort of cool. And I don't know. It's just a nice RGB LED. And, of course, we got a good price. So that was helpful. All right. Power consumption. Power consumption was okay. So it's actually a really efficient part. And the higher the efficiency and the higher brightness, typically, the more expensive the part. So we had to find something that was relatively bright but not overly bright because then that would be too expensive. And we also didn't want something too bright because it would be really annoying with, like, everybody in here with really, really bright LEDs. So there was some tradeoffs that we had to look into. Oh, yeah. Okay. So the other thing is there's two different types of green. I don't have the actual wavelengths, but I think it's, like, 570 and 550 or 540 nanometers, something like that. There's two different types of green. One of them is, like, the true green that you see on, like, a traffic light or, I don't know, like, that guy's T-shirt or that guy's T-shirt. Sort of a real green. And then there's more of a yellowish green, like a paler green that is a lot cheaper to manufacture. Which one do you guys think we went with? And the cheaper green looks fine. You know, it actually looks great. So that was that. Yeah. It was, like, half the price. Not that you guys aren't worth, you know, spending money on. For true green. For true green. But we figured you wouldn't notice the difference. All right. So the next part we used is a Knowles Acoustic microphone. I really suck at, like, analog design and dealing with microphones and stuff. So this one was interesting to me. I basically went on to DigiKey and did a search for microphone. And there's all these vendors that came up. And there's a lot of, like, the standard through-hole electret, like, sort of boring cylinder-looking top-mounted microphones. And I'm, like, well, that's not going to work because those look really ugly. We already knew that we were going to use the rear-mounted LED. We already knew that we had the microprocessor on the back and that we were able to get everything else onto the backside. So I wanted something that was rear-mounted. I didn't know if it existed. So I ended up calling a bunch of vendors. And one company called me back right away. Which is a surprise. Because when there's one guy working on a project, a lot of times you don't really get calls back that often. Even if you say you're working on the DEF CON badge. Sometimes it works, though. So anyway, this company called me back. And I ended up talking to the sales marketing guy about the company. And I told him about DEF CON. He was, like, oh, that sounds really cool. And, you know, it's, like, all these people. Had never heard of hackers. Never heard of DEF CON. And never heard of just our whole community. And it was pretty wild. You know, they were just, like, free scale. And they're, like, wow. You know, what can we do to help? And they did help. But he told me a story about how Knowles Acoustics came about. And I thought it was kind of a neat one to share. As far as, like, using new technologies and how humongous this company is. These guys were the first one to develop a balanced armature receiver for hearing aids. I don't really know what that is. But he told me that. So I put it in the slides. And I haven't had Internet access in about a week. So I couldn't, like, go check it out. They also developed the first MEMS microphone in 1988. So MEMS meaning really, really small on silicon. In 1940. Is that 1940? I don't even know. Whatever the moon landing was. I know there's an anniversary recently. When was it, anyway? Like 1902? 59. All right. 69. Blame it on the marketing guy. I told you. I haven't been able to check this stuff. Jason Scott is yelling at me in the corner. I like your sideburns, by the way. Noob. Yeah, I know. I can design electronics. But I don't really know anything else. Um. Anyway. When he landed on the moon. Whenever that was. Um. He was wearing a Plantronics headset with a Knowles microphone. So these guys have been around since 1940. That's what it was. The 40-year anniversary. See, I'm not that stupid. Okay. Um. So. I mean, they've sold almost a billion of these MEMS-based microphones. That's a lot of hamburgers. I mean, a lot of microphones. They're using laptops, cell phones, headsets, the in-ear things. And, yeah. They're used all over the place. So for a company that sells like 300 million of these microphones a year to want to even deal with somebody like me to give us or to sell us. 6,700 is a real surprise. So I was very, very honored that they at least wanted to do that. So it's a rear mounting microphone which is very cool. It's amplified. So I don't have to deal with a lot of the initial amplification externally. Which means the signal is going to be better. Because I'm not going to have to bring a really low level analog signal out of the microphone. Process that externally. And then bring it into the microprocessor. Which actually the microprocessor does have some internal gain amplifiers. Internal gain amplifiers. But I didn't want to take the risk of committing to the hardware design. And then realizing later that there was going to be some design problem with the firmware. So having the internal amplification is really cool. And that also means that you can take that signal, route it out to whatever else you're working on and not have to deal with any of that either. So it's really tiny. That's also the only part on the board that can't be hand soldered. If you look at it, there's no pins around it at all. It's sort of this BGA, ball grid array type of device. So it has to be mounted by reflow. So it's a little harder to hack. Here's the initial development hardware. I had a free scale demo board. And some custom circuitry. Just to verify my hardware design. And make sure everything was good. There's the schematic. All this stuff is on the CD. A bill of materials. Not a lot of parts. So the bad shape concepts. One of the things we really wanted to do, as I mentioned, as DT mentioned, is make this thing look cool. Have this puzzle piece sort of thing. Where the badges all connect together. So we went through a few different concepts. The picture behind that blue thing is what they all look like when they go together. Do you guys want to see a picture of them all together? Yeah, too bad. That's for you guys to figure out. It's in the program. Oh man, that's lame. What page? Page two. Here's a close up of the assembly drawing of the main circuitry. There's a bunch of test points around there. I'll get into what those are. But they're actually test points. They're pads. They're small. You have to solder to them. Boo hoo. That's going to make badge hacking harder. But given that this is the fourth year of the badge hacking contest, you should be able to solder by now. Yeah. Some power measurements for the different modes. Not very exciting. Here's some estimates that I made based on the power consumption. DT had mentioned that this badge will last all weekend. It won't. Well, it might. Yeah. So let me explain something. These estimates are based on typical DEF CON attempts. So you're up for a long time, and maybe you sleep a little bit. I actually put in here 12 hours of sleep per night. Because when the badge detects that there's no sound, it goes to bed. That's why sometimes you look at your badge and it's off. It's not broken. It's sleeping. But just yell at it, and it will wake up again. So we did some estimates saying, OK, even 12 hours of sleep with the LEDs and all these different modes, around two, two and a half days. But, yeah. That's all right. We'll see what happens when the battery starts dying. It might be interesting. So development environment. Oh, yeah. OK. So that's all the hardware stuff. We're going to just quickly move into the firmware stuff. For the dev environment, if you're interested in hacking your badge, we're using another version of Free Scale Code Warrior that is, again, free on their website, on the CD, up to 16K of flash. This device has 16K of flash. If I remember correctly. So everything's free. And yeah, the tools are on the CD this time as opposed to last time where they were left off. The development environment is sort of standard. You program it and see. There's a bunch of source code examples available on the Free Scale site. And then there's obviously the source code of the badge you can look at. But one cool thing is the processor expert, which is sort of a GUI to help you configure all the peripherals on the badge. Because there's a lot of them. And you need to select which pins they want to go to. And all of these different functions. You could do it all in source code if you want to, all on your own. Changing register values. But I tried that. And you might as well just use this. Trust me. It's there for a reason. It's a very, very powerful part. And it also generates all of the code required to use that module. So say with the serial port. If you're messing with that. You set the baud rate. You set your parity. Everything. Your pins. And then there's another tab that actually sets which functions it's going to generate. generate, like send character, get character, all the things that you would normally have to do on your own, so that's very useful. For the signal processing of this badge, if you notice while I'm talking, you look down, the badge is pulsing sort of along with my voice. That was intentional. And that is using a fast Fourier transform. So without getting into the math of it, which I don't understand, basically the function is taking in input signals from the microphone, and then breaking it out into discrete bins, or frequency elements. In our case, I think it's like, there's three different bins, sorry, seven different bins based on input frequency, and then I look at the power of those and figure out how to set the RGB LED color and brightness. Is that video actually running? Yeah, so here's a tone sweep that I ran showing the FFT on an oscilloscope, and you can barely see it. But there is one high peak of power that's moving across, and that's the main frequency, and you can't hear the tone at all, but trust me, it's going up. Oh, it's over. Yeah, I know, I'm a noob. Hey, that's the same slide. Here we go. All right, I don't know if you can hear that, or even see the little purple thing. It's the purple line, but it's kind of neat. What's that? The sound is making the badges cycle. Oh, okay, that's good, so I don't have to show a video of that. Yeah, so try to run a tone sweep on your badge and watch the LED change color and brightness. It's sort of cool. Badge-to-badge communication, yes, this thing's a puzzle. Yes, they connect together, but it's not only visual. It uses I2C, and all of the badges can communicate with whatever else is connected onto that bus. Using SEL, SDA, and GRAM. Which are conveniently all located right next to each other. The human badge is always the master, and all the other badges are slaves. So when you connect them together, the master is going to start sending data, and the slaves are going to respond to that data and set their LEDs accordingly. The master only checks for slaves on power up, so what you want to do is install batteries into all the slaves first, and they'll just go into their regular mode. Plug in the master, and it's going to control them all. What's that? What's that? One badge to do them all. Yeah. That was his joke. I don't even get it. Yeah, that movie came out in 1940. All right, so each of the badges is individually addressable. You can have all seven badges connected at once, or you can have all seven human badges connected at once if you change the address of all of the other human badges. Because each badge type is set with three different resistor values on three of the lines. So check out the schematic to see which one means what. And then the data format that we're sending through I2C is just an address. So you send the address of the badge you want to communicate with, and then you send your RGB values to the badge, and it will respond. Actually, here's a view of the data that's being sent as soon as it detects that there's other badges. So it's sending lots of data. In this case, I'm sending data to pulse through different colors. But it's kind of neat. And then if you want to load on your own firmware, it's a little harder this year than previous years. There's no connector right there for you. Boo. That was intentional. It's a serial static bootloader. Previous years, we had to have, like, custom drivers, and we had to use some custom hardware. This year, all you need is a serial port and a terminal program. I put hyperterminal because it seemed to work really well. You can use whatever you want. So what you do with the code, you modify the user code. You recompile it. You have to make some changes to the code once it's compiled to make sure that your reset vector when the badge starts up points to the bootloader and not to your user code. Because if it points to your user code, you're never going to get back to the bootloader to reload new stuff. There's a comment in CPU. So if you're interested in that, look through it, and there's a step-by-step on how to do it. It's actually really easy. But you have to work a little harder to load firmware onto this badge. The bar has been raised a little bit. You do need a level shifter because the badge is outputting a 0 to 3 volt TTL level serial, and you need to interface that. So Hardware Hacking Village Kit has some of those available. I posted on the DEF CON forums a few weeks ago about that. So I know some of you guys brought them. But there's a few floating around. And here are the settings. This is a 19.2K setting. Pretty straightforward. So here's a small little video just so I don't have to actually explain how it works. All you have to do is you get your hex file that was compiled from Code Warrior and then upload that text file through the terminal program. Let's see if I can start this video. I'm new at this. Oh, it is? Cool. This is the header string that comes up. Serial bootloader started waiting for application as record. So when you compile the code, it creates this text file. So all you have to do is go and send text file. So now I'm going to send the firmware to the badge. So this would be something if the person wants to modify the badge. And add their own firmware and stuff. They don't need any special hardware at all, which is really cool. So I'm going to pick the file. And now it's loading it. Load, load, load, load, load. This is going to take a little while. But as I mentioned, if the person doesn't load the file within 10 seconds, then the badge goes into the regular mode. So this bootloader mode only happens on power up. So most people won't see that. All right. There we go. Complete starting user application. Then we jump to the actual DEF CON badge functionality, which is there. Welcome to DEF CON 17 badge. All right. Whoa. That video was for Dark Tangent, by the way. So it's kind of cool. In case you totally brick your badge, there is a JTAG port on board. And the pinouts are there. But there's no JTAG connector on board. Boo. That was also intentional. Yeah. Well, they cost money. And it also looks really ugly. So I built a little board to help in the process. If you do brick your badge, it's going to be up in the hardware hacking village. And it's just a pogo pin thing that plugs on in place. What's that X mean? Okay. I'm done. Here's some pictures of the badge assembly. This presentation is going to be online. Pictures of the badge assembly in China as they're being manufactured. They're sort of cool with the pick and place machine. There's a bunch of Uber badges. The black badges. Ooh. Cool. And here we go. Badge types are 6700 almost. Time-wise it took 186 hours. Mostly firmware this time as opposed to hardware. And then a bunch of other stuff. And how long did it take to build the slide? About a minute. I'm a pro at keynote. Okay. And then the badge hacking contest. This is it. This is it. Give me submissions by Sunday 2 p.m. in the hardware hacking village. Check out the links on the side for previous contests and what you should sort of set your status and set your submissions to be. Oh, no. It's right there. It's on the left. And it's a black badge contest now. So come prepared. And I just need to thank, again, Freescale, eTechNet, DT, Black Beetle, Neil, Keely and Ben for dealing with me again. And that's it. So thanks for coming. Enjoy the badge. And we'll see you at the award ceremony.