1 00:00:00,000 --> 00:00:01,360 Oh, I can start? 2 00:00:01,640 --> 00:00:02,780 Oh, sorry, I thought we were... 3 00:00:03,260 --> 00:00:05,620 All right, we can start. 4 00:00:06,360 --> 00:00:08,280 All right, thanks everyone for coming. 5 00:00:08,280 --> 00:00:13,540 I know there are a bazillion other things you could be doing here at DEF CON, and I appreciate you giving me your time. 6 00:00:13,900 --> 00:00:17,260 So, today I want to talk to you about the Power Glove. 7 00:00:17,380 --> 00:00:20,360 This guy is... how do you pronounce it? 8 00:00:22,120 --> 00:00:24,240 Diogenes, and he lived in a barrel. 9 00:00:25,240 --> 00:00:27,900 He's probably the most accurate of the Asian Greek philosophers. 10 00:00:27,900 --> 00:00:33,060 I love these old paintings because they're beautiful. 11 00:00:33,060 --> 00:00:34,220 There's so many of them. 12 00:00:34,220 --> 00:00:36,860 They're not AI-generated, and they don't have copyright. 13 00:00:36,860 --> 00:00:50,040 Like for these, for example, even if there's a gate, you won't see it in the bottom right, but the museum has released it on like a CC1 copyright, so you can just use it wherever you want. 14 00:00:50,180 --> 00:00:52,200 Today we're going to talk about this. 15 00:00:52,400 --> 00:00:57,700 Instead of using a clicker or a keyboard or whatever you want, we're going to use a Nintendo Power Glove. 16 00:00:57,900 --> 00:01:02,800 So I can do this, and go to the next slide. 17 00:01:03,260 --> 00:01:03,840 That's it. 18 00:01:03,840 --> 00:01:09,160 If you want to leave now, you're good to go. 19 00:01:09,160 --> 00:01:15,520 But in general, I want people to be able to see what I'm going to talk about in case they want to go and be somewhere else. 20 00:01:15,520 --> 00:01:20,760 I don't want to get to the end and say, that guy just wasted my time or whatever. 21 00:01:20,760 --> 00:01:35,820 So I'm going to talk about a bunch of these, why I'm doing this, what is a Power Glove, how it works, what other people have done, because it's pretty popular, what I did to do the dev stuff, and in the end, if this still works, we're going to have a demo. 22 00:01:36,020 --> 00:01:41,420 If you were in the Bug Bounty talk that I had yesterday, this is a free-for-all CTF. 23 00:01:41,580 --> 00:01:44,000 You will know when someone captures the flag. 24 00:01:44,160 --> 00:01:48,500 If no one captures the flag, we'll talk about it in the end, about why. 25 00:01:49,500 --> 00:01:51,840 So my name is Parsia, I work at Microsoft. 26 00:01:52,320 --> 00:01:53,960 This is my third DEF CON. 27 00:01:53,960 --> 00:01:58,020 Originally, my first ever talk was DEF CON 2018. 28 00:01:58,620 --> 00:02:00,600 2020, I did recording. 29 00:02:00,700 --> 00:02:05,580 And this year, I did my third, which was yesterday, and this is my fourth talk. 30 00:02:06,060 --> 00:02:12,980 So in my second time at DEF CON, it's been seven years, or as something I would like to say, seven years of famine. 31 00:02:14,440 --> 00:02:19,620 2016, I bought this Power Glove for a Hacker Man cosplay from the movie Kong Fury. 32 00:02:19,660 --> 00:02:27,260 And I won 50 bucks, which is the first and last time I've actually bought I'm sorry, won anything in a corporate environment, so that was good. 33 00:02:28,040 --> 00:02:29,920 Does anyone recognize this guy? 34 00:02:30,900 --> 00:02:34,460 He is from a sitcom called Third Rock from the Sun. 35 00:02:34,760 --> 00:02:36,380 It's one of my favorite ones. 36 00:02:36,560 --> 00:02:42,520 So this is independent research, not affiliated with my employer or yours or anyone else's. 37 00:02:43,160 --> 00:02:45,880 It's just something that I did that I think was cool. 38 00:02:45,900 --> 00:02:47,240 So why did I want to do this? 39 00:02:47,240 --> 00:02:52,120 In 20, not 2013, but a couple of years ago, I watched a talk by Haroon Mir. 40 00:02:52,120 --> 00:02:56,280 Haroon is a South African hacker and one of the people that I really, really like. 41 00:02:56,760 --> 00:03:01,220 Not only he is technically great, but he's also a kind human being. 42 00:03:01,220 --> 00:03:08,920 So he had this talk about why do we have so many enforced conferences, which is ironic because we are already at DEF CON. 43 00:03:09,380 --> 00:03:13,180 And they let everyone speak at DEF CON these days, like me. 44 00:03:13,580 --> 00:03:19,880 And he was like, we're doing entertainment, so people want to be entertained, so we are doing all of this. 45 00:03:20,780 --> 00:03:26,160 And in order to be remorable, I learned all the wrong lessons from Haroon. 46 00:03:26,340 --> 00:03:31,400 Fortunately for him and me, he's not here, so he left after Black Hat. 47 00:03:31,400 --> 00:03:32,700 So you're not going to see this. 48 00:03:32,700 --> 00:03:40,300 But in my opinion, if you want your presentation to be memorable, you need to have at least one of these three, possibly all three. 49 00:03:40,600 --> 00:03:45,980 So first, you really have to be technically advanced, so technically advanced that the audience thinks it's magic. 50 00:03:46,840 --> 00:03:49,120 Second, you need to have charisma or risk. 51 00:03:49,120 --> 00:03:51,020 And as you can see, I don't have any. 52 00:03:51,020 --> 00:03:56,260 And the third, you have to do these hijinks with this, so people can remember, oh, I remember that guy. 53 00:03:56,260 --> 00:03:57,740 He has a power glove. 54 00:03:57,880 --> 00:04:05,000 So I remember I joined a company, and I was going around, it was a game launch, and I was going around the game launch with this. 55 00:04:05,080 --> 00:04:08,480 And then people were like, who is that guy with a power glove? 56 00:04:10,140 --> 00:04:20,360 A talk that I look up to very idyllically that had all three was the late Barnaby Jacks talk here in Vegas at Black Hat. 57 00:04:20,360 --> 00:04:23,120 So 2013, he put a bunch of ATMs up there. 58 00:04:23,280 --> 00:04:26,080 And it's so advanced because people don't know how ATMs work. 59 00:04:26,080 --> 00:04:27,760 They are just money machines. 60 00:04:27,760 --> 00:04:34,220 So he started popping bills out of it, and they even coined a term called jackpotting for him. 61 00:04:34,320 --> 00:04:39,920 So he's technically advanced, he has charisma, and then he's putting an ATM on it, and this money is coming out of it. 62 00:04:39,920 --> 00:04:42,940 So that is my ideal thing that I wanted to do. 63 00:04:42,940 --> 00:04:46,500 But the Nintendo Power Glove is something super old. 64 00:04:46,560 --> 00:04:48,480 It was released in 1989. 65 00:04:49,400 --> 00:04:57,440 If you are older than this, and that includes me, be sure to stretch and think about that shingles vaccine in a little bit. 66 00:04:58,560 --> 00:05:03,880 I got shingles at 29, so I don't have to worry about that, but I don't know. 67 00:05:04,000 --> 00:05:12,460 It was released at around like $100, which is $200 current inflation inflated, but we all know that you could have probably bought a house, right? 68 00:05:12,460 --> 00:05:15,940 By then, it wasn't actually created by Nintendo. 69 00:05:16,160 --> 00:05:28,900 So I was talking to someone today and they told me that Nintendo wanted to get into the US market, and I hadn't heard it before, but they didn't want to do toy, they didn't want to do video games, because video games are bad and for kids. 70 00:05:29,280 --> 00:05:30,940 So they wanted to do toys. 71 00:05:31,120 --> 00:05:34,000 So as a result, they had this as a toy. 72 00:05:34,540 --> 00:05:39,720 So it wasn't created by Nintendo, it was designed by a different company, and even produced by a different company. 73 00:05:39,720 --> 00:05:42,400 Like in Japan, it's called Pax Famicom Glove. 74 00:05:42,460 --> 00:05:45,160 Famicom is the name of NES in Japan. 75 00:05:45,300 --> 00:05:46,620 In the US, it was created by... 76 00:05:47,700 --> 00:05:52,020 I used to pronounce it Mattel, but a friend of mine, Amber, said, no, it's Motel. 77 00:05:52,180 --> 00:05:53,800 So I'll go with this. 78 00:05:54,620 --> 00:05:57,480 So as a result, the Motel is a company that makes Barbie. 79 00:05:57,760 --> 00:06:00,900 As a result, well, this is a Barbie, I guess. 80 00:06:02,280 --> 00:06:13,300 So the idea is that Plato said a man is a featherless bipedal, and Diogenes grabbed a chicken, plucked all the feathers, and said, behold, a man. 81 00:06:13,980 --> 00:06:15,720 And the guy in the barrel, of course, did it. 82 00:06:15,720 --> 00:06:18,360 The original joke was that I am a Barbie. 83 00:06:18,580 --> 00:06:22,840 And then my wife looked at me and said, seriously, listen to yourself. 84 00:06:23,180 --> 00:06:25,620 As you can see, there's stark, like, difference. 85 00:06:25,920 --> 00:06:31,120 All I can say is, like, to borrow from the TV show, thank God that love is blind, habibi. 86 00:06:31,780 --> 00:06:32,680 But, yeah. 87 00:06:34,720 --> 00:06:37,660 So it became, it was actually very, very popular. 88 00:06:37,660 --> 00:06:39,140 It had really cool ads. 89 00:06:39,140 --> 00:06:40,520 We saw one of the ads. 90 00:06:40,600 --> 00:06:43,340 And it was also because of this movie called The Wizard. 91 00:06:43,520 --> 00:06:49,720 So you see a young Fritz Savage traveling across the country to compete in a video game tournament. 92 00:06:50,660 --> 00:06:53,360 And it is a walking, talking ad for Nintendo. 93 00:06:53,360 --> 00:06:58,720 Now, he has a power glove on his left hand, which is a lie, because I never made a left-handed version of it. 94 00:06:58,720 --> 00:07:00,060 It's just right-handed. 95 00:07:00,980 --> 00:07:02,640 So at some point, they see Billy. 96 00:07:02,640 --> 00:07:04,660 Billy is the main bad guy. 97 00:07:04,660 --> 00:07:09,900 And Billy is playing, takes out the power glove out of a suitcase with, like, huge plum. 98 00:07:10,520 --> 00:07:12,680 And then starts playing Red Racer. 99 00:07:13,040 --> 00:07:14,820 Power glove would have different mods. 100 00:07:14,820 --> 00:07:17,760 So for Red Racer, you could put a mod and hold it like a wheel. 101 00:07:17,940 --> 00:07:19,220 And you could, like, do this. 102 00:07:19,320 --> 00:07:21,980 For, like, Mike Tyson's punch up, you could do, like, punch. 103 00:07:21,980 --> 00:07:23,160 And you could do, like, uppercut. 104 00:07:23,160 --> 00:07:25,240 So it looks very, very cool. 105 00:07:25,720 --> 00:07:29,220 But in the end, he says the iconic quote, like, I love the power glove. 106 00:07:29,260 --> 00:07:31,300 It is so bad. 107 00:07:31,380 --> 00:07:32,580 And it is. 108 00:07:32,880 --> 00:07:33,700 Don't get me wrong. 109 00:07:33,700 --> 00:07:35,880 If you want to make it work, it won't work. 110 00:07:35,880 --> 00:07:37,360 Today, I met someone. 111 00:07:37,520 --> 00:07:40,200 And he said, does the power glove work? 112 00:07:40,200 --> 00:07:41,260 And I said, yes. 113 00:07:41,260 --> 00:07:42,780 And he said, well, I had one as a kid. 114 00:07:42,780 --> 00:07:44,060 And it barely worked. 115 00:07:44,220 --> 00:07:45,680 And I said, OK, let me rephrase that. 116 00:07:45,680 --> 00:07:46,800 It's functional. 117 00:07:50,320 --> 00:07:54,380 So the way it works is, you have these sensors you put around your TV. 118 00:07:54,520 --> 00:07:56,480 And I'm, like, putting this thing. 119 00:07:56,480 --> 00:07:59,340 And we saw it, like, a couple of slides ago. 120 00:08:01,120 --> 00:08:04,700 You can see the sensors around the TV that Billy's playing. 121 00:08:05,580 --> 00:08:08,080 And then these are essentially microphones. 122 00:08:08,080 --> 00:08:09,600 They're glorified microphones. 123 00:08:09,780 --> 00:08:11,160 And it's the thing with the hardware people. 124 00:08:11,160 --> 00:08:13,220 The good thing, the hardware hacking people are not here. 125 00:08:13,220 --> 00:08:14,440 I mean, a couple of them are here. 126 00:08:14,440 --> 00:08:16,680 But we can do that. 127 00:08:16,960 --> 00:08:19,040 They are really... 128 00:08:20,160 --> 00:08:21,880 they name things differently. 129 00:08:21,880 --> 00:08:23,200 Like, so these are not microphones. 130 00:08:23,200 --> 00:08:24,360 These are sensors. 131 00:08:25,040 --> 00:08:26,560 So you put them around your TV. 132 00:08:26,560 --> 00:08:28,840 And there's this junction box at the bottom. 133 00:08:28,900 --> 00:08:29,320 Oops. 134 00:08:29,740 --> 00:08:30,980 Did I go to the next slide? 135 00:08:30,980 --> 00:08:31,440 No. 136 00:08:31,540 --> 00:08:35,060 And this junction box, that DB9 connector goes into there. 137 00:08:35,060 --> 00:08:36,080 There's Power Glove. 138 00:08:36,080 --> 00:08:38,520 And that 7-pin connector is your Nintendo connector. 139 00:08:38,520 --> 00:08:39,800 It goes to the NES. 140 00:08:39,940 --> 00:08:41,460 And then now it works. 141 00:08:41,580 --> 00:08:43,040 You sit in front of it. 142 00:08:43,740 --> 00:08:45,080 Sometimes it does that. 143 00:08:45,080 --> 00:08:45,820 There we go. 144 00:08:45,820 --> 00:08:50,000 And this, you can see, it is from here, it starts sending out sound waves. 145 00:08:50,000 --> 00:08:56,460 So when I talk to people here at DEF CON or, like, Blue Hats or anywhere else, they were, like, oh, is this, like, a gyrometer or, like, accelerometer? 146 00:08:56,460 --> 00:08:58,340 No, it's just sound waves. 147 00:08:58,340 --> 00:09:00,000 They don't have any of that. 148 00:09:00,560 --> 00:09:02,700 So if, unfortunately, you can't hear it. 149 00:09:02,700 --> 00:09:08,700 But if you listen, you can hear this very rapid tick, tick, tick, tick sound of, like, hypersonic sounds going out. 150 00:09:08,860 --> 00:09:10,020 And you sit in front of it. 151 00:09:10,020 --> 00:09:11,620 And then the sound's going. 152 00:09:11,620 --> 00:09:14,020 And you can use the Doppler effect and the sensors. 153 00:09:14,020 --> 00:09:16,840 You can do, like, up and down, left and right, and forward and backward. 154 00:09:17,200 --> 00:09:19,040 But it doesn't really work great. 155 00:09:21,160 --> 00:09:22,280 As you can see. 156 00:09:23,420 --> 00:09:26,520 So Ben Heck, in 2016, like, did a teardown. 157 00:09:26,520 --> 00:09:31,320 He tried to figure out what can we do to make it a mouse. 158 00:09:32,420 --> 00:09:40,100 So if you put a... if you connect it to an NES with a Power Glove-enabled game, it would start, like, working the Power Glove mode. 159 00:09:40,100 --> 00:09:45,160 And it would start sending, like, four bytes, which is X, Y, Z, and then the buttons that you have here. 160 00:09:45,160 --> 00:09:46,760 So you can also do, like, A. 161 00:09:46,760 --> 00:09:48,240 And you can also do B. 162 00:09:48,280 --> 00:09:50,940 Unfortunately for me, these sensors do not work. 163 00:09:51,060 --> 00:09:53,680 I bought a second one, and the sensors on that didn't work. 164 00:09:53,680 --> 00:09:57,520 So maybe after all these years, the sensors have stopped working. 165 00:09:58,160 --> 00:09:59,680 So we tried to make it a mouse. 166 00:09:59,680 --> 00:10:03,720 And that is... and then tried to draw in MS Paint, and that's what it did. 167 00:10:03,840 --> 00:10:06,100 So you can't really... it doesn't really work. 168 00:10:06,200 --> 00:10:07,180 The other guy, Dr. 169 00:10:07,180 --> 00:10:09,940 Ben... unfortunately, it didn't release any code. 170 00:10:10,040 --> 00:10:10,380 Dr. 171 00:10:10,380 --> 00:10:14,020 Benjamin Blondo did a similar thing to what I did. 172 00:10:14,020 --> 00:10:20,020 But instead of a Bluetooth keyboard, he created a joystick. 173 00:10:22,080 --> 00:10:23,560 A wired joystick. 174 00:10:23,560 --> 00:10:28,100 Unfortunately for me, the code that he released also didn't work. 175 00:10:28,260 --> 00:10:30,440 For some reason, I don't know why, but I had to redo it. 176 00:10:30,440 --> 00:10:37,140 But he gave me this great information, that pinout for the DB9 or DE9 pin, whatever you want to call it. 177 00:10:37,140 --> 00:10:41,540 So you have... the green ones are supposedly wiggles for the sensors. 178 00:10:41,740 --> 00:10:44,120 Again, for mine, it doesn't work, so I just gave up. 179 00:10:44,640 --> 00:10:46,000 And then you have five volts. 180 00:10:46,000 --> 00:10:48,020 It works... all the electronic works on five volts. 181 00:10:48,020 --> 00:10:50,340 And a ground and latch and a bunch of other things. 182 00:10:50,340 --> 00:10:52,020 So now I have the pinout. 183 00:10:52,020 --> 00:10:53,540 I can start reading what's coming out. 184 00:10:53,560 --> 00:10:55,100 I also found this other thing. 185 00:10:55,100 --> 00:10:58,160 This is a connector from RetroUSB. 186 00:10:58,160 --> 00:11:02,840 So I bought like ten of these, but none of them except this worked with a power glove. 187 00:11:02,840 --> 00:11:14,140 If you connect this to the power glove, not this, but the sensors and junction box, it will act as a USB joystick on Windows, which has great backwash compatibility. 188 00:11:14,140 --> 00:11:17,340 And I don't say this because I work there, but it is great. 189 00:11:17,340 --> 00:11:18,600 I love it for gaming. 190 00:11:19,100 --> 00:11:21,080 So now I have... I know how to pinout. 191 00:11:21,080 --> 00:11:22,360 I need to read those pinouts. 192 00:11:22,360 --> 00:11:26,020 The first thing I need to figure out is like, what can I do? 193 00:11:26,020 --> 00:11:28,700 And then my idea was that I want to have a Bluetooth keyboard. 194 00:11:29,140 --> 00:11:33,320 And in this day and age, if you want to have a microcontroller with a Bluetooth, you do an ESP32. 195 00:11:33,320 --> 00:11:35,060 So ESP32, this is a dev board. 196 00:11:35,240 --> 00:11:36,820 ESP32 is that chip. 197 00:11:36,980 --> 00:11:38,500 It's called a system on a chip. 198 00:11:38,500 --> 00:11:42,480 It has Bluetooth, Wi-Fi, and a kind of beefy CPU. 199 00:11:42,500 --> 00:11:50,520 The cheapest one I could find had like 140 megahertz CPU, like 8 megabytes of flash, which is really great. 200 00:11:50,520 --> 00:11:58,440 And then you can also have expansion boards that exposes more pins and gives you like more power supply, like a barrel jack and USB-C and all that. 201 00:11:58,560 --> 00:12:00,020 But there's a huge problem. 202 00:12:00,020 --> 00:12:02,560 These are 3.3 pins. 203 00:12:02,680 --> 00:12:07,080 And internally, the CPUs actually work lower, like 1.8 volts. 204 00:12:07,580 --> 00:12:11,440 And I would expect that the voltages for the boards actually... 205 00:12:11,440 --> 00:12:15,940 dev boards actually drop in the future because they're more energy efficient and just better. 206 00:12:15,940 --> 00:12:19,120 Now, what happens when you send a 5-volt signal to a 3.3 pin? 207 00:12:20,780 --> 00:12:24,260 If you are unlucky, nothing happens. 208 00:12:24,260 --> 00:12:26,360 If you're unlucky, the pin dies. 209 00:12:26,380 --> 00:12:30,220 But if you're very unlucky, the CPU dies and then like the magic smoke comes out. 210 00:12:30,260 --> 00:12:33,980 And I killed a bunch of those ones on the left. 211 00:12:34,360 --> 00:12:36,020 Okay, so what now we need to do? 212 00:12:36,020 --> 00:12:41,440 We need to find a board that has Bluetooth, what we want, and also 5-volt resistance. 213 00:12:41,440 --> 00:12:42,260 And I found this thing. 214 00:12:42,260 --> 00:12:46,020 This is an Arduino Uno R4 Wi-Fi. 215 00:12:46,020 --> 00:12:47,880 And it's a freak of nature. 216 00:12:48,520 --> 00:12:50,980 Because you have that ESP32 there. 217 00:12:51,400 --> 00:12:55,780 And it also has its own CPU, which is an ARM Cortex 41 megahertz something, something. 218 00:12:55,800 --> 00:13:01,260 So you talk to the ARM Cortex and that talks to the ESP32 to set up Bluetooth and whatever. 219 00:13:01,480 --> 00:13:04,040 But unfortunately, there were like no libraries, like nothing. 220 00:13:04,040 --> 00:13:06,200 They just released it and there was nothing else. 221 00:13:06,220 --> 00:13:09,200 But the pins are 24-volt resistance, so that was good. 222 00:13:09,940 --> 00:13:11,460 But there was nothing for me to do. 223 00:13:11,460 --> 00:13:14,580 But someone had actually created something that you could do a... 224 00:13:14,580 --> 00:13:24,020 short a couple of pins and then flash the firmware and just talk to the ESP32 directly, which is kind of like an oxymoron because you already have a CPU there. 225 00:13:24,520 --> 00:13:25,840 And I tried and it didn't work. 226 00:13:25,840 --> 00:13:27,260 And I was like, okay, what can I do? 227 00:13:27,660 --> 00:13:28,520 So look at something else. 228 00:13:28,520 --> 00:13:31,920 I found this other thing called a level shifter, this red thing on the left. 229 00:13:31,920 --> 00:13:34,300 So it's a very interesting piece of tech. 230 00:13:34,480 --> 00:13:36,080 Now, we are dealing with signals. 231 00:13:36,080 --> 00:13:37,640 It's not like constant power. 232 00:13:37,640 --> 00:13:40,640 And signals are, in this case, we're looking at the digital signals. 233 00:13:40,660 --> 00:13:45,220 So a signal is high if it's over a certain amount of voltage for a certain amount of time. 234 00:13:45,220 --> 00:13:48,200 But other than that, it's just a signal. 235 00:13:48,540 --> 00:13:52,980 So you supply the five, the high and low, and the ground. 236 00:13:52,980 --> 00:13:57,280 And then every signal from one side gets converted to the other one, which is really great. 237 00:13:57,900 --> 00:14:01,600 Now, that's like a bunch of pins that I wanted to solder and I don't know how to solder. 238 00:14:01,920 --> 00:14:02,660 And then I was... 239 00:14:02,660 --> 00:14:06,900 Blue Hat, a team member of mine, was running the soldering station. 240 00:14:06,900 --> 00:14:09,740 So I asked him to solder these for me. 241 00:14:09,740 --> 00:14:12,260 And then I guilt-tripped him into soldering these for him. 242 00:14:12,260 --> 00:14:13,640 And that guy is Reid. 243 00:14:14,020 --> 00:14:17,400 I asked for his permission to ask for his name. 244 00:14:17,400 --> 00:14:19,500 So everyone say, thank you, Reid. 245 00:14:21,240 --> 00:14:21,880 Thank you. 246 00:14:21,880 --> 00:14:24,420 And then tomorrow, we'll start working on counting. 247 00:14:26,100 --> 00:14:30,120 So the other thing that this is, the other one I found, this is from TIDA Electronics. 248 00:14:30,120 --> 00:14:31,980 So TIDA is a Taiwanese shop. 249 00:14:32,400 --> 00:14:33,080 It is... 250 00:14:33,080 --> 00:14:42,240 I used to make fighting game sticks, like custom fighting game sticks, which are basically like a wooden box with an Xbox controller or something. 251 00:14:42,240 --> 00:14:44,980 With a bunch of wires going to the buttons. 252 00:14:44,980 --> 00:14:49,940 And they were very popular in the guitar pedal and custom fighting game community. 253 00:14:49,940 --> 00:14:52,460 So I found these for like $7 before tariffs. 254 00:14:52,500 --> 00:14:54,520 These are 5 volt resistance. 255 00:14:54,880 --> 00:15:00,160 And they also have like a battery slot at the bottom that you can put an 18650 battery on it. 256 00:15:00,160 --> 00:15:01,220 And that was great. 257 00:15:01,220 --> 00:15:02,500 So I started using those. 258 00:15:02,500 --> 00:15:06,020 Now an 18650 battery, we all know what it is. 259 00:15:06,020 --> 00:15:09,400 It's 18 millimeters diameter, 65 millimeters length. 260 00:15:09,400 --> 00:15:12,100 And the zero in the end means it's round. 261 00:15:12,100 --> 00:15:14,660 You should not over discharge it. 262 00:15:14,680 --> 00:15:15,980 You should not overcharge it. 263 00:15:15,980 --> 00:15:19,800 And then you can have like these charger modules, a TP456 to do that. 264 00:15:19,800 --> 00:15:21,960 And that board has all of those. 265 00:15:22,080 --> 00:15:25,160 So I started using the 5 volt pin on that for this. 266 00:15:25,240 --> 00:15:26,520 But I had a bigger problem. 267 00:15:26,820 --> 00:15:32,180 Because if you are on battery, that 5 volt pin, the red line at the bottom, is connected to that micro USB. 268 00:15:33,020 --> 00:15:35,160 So it only gives you like less than a volt. 269 00:15:35,300 --> 00:15:36,860 So you can't rely on the battery. 270 00:15:37,240 --> 00:15:42,080 You can do another thing that at the corner of the bottom left corner, the pin is 3.3. 271 00:15:42,100 --> 00:15:45,680 So you can grab a step-up module and then convert 3.3 to 5. 272 00:15:45,680 --> 00:15:46,800 And then you're good to go. 273 00:15:47,280 --> 00:15:49,660 But then I said, okay, maybe I should do something else. 274 00:15:49,660 --> 00:15:51,780 So I find these battery packs. 275 00:15:51,780 --> 00:15:54,800 They give you like whatever you want, a micro USB. 276 00:15:54,800 --> 00:15:56,000 And then you connect it and that. 277 00:15:56,000 --> 00:15:58,040 And now you have like a 5 volt from there. 278 00:15:58,040 --> 00:15:58,880 From the 5 volt. 279 00:15:58,880 --> 00:16:01,080 So right now I'm connected to the computer. 280 00:16:01,080 --> 00:16:03,000 I have the battery pack if you want to. 281 00:16:03,060 --> 00:16:05,900 But if you want to do a step-up module with like just one battery. 282 00:16:06,420 --> 00:16:10,560 That the power consumption is very, very minimal. 283 00:16:11,220 --> 00:16:14,640 Especially when you're not just, you know, running it. 284 00:16:14,640 --> 00:16:17,080 I mean that the sounds are working, but other than that. 285 00:16:17,080 --> 00:16:21,840 Like I've made it run overnight with one 18650 of like 23 mega amp hour. 286 00:16:21,840 --> 00:16:24,060 I'm sorry, milliamp hour, I wish. 287 00:16:24,120 --> 00:16:25,720 Mega, milliamp hour. 288 00:16:25,720 --> 00:16:27,780 It was running overnight and was still working. 289 00:16:28,500 --> 00:16:28,740 All right. 290 00:16:28,740 --> 00:16:33,140 So now we have something that doesn't die. 291 00:16:33,580 --> 00:16:35,600 And then now we need to start like development. 292 00:16:35,600 --> 00:16:38,100 And I was very, I've never, never done this before. 293 00:16:38,100 --> 00:16:40,340 So it was very, very much easier than I was thinking. 294 00:16:40,340 --> 00:16:43,100 You can use Arduino IDE, platform IO that I never use. 295 00:16:43,100 --> 00:16:45,540 Or EPA, ESP, IDF. 296 00:16:46,180 --> 00:16:49,760 The great thing about Suppressive, the company that makes this, these chips. 297 00:16:49,760 --> 00:16:51,520 And they're making these by the hundreds of millions. 298 00:16:51,520 --> 00:16:53,940 And they're made by TSMC. 299 00:16:54,260 --> 00:16:57,220 Is that they release a lot of code that's called unlicensed. 300 00:16:57,240 --> 00:17:02,220 As in like, it is good for, it has a license and it's called unlicensed. 301 00:17:02,240 --> 00:17:03,540 You can use it for whatever you want. 302 00:17:03,540 --> 00:17:05,120 There is, they're not a software company. 303 00:17:05,120 --> 00:17:06,300 They can give you this code. 304 00:17:06,300 --> 00:17:08,780 You can start modifying this code and they can do whatever you want. 305 00:17:08,780 --> 00:17:10,300 But they don't have a lot of answers. 306 00:17:10,340 --> 00:17:12,660 All right, so we know how to read. 307 00:17:12,660 --> 00:17:15,260 We know how to use a controller to read. 308 00:17:15,260 --> 00:17:16,540 How do we do that? 309 00:17:16,540 --> 00:17:19,500 And this is essentially an NES gamepad, right? 310 00:17:20,020 --> 00:17:24,260 So in order to read an NES gamepad, the protocol is very well documented. 311 00:17:24,680 --> 00:17:26,760 What we do is we had a latch. 312 00:17:26,760 --> 00:17:28,680 So we pulse the latch. 313 00:17:28,680 --> 00:17:32,400 Which is another one of the things that hardware people say instead of putting a signal up. 314 00:17:32,440 --> 00:17:37,440 They also call like screws, fasteners, motors or actuators and so on. 315 00:17:38,140 --> 00:17:42,660 You pulse the latch and then you read one bit from the data pin. 316 00:17:42,680 --> 00:17:46,280 If the button is pressed, the pin is zero. 317 00:17:46,280 --> 00:17:47,500 If not, it's one. 318 00:17:47,500 --> 00:17:49,680 And the first button is the A. 319 00:17:50,100 --> 00:17:55,720 And then you pulse the clock seven more times and then read data after after. 320 00:17:55,720 --> 00:17:58,300 And then you read A, B, start, select. 321 00:17:58,640 --> 00:18:02,100 And then like, you know, the arrow keys and then that's it. 322 00:18:02,100 --> 00:18:08,200 One thing that I almost burned my power glove with is that NES has a 1.79 megahertz CPU. 323 00:18:08,200 --> 00:18:11,620 So the power glove is not expecting rapid polling. 324 00:18:11,700 --> 00:18:16,940 I read somewhere, I'm not sure if it's true, that it only expects like 20 reads a second. 325 00:18:16,940 --> 00:18:18,260 Like 20 hertz. 326 00:18:18,420 --> 00:18:20,980 But I felt a little bit of experimentation. 327 00:18:20,980 --> 00:18:25,720 I almost burned it because my CPU on the ESP32 is 140. 328 00:18:25,720 --> 00:18:27,620 So I was just doing it very quickly. 329 00:18:28,000 --> 00:18:31,000 So I had to like add some delay in between the reading. 330 00:18:31,000 --> 00:18:32,740 Well, it's not really that bad. 331 00:18:32,740 --> 00:18:34,860 So it almost died, but it didn't. 332 00:18:34,920 --> 00:18:39,780 So you do a bit of delay and now you have read one byte, which gives you all the buttons that you have. 333 00:18:40,680 --> 00:18:41,860 And then now we have a button. 334 00:18:41,860 --> 00:18:44,540 The next thing I wanted to do, I want to create a Bluetooth mouse. 335 00:18:44,680 --> 00:18:48,080 And when you create a Bluetooth mouse, there are libraries out there that create one for you. 336 00:18:48,080 --> 00:18:51,880 The only thing you need to supply is, okay, where am I? 337 00:18:51,880 --> 00:18:54,280 And you supply four bytes. 338 00:18:54,440 --> 00:18:59,400 So you supply the buttons, which goes by bits. 339 00:19:00,020 --> 00:19:03,620 First bit is one, right-click, left-click, and then so on. 340 00:19:03,760 --> 00:19:05,300 And then you do the x. 341 00:19:05,580 --> 00:19:08,720 So x is going to positive, x is going to be right here. 342 00:19:09,040 --> 00:19:12,280 So if you're going up, you're going minus, minus y, and so on. 343 00:19:12,280 --> 00:19:19,040 And then you will also supply a wheel, the wheel of the mouse, which is zero in what I'm doing. 344 00:19:19,380 --> 00:19:22,040 Another thing you could do is that I did, it was very slow. 345 00:19:22,040 --> 00:19:27,200 So I had to add what's called a step, which is your mouse sensitivity, your mouse sensitivity on your machine. 346 00:19:27,200 --> 00:19:30,200 Everything is multiplied by that, so it's going faster. 347 00:19:30,440 --> 00:19:34,740 And I created a mouse, and it's the world's clunkiest etch-a-sketch. 348 00:19:35,280 --> 00:19:40,980 So I'm using the arrow keys as a mouse, and you have to hold A for right-click. 349 00:19:40,980 --> 00:19:47,840 And as you can do this, it's very, very well, very clunky, but better than nothing. 350 00:19:47,840 --> 00:19:49,660 Okay, so we have a mouse. 351 00:19:49,660 --> 00:19:51,740 Next thing I wanted to do is I wanted to create a keyboard. 352 00:19:51,740 --> 00:19:59,640 And when you are using a keyboard, you would assume that you're going to be sending ASCII hex code to the Bluetooth as it has a HID. 353 00:19:59,920 --> 00:20:01,100 But it's not. 354 00:20:01,340 --> 00:20:06,520 So you send eight bytes, but only the first and third, zero and two, are being used. 355 00:20:06,520 --> 00:20:12,560 The first one is the actual key, and the number three, I'm sorry, number two is the modifier. 356 00:20:13,300 --> 00:20:16,460 I'm sorry, the first one is the modifier, number two is the actual key. 357 00:20:16,460 --> 00:20:21,480 So instead of sending the ASCII hex code, for A you send four, and then you O up to Z. 358 00:20:21,480 --> 00:20:26,120 If you want to do capital A, you do exactly as you were doing when you were typing. 359 00:20:26,120 --> 00:20:32,240 You do shift as modifier and an A, and that the keyboard thinks, oh yeah, I've gotten a capital A for you. 360 00:20:32,400 --> 00:20:34,040 So I guess maybe that's like that. 361 00:20:34,880 --> 00:20:44,400 And then, so I created these mappings and said, okay, if I'm reading, if I see right being selected, I go right and left and up and down. 362 00:20:44,400 --> 00:20:49,180 And you can also add the media keys if you want, like you don't want to pop calc or so on and so forth. 363 00:20:49,180 --> 00:20:51,800 This is essentially what it does. 364 00:20:52,120 --> 00:20:59,360 And then at the end, what we do is you create a Bluetooth keyboard, you grab it by, I've found a library that basically does most of it for you, which is really fun. 365 00:20:59,500 --> 00:21:03,880 And then there was, and then you read whatever is coming from the buttons. 366 00:21:04,220 --> 00:21:08,200 Now there was this huge problem, I guess this is dying because this is faulty electronics. 367 00:21:08,200 --> 00:21:14,600 Yesterday when I called it a CTF at the Bug Bounty Village, it suddenly started going all the way to the left. 368 00:21:14,600 --> 00:21:16,660 And I thought maybe someone has messed with it. 369 00:21:16,660 --> 00:21:19,120 But it seems like just the electronics were dying. 370 00:21:19,120 --> 00:21:25,180 So last night I connected it to my machine and it was just popping calcs over and over again, which is the select key for me. 371 00:21:25,400 --> 00:21:30,760 So I had to add some code that, okay, if nothing is pressed, which everything is one, ignore it. 372 00:21:30,760 --> 00:21:36,940 If everything is pressed, which sometimes it does, also ignore it because I'm not going to be pressing all the keys together. 373 00:21:36,940 --> 00:21:40,480 And everything other than that, if I've created one of the arrow keys, do that mapping. 374 00:21:40,480 --> 00:21:43,700 If I've created one of the other one's keys, do that mapping. 375 00:21:43,700 --> 00:21:46,860 Another problem is I didn't put a delay here. 376 00:21:46,860 --> 00:21:51,080 So if I would write, it would just immediately go up until to the next. 377 00:21:52,380 --> 00:21:54,740 So that was pretty much it. 378 00:21:55,160 --> 00:21:57,920 And then I did it for my wife and he said, well, where's the demo? 379 00:21:58,440 --> 00:22:01,620 And I looked at her and said, yes, you have been looking at the demo. 380 00:22:02,220 --> 00:22:05,160 And then she all just rolled her eyes. 381 00:22:05,160 --> 00:22:11,220 So if you want some unsolicited marriage advice, she will let you make the joke if you're persistent. 382 00:22:14,320 --> 00:22:19,600 But yeah, I'm very lucky that I'm being able to use this as the demo thing. 383 00:22:19,600 --> 00:22:21,540 So I don't have to have a demo in the end. 384 00:22:21,540 --> 00:22:29,480 But in order for it to happen, I did a similar, like a demo, a quick demo at the hotel last night. 385 00:22:29,480 --> 00:22:32,880 So it was just, you know, you can go to the next slide, previous slide. 386 00:22:32,940 --> 00:22:36,700 And then if you press select, it should be able to pop cap for you. 387 00:22:38,920 --> 00:22:40,140 It's really fun. 388 00:22:40,300 --> 00:22:42,180 All right, so what did we learn here today? 389 00:22:42,180 --> 00:22:50,040 We can use the power glove as a gimmick. 390 00:22:50,160 --> 00:22:51,300 And that is great. 391 00:22:51,900 --> 00:23:00,120 And next year, I better see people putting using some janky shirts as a presentation thought. 392 00:23:00,180 --> 00:23:08,020 It would be great if you go into your boardroom and then instead of like typing on a keyboard like a nerd, you press something and the shirt pops up. 393 00:23:08,060 --> 00:23:11,580 The boardroom will remember you as the guy with the power glove or whatever it is. 394 00:23:11,580 --> 00:23:13,080 That popped the show. 395 00:23:13,160 --> 00:23:16,460 And thank you very much for your time and have a great rest of the call.