1 00:00:00,000 --> 00:00:02,500 Today we're going to talk about the ESP8266. 2 00:00:04,320 --> 00:00:05,760 Let me just see if this is working. 3 00:00:06,900 --> 00:00:09,840 First of all, has anybody heard of the ESP8266? 4 00:00:10,260 --> 00:00:13,720 Oh, wow, there's a lot more people than I thought would actually know about this. 5 00:00:13,920 --> 00:00:15,820 Ask how many of us heard in your talk yesterday. 6 00:00:17,000 --> 00:00:18,120 Oh, that too. 7 00:00:20,760 --> 00:00:24,280 All right, so first off, we're going to talk about who we are. 8 00:00:25,020 --> 00:00:26,280 We're going to talk about who we are. 9 00:00:27,280 --> 00:00:29,680 We're going to talk about what the ESP8266 is. 10 00:00:29,680 --> 00:00:32,300 We're kind of assuming that a lot of people haven't had exposure to it. 11 00:00:32,600 --> 00:00:35,520 There's probably a lot of people who haven't even heard of it until yesterday 12 00:00:35,520 --> 00:00:36,760 when they heard it in our talk. 13 00:00:38,300 --> 00:00:41,980 We're going to talk about some things that you can do with it for evil, 14 00:00:42,560 --> 00:00:47,780 and then we're going to give you some evil, annoying, Wi-Fi-throwy examples. 15 00:00:49,420 --> 00:00:51,740 All right, so first off, I'm going to rush through some of these slides. 16 00:00:51,940 --> 00:00:55,160 There's going to be a lot of information that are in the slides I'm not going to go over 17 00:00:55,160 --> 00:00:58,620 just because there's so much stuff because I'm kind of starting that scratch 18 00:00:58,620 --> 00:00:59,660 and kind of getting you going. 19 00:00:59,680 --> 00:01:00,340 I'm going to get you guys up to speed. 20 00:01:00,900 --> 00:01:03,340 We will be posting the slides for you. 21 00:01:04,240 --> 00:01:09,220 They're not up right now, but check back at ragingsecurity.ninja, 22 00:01:11,180 --> 00:01:15,980 and they should be posted probably by next week, depending on how hungover we are. 23 00:01:19,260 --> 00:01:20,080 Wait, is it? 24 00:01:20,140 --> 00:01:20,560 Is it? 25 00:01:23,160 --> 00:01:24,640 It might be a typo. 26 00:01:25,180 --> 00:01:26,560 It's actually spelled the right way. 27 00:01:26,640 --> 00:01:28,080 It is actually spelled the right way. 28 00:01:30,880 --> 00:01:32,320 All right, so I'm Matt Trimble. 29 00:01:32,600 --> 00:01:33,480 I go by Dem. 30 00:01:34,580 --> 00:01:37,460 I'm the information security manager for Barracuda Networks. 31 00:01:38,580 --> 00:01:40,020 I run their bug bounty. 32 00:01:40,180 --> 00:01:41,320 I run their cert. 33 00:01:41,420 --> 00:01:42,400 I run the red team. 34 00:01:42,640 --> 00:01:46,320 Pretty much anything that does security at Barracuda outside of their products, that's me. 35 00:01:48,600 --> 00:01:52,460 And generally, I get to play the pointy-haired manager and tell people no a lot, 36 00:01:52,500 --> 00:01:54,340 and I don't have budget for that or time. 37 00:01:55,840 --> 00:01:57,500 This is Eric Escobar. 38 00:01:57,580 --> 00:01:58,940 He goes by Justice Beaver. 39 00:02:04,080 --> 00:02:05,480 Eric's a special blend. 40 00:02:06,620 --> 00:02:16,180 He's 60% sunshine, 20% kitten videos, a little bit of tinfoil hat, and just a peck of Voldemort. 41 00:02:18,480 --> 00:02:21,100 All right, so what is an ESP8266? 42 00:02:22,700 --> 00:02:23,660 Do you want to go over this one? 43 00:02:25,480 --> 00:02:26,880 Yeah, sorry about some of these slides. 44 00:02:27,080 --> 00:02:29,660 I did it on Google Notes and then went, ah, I'm probably not going to have it. 45 00:02:29,680 --> 00:02:33,580 I didn't have network access, so I exported them to PowerPoint, and Google didn't like that. 46 00:02:33,840 --> 00:02:36,220 So it punished me by making the slides all jacked up. 47 00:02:39,740 --> 00:02:42,880 All right, so I discovered this chip a while ago. 48 00:02:43,060 --> 00:02:47,460 It was scouring through Hackaday, and I saw, hey, a Wi-Fi chip for like $3. 49 00:02:47,540 --> 00:02:48,740 This is awesome. 50 00:02:49,440 --> 00:02:52,020 I have a bunch of home stuff that I like to wire up. 51 00:02:52,640 --> 00:02:57,060 Originally, I got it to do stuff like my chicken coop, to do stuff like feeding the cat. 52 00:02:57,820 --> 00:02:59,620 And so I figured, hey, I can slide. 53 00:02:59,680 --> 00:03:03,740 I can slap $2 on an Arduino and make it Wi-Fi compatible and on my network. 54 00:03:03,960 --> 00:03:04,860 What could be better? 55 00:03:05,100 --> 00:03:10,060 And then from there, we kind of started playing with it and realizing we could do some pretty bad things with it. 56 00:03:11,240 --> 00:03:15,360 So, yeah, I mean, that's in a nutshell when we got started with it. 57 00:03:15,560 --> 00:03:16,620 I don't know where the clicker is. 58 00:03:19,620 --> 00:03:23,080 So just a quick history lesson. 59 00:03:23,300 --> 00:03:24,980 This guy hasn't been around for a long time. 60 00:03:25,600 --> 00:03:28,640 And for most of its life, most of the documentation was in Chinese. 61 00:03:31,360 --> 00:03:35,000 So, yes, and I love Pentoo. 62 00:03:42,540 --> 00:03:48,240 Anyways, so the first time we saw it was on Hackaday around August 2014. 63 00:03:49,320 --> 00:03:53,880 It was just starting to get some translated docs out there in English. 64 00:03:54,020 --> 00:03:54,840 There really wasn't a lot. 65 00:03:55,800 --> 00:03:59,400 Eric actually spent a lot of time translating docs from Chinese. 66 00:03:59,680 --> 00:04:07,020 And we found that just chucking technical jargon into a translator produces a pile of shit. 67 00:04:09,420 --> 00:04:14,600 So it takes a little massaging to actually get any real information. 68 00:04:16,140 --> 00:04:19,660 So in September 2014, we had GCC support land. 69 00:04:20,220 --> 00:04:21,940 It was really rudimentary. 70 00:04:22,000 --> 00:04:26,140 It required a very specific version of GCC that wasn't very well distributed. 71 00:04:26,660 --> 00:04:29,660 So when people were working on this, what they'd do is they'd build it. 72 00:04:29,680 --> 00:04:33,040 They'd build a VM that had all the exact right versions of everything. 73 00:04:33,260 --> 00:04:36,860 And they just distributed VMs because it was so hard to get everything just right. 74 00:04:38,420 --> 00:04:41,160 In October of 2014, an official SDK dropped. 75 00:04:41,320 --> 00:04:43,340 Still was in Chinese. 76 00:04:44,940 --> 00:04:49,620 March of 2015, we got Arduino IDU support and life started getting a lot better. 77 00:04:51,680 --> 00:04:55,860 In May of 2015, we saw the first throwy article. 78 00:04:56,580 --> 00:04:59,660 We had actually been working on throwys before that time. 79 00:04:59,660 --> 00:05:03,680 We just hadn't told anyone because we were afraid that the world would end 80 00:05:03,680 --> 00:05:09,300 if everyone figured out that you could build a $5 Wi-Fi throwy that could jam networks 81 00:05:09,300 --> 00:05:12,700 and just chuck them in places and wreak havoc. 82 00:05:14,180 --> 00:05:16,260 And we actually kind of thought about that for this talk. 83 00:05:17,040 --> 00:05:17,860 Pros and cons. 84 00:05:18,000 --> 00:05:19,300 We're pretty sure someone else is going to do it anyways. 85 00:05:19,520 --> 00:05:20,500 Why not do it first? 86 00:05:23,920 --> 00:05:26,180 So go way forward. 87 00:05:26,440 --> 00:05:29,400 In August. 88 00:05:29,660 --> 00:05:34,740 In August of 2015, we did the Wi-Fi CTF here. 89 00:05:35,080 --> 00:05:39,940 We actually used Wi-Fi throwys built off of the ESP8266. 90 00:05:42,380 --> 00:05:44,400 I was going to talk about what we did with the Fox. 91 00:05:44,560 --> 00:05:45,120 Or is that in there? 92 00:05:45,380 --> 00:05:45,920 No, go ahead. 93 00:05:46,100 --> 00:05:46,440 All right. 94 00:05:46,480 --> 00:05:50,520 So what we did is last year, the Fox, it would continually run around. 95 00:05:50,640 --> 00:05:53,220 And it wasn't reported that the Fox had been found. 96 00:05:53,400 --> 00:05:55,820 So what we had done is we created a bunch of these little throwys, 97 00:05:55,940 --> 00:05:57,660 same MAC address, same ESS ID. 98 00:05:58,340 --> 00:05:59,480 And we put. 99 00:05:59,660 --> 00:06:01,380 So this is like an example of one of the ones that we made. 100 00:06:01,500 --> 00:06:02,020 Oh, no, it's not. 101 00:06:02,420 --> 00:06:06,200 I 3D printed some ones and put some like a little case for it 102 00:06:06,200 --> 00:06:10,020 and had some magnets on it and turned it on, stuck it, 103 00:06:10,100 --> 00:06:11,620 because it had the magnets anywhere and everywhere. 104 00:06:11,840 --> 00:06:15,240 And all of a sudden, the Fox was everywhere but nowhere at the same time. 105 00:06:15,400 --> 00:06:19,460 So there's people going around like, oh, no, it's right. 106 00:06:19,680 --> 00:06:21,740 And they have no idea where it was. 107 00:06:22,000 --> 00:06:27,300 And so that's originally how we got, you know, how that happened. 108 00:06:27,400 --> 00:06:28,440 And that's what we created it for. 109 00:06:28,440 --> 00:06:30,740 And then at some point, you know, so they're disposable. 110 00:06:30,840 --> 00:06:33,960 It's $2, $3 plus, you know, some double A batteries and some wiring. 111 00:06:34,000 --> 00:06:36,980 So it's essentially, you know, disposable if you're using it for a competition. 112 00:06:37,800 --> 00:06:39,820 And we didn't recover all of them. 113 00:06:39,880 --> 00:06:42,040 And somebody turned them into the wireless village. 114 00:06:42,280 --> 00:06:45,600 And this is, I think, a quote directly from Rick from last time. 115 00:06:45,760 --> 00:06:48,280 He goes, who the made this? 116 00:06:49,640 --> 00:06:51,380 Yeah, we still have some of those, too. 117 00:06:51,480 --> 00:06:52,160 You're welcome. 118 00:06:53,940 --> 00:06:55,700 You should put it in a case and be a collector. 119 00:06:55,720 --> 00:06:56,840 So we donated it to him. 120 00:06:56,980 --> 00:06:57,540 No, they didn't. 121 00:06:57,780 --> 00:06:58,420 No, they didn't. 122 00:06:59,780 --> 00:07:00,560 No, they didn't. 123 00:07:00,560 --> 00:07:00,760 No, they didn't. 124 00:07:00,760 --> 00:07:00,980 No, they didn't. 125 00:07:00,980 --> 00:07:01,300 No, they didn't. 126 00:07:01,300 --> 00:07:01,560 No, they didn't. 127 00:07:01,560 --> 00:07:01,580 No, they didn't. 128 00:07:01,580 --> 00:07:01,600 Whatever. 129 00:07:02,200 --> 00:07:02,820 Same, same. 130 00:07:04,640 --> 00:07:05,360 All right. 131 00:07:05,660 --> 00:07:07,480 So this is what it looked like. 132 00:07:08,200 --> 00:07:09,240 It looks pretty ghetto. 133 00:07:09,300 --> 00:07:10,260 But it gets the job done. 134 00:07:10,680 --> 00:07:13,260 So that's going to be kind of a theme for the rest of this talk. 135 00:07:13,420 --> 00:07:14,280 It's going to look pretty ghetto. 136 00:07:14,560 --> 00:07:15,620 But it gets the job done. 137 00:07:17,400 --> 00:07:18,000 All right. 138 00:07:18,040 --> 00:07:21,420 So we're going to talk about some tools and some things you're going to need to set up 139 00:07:21,420 --> 00:07:23,200 in order to work with these guys. 140 00:07:25,980 --> 00:07:27,560 First, some cautionary words. 141 00:07:28,060 --> 00:07:28,420 Okay. 142 00:07:28,440 --> 00:07:29,020 We're not lawyers. 143 00:07:29,240 --> 00:07:31,460 We have no idea what's legal where. 144 00:07:31,880 --> 00:07:34,100 We're not making any legal recommendations. 145 00:07:34,760 --> 00:07:37,780 If you want to know what's legal where, go talk to your lawyer. 146 00:07:39,720 --> 00:07:42,600 I ask you, please, just use these to attack yourself. 147 00:07:43,100 --> 00:07:46,020 Don't turn Wi-Fi into a pile of shit for everyone. 148 00:07:47,100 --> 00:07:48,260 Just do it for yourself. 149 00:07:49,840 --> 00:07:54,840 Don't be the guy who proves that the greater Internet fuckwad theory applies to throwies. 150 00:07:57,040 --> 00:07:57,780 All right. 151 00:07:58,440 --> 00:08:00,440 So the first thing you're going to want to get is the Arduino IDE. 152 00:08:00,800 --> 00:08:02,920 I'm not going to go in-depth into how to do that. 153 00:08:02,980 --> 00:08:06,560 There's plenty of walk-throughs out there for how to get that set up and running. 154 00:08:07,700 --> 00:08:13,080 I am going to talk a little bit, though, about how to set it up specifically for the ESP8266. 155 00:08:13,840 --> 00:08:18,000 So there's a really nice library out there that's kind of a wrapper for the standard 156 00:08:18,000 --> 00:08:24,460 Arduino SDK that makes it function like the Arduino Wi-Fi adapter. 157 00:08:24,460 --> 00:08:35,220 And you can get that by adding the following URL up there to your list of additional board URLs. 158 00:08:36,600 --> 00:08:39,260 And then they actually have a standard package that you can install. 159 00:08:39,360 --> 00:08:40,720 It's going to set up everything for you. 160 00:08:40,920 --> 00:08:42,580 So it's really plug and play. 161 00:08:43,140 --> 00:08:45,800 You just grab my slide, grab the URL, follow directions. 162 00:08:46,140 --> 00:08:48,880 And what it's going to do is it's going to download the Arduino SDK. 163 00:08:49,620 --> 00:08:54,440 It's going to download all of the tools that you're going to need to actually program the ESP8266. 164 00:08:54,440 --> 00:09:00,360 And then it's going to download the wrapper library that makes it function like the standard 165 00:09:00,360 --> 00:09:02,080 Arduino Wi-Fi. 166 00:09:02,280 --> 00:09:03,580 And it's mostly compatible. 167 00:09:03,900 --> 00:09:06,900 There are some differences between the two. 168 00:09:11,160 --> 00:09:14,780 The next thing you're going to want to do is you're going to want to make a programmer. 169 00:09:15,200 --> 00:09:21,980 So unlike a standard Arduino, they don't come usually with a USB interface. 170 00:09:22,560 --> 00:09:24,420 So they're just going to come pinned out. 171 00:09:24,440 --> 00:09:28,520 And they have a mode switch that you have to do to actually program them. 172 00:09:28,800 --> 00:09:34,220 And while you can actually wire them up by hand, it's super annoying. 173 00:09:34,580 --> 00:09:35,980 Especially if you're going to do a bunch of them. 174 00:09:36,420 --> 00:09:41,160 So what you're going to want to do is you're going to want to build something like this. 175 00:09:41,620 --> 00:09:44,500 This is literally the programmer that I've been using all weekend. 176 00:09:45,420 --> 00:09:46,300 Super cheap. 177 00:09:46,540 --> 00:09:49,340 I think it cost me maybe, I don't know, 50 cents. 178 00:09:50,560 --> 00:09:52,980 But it saved me a ton of time. 179 00:09:52,980 --> 00:09:58,340 And what it has on it is it has a switch that switches it into programming mode. 180 00:09:58,800 --> 00:10:00,060 And, well, a button. 181 00:10:00,160 --> 00:10:02,020 And a button that does a reset on it. 182 00:10:02,300 --> 00:10:05,140 And then when you want to program it, you hold down the program button. 183 00:10:05,440 --> 00:10:06,440 You hit reset. 184 00:10:06,820 --> 00:10:07,760 You let go of reset. 185 00:10:08,160 --> 00:10:09,320 You let go of the program button. 186 00:10:09,540 --> 00:10:10,760 And now you're in program mode. 187 00:10:11,140 --> 00:10:14,360 If you're working on something and you want to reset the device, you just hit the reset. 188 00:10:15,000 --> 00:10:18,260 So it really speeds up working with these things. 189 00:10:18,340 --> 00:10:22,960 Otherwise, you're playing with pins and connectors or, you know, soldering things on. 190 00:10:22,960 --> 00:10:23,980 And it just becomes a nightmare. 191 00:10:29,280 --> 00:10:34,080 Also, note, you'll see a lot of diagrams out there on how to wire this thing up. 192 00:10:34,740 --> 00:10:36,640 Most of them are way too complicated. 193 00:10:37,560 --> 00:10:40,040 So this is my own little design that I put together. 194 00:10:42,200 --> 00:10:46,440 So the other thing about it, too, is if you look at the pins on it, this is not breadboard compatible. 195 00:10:46,720 --> 00:10:48,440 So this is not something you can just stick on a breadboard. 196 00:10:48,580 --> 00:10:50,820 Because one way, you're going to just completely short the thing out. 197 00:10:50,920 --> 00:10:52,040 And the other way, it's just not going to work. 198 00:10:52,040 --> 00:10:56,240 So it's not something that you can easily just attach to a breadboard and say, hey, you know, I'm going to get it to work. 199 00:10:56,340 --> 00:10:59,660 And that's why Matt built that programmer, just for that exact same reason. 200 00:11:02,200 --> 00:11:02,820 All right. 201 00:11:03,320 --> 00:11:04,340 So follow this. 202 00:11:04,500 --> 00:11:05,400 This will be super easy. 203 00:11:05,500 --> 00:11:07,200 You'll see some that have multiple resistors. 204 00:11:07,260 --> 00:11:08,360 You really only need one resistor. 205 00:11:09,700 --> 00:11:13,000 I'm sure there are better, more correct ways to do it. 206 00:11:13,340 --> 00:11:16,820 But I've used this for, I don't know, a year and a half. 207 00:11:17,480 --> 00:11:18,980 And I haven't had any problems. 208 00:11:24,660 --> 00:11:27,740 So I'm not going to go into the super low details. 209 00:11:28,000 --> 00:11:33,560 But it requires certain pins to be pulled low and high for operation versus programming mode. 210 00:11:33,920 --> 00:11:38,100 And then it wants a pull down for actual normal execution. 211 00:11:43,220 --> 00:11:44,000 All right. 212 00:11:44,080 --> 00:11:46,240 So I'm going to talk about your first sketch in Arduino. 213 00:11:48,980 --> 00:11:51,480 So this is going to work for most of your use cases. 214 00:11:51,480 --> 00:11:52,420 But not all of them. 215 00:11:53,420 --> 00:12:01,700 This is essentially setting up your sketch to use the standard ESP8266 Wi-Fi library. 216 00:12:03,020 --> 00:12:12,520 It makes it really easy to get up and going and getting your sketch running and getting either an AP in place or a client in place or a client AP in place. 217 00:12:13,520 --> 00:12:16,540 But it doesn't expose some of the more advanced feature sets. 218 00:12:16,760 --> 00:12:20,460 So if you're wanting to do anything crazy, you're going to have to bypass this. 219 00:12:24,540 --> 00:12:25,140 All right. 220 00:12:25,180 --> 00:12:31,300 So this is just an example of what a really super simple basic sketch is. 221 00:12:31,880 --> 00:12:32,920 I'm actually going to post this. 222 00:12:33,100 --> 00:12:36,160 There's a URL right there where you can grab it off of Google Docs. 223 00:12:36,640 --> 00:12:39,520 We were talking about throwing it up on a code repo. 224 00:12:39,700 --> 00:12:40,660 I just haven't gotten there. 225 00:12:41,760 --> 00:12:43,300 And I wanted to get this out to you guys. 226 00:12:46,500 --> 00:12:46,860 OK. 227 00:12:47,120 --> 00:12:51,460 So the next thing I'm going to talk about is how to use an ESP8266. 228 00:12:51,460 --> 00:12:53,460 This is an ESP8266 for AP scanning. 229 00:12:54,340 --> 00:12:58,460 So yesterday we were talking about setting up some nodes out there. 230 00:12:58,820 --> 00:13:00,800 We were actually talking about using Raspberry Pis. 231 00:13:01,200 --> 00:13:03,300 But the ESP8266 will work too. 232 00:13:04,680 --> 00:13:06,680 You can set these up essentially as a scanner. 233 00:13:06,840 --> 00:13:09,860 So it just sits there and scans and looks for APs. 234 00:13:10,080 --> 00:13:17,760 So you can throw these around if you think you have some jack wagon that's coming in with a rogue access point to help you find them. 235 00:13:18,080 --> 00:13:21,440 And because they're so cheap, you can throw 20 of these around your office. 236 00:13:21,460 --> 00:13:24,420 And get a really good feel for where they are. 237 00:13:26,780 --> 00:13:31,760 So the first thing you're going to want to do is you're going to want to set the Wi-Fi mode to Wi-Fi STA, 238 00:13:32,200 --> 00:13:33,380 which is essentially a client. 239 00:13:33,480 --> 00:13:37,440 So you're going to tell it, OK, you're going to client scan for access points. 240 00:13:38,460 --> 00:13:40,120 Then you want to make sure it's disconnected. 241 00:13:40,400 --> 00:13:43,280 You don't want to be associated with anything when you're doing your scan. 242 00:13:45,220 --> 00:13:50,020 For people who aren't familiar with the standard Arduino sketch, 243 00:13:50,680 --> 00:13:53,680 you've got two primary functions that you're going to use. 244 00:13:53,920 --> 00:13:55,260 The first is going to be setup. 245 00:13:55,720 --> 00:13:57,380 That's kind of the setup for the board. 246 00:13:57,800 --> 00:13:59,000 The next one is loop. 247 00:13:59,200 --> 00:14:02,600 Loop is just called over and over and over and over and over and over. 248 00:14:04,520 --> 00:14:05,840 So we're going to set it up. 249 00:14:06,240 --> 00:14:08,620 And then in our loop, we're actually going to do the scan. 250 00:14:09,160 --> 00:14:12,020 And to do the scan, you're going to call Wi-Fi scan networks. 251 00:14:13,000 --> 00:14:18,520 And what that's going to return is going to return the number of access points that it found. 252 00:14:19,440 --> 00:14:25,020 And then using that, you can call Wi-Fi dot whatever, 253 00:14:25,360 --> 00:14:31,420 R-S-S-I, B-S-S-I, is hidden, whatever it is you want to get the information back from, 254 00:14:31,540 --> 00:14:35,520 and pass it the index of the AP that you want to look at. 255 00:14:37,320 --> 00:14:39,680 So I actually have a demo set up. 256 00:14:41,180 --> 00:14:42,580 This is a big no-no. 257 00:14:43,480 --> 00:14:44,900 We're going to do a live demo. 258 00:14:44,980 --> 00:14:48,180 And it actually died on us this morning. 259 00:14:48,780 --> 00:14:54,080 We stepped on my programmer and totally crushed the USB portion of it. 260 00:14:54,220 --> 00:14:56,400 And so I hastily put it back together. 261 00:14:56,720 --> 00:15:00,640 It appears to be working, but we'll see. 262 00:15:03,800 --> 00:15:04,580 Drum roll. 263 00:15:24,420 --> 00:15:25,160 All right. 264 00:15:25,180 --> 00:15:26,980 So I'm going to put this guy in programming mode. 265 00:15:27,120 --> 00:15:28,560 Right now he's in run mode. 266 00:15:28,900 --> 00:15:31,480 So I'm just going to hold down the reset or the program button. 267 00:15:32,020 --> 00:15:32,900 Hit reset. 268 00:15:33,780 --> 00:15:34,720 Let go program. 269 00:15:35,980 --> 00:15:37,740 And we should be in program mode now. 270 00:15:38,560 --> 00:15:41,600 And now what I'm going to do is I'm going to compile and upload this sketch. 271 00:15:41,840 --> 00:15:47,220 This is essentially just a fleshed out version of what we were just looking at. 272 00:15:47,220 --> 00:15:49,860 It's just going to print information about some scans it sees. 273 00:15:51,840 --> 00:15:52,520 I am. 274 00:15:52,600 --> 00:15:53,220 I tested. 275 00:15:57,200 --> 00:15:59,160 It's going to take just a minute to do the upload. 276 00:15:59,700 --> 00:16:00,580 Use your fingers. 277 00:16:13,040 --> 00:16:16,460 It always goes way, way slower when you're presenting. 278 00:16:18,640 --> 00:16:19,500 Somehow it knows. 279 00:16:21,640 --> 00:16:22,040 . 280 00:16:28,220 --> 00:16:28,620 Yeah. 281 00:16:28,680 --> 00:16:29,720 Yeah, you absolutely could. 282 00:16:29,840 --> 00:16:30,620 The exact same thing. 283 00:16:30,720 --> 00:16:33,360 Especially tied in with like one of Adafruit's little GPS modules. 284 00:16:33,660 --> 00:16:34,060 Perfect. 285 00:16:34,220 --> 00:16:35,060 You just tie the two together. 286 00:16:35,300 --> 00:16:37,760 That's actually what in yesterday's talk I put on my cat. 287 00:16:37,940 --> 00:16:39,420 The cat walks around and maps everything. 288 00:16:40,600 --> 00:16:41,000 . 289 00:16:41,000 --> 00:16:41,500 . 290 00:16:41,500 --> 00:16:41,540 . 291 00:16:41,540 --> 00:16:41,900 . 292 00:16:47,220 --> 00:16:48,900 How's that causing such a 256-arı scan? 293 00:16:49,000 --> 00:16:53,740 Oh, I've actually had weird results when I tried doing a scan and I'm connected. 294 00:16:53,960 --> 00:16:57,560 Sometimes it will miss things, so I generally don't 295 00:16:57,560 --> 00:16:58,100 recommend that. 296 00:16:59,000 --> 00:17:04,040 What you could also do though, too, is you could scan down yourself, up yourself, 297 00:17:04,200 --> 00:17:09,320 connect, offload data, and then just switch modes to just kind of toggle back and forth 298 00:17:09,320 --> 00:17:11,120 between you being a client being in access point. 299 00:17:11,400 --> 00:17:11,620 . 300 00:17:11,620 --> 00:17:12,480 . 301 00:17:16,640 --> 00:17:23,100 Alright, so we compiled, we uploaded, it automatically switched over into run mode, and now we're 302 00:17:23,100 --> 00:17:23,980 actually doing some scans. 303 00:17:24,960 --> 00:17:26,660 If you want to, if you want to put this on here. 304 00:17:28,300 --> 00:17:28,960 That's fine. 305 00:17:29,120 --> 00:17:30,300 We'll just swap back and forth. 306 00:17:31,840 --> 00:17:32,340 Okay. 307 00:17:33,080 --> 00:17:33,860 It worked. 308 00:17:34,040 --> 00:17:34,320 Yay. 309 00:17:40,360 --> 00:17:42,180 All right, so now I'm going to talk about 310 00:17:42,180 --> 00:17:43,040 promiscuous mode. 311 00:17:43,380 --> 00:17:48,820 So the ESP8266 kind of supports promiscuous mode. 312 00:17:49,520 --> 00:17:54,040 If you read the API docs, they say they fully support it. 313 00:17:54,640 --> 00:18:01,120 In some places, which is a lie, and in other places, they'll say, we support it, but only 314 00:18:02,280 --> 00:18:03,800 some of the data. 315 00:18:05,120 --> 00:18:07,960 So it's not super useful. 316 00:18:09,440 --> 00:18:13,560 What you're actually going to get when you set up the device to listen in promiscuous 317 00:18:13,560 --> 00:18:20,580 mode is you're going to get the start of the Wi-Fi packet if it's a data packet, or the 318 00:18:20,580 --> 00:18:23,200 entire packet if it's a management packet. 319 00:18:23,620 --> 00:18:27,300 And if it's a data packet, it only gives you the first 32 bytes. 320 00:18:29,840 --> 00:18:33,940 And I think they have done this specifically so you can't make these sniffers. 321 00:18:33,940 --> 00:18:37,900 I'm like, super cheap and chuck them around everywhere and just monitor everyone's traffic. 322 00:18:38,280 --> 00:18:40,880 Because it appears to be a completely artificial limitation. 323 00:18:45,220 --> 00:18:50,260 The documentation is also not very good for this portion of the SDK. 324 00:18:51,400 --> 00:18:56,120 When you're hunting and pecking and looking for it, it actually is documented in their 325 00:18:56,120 --> 00:19:00,100 structures section, not in their API documentation. 326 00:19:00,680 --> 00:19:03,840 There's a whole section down there that describes the 327 00:19:03,840 --> 00:19:05,540 method for doing a promiscuous scan. 328 00:19:06,420 --> 00:19:10,680 So if you're looking for the documentation and you can't find it, I actually put up here 329 00:19:10,680 --> 00:19:14,800 the specific section that you need to go to to look at the documentation in the slide. 330 00:19:15,520 --> 00:19:17,380 So you can just grab this and take a look at it. 331 00:19:18,000 --> 00:19:20,320 But this is the basics of how you're going to do it. 332 00:19:20,480 --> 00:19:26,540 The first thing that we have to do is we can't use the standard Arduino interface. 333 00:19:26,920 --> 00:19:29,740 We have to bypass that and go straight to the SDK interface. 334 00:19:30,260 --> 00:19:33,360 So you can see up at the top, I've got this extern C. 335 00:19:34,260 --> 00:19:41,620 Include user interface H. That is including the SDK header instead of including the header 336 00:19:41,620 --> 00:19:43,740 for the Arduino API. 337 00:19:45,220 --> 00:19:52,320 When you do this, you have to use the programming methods that the SDK uses, which are a little 338 00:19:52,320 --> 00:19:54,600 different than the standard Arduino programming methods. 339 00:19:55,120 --> 00:19:58,060 It's really big on asynchronous things. 340 00:19:59,000 --> 00:20:01,260 So it handles this with a callback. 341 00:20:04,720 --> 00:20:12,740 And the definition for the callback is not defined well at all in the documentation. 342 00:20:13,000 --> 00:20:16,660 I actually had to dig around in a bunch of examples to get this guy. 343 00:20:17,020 --> 00:20:22,300 So this is good information right here, where you see the handle packet, PKT. 344 00:20:23,060 --> 00:20:24,660 That's the signature for the callback. 345 00:20:25,540 --> 00:20:31,260 When you get your data back, some of the information that you're going to need is actually encoded 346 00:20:31,260 --> 00:20:32,820 in the length of the packet. 347 00:20:33,840 --> 00:20:39,840 So if you get some data back and the length is equal to 128, you have a management packet. 348 00:20:40,100 --> 00:20:43,940 There's no flag that says, hey, this is a management packet. 349 00:20:44,180 --> 00:20:45,640 You're going to have 128 bytes. 350 00:20:46,780 --> 00:20:55,860 If you get something back that modulus of 10 is 0, so if it's a multiple of 10, I am 351 00:20:55,860 --> 00:20:56,920 absolutely dead serious. 352 00:20:57,900 --> 00:20:59,180 You have a data packet. 353 00:21:01,680 --> 00:21:03,820 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 00:21:03,840 --> 00:21:04,060 . . . . . . . 355 00:21:04,640 --> 00:21:08,720 You have an undefined packet that is not reliable. 356 00:21:09,520 --> 00:21:14,060 I have found that sometimes it actually contains data, so I think what that is is if they do 357 00:21:14,060 --> 00:21:19,480 the CRC check on the packet and it fails, they just give you the whole thing because 358 00:21:19,480 --> 00:21:20,980 they think, this isn't valid anyways. 359 00:21:22,380 --> 00:21:27,860 But I pretty much ignore those because it says it's undefined and that you can't trust 360 00:21:27,860 --> 00:21:28,040 it. 361 00:21:28,800 --> 00:21:33,600 So the two things you want to look for is if it's equal to 128 or if it's a multiple 362 00:21:37,220 --> 00:21:48,040 I have never seen that. Theoretically, I guess that could be if it was over 30 because 363 00:21:48,040 --> 00:21:58,720 you're only going to get back 32 bytes maximum. So the other thing about that is they can 364 00:21:58,720 --> 00:22:04,860 pass you back multiple packets at once. So once you look at what they've passed you back 365 00:22:04,860 --> 00:22:08,440 and you look at the length, that's the length for the first packet they gave you. And then 366 00:22:08,440 --> 00:22:11,920 there's a flag that says, I actually have two packets. There's another packet right 367 00:22:11,920 --> 00:22:17,640 next to me. Here's a pointer to it. So it's kind of a funky layout. 368 00:22:19,260 --> 00:22:22,340 So in your setup, when you want to do this, you're going to do a couple of things. You're 369 00:22:22,340 --> 00:22:28,060 going to do a Wi-Fi set op mode station mode. You're going to set the channel, right? So 370 00:22:28,060 --> 00:22:28,700 whatever you're going to do, you're going to do a Wi-Fi set op mode station mode. 371 00:22:28,700 --> 00:22:33,680 That's what you're going to want to listen on. Then you're going to call Wi-Fi set promiscuous 372 00:22:35,360 --> 00:22:41,960 RxCB. So that actually sets up the promiscuous listen. And you have to register your callback. 373 00:22:44,920 --> 00:22:50,820 And then delay for a second. If you just call the next line right after the fact, I've 374 00:22:50,820 --> 00:22:56,160 had it fail. And it just won't capture anything. So do a delay of like 10. Just give it some 375 00:22:56,160 --> 00:22:57,100 time to get it set up. 376 00:22:57,100 --> 00:23:02,280 And then call Wi-Fi promiscuous enable. And that'll actually get you going so that you 377 00:23:02,280 --> 00:23:07,600 can do promiscuous captures. I don't know what the minimum delay is. Like there's no 378 00:23:07,600 --> 00:23:12,720 documentation on that. It's just something that I've observed. And I find that 10 usually 379 00:23:12,720 --> 00:23:15,940 does the trick. If you want to increase that or decrease that, have fun. 380 00:23:20,060 --> 00:23:26,400 All right. So the next thing we're going to talk about is the AT firmware. So the two 381 00:23:26,400 --> 00:23:32,040 previous things that we talked about use the standard firmware that comes with the 382 00:23:32,040 --> 00:23:41,480 Arduino SDK for the ESP8266. They have another firmware that they put out. It's closed source. 383 00:23:41,700 --> 00:23:45,220 We don't know how it works internally. We make some guesses about how it works. But 384 00:23:45,220 --> 00:23:49,320 we don't know for sure. And it actually exposes all the functionality of the device in the 385 00:23:49,320 --> 00:23:50,400 AT command set. 386 00:23:53,740 --> 00:23:56,380 So this is what I had a lot of fun playing with, the 3D printer. Because the AT is in 387 00:23:56,400 --> 00:24:00,540 Chinese documentation and some symbols do not translate so that makes things a 388 00:24:00,540 --> 00:24:04,800 lot harder and so so this is basically this is going off that same sketch so 389 00:24:04,800 --> 00:24:08,060 if anybody has like a phone that's Wi-Fi analyzer on it or anything I'm just 390 00:24:08,060 --> 00:24:10,880 gonna plug this in just to show you that you can get it from a pretty good 391 00:24:10,880 --> 00:24:17,400 distance away so it should be live now and just imagine if there's like you 392 00:24:17,400 --> 00:24:20,280 know maybe five of these and they all look exactly the same how difficult that 393 00:24:20,280 --> 00:24:23,380 would be able to find and so if you look through these AT commands you can 394 00:24:23,380 --> 00:24:29,020 see that okay the first the first set the CW sat you just set the SSID set the 395 00:24:29,020 --> 00:24:33,360 password the five is the channel so you can set that anywhere from you know one 396 00:24:33,360 --> 00:24:37,540 to eleven to fourteen if you're in Europe and then the three is the is the 397 00:24:37,540 --> 00:24:44,580 encryption type so the zero is open one is web two is WPA three is WPA two so 398 00:24:44,580 --> 00:24:48,040 that's that's how that instruction set works the the next line that won't the 399 00:24:48,040 --> 00:24:51,300 question mark that just gives you the details of what's currently on the 400 00:24:51,300 --> 00:24:53,300 device itself and then the next 401 00:24:53,300 --> 00:24:57,060 step so if you want to create an access point and you want to clone the MAC 402 00:24:57,060 --> 00:25:02,160 address you'll also want to set this AT I don't even know how to say that for 403 00:25:02,160 --> 00:25:06,740 the MAC address and then again the question mark is to check it if you're 404 00:25:06,740 --> 00:25:10,060 in our talk yesterday this is what we're talking about cloning the BSS ID 405 00:25:11,640 --> 00:25:14,740 and we actually so we were playing around with it and depending on what 406 00:25:14,740 --> 00:25:17,500 firmware you have there's a lot of different firmwares out there just go 407 00:25:17,500 --> 00:25:22,060 look at the command stack because you might there so instead of fixing some of 408 00:25:22,060 --> 00:25:22,960 the things that come with 409 00:25:23,300 --> 00:25:26,420 the MAC address they decide you know what we're gonna deprecate that feature 410 00:25:26,420 --> 00:25:30,040 and we're gonna add a new feature so it'll be the same thing you know 411 00:25:30,040 --> 00:25:34,460 underscore like new underscore you know current for C you are so it's just 412 00:25:34,460 --> 00:25:38,100 horrible horrible documentation from that standpoint and instead of fixing a 413 00:25:38,100 --> 00:25:42,160 feature they decide to deprecate it and then have a new one so just watch out 414 00:25:42,160 --> 00:25:48,420 for that if the the MAC address doesn't stick or if it doesn't stay another 415 00:25:48,420 --> 00:25:53,200 thing is to point out is the AT command set between the firmwares not only have 416 00:25:53,300 --> 00:25:57,960 they deprecated features but they've been adding them so if you're trying to 417 00:25:57,960 --> 00:26:02,720 do something and it's not working check your firmware because you may be too old 418 00:26:02,720 --> 00:26:06,100 some of the devices that we get still have the 0.9 firmware which is pretty 419 00:26:06,100 --> 00:26:11,420 darn old which has a very limited AT command set so you're probably gonna 420 00:26:11,420 --> 00:26:16,660 want to update to like a 1.3 we actually tried the 2.0 this morning 421 00:26:17,140 --> 00:26:23,240 trying to rebuild our throwy that died and we were having issues with it so I 422 00:26:23,300 --> 00:26:26,920 probably want to stick with a 1x if you want to do something with the AT command 423 00:26:26,920 --> 00:26:30,840 set and then my bread and butter the one that I always used for a long time was 424 00:26:30,840 --> 00:26:35,620 the 9.5.2 not if it makes any difference but that's the the 0.9 is the 425 00:26:35,620 --> 00:26:42,320 one that I've been using too I want to point out that it uses a superset of the 426 00:26:42,320 --> 00:26:45,860 AT command set so it has your standard AT commands and then a bunch of add-ons 427 00:26:45,860 --> 00:26:50,680 to do Wi-Fi and they're not very standard as you can see by some of the 428 00:26:50,680 --> 00:26:50,940 commands 429 00:26:53,300 --> 00:26:58,260 documentation has gotten a lot better they actually have some some supported 430 00:26:58,260 --> 00:27:01,880 English documentation it's not the greatest you can still tell that there's 431 00:27:01,880 --> 00:27:05,720 some translation difficulties but for the most part you can figure it out 432 00:27:08,560 --> 00:27:12,780 alright so if you've got something that can scan networks you should see that we 433 00:27:12,780 --> 00:27:17,440 actually have our throwy up we didn't want to actually DOS anyone's we set a 434 00:27:17,440 --> 00:27:21,420 MAC address of zero zero one one two two three three four four five five just to 435 00:27:21,420 --> 00:27:23,280 show you guys that we actually have control over the 436 00:27:23,300 --> 00:27:34,200 BSS ID alright so those are super annoying throwy example and it looked 437 00:27:34,200 --> 00:27:38,400 like it actually worked and and the other thing if you if we are DOSing you 438 00:27:38,400 --> 00:27:41,040 because you have that MAC address I'd really like to meet you because I use 439 00:27:41,040 --> 00:27:49,860 that MAC address a lot everywhere for testing alright so in closing I want you 440 00:27:49,860 --> 00:27:53,020 guys to just think about experimenting because this thing is so cheap you can 441 00:27:53,020 --> 00:28:00,260 go on you know Amazon and pick up 20 of them for next to nothing and and you 442 00:28:00,260 --> 00:28:05,540 know like I said the programmer cost me 50 cents to actually build and the 443 00:28:05,540 --> 00:28:09,280 software that you're gonna need is free so really all it's gonna take is your 444 00:28:09,280 --> 00:28:14,600 investment in time to play with them and you know maybe some documentation to 445 00:28:14,600 --> 00:28:19,540 kind of get you bootstrapped so you you can actually get some stuff working but 446 00:28:19,540 --> 00:28:22,920 I also want to ask you guys if you do something cool share it so this 447 00:28:23,020 --> 00:28:27,420 is the reason the ESP8266 has really become popular there's other devices that are similar 448 00:28:27,420 --> 00:28:33,120 to it similar price range is it has a really good community and so if you come up with 449 00:28:33,120 --> 00:28:37,060 something or you know you're in a forum and you see someone that's having trouble with 450 00:28:37,060 --> 00:28:43,500 something that you figured out you know talk to them you know throw out your ideas the 451 00:28:43,500 --> 00:28:47,160 community is better the more of us there are and the more of us there are communicating 452 00:28:47,160 --> 00:28:49,280 the more of us there are building documentation 453 00:28:53,020 --> 00:29:00,040 all right so in closing the moral of this story is the esp8266 is evil and hellbent on 454 00:29:00,040 --> 00:29:05,000 world domination you've been warned I 455 00:29:05,000 --> 00:29:12,060 just little shout out for imagenstribution let's think Spark Fun all of their images 456 00:29:12,060 --> 00:29:17,920 are actually licensed under Creative Commons which is super awesome and pexels 457 00:29:17,920 --> 00:29:22,940 pexels even even more awesome because they're under Creative Commons zero license which 458 00:29:23,020 --> 00:29:27,140 means you technically don't have to give them attribution at all but I did 459 00:29:27,140 --> 00:29:32,800 because they're cool all right so that's it we're gonna open it up to two 460 00:29:32,800 --> 00:29:40,280 questions yes in the back yes 461 00:29:46,820 --> 00:29:47,220 yes 462 00:29:47,220 --> 00:29:57,220 it has a deep sleep mode that you can put it in so one of the things we didn't go into 463 00:29:57,220 --> 00:30:01,040 that you can do that's super annoying is when you get a little more advanced and you're 464 00:30:01,040 --> 00:30:05,440 working on it and you get into the deep sleep mode you can actually throw like five or six 465 00:30:05,440 --> 00:30:09,980 of these suckers out there to do D off and then send them up on a timer so they pop up 466 00:30:09,980 --> 00:30:10,200 they 467 00:30:10,200 --> 00:30:15,440 D off for a minute then go offline for a few days and then just have them pop up and down 468 00:30:15,440 --> 00:30:22,280 all over the place and your IT guys will go bald it's just game over yes 469 00:30:31,060 --> 00:30:38,560 so I actually don't use them for that you can I use a different Adreno for that so I 470 00:30:38,560 --> 00:30:39,240 don't know if anyone's 471 00:30:40,200 --> 00:30:47,560 heard of the hope Rf chips but there are some some really nice low power Rf chips 472 00:30:47,560 --> 00:30:53,300 out there the one I've been using lately a supports Laura if you go to was it low power 473 00:30:53,300 --> 00:30:53,780 labs 474 00:30:53,780 --> 00:30:54,760 yeah low power labs 475 00:30:54,760 --> 00:30:55,700 l overview 476 00:30:55,700 --> 00:31:01,120 make some really awesome like integrated altogether modules can you pick them up for like 25 bucks 477 00:31:01,750 --> 00:31:06,360 that is like a long range Rf that you can easily turn into like a serial programmer 478 00:31:06,360 --> 00:31:06,800 and you can 479 00:31:06,800 --> 00:31:09,220 get in with the little flash chip so you could actually be OTAs but just you're whenever 480 00:31:09,220 --> 00:31:14,040 So I'll hook these up to one of those, and I'll set up OTA so I can actually program 481 00:31:14,040 --> 00:31:15,780 them in the field to do different things. 482 00:31:19,400 --> 00:31:21,360 Yeah, you could totally do that. 483 00:31:21,880 --> 00:31:23,960 There's actually some standard examples for that. 484 00:31:26,080 --> 00:31:27,000 Any other questions? 485 00:31:28,540 --> 00:31:29,060 Sorry. 486 00:31:32,700 --> 00:31:33,220 No. 487 00:31:40,340 --> 00:31:41,760 That would be super useful. 488 00:31:42,680 --> 00:31:46,200 So the one place that I found, oh, man, I can't think of it off the top of my head, 489 00:31:46,300 --> 00:31:50,780 but it has basically the whole, like, Flasher has the full firmware set, 490 00:31:50,940 --> 00:31:54,840 and we'll put it up in the slides, but that's where we've gotten started with it. 491 00:31:54,900 --> 00:31:55,760 And then there's another website. 492 00:31:55,800 --> 00:31:58,380 I think it's the ESP8266.com. 493 00:31:58,540 --> 00:31:59,740 I think that's the exact website. 494 00:32:00,080 --> 00:32:02,340 And those are basically the live forums for everything, 495 00:32:02,540 --> 00:32:04,100 and that answers a lot of questions. 496 00:32:04,280 --> 00:32:07,480 And there's a lot of people that, you know, can speak Chinese and English that are like, 497 00:32:07,560 --> 00:32:08,680 yeah, you want this link. 498 00:32:09,220 --> 00:32:11,580 Even though, you know, Google Translate just murders it. 499 00:32:13,140 --> 00:32:13,820 Okay. 500 00:32:14,800 --> 00:32:15,480 . 501 00:32:21,040 --> 00:32:27,900 I am playing with it, mainly to bypass the limitations of the promiscuous mode. 502 00:32:28,200 --> 00:32:32,120 I didn't get into it, but it also supports raw packet injection. 503 00:32:32,900 --> 00:32:37,880 But between firmwares, it's really flaky, and there are some undocumented behaviors 504 00:32:37,880 --> 00:32:42,340 where it changes parts of the packet prior to sending them, even in raw mode. 505 00:32:43,760 --> 00:32:47,340 And so I didn't want to talk about it because it's not really ready for prime time yet. 506 00:32:47,520 --> 00:32:54,460 And I think the community needs to get around bypassing some of Espressif's SDK 507 00:32:54,460 --> 00:32:55,720 to make those really work. 508 00:32:56,520 --> 00:32:57,000 . 509 00:32:57,660 --> 00:32:58,300 Far back. 510 00:32:58,880 --> 00:32:59,360 . 511 00:33:04,580 --> 00:33:06,540 So I do LoRa on Arduino. 512 00:33:07,600 --> 00:33:08,160 . 513 00:33:08,160 --> 00:33:09,040 Yeah. 514 00:33:11,560 --> 00:33:12,120 . 515 00:33:22,060 --> 00:33:26,020 So the ones that I like are from SparkFun. 516 00:33:26,780 --> 00:33:29,160 They sell on E1, which is what this is. 517 00:33:29,340 --> 00:33:31,400 There's actually some tiered. 518 00:33:31,400 --> 00:33:32,640 There's like E1, E2, E3. 519 00:33:32,840 --> 00:33:36,520 The super cheap one that looks like this is what they call an E1. 520 00:33:36,520 --> 00:33:37,940 And I get them from SparkFun. 521 00:33:40,220 --> 00:33:40,620 . 522 00:33:41,520 --> 00:33:41,920 . 523 00:33:51,480 --> 00:33:51,880 . 524 00:33:51,880 --> 00:33:52,660 . 525 00:33:56,740 --> 00:33:57,140 . 526 00:33:57,140 --> 00:33:57,360 . 527 00:33:57,360 --> 00:33:57,480 . 528 00:33:57,480 --> 00:33:57,760 . 529 00:33:57,760 --> 00:33:57,880 . 530 00:33:58,360 --> 00:33:58,760 . 531 00:33:58,760 --> 00:33:58,820 . 532 00:33:58,820 --> 00:33:58,940 . 533 00:33:58,940 --> 00:33:59,400 . 534 00:33:59,400 --> 00:33:59,480 . 535 00:33:59,480 --> 00:33:59,520 . 536 00:33:59,520 --> 00:33:59,540 . 537 00:33:59,540 --> 00:33:59,740 . 538 00:33:59,740 --> 00:33:59,900 . 539 00:34:00,280 --> 00:34:00,640 . 540 00:34:03,400 --> 00:34:03,760 . 541 00:34:04,200 --> 00:34:04,560 . 542 00:34:04,560 --> 00:34:04,980 . 543 00:34:06,940 --> 00:34:07,300 . 544 00:34:07,300 --> 00:34:07,480 . 545 00:34:07,480 --> 00:34:08,040 . 546 00:34:08,040 --> 00:34:08,060 . 547 00:34:08,940 --> 00:34:09,300 . 548 00:34:09,300 --> 00:34:09,440 . 549 00:34:09,440 --> 00:34:09,460 . 550 00:34:09,460 --> 00:34:09,480 . 551 00:34:09,480 --> 00:34:09,520 . 552 00:34:09,520 --> 00:34:09,780 . 553 00:34:09,780 --> 00:34:09,840 . 554 00:34:09,840 --> 00:34:09,920 . 555 00:34:09,920 --> 00:34:09,980 . 556 00:34:09,980 --> 00:34:10,060 . 557 00:34:27,760 --> 00:34:28,120 . 558 00:34:28,120 --> 00:34:31,060 a function that gets called very early on in initialization, 559 00:34:31,360 --> 00:34:35,600 and there are some things that you can't set outside of that. 560 00:34:35,660 --> 00:34:40,200 In particular, you can't set the MAC address outside of that function. 561 00:34:40,860 --> 00:34:46,420 You can add a hook inside of that to add your own code in the Arduino IDE 562 00:34:46,420 --> 00:34:50,140 to set the MAC address, but that's kind of an advanced thing. 563 00:34:50,400 --> 00:34:54,600 There is some patches up on GitHub that add some extensions 564 00:34:54,600 --> 00:34:58,000 so you can run some very early code through the Arduino IDE, 565 00:34:58,220 --> 00:35:02,020 but the one that you're going to download through the link doesn't have those in it. 566 00:35:05,360 --> 00:35:06,460 Any other questions? 567 00:35:07,120 --> 00:35:08,020 Going twice. 568 00:35:09,480 --> 00:35:10,080 Oh. 569 00:35:10,240 --> 00:35:13,980 How are you connecting the chips to your programmer? 570 00:35:14,540 --> 00:35:15,340 What were you using? 571 00:35:16,340 --> 00:35:23,420 So this is a USB serial adapter I got from Adafruit that's slightly modified. 572 00:35:23,700 --> 00:35:24,580 When you get... 573 00:35:24,600 --> 00:35:27,560 When you get it straight from them, it's going to be set up for 5 volts. 574 00:35:27,780 --> 00:35:29,540 These guys are a 3.3 volt. 575 00:35:29,760 --> 00:35:31,640 If you crack it open... 576 00:35:32,000 --> 00:35:36,300 That would be more on the ESP side, but it doesn't have a breadboard pin, 577 00:35:36,420 --> 00:35:39,880 where you just have a socket you plug into your programmer. 578 00:35:40,240 --> 00:35:40,320 Yeah. 579 00:35:40,740 --> 00:35:45,340 So it's just a cheap little socket I got off of eBay. 580 00:35:45,900 --> 00:35:49,200 I think I got, I don't know, 100 of them for like $5. 581 00:35:55,300 --> 00:35:58,740 Yeah, there's, I mean, the whole point of these things is they're super cheap. 582 00:36:00,220 --> 00:36:00,780 All right. 583 00:36:01,060 --> 00:36:01,780 Anything else? 584 00:36:04,500 --> 00:36:05,720 Then that's going to be it, guys. 585 00:36:05,980 --> 00:36:06,960 You were an awesome audience. 586 00:36:07,320 --> 00:36:07,820 Thank you. 587 00:36:07,940 --> 00:36:08,580 Thank you.