1 00:00:00,600 --> 00:00:02,100 Hello, thank you everybody for coming. 2 00:00:02,500 --> 00:00:09,000 My name is Joe Grand, also known as Kingpin, and it's an honor to be here in Beijing and 3 00:00:09,000 --> 00:00:11,880 present to you the first electronic badge for DEFCON China. 4 00:00:12,940 --> 00:00:18,740 Like DarkTangent just mentioned, badges have always had a special place in the DEFCON community, 5 00:00:18,980 --> 00:00:24,760 so it's really an honor to come here and talk about the development process and show you 6 00:00:24,760 --> 00:00:29,760 why we feel so strongly and why we think that electronic badges are so cool and why they're 7 00:00:29,760 --> 00:00:31,740 going to continue to be a part of the hacker culture. 8 00:00:34,420 --> 00:00:37,100 So here are some of the early electronic badges. 9 00:00:37,540 --> 00:00:43,420 And this is something like when we first released an electronic badge at DEFCON 14, we didn't 10 00:00:43,420 --> 00:00:44,460 know what people would think. 11 00:00:44,600 --> 00:00:46,400 Nobody had really tinkered around with electronics. 12 00:00:46,840 --> 00:00:51,380 And we wanted to give them a platform that they could learn electronics and kind of something 13 00:00:51,380 --> 00:00:54,320 that would make it easy enough for them to get excited about it. 14 00:00:54,760 --> 00:00:59,620 And over the years, things got more complex, more interesting games and things. 15 00:00:59,620 --> 00:01:00,640 Things that people could do with them. 16 00:01:00,820 --> 00:01:07,060 And that's what we're trying to sort of spark over here as well, is we have more of an entry-level 17 00:01:07,060 --> 00:01:12,100 badge, if you will, and I'll talk about some of the process and the functionality of it. 18 00:01:13,080 --> 00:01:17,840 But over time, things might get more complex as more and more people start hacking on hardware. 19 00:01:18,040 --> 00:01:19,480 So it really is very fun. 20 00:01:19,700 --> 00:01:24,760 And being an electronics designer, this has always been an area for me that has just been 21 00:01:24,760 --> 00:01:28,680 fascinating of having something in your mind and then being able to turn it into a physical 22 00:01:29,620 --> 00:01:30,520 thing that people can use. 23 00:01:33,460 --> 00:01:38,020 So the goals of designing the badge for DEFCON China really was to bring the community together 24 00:01:38,460 --> 00:01:39,940 and then let you walk around. 25 00:01:40,220 --> 00:01:44,420 And as you experience DEFCON, you sort of get rewarded for that. 26 00:01:44,680 --> 00:01:46,640 And I'll show you a demonstration of it a little bit later. 27 00:01:46,860 --> 00:01:50,460 But just really quickly, if you look on your badge and if you put the battery in, you might 28 00:01:50,460 --> 00:01:53,200 notice that there's nothing lit up or anything. 29 00:01:54,040 --> 00:01:59,080 But if you turn it over, there's a little flexible connector on the side. 30 00:01:59,620 --> 00:02:01,640 Not the USB connector, but on the other side. 31 00:02:01,920 --> 00:02:07,240 That's what you use to plug in as you complete different tasks around the event, and different 32 00:02:07,240 --> 00:02:08,680 lights will light up on your badge. 33 00:02:08,980 --> 00:02:10,660 And the goal is to complete them all. 34 00:02:10,880 --> 00:02:14,360 And by doing that, you would have tried out a lot of different things at DEFCON. 35 00:02:14,500 --> 00:02:19,200 So a little bit of a game to get everybody together and build this community and sharing 36 00:02:19,200 --> 00:02:21,420 information about, oh, how did you turn that light on? 37 00:02:21,520 --> 00:02:22,680 How did you turn that light on? 38 00:02:22,720 --> 00:02:23,740 And sharing information. 39 00:02:31,120 --> 00:02:33,520 So I thought it would be fun to show some of the early concepts. 40 00:02:33,740 --> 00:02:38,480 Because when you're designing anything, even if it's a piece of software or a piece of 41 00:02:38,480 --> 00:02:41,900 hardware, you always start off with some concepts and some scribbles and notes. 42 00:02:41,960 --> 00:02:45,220 And over time, things change and things get refined. 43 00:02:45,580 --> 00:02:49,780 So when the Dark Tangent and I were talking about what can we do for DEFCON China, I really 44 00:02:49,780 --> 00:02:51,440 wanted to try this flexible circuitry. 45 00:02:51,500 --> 00:02:52,400 I'd never used that before. 46 00:02:53,220 --> 00:02:59,360 We wanted to have this tree of life that kind of symbolized this growth as you experience DEFCON. 47 00:02:59,620 --> 00:03:02,320 And in theory, it sounded really simple. 48 00:03:02,740 --> 00:03:06,560 In practice, as you'll see, it was a very complicated process. 49 00:03:06,700 --> 00:03:09,560 But we still wanted to make it appear very simple. 50 00:03:10,200 --> 00:03:13,220 So we had some kind of sketches and inspiration that we started with. 51 00:03:14,680 --> 00:03:15,940 Some other pictures as well. 52 00:03:16,080 --> 00:03:19,160 A lot of times with the development process is you would start prototyping. 53 00:03:19,240 --> 00:03:23,900 So build up a little bit of electronics to make sure things work before you go to an actual 54 00:03:23,900 --> 00:03:26,200 production type of device. 55 00:03:26,960 --> 00:03:29,560 So we have some hand-built... 56 00:03:29,620 --> 00:03:30,440 Electronics. 57 00:03:30,460 --> 00:03:31,600 Of course, that's not all of it. 58 00:03:31,640 --> 00:03:35,180 Because if you look at the electronics on the back here, there's a little more functionality 59 00:03:35,180 --> 00:03:36,040 going on there. 60 00:03:36,460 --> 00:03:39,580 Some early paper sketches and some debugging of things. 61 00:03:42,260 --> 00:03:46,340 And then we finally come to a point, once we refine it enough, to the real design. 62 00:03:47,180 --> 00:03:53,800 And this platform for this badge, we originally and intentionally created as this reusable 63 00:03:53,800 --> 00:03:56,280 platform that you can use after the conference as well. 64 00:03:57,080 --> 00:03:59,120 And that's something that's also really important. 65 00:03:59,120 --> 00:04:03,760 It's sort of this electronics reuse and being able to take something and modify it after 66 00:04:03,760 --> 00:04:04,120 the fact. 67 00:04:04,260 --> 00:04:08,120 So we can use it at the conference and then we can go home and we can write some extra 68 00:04:08,120 --> 00:04:08,820 code for it. 69 00:04:08,880 --> 00:04:12,380 Or we can cut it apart and add our own electronics to it. 70 00:04:12,500 --> 00:04:15,280 And that's what we really wanted, is something that you can take afterwards and build on. 71 00:04:15,420 --> 00:04:18,940 And we hope that if you do that, you can share with the community what you've done. 72 00:04:20,580 --> 00:04:26,640 So here's our block diagram where this whole platform is based on an Arduino platform, 73 00:04:27,000 --> 00:04:29,100 which is a general purpose kind of microcontroller. 74 00:04:29,120 --> 00:04:35,260 It started in this educational environment that has now kind of taken over the hobbyist 75 00:04:35,260 --> 00:04:35,960 electronics world. 76 00:04:36,360 --> 00:04:41,480 And a lot of people might say, oh, if you're familiar with Arduino, Arduino is too beginner, 77 00:04:41,620 --> 00:04:42,320 it's too basic. 78 00:04:42,600 --> 00:04:47,160 But that was our point, is to have a platform that's custom but, again, will let you write 79 00:04:47,160 --> 00:04:49,280 code with this developed environment already. 80 00:04:49,460 --> 00:04:53,260 So it makes it way easier to get involved in hardware hacking because a lot of that 81 00:04:53,260 --> 00:04:55,940 work is already done, that base level development work. 82 00:04:57,220 --> 00:04:59,060 So an Arduino is based on a... 83 00:04:59,060 --> 00:05:04,340 On an AppMail part, this one is the ATmega328P, just a general purpose microcontroller that's 84 00:05:04,340 --> 00:05:07,660 running the Arduino bootloader, which will then have Arduino software on it. 85 00:05:08,500 --> 00:05:09,720 We have a USB interface. 86 00:05:10,060 --> 00:05:11,760 And again, I'll talk a little bit more about functionality. 87 00:05:12,520 --> 00:05:13,720 We have an accelerometer. 88 00:05:13,960 --> 00:05:19,320 So if you do have lights on yours, and then if you stand still and don't move, then the 89 00:05:19,320 --> 00:05:21,140 lights will turn off to save battery power. 90 00:05:21,260 --> 00:05:22,840 I'll talk a little bit more about that later on. 91 00:05:23,100 --> 00:05:25,280 Our edge connector, which is going to plug into things. 92 00:05:26,120 --> 00:05:27,240 Our LED driver. 93 00:05:27,240 --> 00:05:34,800 Because we have 32 LEDs on here, and we only have a single 3-volt battery. 94 00:05:34,960 --> 00:05:38,380 So we had to do some tricks to be able to enable all the LEDs at the same time. 95 00:05:38,960 --> 00:05:41,380 And then just some power supply circuitry as well. 96 00:05:41,500 --> 00:05:45,480 So it really is this kind of simple platform that you can build on. 97 00:05:47,480 --> 00:05:48,500 Ah, and here's the... 98 00:05:48,500 --> 00:05:49,480 Here's a picture of it. 99 00:05:49,560 --> 00:05:51,640 So kind of go left to right. 100 00:05:51,760 --> 00:05:55,940 We have our USB connection on one side, our power with the battery. 101 00:05:55,940 --> 00:05:57,520 There's also a reset button. 102 00:05:57,680 --> 00:06:01,120 So if you end up loading new software onto this thing, new firmware, you can reset it 103 00:06:01,120 --> 00:06:02,120 manually if you need to. 104 00:06:03,100 --> 00:06:06,940 Our LED driver, our accelerometer, the microcontroller, and then the connector at the end. 105 00:06:11,580 --> 00:06:16,700 Building a flexible circuit is, like the dark tangent mentioned, something that nobody 106 00:06:16,700 --> 00:06:18,140 has done in the hacker community before. 107 00:06:18,300 --> 00:06:22,280 And we see flexible circuitry in printers and in all sorts of consumer devices and phones 108 00:06:22,280 --> 00:06:24,520 to wrap around inside of the devices. 109 00:06:24,860 --> 00:06:25,260 Ah. 110 00:06:25,260 --> 00:06:28,500 And I'd always just been fascinated with, like, how small can we build something? 111 00:06:28,660 --> 00:06:29,520 How flexible? 112 00:06:29,760 --> 00:06:30,200 How thin? 113 00:06:30,960 --> 00:06:35,420 And this was a real challenge for us because every single board I've done for my entire 114 00:06:35,420 --> 00:06:39,300 life has been a rigid circuit board, like a normal circuit board you would see in most 115 00:06:39,300 --> 00:06:39,640 products. 116 00:06:39,840 --> 00:06:45,640 So there was a big learning curve of the different processes that are required for flex that 117 00:06:45,640 --> 00:06:50,160 are sort of similar but not exactly than rigid. 118 00:06:50,280 --> 00:06:51,960 So it's a little bit, you know, it was a little bit tricky. 119 00:06:52,220 --> 00:06:55,240 The most important thing is the flex cable. 120 00:06:55,260 --> 00:06:55,620 The lozenge cable. 121 00:06:55,620 --> 00:06:55,960 What I've learned is the flex cable, re-applied up on one side, on the other side, so that 122 00:06:55,960 --> 00:07:00,060 If we do this on the side, the flexible printed circuit connector has a very specific thickness 123 00:07:00,060 --> 00:07:02,500 thickness requirement, because the connector that we use 124 00:07:02,960 --> 00:07:04,040 requires a certain thickness. 125 00:07:04,340 --> 00:07:07,560 If we hadn't gotten that right, nothing would have worked in 126 00:07:07,560 --> 00:07:08,300 the entire conference. 127 00:07:08,520 --> 00:07:09,680 So that was a really important thing. 128 00:07:09,880 --> 00:07:14,720 And it's down to micrometers, like very, very, very thin, 129 00:07:15,420 --> 00:07:16,440 precise thickness. 130 00:07:24,560 --> 00:07:27,540 And also, we needed help with this. 131 00:07:27,540 --> 00:07:30,800 I think that's something also in the hacker community, we're 132 00:07:30,800 --> 00:07:31,820 all here to learn, right? 133 00:07:31,880 --> 00:07:34,560 We're all here to try something new and to question what's out 134 00:07:34,560 --> 00:07:34,820 there. 135 00:07:35,020 --> 00:07:38,480 So to take this step of doing Flex, I couldn't learn it on my 136 00:07:38,480 --> 00:07:39,820 own, I needed help from other people. 137 00:07:39,940 --> 00:07:44,200 And luckily, I found some people local to my area in 138 00:07:44,200 --> 00:07:47,600 Portland, Oregon, and also some other folks in the United 139 00:07:47,600 --> 00:07:52,020 States, and then in China, to help teach me how I need to do 140 00:07:52,020 --> 00:07:52,780 all the manufacturing. 141 00:07:52,900 --> 00:07:55,560 So Adept Electronics, Electronic Interconnect. 142 00:07:55,700 --> 00:07:56,920 These are people that, you know, 143 00:07:56,920 --> 00:07:57,520 behind the scenes. 144 00:07:57,540 --> 00:08:00,740 A lot goes on, but the badge wouldn't have happened without 145 00:08:00,740 --> 00:08:02,700 all the support from other people helping me out. 146 00:08:02,800 --> 00:08:04,780 So they definitely deserve a thanks for that. 147 00:08:06,060 --> 00:08:09,540 So the Edge Connector is sort of a hackable interface as 148 00:08:09,540 --> 00:08:11,540 well, so it's meant to plug in, which I'll show you the 149 00:08:11,540 --> 00:08:13,380 demonstration of, but there's a bunch of other 150 00:08:13,380 --> 00:08:14,260 connections on there. 151 00:08:14,380 --> 00:08:17,480 So if you are familiar with hardware already, or if you 152 00:08:17,480 --> 00:08:19,300 are learning and you say, I want to add some extra 153 00:08:19,300 --> 00:08:21,300 functionality, or I want to sniff some communication 154 00:08:22,200 --> 00:08:24,960 that's happening, say, between the microcontroller and the 155 00:08:24,960 --> 00:08:26,900 accelerometer, or I want to add on. 156 00:08:26,900 --> 00:08:30,600 I want to add on different types of hardware to it, you 157 00:08:30,600 --> 00:08:32,800 can do that through this Edge Connector. 158 00:08:32,840 --> 00:08:33,860 And that's kind of cool. 159 00:08:37,440 --> 00:08:38,640 And it bends, of course. 160 00:08:39,480 --> 00:08:41,460 This was something, you know, we didn't know how much it 161 00:08:41,460 --> 00:08:44,320 would bend, but again, it was just something fun to try. 162 00:08:49,160 --> 00:08:53,440 So from a software perspective, a firmware perspective, we're 163 00:08:53,440 --> 00:08:56,480 using the Arduino for this particular microcontroller. 164 00:08:56,900 --> 00:08:59,480 And we ended up using about 90% of the available memory. 165 00:08:59,920 --> 00:09:03,680 And a lot of this work wouldn't have happened without some of 166 00:09:03,680 --> 00:09:05,420 the third-party libraries that are available. 167 00:09:05,700 --> 00:09:08,440 And that's another reason to use the Arduino platform for 168 00:09:08,440 --> 00:09:12,520 this, because Adafruit had already created accelerometer 169 00:09:12,520 --> 00:09:16,120 libraries, and other people had created low-power libraries. 170 00:09:16,460 --> 00:09:19,100 So I could kind of cobble this thing together and hack the 171 00:09:19,840 --> 00:09:22,200 firmware together to do the functionality that we wanted 172 00:09:22,200 --> 00:09:23,900 without having to build everything from scratch. 173 00:09:24,120 --> 00:09:26,360 And that's a really important part of the open source 174 00:09:26,360 --> 00:09:26,700 community. 175 00:09:26,700 --> 00:09:28,840 And of course, the hacker community as well, of sharing. 176 00:09:29,160 --> 00:09:32,560 And this badge, the code that I wrote, is available on my 177 00:09:32,560 --> 00:09:35,440 website now, and it's going back into the community. 178 00:09:35,640 --> 00:09:37,220 So then people can use that to build upon. 179 00:09:38,980 --> 00:09:40,840 The functionality is really kind of simple. 180 00:09:41,080 --> 00:09:43,720 We have a loop, and the system's constantly looping. 181 00:09:44,580 --> 00:09:47,680 It's going to first check the state. 182 00:09:47,840 --> 00:09:50,860 It's going to say, am I plugged into a computer? 183 00:09:51,360 --> 00:09:53,140 Or am I plugged into a USB charger? 184 00:09:53,440 --> 00:09:55,680 Or am I plugged in just with a battery? 185 00:09:55,680 --> 00:09:58,040 And it will kind of switch functionality depending. 186 00:09:58,680 --> 00:10:00,560 Because if we're on battery power, we want to save 187 00:10:00,560 --> 00:10:03,680 batteries so it will go to sleep after 10 seconds of inactivity. 188 00:10:03,920 --> 00:10:06,460 But if you're connected to a computer trying to load code 189 00:10:06,460 --> 00:10:07,900 into it, you don't want it to go to sleep. 190 00:10:08,900 --> 00:10:11,420 And then you can add other functionality if you want, say 191 00:10:11,420 --> 00:10:12,680 if you plug it into a charger instead. 192 00:10:13,360 --> 00:10:14,520 So there's all these options. 193 00:10:15,420 --> 00:10:18,940 Once it checks the state, then it goes to look for what I 194 00:10:18,940 --> 00:10:19,880 call the interactive mode. 195 00:10:20,180 --> 00:10:24,860 And that's if you plug in a computer to the micro USB port, 196 00:10:24,860 --> 00:10:27,100 and set up your terminal program settings properly, 197 00:10:27,980 --> 00:10:30,240 this will appear as a virtual com port. 198 00:10:30,380 --> 00:10:32,600 And it should come up and say Defcon China badge, 199 00:10:32,820 --> 00:10:33,700 or something like that. 200 00:10:34,020 --> 00:10:35,180 You'll figure that part out. 201 00:10:36,120 --> 00:10:37,200 There's a menuing system. 202 00:10:37,500 --> 00:10:39,860 And you can do all sorts of neat things, diagnostics, 203 00:10:39,860 --> 00:10:41,100 and kind of play around with the badge. 204 00:10:41,220 --> 00:10:42,220 That's the interactive mode. 205 00:10:42,740 --> 00:10:44,640 So it checks if anybody's connected, 206 00:10:44,860 --> 00:10:46,440 looking for bytes on that interface. 207 00:10:47,360 --> 00:10:51,140 Then it's going to look for connection from the FPC 208 00:10:51,140 --> 00:10:53,480 connection, the finger connection on one side, 209 00:10:54,860 --> 00:10:56,020 then it updates the LEDs. 210 00:10:56,320 --> 00:10:58,420 It says, have any new LEDs been enabled? 211 00:10:58,600 --> 00:10:59,700 If so, let's turn them on. 212 00:11:00,260 --> 00:11:01,340 And then it goes to sleep. 213 00:11:01,580 --> 00:11:03,700 It just does that over and over and over again. 214 00:11:07,960 --> 00:11:09,560 I thought it'd be fun to show some pictures 215 00:11:09,560 --> 00:11:10,180 of the fabrication. 216 00:11:11,840 --> 00:11:16,120 This factory is based somewhere down in southern China, 217 00:11:16,260 --> 00:11:19,900 and super helpful for us to manufacture these boards. 218 00:11:20,020 --> 00:11:22,460 The timeline for this project was actually pretty small. 219 00:11:22,660 --> 00:11:24,840 We've known about Defcon China for a long time. 220 00:11:24,840 --> 00:11:28,920 But building it, testing it, refining it, all takes time. 221 00:11:29,120 --> 00:11:33,100 So these boards ended up being built in two weeks, 222 00:11:33,780 --> 00:11:35,220 all 3,300 of them. 223 00:11:35,340 --> 00:11:37,520 And they were shipped directly here just a few days ago. 224 00:11:38,080 --> 00:11:40,600 And I had the factory take some pictures of the process, 225 00:11:40,820 --> 00:11:42,120 because it's really fascinating to see 226 00:11:42,120 --> 00:11:43,820 how things actually are built. 227 00:11:45,000 --> 00:11:47,060 So some of the fabrication pictures I have here, 228 00:11:48,160 --> 00:11:50,780 I will post a version of the slides on my website. 229 00:11:50,960 --> 00:11:52,960 And there's a link at the end to that, 230 00:11:53,060 --> 00:11:54,740 which will have some assembly pictures as well. 231 00:11:54,740 --> 00:11:56,900 We just didn't have time to add them in beforehand. 232 00:11:57,320 --> 00:12:00,580 So here, the circuit boards are being made, the different layers. 233 00:12:01,520 --> 00:12:04,980 Here, they're putting the white solder mask on, 234 00:12:05,140 --> 00:12:06,820 which is the coating that protects the electronics 235 00:12:06,820 --> 00:12:08,980 or protects the copper traces on the board. 236 00:12:09,620 --> 00:12:11,920 And it's a very manual process to do this, 237 00:12:11,940 --> 00:12:14,560 because these techniques require really, really good precision. 238 00:12:18,340 --> 00:12:21,400 You can see the boards actually get manufactured in a panel. 239 00:12:21,560 --> 00:12:23,420 So there is four per panel. 240 00:12:23,420 --> 00:12:23,520 And there is a single panel. 241 00:12:24,200 --> 00:12:26,680 And each one has to go through these different steps. 242 00:12:29,780 --> 00:12:32,080 So the middle one here is the silk screen. 243 00:12:32,320 --> 00:12:33,560 And then the picture on the right 244 00:12:33,560 --> 00:12:35,260 is what it looks like after the silk screen, 245 00:12:35,380 --> 00:12:36,500 where the ink is pressed through. 246 00:12:40,420 --> 00:12:41,700 Once the hardware is actually built, 247 00:12:41,820 --> 00:12:43,680 we need a way to program the code into them, 248 00:12:43,780 --> 00:12:45,620 test them before they end up around your necks 249 00:12:45,620 --> 00:12:47,400 to make sure that they actually do 250 00:12:47,400 --> 00:12:48,340 what they say they're going to do. 251 00:12:48,600 --> 00:12:50,320 Because we don't want a bunch of people walking around 252 00:12:50,320 --> 00:12:51,020 with a dead badge. 253 00:12:51,300 --> 00:12:53,400 So there's a little bit of a process that we had to do for now. 254 00:12:53,420 --> 00:12:57,600 that as well and what we did is created little programming stations with the 255 00:12:57,600 --> 00:13:04,200 Raspberry Pi little Linux based module and that has USB support so what this 256 00:13:04,200 --> 00:13:10,540 does is will configure the USB chip that's on here it's an FT 232 USB to 257 00:13:10,540 --> 00:13:13,880 serial adapter it'll can it will configure that then it will load the 258 00:13:13,880 --> 00:13:18,980 Arduino code into it and then the LEDs will all turn on to indicate that to 259 00:13:18,980 --> 00:13:22,820 make sure all the LEDs are good and then all the LEDs turn off it also 260 00:13:22,820 --> 00:13:26,200 checks the state of the accelerometer so if the accelerometer doesn't work say 261 00:13:26,200 --> 00:13:29,440 during the assembly process there's a problem which there actually were with a 262 00:13:29,440 --> 00:13:33,100 few of them and the factory had to had to refine their process a little bit 263 00:13:33,100 --> 00:13:37,500 then the lights would blink on power up so you would know oh the accelerometer 264 00:13:37,500 --> 00:13:42,920 is is not working so a little bit of a test procedure for that and that's why 265 00:13:42,920 --> 00:13:46,760 you'll notice when you plug in your your battery all the lights turn on and 266 00:13:46,760 --> 00:13:49,480 then they turn off that's you can make sure all the LEDs are there 267 00:13:53,440 --> 00:13:57,360 in case you're curious in the numbers of the of the different badges that are out 268 00:13:57,360 --> 00:14:02,680 here different types different colors to denote the different people this is 269 00:14:02,680 --> 00:14:06,240 always something that we've done at DEF CON and it makes it fun also if you're 270 00:14:06,240 --> 00:14:09,700 trying to collect badges like how can you trade with people what what can you 271 00:14:09,700 --> 00:14:18,620 do after the conference to to build up your collection some of the problems we 272 00:14:18,620 --> 00:14:22,240 had no development ever goes perfectly right that would be amazing if 273 00:14:22,240 --> 00:14:25,420 everything works the first time we ended up making two revisions of the 274 00:14:25,420 --> 00:14:28,480 board before we went to production because we really wanted to make sure 275 00:14:28,480 --> 00:14:33,760 that everything was gonna work and not working with flex circuitry before 276 00:14:33,760 --> 00:14:37,140 usually what happened is you get your board back if there's a problem you can 277 00:14:37,140 --> 00:14:41,340 modify the circuit board you can cut traces you can solder components on but 278 00:14:41,340 --> 00:14:45,440 with a flexible substrate it's so thin that if you're trying to cut one trace 279 00:14:45,440 --> 00:14:49,180 on the board you cut straight through the rest of it so a really tricky kind 280 00:14:49,180 --> 00:14:51,640 of surgery that I had to do to to get things working 281 00:14:53,240 --> 00:14:56,540 and I only had two prototypes to work with so it was a little bit 282 00:14:56,540 --> 00:15:00,140 nerve-racking to get that working and luckily there was only a few changes that 283 00:15:00,140 --> 00:15:06,420 had to be done the other thing too with flex is flex flexes which leads to 284 00:15:06,420 --> 00:15:09,940 mechanical stress if the board isn't designed right that was a lesson that 285 00:15:09,940 --> 00:15:13,500 that I learned early on and really scared me because the first little 286 00:15:13,500 --> 00:15:18,080 version you can see over here the USB connector is kind of sticking out and 287 00:15:18,080 --> 00:15:21,660 there's no support along the sides so when I plugged in the USB connector over 288 00:15:22,240 --> 00:15:23,420 here I had to plug it into the USB connector and it would kind of flex on 289 00:15:23,420 --> 00:15:27,740 the board and then the board would stop working and I go and like oh this is bad 290 00:15:27,740 --> 00:15:34,120 not good and so I worked with with Neil one of the DEF CON artists to refine the 291 00:15:34,120 --> 00:15:37,960 shape of the board to give the USB connector more stability so it wouldn't 292 00:15:37,960 --> 00:15:42,440 flex and that that saved us but this is stuff that was just a you know 293 00:15:42,440 --> 00:15:45,800 challenges that we had to deal with it's all sort of a blur too it's funny 294 00:15:45,800 --> 00:15:50,480 because I look at these slides I'm like wow that was I don't even remember that 295 00:15:50,480 --> 00:15:52,220 like that was such a crazy problem. 296 00:15:52,240 --> 00:15:59,120 project the time frame for this again was like really tricky so battery life 297 00:15:59,120 --> 00:16:03,760 is always a question right is the battery gonna work I always like to 298 00:16:03,760 --> 00:16:09,200 design badges and projects that are very simple and use as minimal amount of 299 00:16:09,200 --> 00:16:12,760 functionality as necessary with a project like this I wanted to try to 300 00:16:12,760 --> 00:16:17,840 stick with a coin cell all of my other badges have used the CR 2032 coin cells 301 00:16:19,660 --> 00:16:22,920 and it's something that is very tricky because when you have electronics 302 00:16:22,920 --> 00:16:27,440 running you have LEDs you have a lot of power consumption you have to do all 303 00:16:27,440 --> 00:16:30,620 these tricks to make sure that your battery is gonna last the length of 304 00:16:30,620 --> 00:16:38,240 DEF CON for this particular badge I've done some calculations and I think it's 305 00:16:38,240 --> 00:16:43,700 if we have the active state for 24 hours the battery will last and by active I 306 00:16:43,700 --> 00:16:47,280 mean displaying LEDs because normally it's gonna be sleeping for the most 307 00:16:47,280 --> 00:16:47,520 part 308 00:16:47,840 --> 00:16:50,900 so we should be able to get through the conference we'll see what happens over 309 00:16:50,900 --> 00:16:55,780 time and you know that's part of the fun right when we get these things out into 310 00:16:55,780 --> 00:16:58,520 the world when they're actually being used what's gonna happen what are people 311 00:16:58,520 --> 00:17:02,700 gonna do but it is interesting that a sleep mode for this badge is only four 312 00:17:02,700 --> 00:17:06,740 microamps it's like sipping power barely doing anything at all and then it 313 00:17:06,740 --> 00:17:13,660 wakes up to do its functionality and here's a little graph also of showing 314 00:17:13,660 --> 00:17:17,740 the as the the system powers up when all the LEDs come on and then it dips 315 00:17:17,840 --> 00:17:25,320 and show us some LEDs and the sleep mode is is really far down so then how do we 316 00:17:25,320 --> 00:17:26,160 interact with this badge 317 00:17:26,160 --> 00:17:30,420 what's the whole point besides you know plugging it in to do things there's some 318 00:17:30,420 --> 00:17:34,620 accessories that we've designed as well and the first one I've been calling a 319 00:17:34,620 --> 00:17:38,360 breakout board it's a tiny little board that will actually connect through that 320 00:17:38,360 --> 00:17:44,180 FPC connector so then you have easy access to solder to that connector 321 00:17:44,180 --> 00:17:47,420 and add things to it these are going to be in the hardware hacking 322 00:17:47,420 --> 00:17:51,920 hacking village. I need to go over there and drop them off. So a bunch will be there. I'm 323 00:17:51,920 --> 00:17:57,400 also doing two badge hacking workshops. So whoever has signed up for those will get one. 324 00:17:57,640 --> 00:18:01,580 And then you'll probably see some sprinkled around DEF CON. We made a few hundred of them. 325 00:18:01,720 --> 00:18:07,080 So they'll be enough for people that are interested in hacking hardware. And this just makes it 326 00:18:07,080 --> 00:18:11,080 easy to start doing other things with it. We thought that would be fun. Also, if you're 327 00:18:11,080 --> 00:18:15,900 familiar with the SAO add-on, the badge add-ons that people have been doing, making little 328 00:18:16,580 --> 00:18:23,120 blinky light things, this breakout board also serves as that SAO connector. So you can plug in 329 00:18:23,120 --> 00:18:26,380 different things to it, and it will hang off the side of your badge. So we just thought that would 330 00:18:26,380 --> 00:18:34,680 be fun to do. And then we have the programming shield. This is kind of the other side of the badge, 331 00:18:34,800 --> 00:18:37,980 where if you have the badge but not the programming shield, it sort of doesn't do as much 332 00:18:37,980 --> 00:18:43,440 as we wanted. So these shields have already been handed out to some different villages, different 333 00:18:43,440 --> 00:18:45,500 contest areas. There's some 334 00:18:45,500 --> 00:18:58,300 other things that you have to find around the event. But the purpose of the shield is you would plug your badge into the shield, there would be some communication, and then a specific light would turn on depending on what task you've completed. 335 00:18:58,840 --> 00:19:03,140 This was a separate little project that I had to build also to write some code for this 336 00:19:03,140 --> 00:19:08,600 thing to make sure that it could communicate properly to the device. We go into more detail 337 00:19:08,600 --> 00:19:14,080 of a lot of this in the badge hacking workshop. And then I'll post some expanded slides with 338 00:19:14,080 --> 00:19:15,360 even more detail of things 339 00:19:15,360 --> 00:19:44,560 later on if you're interested in really getting into this stuff. But really just kind of briefly is this device is a shield that plugs into a standard Arduino microprocessor module, and it has a level translator to convert the 5-volt signals from an Arduino to the 3-volt signals that we need on our badge. That's an important one. If you're going to hack on this thing, you want to make sure that the voltage levels are actually correct, because if you're sending 5 volts to a 3-volt system, you could maybe release the magic smoke of the badge. 340 00:19:46,740 --> 00:20:01,620 And this board, if you look on the upper right, there's some dip switches, some switches that we can turn on and off. Those end up setting the state of do we want to set an LED? Do we want to clear an LED? And there's another state as well, which I'll talk about shortly. 341 00:20:06,060 --> 00:20:14,640 Okay, so demonstration time. I'll just show you the process of this, and you'll get familiar as you go to the different areas to do this. 342 00:20:16,480 --> 00:20:18,500 So here's a, let's see. 343 00:20:18,620 --> 00:20:19,760 Oh, there, you can see me. 344 00:20:19,820 --> 00:20:20,000 Okay. 345 00:20:21,580 --> 00:20:22,460 So here's a shield. 346 00:20:23,140 --> 00:20:25,820 I can't see me, so if I'm out of the frame, you tell me. 347 00:20:26,140 --> 00:20:27,020 I'm going to turn it on. 348 00:20:27,180 --> 00:20:30,040 A little battery-powered system, too, because a lot of the villages are outdoors. 349 00:20:30,320 --> 00:20:32,440 So we have a little battery power here. 350 00:20:34,340 --> 00:20:37,860 And then I'm going to try to do all of this with holding the microphone also. 351 00:20:38,160 --> 00:20:41,040 So here's my badge, which currently I have a few lights on. 352 00:20:41,320 --> 00:20:42,180 Kind of hard to see. 353 00:20:43,560 --> 00:20:45,320 So I'm going to take this and plug it in here. 354 00:20:45,480 --> 00:20:46,960 Now, you normally won't have to do this. 355 00:20:46,980 --> 00:20:50,080 Whoever is running the contest or the village will plug it in for you. 356 00:20:51,200 --> 00:20:52,160 Let me plug it in. 357 00:20:55,080 --> 00:20:59,000 And you can't see it because it's on my side, but there's a little status light that was orange. 358 00:20:59,160 --> 00:21:00,060 I plugged it in. 359 00:21:00,080 --> 00:21:00,560 It turned red. 360 00:21:00,740 --> 00:21:03,080 And then I, and once the communication was done, it turned green. 361 00:21:03,360 --> 00:21:04,800 So now I can just unplug it. 362 00:21:04,900 --> 00:21:06,000 It happens really fast. 363 00:21:06,800 --> 00:21:09,820 And now another LED is turned on. 364 00:21:10,260 --> 00:21:10,620 Okay. 365 00:21:11,800 --> 00:21:12,160 So I'm going to go ahead and turn it on. 366 00:21:12,180 --> 00:21:27,260 If you complete a one route, there's four LEDs per route of this tree, then one part of the actual top, the branches of the tree turn on and the whole concept for us, we thought, let's plant a tree and let's grow the tree as we go through DEF CON. 367 00:21:28,260 --> 00:21:30,200 So that's the, that's the demo portion. 368 00:21:40,120 --> 00:21:41,860 So the remaining mode of the shield. 369 00:21:42,180 --> 00:21:48,520 Is something really cool that we said, okay, not only do we want to have individual people build their own tree. 370 00:21:48,700 --> 00:21:58,940 Let's see if we can have something for the entire community to plug their badges into and see how the community as a whole has kind of been learning and been building throughout DEF CON. 371 00:21:59,140 --> 00:22:11,720 So if you look behind you, there's this giant case, the shipping container back here, that's an art installation made by some very talented artists that is essentially a virtual tree. 372 00:22:12,180 --> 00:22:12,980 Inside of this container. 373 00:22:13,180 --> 00:22:24,820 And as you change your state of the badge, as you light up different lights, you can go into this container and virtually grow this larger tree and do some really cool interactivity with your badge. 374 00:22:25,000 --> 00:22:30,220 So I highly encourage you to do that and, and, and visit over the conference and see how that's changed. 375 00:22:30,580 --> 00:22:38,120 See how things have changed in there based on what you're doing, because then it's, you know, your individual badge, but then it's as a community, what can we do? 376 00:22:38,220 --> 00:22:40,380 How can we, how can we see what happens there? 377 00:22:42,980 --> 00:22:54,120 And this setup, the artists can explain more about it when they're there, but it's a, you have your badge that plugs into an Arduino, which communicates to a Raspberry Pi that then does all of this amazing stuff. 378 00:22:54,340 --> 00:22:56,800 So it's really this really neat interactive artwork. 379 00:22:59,080 --> 00:23:00,480 That's called the Tree of Promise. 380 00:23:05,520 --> 00:23:10,960 So yeah, some resources for the badge, all of the development documentation. 381 00:23:11,400 --> 00:23:26,700 A version of these slides are up there now, again, I'll post a, I'll post a different one, more expanded later on, source code is there, test procedure, everything that you need to experiment with this badge and hack on it and grow with it and build on it is going to be, is going to be there if it's not already. 382 00:23:27,640 --> 00:23:29,040 So feel free to go there. 383 00:23:30,320 --> 00:23:38,100 And I do want to mention too, the last time I designed a badge was DEF CON 18, an electronic badge. 384 00:23:38,220 --> 00:23:39,020 And I kind of retired. 385 00:23:39,440 --> 00:23:40,940 And when the Dark Tangent said, Hey. 386 00:23:40,960 --> 00:23:42,540 Hey, let's, let's do more badges. 387 00:23:43,000 --> 00:23:44,240 I was like, Oh wow. 388 00:23:44,340 --> 00:23:45,160 It's been a long time. 389 00:23:45,360 --> 00:23:46,060 Um, sure. 390 00:23:46,280 --> 00:23:47,140 Like that sounds fun. 391 00:23:47,480 --> 00:23:56,100 Uh, I sort of forgot how hard it is, you know, and it's really a big struggle to, to get this done in time and very stressful. 392 00:23:56,460 --> 00:24:09,960 And I need to thank my family who is actually sitting over here and they came to Beijing with me first time at DEF CON to experience everything here and experience the community, uh, because they dealt with me every single day coming in from my office. 393 00:24:10,960 --> 00:24:14,540 And I think they're complaining or being happy or stressed out or whatever. 394 00:24:14,920 --> 00:24:17,700 Um, and you know, it is just like everything else. 395 00:24:17,760 --> 00:24:18,300 It really is. 396 00:24:18,340 --> 00:24:22,720 There's a lot of people behind the scenes that you don't really think about that are that are important. 397 00:24:22,900 --> 00:24:35,680 So anyway, thank you to my, to my family for dealing with me and thank you to all of you for coming and hopefully experimenting with the badges. 398 00:24:35,760 --> 00:24:40,360 And I believe we maybe have time for questions if anybody has questions here. 399 00:24:45,340 --> 00:24:50,580 If not, I'll also be wandering around, I'll be in the hardware hacking village, but feel 400 00:24:50,580 --> 00:24:56,040 free to, anytime you see me, come up and ask questions and I can explain whatever you need 401 00:24:56,040 --> 00:24:56,340 to know. 402 00:24:57,600 --> 00:25:02,220 So with that, thank you, enjoy the conference, and yeah, see you around. 403 00:25:15,200 --> 00:25:20,600 Alright, thank you very much, that was Joe Gran for our first talk, we're gonna start the normal 404 00:25:20,600 --> 00:25:25,140 speaking schedule now, so there'll be a break, and then the next speaker will start at the top of the 405 00:25:25,140 --> 00:25:28,420 hour. Thank you very much, and I'll see you all around DEF CON. 406 00:25:37,000 --> 00:25:38,460 I hope we have music.