1 00:00:00,360 --> 00:00:03,500 My name is Matt Knight. I'm a software engineer with Bestial Networks. 2 00:00:03,600 --> 00:00:06,360 And today I'm going to be talking about this new wireless protocol called LoRa. 3 00:00:07,260 --> 00:00:10,120 We'll get into that in a minute. I love electronics and wireless. 4 00:00:10,340 --> 00:00:14,580 I came from a double-E background, work mostly with SDR these days. 5 00:00:15,520 --> 00:00:17,240 This is my passion, so I'm excited to be here. 6 00:00:17,700 --> 00:00:19,640 I also want to give a shout-out to the Wireless Village people. 7 00:00:19,900 --> 00:00:22,600 I've absolutely haunted this place for the last four or five DEF CONs, 8 00:00:22,620 --> 00:00:24,680 and I'm really excited to be here and present for you guys. 9 00:00:25,820 --> 00:00:31,600 Okay, before we get started, this is going to be more of a FI radio talk than like a security talk. 10 00:00:32,240 --> 00:00:36,700 No zero days, no exploits, but we are going to look at a very low level into a brand-new cutting-edge protocol. 11 00:00:38,180 --> 00:00:40,120 So before we get started, I just want to gauge the room. 12 00:00:40,840 --> 00:00:44,060 Hands up if you've used SDR before. Okay, good. 13 00:00:44,880 --> 00:00:47,780 If you've used a spectrum analyzer. All right, cool. 14 00:00:48,120 --> 00:00:50,040 And you know what an FFT is? 15 00:00:51,720 --> 00:00:54,140 And who knows what a symbol is in the wireless context? 16 00:00:55,260 --> 00:00:56,000 All right, cool. 17 00:00:57,900 --> 00:00:59,620 All right, so why is this relevant? 18 00:00:59,720 --> 00:01:02,480 Why do we want to look at a low level at these different radio FIs? 19 00:01:03,600 --> 00:01:08,960 Cisco projects that by 2020, there are going to be 50 billion devices connected to the Internet in some way, 20 00:01:09,040 --> 00:01:12,320 and fewer and fewer of those are going to be connected with wires every year. 21 00:01:12,800 --> 00:01:17,020 And in terms of, you know, security research and having insight into what they're really doing, 22 00:01:17,180 --> 00:01:21,760 we need to develop tools to be able to stay ahead and really be curious about these things, 23 00:01:21,860 --> 00:01:24,500 because Wireshark existed because somebody made it. 24 00:01:24,500 --> 00:01:27,060 And monitor mode capable Wi-Fi cards weren't always a thing. 25 00:01:27,320 --> 00:01:32,160 So we need to make the tools so that we can do this low level introspection and stay ahead of the game here. 26 00:01:32,800 --> 00:01:35,940 So I'm going to introduce this new class of network called LPWAN. 27 00:01:36,220 --> 00:01:41,640 We're going to review some technical concepts, and then we're going to get really low into the LoRaFI and talk about how it works. 28 00:01:42,220 --> 00:01:47,480 Finally, I'm going to introduce an open source tool that's coming out soon, and we'll hopefully get this into more hands. 29 00:01:48,680 --> 00:01:53,520 Before we get started, everybody's favorite marketing buzzword right now is IoT, Internet of Things. 30 00:01:54,500 --> 00:01:57,980 I kind of reset the term because really it's just fancy speak for connected embedded devices. 31 00:01:59,680 --> 00:02:00,080 And... 32 00:02:01,520 --> 00:02:02,380 Okay, how's that? 33 00:02:03,700 --> 00:02:08,500 All right, so embedded can mean a number of things, but a common theme is that there are hardware constraints involved. 34 00:02:09,400 --> 00:02:11,460 You often have low intelligence CPUs. 35 00:02:11,480 --> 00:02:14,060 They're battery powered, so you can't do complex operations on them. 36 00:02:14,760 --> 00:02:16,540 They get installed in hard to reach places. 37 00:02:16,900 --> 00:02:18,380 They need to last for a long time. 38 00:02:18,480 --> 00:02:19,540 They might not get patched. 39 00:02:19,840 --> 00:02:22,760 And they do often require installation provisioning. 40 00:02:22,760 --> 00:02:23,700 You have to have somebody go. 41 00:02:23,800 --> 00:02:24,460 Put them somewhere. 42 00:02:24,500 --> 00:02:26,540 And change some settings to get them to connect. 43 00:02:27,480 --> 00:02:32,260 So given this, an ideal interface, if we could design it, would be wireless so you don't have to run cable to it. 44 00:02:32,820 --> 00:02:34,440 Easy on the battery so it can last a while. 45 00:02:35,440 --> 00:02:40,460 Capable of being installed anywhere, whether it's in the middle of a field or in a building in an urban environment. 46 00:02:41,640 --> 00:02:42,280 No configuration. 47 00:02:42,620 --> 00:02:43,100 Easy to provision. 48 00:02:43,340 --> 00:02:49,140 You don't want to have to type in, you know, an SSID and a password to get it on Wi-Fi or, you know, pair it with a coordinator. 49 00:02:49,340 --> 00:02:50,860 You need a gateway on site or something like that. 50 00:02:51,080 --> 00:02:52,280 And finally, it would be inexpensive. 51 00:02:53,660 --> 00:02:55,500 Now let's talk about what's not required. 52 00:02:55,760 --> 00:03:02,500 And oftentimes when you're connecting devices like this, high throughput and persistent and always on connections are often things that we don't really need. 53 00:03:02,680 --> 00:03:10,820 If you have a sensor that you're just trying to report some data off of, you know, GPS every ten minutes or so, it doesn't really require an LTE pipe to do that. 54 00:03:11,840 --> 00:03:17,040 So as it currently stands, IoT devices are grossly over served by some of the common interfaces that are out there. 55 00:03:18,220 --> 00:03:22,260 So when we talk about IoT interfaces, we're often talking about things like 802.5. 56 00:03:22,260 --> 00:03:23,440 It's like 15.4 and all of its friends. 57 00:03:24,200 --> 00:03:29,600 Zigbee is a layer three and up flavor that, you know, people confuse. 58 00:03:29,880 --> 00:03:33,880 But 802.11, you know, Wi-Fi gets used a lot. 59 00:03:34,040 --> 00:03:36,220 We have Bluetooth, Bluetooth low energy, et cetera. 60 00:03:36,640 --> 00:03:37,800 So what's wrong with all of these? 61 00:03:37,880 --> 00:03:38,600 We have these standards. 62 00:03:38,840 --> 00:03:39,720 Why don't we use these? 63 00:03:41,820 --> 00:03:46,320 All of these protocols that we've talked about require some local provisioning. 64 00:03:46,460 --> 00:03:49,960 Whether it's Zigbee or 802.11, you need to connect to a coordinator. 65 00:03:50,400 --> 00:03:51,980 If it's Wi-Fi, you need to get on. 66 00:03:52,260 --> 00:03:53,320 Get on an AP, et cetera. 67 00:03:53,600 --> 00:03:56,080 In the case of 802.11, it's not too power efficient. 68 00:03:57,460 --> 00:03:58,500 So what's ideal then? 69 00:03:58,580 --> 00:04:01,360 What if you want an application where, say, your device is moving around? 70 00:04:01,580 --> 00:04:05,320 You're monitoring a vehicle fleet that, you know, drives throughout a city or across the country. 71 00:04:06,020 --> 00:04:08,340 Or if you want to monitor, you know, fuel tanks. 72 00:04:08,580 --> 00:04:16,060 If you have, like, heating oil tanks in New England and you want to remotely report back on their level on how full they are. 73 00:04:16,260 --> 00:04:19,320 You don't want to have your installers having to go and get on the home Wi-Fi of everybody there. 74 00:04:20,080 --> 00:04:21,280 How about cellular networks? 75 00:04:22,260 --> 00:04:22,840 They work everywhere. 76 00:04:23,040 --> 00:04:24,180 And they're easy to install. 77 00:04:24,340 --> 00:04:25,420 You know, pretty much guaranteed. 78 00:04:27,120 --> 00:04:30,200 One big problem with them is that they're very power intensive. 79 00:04:30,700 --> 00:04:33,720 And the second problem is that some of these PHIs are going away. 80 00:04:34,600 --> 00:04:36,080 So 2G in particular. 81 00:04:36,400 --> 00:04:39,160 AT&T is scheduled to sunset it at the end of this year. 82 00:04:39,260 --> 00:04:40,600 So January 1, 2017. 83 00:04:40,760 --> 00:04:44,180 They're turning off their GPRS and edge PHIs. 84 00:04:44,780 --> 00:04:46,600 And other major carriers are going to follow. 85 00:04:48,540 --> 00:04:51,980 These networks are really popular for a lot of these IoT applications. 86 00:04:53,080 --> 00:04:54,520 Because they're battery conscious. 87 00:04:54,700 --> 00:04:55,460 You get service everywhere. 88 00:04:55,820 --> 00:04:56,760 And they're somewhat inexpensive. 89 00:04:57,840 --> 00:05:03,060 So if you are a company that is deploying a device on a GPRS or edge network now, what are you going to move to? 90 00:05:03,380 --> 00:05:05,860 You can move to 3G, which is a little more expensive. 91 00:05:05,940 --> 00:05:07,020 It has some harder power requirements. 92 00:05:07,460 --> 00:05:10,320 Or you can wait for this thing called LTE-M release 13. 93 00:05:10,940 --> 00:05:12,260 It's part of the LTE standard. 94 00:05:12,540 --> 00:05:20,880 And basically it's going to allow for devices to use narrower bandwidths and lower data rates to get some of these higher performance applications for long-term embedded applications. 95 00:05:22,040 --> 00:05:29,740 However, the roadmap as it currently stands, at least what I've gleaned publicly, is that that's not going to be deployed until the end of 2017 or early 2018. 96 00:05:30,440 --> 00:05:35,740 So until then, there's a big hole in the market for these embedded devices to connect. 97 00:05:37,200 --> 00:05:41,140 So that brings us to the topic that we're going to discuss today, which are these low power wide area networks. 98 00:05:41,380 --> 00:05:42,080 LP WANs. 99 00:05:42,360 --> 00:05:47,180 The way to think of these things is they're just like cellular, but optimized for IoT and M2M applications. 100 00:05:47,880 --> 00:05:50,860 So you have a network of base stations that are deployed over some area. 101 00:05:50,880 --> 00:05:52,880 You know, it could be local. 102 00:05:53,000 --> 00:05:53,480 It could be a city. 103 00:05:53,580 --> 00:05:55,040 It could be, you know, the entire world. 104 00:05:55,920 --> 00:05:58,940 And then devices connect up to them as they would in a star network. 105 00:05:59,160 --> 00:06:02,980 So you have these central base stations and then devices and nodes connect directly. 106 00:06:03,240 --> 00:06:06,940 There's no meshing, no routing, just device wireless link to the base station. 107 00:06:08,140 --> 00:06:10,200 They can uplink and downlink traffic in many cases. 108 00:06:10,340 --> 00:06:12,120 And they have a range typical of miles. 109 00:06:12,360 --> 00:06:16,400 So, again, really think of this just like being cellular, but for low data rate applications. 110 00:06:17,080 --> 00:06:18,780 There are a whole bunch of standards that are popping up. 111 00:06:18,980 --> 00:06:20,860 But the most popular ones are the ones that we're talking about. 112 00:06:20,880 --> 00:06:23,000 The ones that have the most momentum are LoRa and Sigfox. 113 00:06:23,900 --> 00:06:27,120 They've raised a ton of money in the last, you know, 18 months or so. 114 00:06:27,260 --> 00:06:32,960 LoRa raised or, sorry, Sigfox raised $115 million last year. 115 00:06:33,020 --> 00:06:34,980 And Wall Street Journal reports that they're going to IPO. 116 00:06:35,500 --> 00:06:36,720 So they're growing like crazy. 117 00:06:37,340 --> 00:06:38,560 Raise your hand if you've heard of them. 118 00:06:39,380 --> 00:06:40,260 Not too many hands. 119 00:06:42,040 --> 00:06:47,220 And finally, two companies that are big LoRa backers raised $51 million last year. 120 00:06:47,400 --> 00:06:48,640 So there's a ton of investment. 121 00:06:48,900 --> 00:06:50,320 Investors see the revenue. 122 00:06:50,880 --> 00:06:51,520 They see the relevance here. 123 00:06:52,200 --> 00:06:55,680 So expect to see these protocols be more and more relevant going forward. 124 00:06:56,640 --> 00:06:58,400 Let's talk about the stacks and what makes them cool. 125 00:06:58,740 --> 00:07:03,480 As I mentioned, they're optimized for IoT applications, meaning they're very battery conscious. 126 00:07:03,780 --> 00:07:04,680 That's probably the big thing. 127 00:07:05,760 --> 00:07:09,700 Sigfox, one of those standards I just mentioned, gets 10 years on a single AA battery. 128 00:07:09,840 --> 00:07:10,520 That's what they advertise. 129 00:07:10,720 --> 00:07:15,000 That's, like, pretty crazy to be sending data over miles for 10 years on a single AA. 130 00:07:15,220 --> 00:07:17,140 You cannot do that on LTE. 131 00:07:18,400 --> 00:07:22,800 And LoRa advertises 13 miles of range between the end node and the base station. 132 00:07:23,020 --> 00:07:24,400 So pretty crazy coverage. 133 00:07:24,580 --> 00:07:29,340 Compare that with, like, 2G, which has a limit in the standard of 22 miles. 134 00:07:30,520 --> 00:07:34,480 All these other things are really local, short range, and they are not great on battery. 135 00:07:34,620 --> 00:07:36,340 So this is a huge step forward for embedded devices. 136 00:07:37,580 --> 00:07:38,860 You know, how can they do this? 137 00:07:39,420 --> 00:07:45,100 They embrace the fact that embedded and IoT applications can accept some level of compromise. 138 00:07:45,100 --> 00:07:51,960 So they embrace this, and they do recycle the messages heavily, so you're not sending that much traffic. 139 00:07:52,820 --> 00:07:54,940 You're often not always listening all the time. 140 00:07:55,020 --> 00:08:00,860 So you might have scheduled windows where the end device will wake up and keep the radio on, look for downlink from the base station. 141 00:08:01,560 --> 00:08:02,880 Really small payloads. 142 00:08:02,880 --> 00:08:03,840 We'll talk about that in a minute. 143 00:08:04,100 --> 00:08:05,960 And they're very highly rate limited. 144 00:08:06,560 --> 00:08:07,560 So some examples. 145 00:08:08,160 --> 00:08:12,900 Sigfox limits devices to 140 12-byte datagrams per day. 146 00:08:13,080 --> 00:08:13,920 Think about that. 147 00:08:13,920 --> 00:08:15,960 That's like, I mean, what is that? 148 00:08:16,040 --> 00:08:17,860 That's like a single UDP packet. 149 00:08:19,840 --> 00:08:29,300 And finally, waitlist N is uplink only, so it can only send messages up to a base station. 150 00:08:29,500 --> 00:08:31,240 It cannot accept messages down. 151 00:08:32,100 --> 00:08:37,680 And finally, LoRa class A devices only can receive a downlink message from the base station after sending an uplink message. 152 00:08:37,820 --> 00:08:39,120 So they're not promiscuously listening. 153 00:08:39,580 --> 00:08:40,780 So this is quite different. 154 00:08:40,780 --> 00:08:47,060 And there's some really unique features that contribute to this. 155 00:08:48,500 --> 00:08:52,140 So the rest of the talk we're going to spend talking about one of these LPWANs in really great depth. 156 00:08:52,320 --> 00:08:54,640 We're going to talk about this PHY called LoRa. 157 00:08:55,720 --> 00:08:59,860 LoRa is an LPWAN PHY that was developed by a semiconductor company called Semtech. 158 00:09:00,060 --> 00:09:02,480 It was actually developed by a startup that was acquired by Semtech. 159 00:09:02,560 --> 00:09:05,800 But Semtech is the company that's evangelizing it and pushing it worldwide. 160 00:09:06,300 --> 00:09:08,020 The PHY was patented in 2014. 161 00:09:08,100 --> 00:09:10,760 And the first definition of the PHY was, 162 00:09:10,760 --> 00:09:15,200 the MAC and network stack that they're pushing products on came out last year. 163 00:09:15,320 --> 00:09:16,200 So these things are brand new. 164 00:09:16,340 --> 00:09:21,100 They really haven't been battle tested and are just starting to become available. 165 00:09:22,680 --> 00:09:26,500 Just to clear something up before we continue, oftentimes you'll hear the term LoRa used. 166 00:09:26,680 --> 00:09:28,100 Sometimes you'll hear about LoRa WAN. 167 00:09:28,580 --> 00:09:30,360 LoRa refers only to the PHY layer. 168 00:09:30,600 --> 00:09:34,500 And LoRa WAN is the higher layers built on top of it. 169 00:09:35,400 --> 00:09:38,720 So think of it as being like 802.15.4 versus Zigbee. 170 00:09:38,920 --> 00:09:40,680 Different layers of the stack that often get, 171 00:09:40,760 --> 00:09:41,400 get used together. 172 00:09:43,120 --> 00:09:45,460 LoRa WAN defines a whole bunch of security features. 173 00:09:46,020 --> 00:09:47,480 They have a pretty, they've, 174 00:09:47,560 --> 00:09:50,000 they've done a pretty good job of thinking about these things, 175 00:09:50,040 --> 00:09:50,840 things ahead. 176 00:09:51,640 --> 00:09:56,780 But some interesting features is that the MAC stack is controlled by an IP-based network server 177 00:09:56,780 --> 00:10:00,520 that does all of the intelligent coordination in place of the base stations. 178 00:10:02,220 --> 00:10:03,820 Probably do some more on that later, 179 00:10:04,380 --> 00:10:05,260 if there's time. 180 00:10:05,460 --> 00:10:08,880 But they also define the security architecture that does enable 181 00:10:08,880 --> 00:10:10,740 a unique key being used per data. 182 00:10:10,760 --> 00:10:11,000 So if you're using a device, 183 00:10:11,000 --> 00:10:12,120 but that's left up to the, 184 00:10:12,900 --> 00:10:14,800 that's left up to the application to, 185 00:10:14,860 --> 00:10:15,860 to implement, of course. 186 00:10:16,500 --> 00:10:18,380 And they also have two different keys. 187 00:10:18,540 --> 00:10:19,700 So you have the application key, 188 00:10:19,780 --> 00:10:20,780 which is end-to-end between, 189 00:10:21,180 --> 00:10:23,280 you know, your company's application server and the end node. 190 00:10:23,420 --> 00:10:26,040 But then there's also a network key that protects everything going from the end node 191 00:10:27,080 --> 00:10:28,300 to the network server. 192 00:10:28,740 --> 00:10:29,760 So if you're a developer, 193 00:10:29,880 --> 00:10:34,140 you can use these application keys to make it such that the carrier never sees your, 194 00:10:34,160 --> 00:10:35,340 your content in plain text. 195 00:10:37,040 --> 00:10:38,540 That's all we're going to say about LoRa WAN. 196 00:10:38,620 --> 00:10:40,480 We're going to talk about the LoRa PHY from here on out. 197 00:10:41,540 --> 00:10:43,120 So one of the really unique things about, 198 00:10:43,160 --> 00:10:46,940 about this PHY is that it operates an unlicensed spectrum. 199 00:10:47,560 --> 00:10:49,260 So when we say unlicensed, 200 00:10:49,360 --> 00:10:51,660 we're talking about the ISM bands in the U.S., 201 00:10:51,660 --> 00:10:53,800 primarily 900 megahertz and 2.4 gigahertz. 202 00:10:54,380 --> 00:10:55,480 And in these bands, 203 00:10:55,560 --> 00:10:59,460 you have devices like Wi-Fi, 802.15.4, cordless phones, etc. 204 00:11:00,220 --> 00:11:02,800 You don't need a special license to operate on those bands, 205 00:11:02,860 --> 00:11:06,680 so long as you abide by certain rules and regulations that the FCC has put out. 206 00:11:07,220 --> 00:11:08,920 You know, if you go to Best Buy and you buy a router, 207 00:11:09,000 --> 00:11:09,500 you don't need to, 208 00:11:09,500 --> 00:11:11,360 you don't need to petition the FCC to get, 209 00:11:11,400 --> 00:11:12,380 to install it in your house. 210 00:11:12,440 --> 00:11:13,100 You can just do it. 211 00:11:13,180 --> 00:11:14,260 It's because, you know, 212 00:11:14,300 --> 00:11:18,300 Netgear or whoever you're getting your router from plays by the FCC's rules. 213 00:11:18,400 --> 00:11:20,960 They get it certified and anybody can use it in mass market. 214 00:11:22,580 --> 00:11:24,020 Contrast this with cellular, right? 215 00:11:24,940 --> 00:11:28,240 Cellular operates on private and protected spectrum that is very expensive. 216 00:11:28,520 --> 00:11:31,880 The FCC auctions the air rights of the spectrum for billions of dollars, 217 00:11:32,560 --> 00:11:34,880 which restricts building infrastructure to the biggest companies, 218 00:11:35,000 --> 00:11:36,440 you know, Verizon, AT&T. 219 00:11:36,660 --> 00:11:37,680 You can't put up, 220 00:11:37,720 --> 00:11:39,440 legally put up your own 4G base station, 221 00:11:39,500 --> 00:11:40,500 your house if you wanted to. 222 00:11:40,720 --> 00:11:41,940 You'll get a phone call. 223 00:11:43,780 --> 00:11:45,500 So, I don't know if you can see the numbers here, 224 00:11:45,640 --> 00:11:51,940 but this is a price list from the FCC's reverse auction of some very high value wireless, 225 00:11:52,480 --> 00:11:55,400 or TV white space spectrum that was recently auctioned. 226 00:11:56,320 --> 00:11:58,040 Circle one number there, you probably can't see it. 227 00:11:58,120 --> 00:12:02,400 That is $900 million for WCBS TV in New York. 228 00:12:02,560 --> 00:12:04,440 So, you know, if you want to start a cell network, 229 00:12:05,200 --> 00:12:09,000 you know, maybe we can pass the hat and buy some spectrum at the end of the con. 230 00:12:10,520 --> 00:12:14,440 So, there are a couple companies that are building up cellular type networks 231 00:12:14,440 --> 00:12:15,940 on this LoRaWAN technology. 232 00:12:16,180 --> 00:12:17,220 The two big ones are Senate, 233 00:12:17,700 --> 00:12:21,520 which actually started with that heating oil monitoring scenario that I mentioned earlier, 234 00:12:21,760 --> 00:12:23,420 and now is doing a commercial data network, 235 00:12:23,580 --> 00:12:24,360 you know, kind of at scale. 236 00:12:25,220 --> 00:12:27,900 And the Things Network is another one that's really interesting. 237 00:12:28,140 --> 00:12:29,940 That's a totally crowd sourced network. 238 00:12:30,660 --> 00:12:33,360 So, you know, they own a couple base stations here and there, 239 00:12:33,480 --> 00:12:36,520 but really what they do is they provide that network back end architecture 240 00:12:36,520 --> 00:12:37,920 open on the internet, 241 00:12:37,920 --> 00:12:41,300 so that anybody can buy their own LoRa hardware, 242 00:12:42,040 --> 00:12:43,140 set it up wherever they want, 243 00:12:43,280 --> 00:12:44,920 and then send the data back to their network servers. 244 00:12:46,120 --> 00:12:47,740 So, think about how radical this is. 245 00:12:47,840 --> 00:12:50,640 You don't need a spectrum license to stand up a base station 246 00:12:50,640 --> 00:12:53,000 that can cover miles and miles of range. 247 00:12:53,400 --> 00:12:55,280 You know, one day you might be able to go to Best Buy 248 00:12:55,280 --> 00:12:56,760 and buy a LoRaWAN gateway 249 00:12:56,760 --> 00:12:59,460 and set up a network that either could be private 250 00:12:59,460 --> 00:13:01,600 or could be hooked up to something like the Things Network 251 00:13:01,600 --> 00:13:04,160 that could cover, you know, all of Manhattan, right? 252 00:13:04,380 --> 00:13:05,160 That's really cool, 253 00:13:05,260 --> 00:13:07,300 and that's like a pretty radical shift for connected devices 254 00:13:07,300 --> 00:13:09,300 and IoT applications going forward. 255 00:13:11,040 --> 00:13:13,240 Okay, so we're going to run through this next section. 256 00:13:13,460 --> 00:13:15,180 I figure it's on the first, you know, technical talk 257 00:13:15,600 --> 00:13:17,920 of the session here at the Wireless Village and DEF CON. 258 00:13:19,040 --> 00:13:20,560 We might have varying levels of experience. 259 00:13:20,780 --> 00:13:22,340 Let's just kind of even the playing field a little bit. 260 00:13:23,180 --> 00:13:24,660 This is going to be obscenely short, 261 00:13:25,480 --> 00:13:26,500 so bear with me here. 262 00:13:27,740 --> 00:13:29,920 We're talking about the file layer for the rest of the talk, 263 00:13:30,020 --> 00:13:32,060 which is this lowest level on the OSI stack. 264 00:13:32,420 --> 00:13:36,080 And that refers to how bits of data get mapped into 265 00:13:37,580 --> 00:13:40,260 the physical electrical characteristics 266 00:13:40,260 --> 00:13:41,200 that are used to carry it. 267 00:13:41,360 --> 00:13:43,640 So we're talking about, you know, voltage, you know, current, 268 00:13:43,760 --> 00:13:44,600 actually moving electrons. 269 00:13:45,020 --> 00:13:46,940 So that's where we're going to be moving forward. 270 00:13:47,820 --> 00:13:49,100 We're talking about a wireless protocol, 271 00:13:49,320 --> 00:13:50,600 which travels over radio frequency, 272 00:13:50,860 --> 00:13:53,060 and that's just electromagnetic waves and energy 273 00:13:53,060 --> 00:13:53,840 moving through the air. 274 00:13:54,240 --> 00:13:56,340 And you can manipulate RF by using a radio, 275 00:13:56,520 --> 00:13:57,820 which can either be hardware-defined, 276 00:13:58,040 --> 00:14:00,960 like a chip that speaks one protocol really well, 277 00:14:01,120 --> 00:14:02,560 or software-defined, 278 00:14:02,700 --> 00:14:05,360 where you have really flexible hardware at the front end, 279 00:14:05,360 --> 00:14:06,880 and then you implement the hardware 280 00:14:06,880 --> 00:14:09,000 and protocol-specific stuff in software. 281 00:14:09,680 --> 00:14:11,320 Really flexible and allows you to iterate 282 00:14:11,320 --> 00:14:12,540 and prototype things really easily. 283 00:14:13,400 --> 00:14:15,280 When we talk about radio PHYs, 284 00:14:16,480 --> 00:14:17,800 one of the most important components 285 00:14:17,800 --> 00:14:19,140 is this thing called the modulation. 286 00:14:19,480 --> 00:14:21,780 And that defines how the digital data values 287 00:14:21,780 --> 00:14:23,180 get mapped to RF energy, 288 00:14:23,380 --> 00:14:25,140 how you take the bits and convert them into 289 00:14:25,640 --> 00:14:26,820 signals moving through the air. 290 00:14:27,320 --> 00:14:28,880 And when you're modulating, 291 00:14:29,080 --> 00:14:30,640 there are three parameters that you can play with. 292 00:14:30,740 --> 00:14:32,860 You can play with amplitude, frequency, and phase. 293 00:14:33,120 --> 00:14:34,720 Or you can, you know, put them together 294 00:14:35,360 --> 00:14:35,560 in a combination. 295 00:14:36,800 --> 00:14:39,080 Modulators can be either analog or digital. 296 00:14:40,860 --> 00:14:42,800 And with digital modulation, 297 00:14:42,960 --> 00:14:44,320 we have this notion of something called a symbol. 298 00:14:44,440 --> 00:14:46,640 And a symbol is an RF energy state 299 00:14:46,640 --> 00:14:49,560 that represents some quantity of information. 300 00:14:49,880 --> 00:14:51,260 It is discretely sampled. 301 00:14:51,780 --> 00:14:53,280 We're going to get into this more, 302 00:14:53,360 --> 00:14:56,400 but just think about this concept of a symbol 303 00:14:56,400 --> 00:14:57,860 being a state that represents data. 304 00:14:58,200 --> 00:14:59,740 We're going to talk about it more going forward, 305 00:14:59,840 --> 00:15:00,820 so just remember that. 306 00:15:02,240 --> 00:15:03,700 To illustrate some symbols here, 307 00:15:03,700 --> 00:15:06,840 we have two different IOT, you know, common IOT PHYs. 308 00:15:06,920 --> 00:15:08,320 On the top, we have frequency shift keying. 309 00:15:08,480 --> 00:15:10,420 On the bottom, we have on-off keying, 310 00:15:10,540 --> 00:15:11,820 which is like an ASK type thing. 311 00:15:12,720 --> 00:15:14,140 And on the FSK example, 312 00:15:14,400 --> 00:15:16,580 a symbol representing a single bit of information 313 00:15:16,580 --> 00:15:18,840 is a frequency being on, 314 00:15:19,060 --> 00:15:21,960 or is the power being in one frequency 315 00:15:21,960 --> 00:15:23,700 versus the other at some instant in time. 316 00:15:24,060 --> 00:15:25,720 And with the OOK example, 317 00:15:25,920 --> 00:15:27,160 it's the presence of the signal. 318 00:15:27,340 --> 00:15:28,560 So these are all different, 319 00:15:28,680 --> 00:15:30,320 how different modulations represent 320 00:15:30,320 --> 00:15:32,380 digital information over the air. 321 00:15:34,260 --> 00:15:35,800 There are some more complicated PHYs 322 00:15:35,800 --> 00:15:36,460 that are used as well. 323 00:15:37,280 --> 00:15:40,200 On the right there, we have an 802.154 packet. 324 00:15:41,520 --> 00:15:44,240 And what 802.154 does is it spreads, 325 00:15:44,280 --> 00:15:46,500 it spreads its information across a wider, 326 00:15:47,520 --> 00:15:49,880 it spreads its information across more spectrum 327 00:15:49,880 --> 00:15:51,820 to increase resiliency 328 00:15:51,820 --> 00:15:54,240 and get some, you know, low power features in there too. 329 00:15:54,600 --> 00:15:57,300 It makes it more resilient to RF noise and interference. 330 00:15:57,900 --> 00:16:00,100 And some other more complicated PHYs 331 00:16:00,100 --> 00:16:01,340 are Bluetooth and Bluetooth Low Energy 332 00:16:01,340 --> 00:16:03,680 that do some frequency hopping and things like that. 333 00:16:03,700 --> 00:16:06,760 So we mentioned hardware 334 00:16:06,760 --> 00:16:07,980 and software-defined radios earlier. 335 00:16:08,200 --> 00:16:09,920 We're going to use one of each in this talk. 336 00:16:10,280 --> 00:16:13,220 On the top, we have a hardware-defined LoRa module. 337 00:16:13,900 --> 00:16:15,420 That's what I use to generate the traffic 338 00:16:15,420 --> 00:16:16,420 that we're going to take apart. 339 00:16:16,800 --> 00:16:19,400 And on the bottom, we have a really popular 340 00:16:19,400 --> 00:16:22,000 Edis B210, which is a commodity software-defined radio 341 00:16:22,000 --> 00:16:23,920 that we're going to use to prototype our receiver 342 00:16:23,920 --> 00:16:25,540 and iterate quickly on this protocol. 343 00:16:27,220 --> 00:16:28,420 Last thing I want to talk about 344 00:16:28,420 --> 00:16:29,560 is a fast Fourier transform. 345 00:16:30,520 --> 00:16:32,780 What this does is if you feed it some samples, 346 00:16:32,780 --> 00:16:34,740 it will decompose the signal 347 00:16:34,740 --> 00:16:36,560 into the component frequencies that comprise it, 348 00:16:36,640 --> 00:16:39,220 and we can visualize this using a spectrogram. 349 00:16:39,620 --> 00:16:42,060 So here we have a whole bunch of FFTs 350 00:16:42,060 --> 00:16:43,680 that we've run over a signal in time. 351 00:16:44,620 --> 00:16:46,460 And then we have time in the y-axis, 352 00:16:46,620 --> 00:16:49,220 the frequency increasing in the x-axis, 353 00:16:49,300 --> 00:16:50,840 and finally power in the z-axis, 354 00:16:50,900 --> 00:16:52,140 how intense the signal is there. 355 00:16:52,420 --> 00:16:53,740 We're going to be seeing some more of these. 356 00:16:54,720 --> 00:16:57,460 Okay, cool. That's enough with the crash course. 357 00:16:58,460 --> 00:17:00,020 Back to the main event here. 358 00:17:01,400 --> 00:17:02,680 LoRa implements a proprietary 359 00:17:02,780 --> 00:17:04,060 PHY that's built on a modulation 360 00:17:04,060 --> 00:17:05,920 called Chirp Spread Spectrum, CSS. 361 00:17:06,700 --> 00:17:07,840 Now, what is a chirp? 362 00:17:07,940 --> 00:17:11,340 A chirp is a signal that is continuously increasing 363 00:17:11,340 --> 00:17:12,860 or decreasing in frequency. 364 00:17:13,140 --> 00:17:14,340 It's like a sweep tone. 365 00:17:15,800 --> 00:17:17,480 We have some visuals here. 366 00:17:18,080 --> 00:17:20,720 An up chirp is on top, and here you can see 367 00:17:20,720 --> 00:17:23,320 the frequency is linearly increasing 368 00:17:23,320 --> 00:17:25,000 until it hits the edge of the band, 369 00:17:25,160 --> 00:17:26,880 and then it wraps around to the bottom of the band 370 00:17:26,880 --> 00:17:27,820 and continues increasing. 371 00:17:28,980 --> 00:17:31,580 The frequency can change instantaneously, 372 00:17:31,580 --> 00:17:34,420 but the rate at which it's changing is constant, right? 373 00:17:34,520 --> 00:17:36,100 The first derivative of the frequency 374 00:17:36,100 --> 00:17:39,540 is some constant value that's going up. 375 00:17:40,080 --> 00:17:42,360 We can have the complex conjugate of that too, 376 00:17:42,480 --> 00:17:44,440 which is the down chirp with the frequency decreasing. 377 00:17:45,700 --> 00:17:47,620 So it just keeps going and then wraps 378 00:17:47,620 --> 00:17:48,460 when it hits the edge of the band. 379 00:17:49,160 --> 00:17:51,540 Why would you use CSS to carry data? 380 00:17:52,860 --> 00:17:54,820 It's very resilient to interference 381 00:17:54,820 --> 00:17:56,040 and gives you great, you know, 382 00:17:56,540 --> 00:17:57,980 link budget, multi-path performance 383 00:17:57,980 --> 00:18:00,400 for real-world deployments. 384 00:18:00,400 --> 00:18:04,460 So it provides some benefits. 385 00:18:05,960 --> 00:18:06,940 It's pretty interesting. 386 00:18:07,040 --> 00:18:08,500 Where else would you see something like this? 387 00:18:08,640 --> 00:18:10,120 And the answer is radar. 388 00:18:10,660 --> 00:18:12,500 CSS features are, you know, 389 00:18:12,500 --> 00:18:14,040 derivative of some RF elements 390 00:18:14,040 --> 00:18:15,140 that you often see in radar systems. 391 00:18:15,920 --> 00:18:17,200 Just some examples here. 392 00:18:17,660 --> 00:18:19,280 Marine radars will use chirps 393 00:18:19,280 --> 00:18:20,600 for their ranging applications. 394 00:18:21,520 --> 00:18:24,060 Also, chirps are used in some scientific 395 00:18:24,060 --> 00:18:25,080 and atmospheric radars. 396 00:18:25,280 --> 00:18:28,180 There's an open-source project that's pretty interesting 397 00:18:28,180 --> 00:18:30,000 that has some really cool visuals online 398 00:18:30,400 --> 00:18:30,800 if you want to check it out, 399 00:18:30,880 --> 00:18:33,600 of chirps being received that had been reflected 400 00:18:33,600 --> 00:18:34,420 off of the ionosphere 401 00:18:35,500 --> 00:18:37,640 to measure space weather and geomagnetic activity. 402 00:18:37,920 --> 00:18:38,560 So that's pretty cool. 403 00:18:39,660 --> 00:18:41,820 So I first heard of this LoRa protocol 404 00:18:42,280 --> 00:18:43,440 in December of last year. 405 00:18:45,300 --> 00:18:46,640 I thought it was pretty cool, 406 00:18:46,660 --> 00:18:47,420 so I went to look for it. 407 00:18:47,520 --> 00:18:49,940 I got my SDR and went on a little fox hunt. 408 00:18:50,200 --> 00:18:52,340 I couldn't find LoRa in Boston, Atlanta, 409 00:18:52,520 --> 00:18:53,820 San Francisco, or New York. 410 00:18:53,940 --> 00:18:56,000 Pretty big engineering urban centers. 411 00:18:57,440 --> 00:18:58,400 However, you know, 412 00:18:58,420 --> 00:18:59,420 a few weeks after I heard of it, 413 00:19:00,400 --> 00:19:01,920 the company sent it to meet up in Cambridge. 414 00:19:02,120 --> 00:19:03,720 They were talking about their company 415 00:19:03,720 --> 00:19:04,220 and their network. 416 00:19:04,420 --> 00:19:05,380 One of the things they mentioned 417 00:19:05,380 --> 00:19:10,740 was that they were growing pretty rapidly. 418 00:19:12,340 --> 00:19:14,000 So I was watching one of their marketing videos 419 00:19:14,000 --> 00:19:16,100 and they popped up this pretty slick graphic. 420 00:19:16,480 --> 00:19:17,780 Looks like a coverage map, right? 421 00:19:18,180 --> 00:19:19,580 And I look a little closer here 422 00:19:19,580 --> 00:19:21,600 and, you know, where is that? 423 00:19:21,780 --> 00:19:22,820 That's Portsmouth, New Hampshire. 424 00:19:23,300 --> 00:19:25,780 So at the time, I was living in Cambridge, Mass. 425 00:19:27,500 --> 00:19:28,360 And, you know, 426 00:19:28,420 --> 00:19:29,560 Portsmouth isn't too far away, 427 00:19:30,400 --> 00:19:30,840 so I grabbed my radio, 428 00:19:30,900 --> 00:19:31,580 went for a little drive, 429 00:19:32,720 --> 00:19:35,100 and here I am sitting in my car, 430 00:19:35,260 --> 00:19:36,020 usurp on the dash, 431 00:19:36,720 --> 00:19:38,780 and the result of this little field trip 432 00:19:38,780 --> 00:19:40,540 was some LoRa found in the wild. 433 00:19:41,840 --> 00:19:43,860 So luckily that graph they showed 434 00:19:43,860 --> 00:19:46,680 was real live data on their deployment. 435 00:19:46,920 --> 00:19:48,760 The base stations that were on that picture 436 00:19:48,760 --> 00:19:49,460 were real. 437 00:19:50,320 --> 00:19:51,160 So there you go. 438 00:19:51,460 --> 00:19:52,900 So let's take a closer look at this 439 00:19:52,900 --> 00:19:54,280 random signal that we captured 440 00:19:54,280 --> 00:19:55,340 in a parking lot in Portsmouth. 441 00:19:56,740 --> 00:19:57,980 This is, you know, 442 00:19:57,980 --> 00:19:59,200 part of the PHY frame that we pulled out. 443 00:19:59,920 --> 00:20:01,860 Some features we can immediately identify 444 00:20:01,860 --> 00:20:02,840 is up at the top, 445 00:20:02,920 --> 00:20:04,800 we have some continuous repeated upchirps. 446 00:20:04,940 --> 00:20:06,520 So the signal is just increasing 447 00:20:07,240 --> 00:20:08,280 kind of continuously. 448 00:20:08,880 --> 00:20:10,600 And finally, about halfway down, 449 00:20:10,680 --> 00:20:12,100 we have, sorry, 450 00:20:12,360 --> 00:20:14,400 you can think of that as being like a preamble. 451 00:20:15,080 --> 00:20:16,020 Finally, halfway down, 452 00:20:16,120 --> 00:20:17,600 we see the chirp direction changes. 453 00:20:17,740 --> 00:20:18,880 We have two downchirps. 454 00:20:20,820 --> 00:20:22,940 Which, you know, looks like a start of frame delimiter 455 00:20:22,940 --> 00:20:24,200 or some sort of synchronization element. 456 00:20:25,340 --> 00:20:25,940 And then finally after that, 457 00:20:26,000 --> 00:20:28,020 we have these choppy upchirps of varying length. 458 00:20:28,360 --> 00:20:30,620 So again, notice the frequency is always increasing, 459 00:20:31,040 --> 00:20:33,440 although it might change instantaneously. 460 00:20:33,660 --> 00:20:34,760 So, you know, 461 00:20:34,780 --> 00:20:36,740 the rate of change for the frequency 462 00:20:36,740 --> 00:20:38,820 is always constant in that PHY data unit. 463 00:20:39,180 --> 00:20:41,280 But the frequency might jump 464 00:20:41,280 --> 00:20:41,920 within that band. 465 00:20:43,000 --> 00:20:45,300 And that's how we modulate data onto this waveform. 466 00:20:46,640 --> 00:20:47,040 So, 467 00:20:47,040 --> 00:20:48,680 yeah, we just talked about that a little bit. 468 00:20:48,760 --> 00:20:49,500 Jumped the gun on this slide. 469 00:20:50,280 --> 00:20:52,660 But one way to think about the way the data is encoded 470 00:20:53,240 --> 00:20:55,000 is it's kind of like 471 00:20:55,340 --> 00:20:56,620 frequency modulated chirps, right? 472 00:20:56,980 --> 00:20:58,800 Chirps are, you know, 473 00:20:58,800 --> 00:21:00,520 kind of your signal that you modulate 474 00:21:00,520 --> 00:21:02,120 and you modulate it by changing 475 00:21:02,120 --> 00:21:04,880 the instantaneous position within the band. 476 00:21:06,060 --> 00:21:07,600 So let's take this thing apart 477 00:21:07,600 --> 00:21:08,900 and try to get the data out of it. 478 00:21:09,940 --> 00:21:11,500 So LoRa is a closed PHY. 479 00:21:11,580 --> 00:21:12,080 It's proprietary. 480 00:21:12,480 --> 00:21:13,820 The spec is not published. 481 00:21:14,280 --> 00:21:17,440 The LoRaWAN spec that defines the MAC and network layer, 482 00:21:17,600 --> 00:21:18,740 that's open. You can look that up. 483 00:21:18,880 --> 00:21:20,700 But the actual modulation is closed. 484 00:21:20,940 --> 00:21:22,160 And that's because, you know, 485 00:21:22,160 --> 00:21:23,620 Semtech, they make ICs. 486 00:21:23,620 --> 00:21:25,020 They don't want other people knowing how it works. 487 00:21:26,780 --> 00:21:28,520 But there are some documents out there 488 00:21:28,520 --> 00:21:29,540 that leak a little bit of information 489 00:21:29,540 --> 00:21:31,760 that we can use to start gauging 490 00:21:31,760 --> 00:21:33,060 our exploration here. 491 00:21:33,660 --> 00:21:35,380 They have a European patent application 492 00:21:35,380 --> 00:21:37,460 which talks about some very high level concepts. 493 00:21:38,380 --> 00:21:40,360 They have that MAC and network spec 494 00:21:40,360 --> 00:21:41,940 which talks about PHY elements 495 00:21:41,940 --> 00:21:43,720 without necessarily going into too much detail. 496 00:21:44,100 --> 00:21:45,540 We have some application notes 497 00:21:45,540 --> 00:21:47,760 which talk about some radio specific 498 00:21:49,360 --> 00:21:49,840 considerations. 499 00:21:50,300 --> 00:21:52,140 That's if you have one of their LoRa ICs 500 00:21:52,160 --> 00:21:54,340 you know, some of the features 501 00:21:54,340 --> 00:21:54,880 that they implement. 502 00:21:55,200 --> 00:21:56,900 And finally, there's a little bit of prior art out there. 503 00:21:57,480 --> 00:22:00,480 There was an open source project called RTL Strangelove 504 00:22:00,480 --> 00:22:03,100 that had an attempt at a LoRa decoder. 505 00:22:03,240 --> 00:22:04,160 I never quite got it working 506 00:22:04,160 --> 00:22:06,780 but there were some good hints there. 507 00:22:07,000 --> 00:22:09,040 And finally, some pretty high level observations 508 00:22:09,040 --> 00:22:10,060 on the PHY in a wiki page. 509 00:22:11,800 --> 00:22:13,260 So from all this documentation 510 00:22:13,260 --> 00:22:14,740 we're able to start to pull out some definitions 511 00:22:14,740 --> 00:22:16,960 about features that are actually occurring in the PHY. 512 00:22:18,420 --> 00:22:19,400 We have the bandwidth 513 00:22:19,400 --> 00:22:21,280 which is the width of the chirp. 514 00:22:21,340 --> 00:22:22,140 How much frequency we have 515 00:22:22,160 --> 00:22:23,040 you can see the chirp traverses 516 00:22:23,040 --> 00:22:24,240 if just allowed to run continuously. 517 00:22:25,840 --> 00:22:28,140 Secondly, we have this notion of the spreading factor. 518 00:22:28,380 --> 00:22:29,180 And this is very important. 519 00:22:29,440 --> 00:22:31,260 This is a very important concept that we'll talk about. 520 00:22:31,620 --> 00:22:33,020 The spreading factor represents 521 00:22:33,020 --> 00:22:35,220 the number of bits encoded per symbol. 522 00:22:35,940 --> 00:22:37,620 So this is a spread spectrum modulation 523 00:22:38,140 --> 00:22:39,440 meaning that we have multiple bits 524 00:22:40,060 --> 00:22:41,580 being encoded into each symbol. 525 00:22:43,140 --> 00:22:43,580 So 526 00:22:43,580 --> 00:22:45,660 the spreading factor is the number of bits 527 00:22:45,660 --> 00:22:47,780 in each RF energy state that we're going to measure. 528 00:22:48,500 --> 00:22:50,180 And finally we talked about the chirp rate 529 00:22:50,180 --> 00:22:51,600 that's the first derivative of the frequency 530 00:22:52,540 --> 00:22:54,740 all of these things are mathematically defined 531 00:22:54,740 --> 00:22:55,880 and from these documents 532 00:22:55,880 --> 00:22:57,060 we can start to figure out 533 00:22:57,060 --> 00:22:58,420 how they relate to each other. 534 00:22:59,640 --> 00:23:01,380 The bandwidth in the US is 125 535 00:23:02,200 --> 00:23:03,680 250 or 500 kHz 536 00:23:03,680 --> 00:23:06,680 the spreading factor ranges from 7 to 12 bits per symbol 537 00:23:06,680 --> 00:23:07,840 and finally the chirp rate 538 00:23:07,840 --> 00:23:08,900 is a function of the first two. 539 00:23:09,840 --> 00:23:11,680 So if we know the modulation parameters 540 00:23:11,680 --> 00:23:13,120 we can figure out what the chirp rate is. 541 00:23:14,060 --> 00:23:15,820 So what's a symbol in this case? 542 00:23:16,240 --> 00:23:18,960 We mentioned it being a frequency modulated chirp 543 00:23:18,960 --> 00:23:20,940 but what we're going to be trying to do 544 00:23:20,940 --> 00:23:21,880 when we demodulate this 545 00:23:22,160 --> 00:23:24,040 is measure the changes 546 00:23:24,040 --> 00:23:25,460 in frequency throughout the band 547 00:23:26,300 --> 00:23:27,880 as that chirp jumps. 548 00:23:29,480 --> 00:23:29,880 Alright 549 00:23:29,880 --> 00:23:31,720 so here's our little checklist here. 550 00:23:32,180 --> 00:23:33,500 When writing software to 551 00:23:34,020 --> 00:23:35,080 find and decode this 552 00:23:35,080 --> 00:23:36,460 there are a few steps that we need to do. 553 00:23:37,260 --> 00:23:38,780 Pretty much all digital radio systems 554 00:23:38,780 --> 00:23:41,260 have a preamble and a start of frame delimiter 555 00:23:41,260 --> 00:23:43,160 for training the receiver 556 00:23:43,960 --> 00:23:45,500 to pick up an incoming message. 557 00:23:45,960 --> 00:23:47,100 So the first thing we're going to do 558 00:23:47,100 --> 00:23:48,060 is we're going to find the preamble 559 00:23:48,060 --> 00:23:49,940 which is those repeated up chirps at the beginning of the frame. 560 00:23:52,160 --> 00:23:53,180 So when we think we're about to receive a packet 561 00:23:53,700 --> 00:23:56,680 we're going to start looking for those two down chirps 562 00:23:56,680 --> 00:23:58,500 which we're going to use to synchronize 563 00:23:58,500 --> 00:23:59,260 on the start of the message. 564 00:23:59,600 --> 00:24:00,800 Finally once we have that 565 00:24:00,800 --> 00:24:03,020 we're going to extract the data from the frequency transitions 566 00:24:03,820 --> 00:24:04,900 by doing some math. 567 00:24:06,880 --> 00:24:08,320 So how can we do this? 568 00:24:09,140 --> 00:24:10,360 One technique that I found 569 00:24:10,360 --> 00:24:10,980 that was pretty cool 570 00:24:10,980 --> 00:24:14,320 was if we do a little transformation on the signal 571 00:24:14,320 --> 00:24:15,280 it puts it into a 572 00:24:16,060 --> 00:24:17,680 form that makes it pretty easy to work with. 573 00:24:18,520 --> 00:24:20,200 So we can de-chirp the signal 574 00:24:20,200 --> 00:24:21,940 by generating a local 575 00:24:22,160 --> 00:24:23,620 copy of each of those two chirps 576 00:24:23,620 --> 00:24:26,240 and multiplying it against the original baseband. 577 00:24:26,800 --> 00:24:28,420 And we know what the chirp rate is 578 00:24:28,420 --> 00:24:30,140 because there are a finite number 579 00:24:30,140 --> 00:24:31,240 of modulation parameters 580 00:24:31,240 --> 00:24:34,120 we can kind of guess them until we get the correct chirp rate 581 00:24:34,120 --> 00:24:35,980 which is just a function of those two features 582 00:24:35,980 --> 00:24:37,000 spreading factor and bandwidth. 583 00:24:37,740 --> 00:24:38,980 So we do that 584 00:24:38,980 --> 00:24:41,500 and we start to see something interesting here. 585 00:24:42,160 --> 00:24:44,000 This is just an IQ signal 586 00:24:44,000 --> 00:24:46,040 being run through a GNU radio flow graph that does this. 587 00:24:46,960 --> 00:24:48,400 So some repeated elements here. 588 00:24:48,660 --> 00:24:50,000 I don't know if you can see it 589 00:24:50,000 --> 00:24:52,140 we'll move quickly through this and look at a better picture in a minute. 590 00:24:52,160 --> 00:24:53,640 But here we can start to see 591 00:24:53,640 --> 00:24:54,940 that those chirps that were previously 592 00:24:56,200 --> 00:24:57,940 diagonal moving throughout the spectrogram 593 00:24:57,940 --> 00:24:59,600 have been rotated and they're now vertical. 594 00:24:59,840 --> 00:25:01,420 And that looks like something we can start to play with. 595 00:25:03,720 --> 00:25:04,860 So going back to symbols 596 00:25:04,860 --> 00:25:08,140 we know that the symbol is the energy state 597 00:25:08,140 --> 00:25:10,180 representing how many bits of information there are. 598 00:25:10,960 --> 00:25:11,720 And since 599 00:25:11,720 --> 00:25:13,760 LoRa is spread spectrum there are multiple bits per symbol. 600 00:25:14,940 --> 00:25:16,320 We can derive from this 601 00:25:16,320 --> 00:25:18,480 the number of possible symbols that there can be 602 00:25:18,480 --> 00:25:20,180 and that's just 2 to the spreading factor 603 00:25:20,180 --> 00:25:21,120 because the 604 00:25:22,160 --> 00:25:23,540 each bit can either be a 1 or a 0 605 00:25:23,540 --> 00:25:26,300 and that's just how it works out. 606 00:25:27,580 --> 00:25:29,520 So we can leverage this to come up with a method 607 00:25:29,520 --> 00:25:31,140 for extracting symbols from this 608 00:25:31,660 --> 00:25:32,600 D chirp signal. 609 00:25:32,800 --> 00:25:34,320 And we can do that using a fast Fourier transform. 610 00:25:34,860 --> 00:25:36,820 If we set the width of the FFT 611 00:25:36,820 --> 00:25:39,360 that is the number of component frequencies that we're looking at 612 00:25:39,360 --> 00:25:41,420 and run the D chirp signal through it 613 00:25:42,880 --> 00:25:43,680 then each 614 00:25:44,240 --> 00:25:45,880 bin will represent a possible 615 00:25:45,880 --> 00:25:47,300 symbol and 616 00:25:47,300 --> 00:25:49,100 then the symbol which is present 617 00:25:49,100 --> 00:25:51,040 is just the bin that has the most amount of energy in it. 618 00:25:53,220 --> 00:25:54,680 So here's our original signal 619 00:25:54,680 --> 00:25:56,060 next to the D chirp signal. 620 00:25:57,340 --> 00:25:57,740 Again 621 00:25:58,780 --> 00:26:00,220 chirp can either be positive or negative 622 00:26:00,220 --> 00:26:01,200 up chirp or down chirp 623 00:26:01,200 --> 00:26:03,180 so when we do the multiplication we do it against both 624 00:26:03,180 --> 00:26:05,100 and we get out these 2 different IQ streams. 625 00:26:06,180 --> 00:26:08,720 So on the left is the D chirped up chirp 626 00:26:08,720 --> 00:26:09,780 and on the right 627 00:26:09,780 --> 00:26:11,300 is the D chirp down chirp. 628 00:26:11,420 --> 00:26:13,520 So you can see that the preamble and the data 629 00:26:13,980 --> 00:26:15,720 which are always up chirps are going in the right direction 630 00:26:16,200 --> 00:26:16,880 and the 631 00:26:17,620 --> 00:26:20,060 those come out when you D chirp the up chirp 632 00:26:20,060 --> 00:26:22,140 and finally the SFD, those 2 down chirps 633 00:26:22,160 --> 00:26:24,280 you can see is a pretty intense little red spot 634 00:26:24,280 --> 00:26:24,980 right there on the right. 635 00:26:27,000 --> 00:26:28,300 Going back to our flow graph 636 00:26:28,300 --> 00:26:30,140 we need to start working through this process 637 00:26:30,140 --> 00:26:32,200 and actually writing 638 00:26:32,200 --> 00:26:33,060 software that does this. 639 00:26:34,440 --> 00:26:36,220 So identifying the beginning of the packet 640 00:26:36,220 --> 00:26:37,980 is signified by finding this preamble 641 00:26:37,980 --> 00:26:40,100 and the preamble in the case of Laura 642 00:26:40,100 --> 00:26:42,060 is the same symbol being 643 00:26:42,060 --> 00:26:43,980 transmitted over and over again. Remember it's just that 644 00:26:43,980 --> 00:26:46,260 continuous up chirp. So when we D chirp it 645 00:26:46,260 --> 00:26:48,220 all that energy winds up being in the 646 00:26:48,220 --> 00:26:49,800 same FFT bin. So 647 00:26:49,800 --> 00:26:52,100 we can do this and just look for a number of 648 00:26:52,160 --> 00:26:54,040 consecutive symbols having the same value 649 00:26:54,040 --> 00:26:55,900 and that says okay, we're probably getting 650 00:26:56,740 --> 00:26:57,800 some data out of this. 651 00:26:58,280 --> 00:26:59,420 We're probably about to receive a packet. 652 00:27:00,420 --> 00:27:02,180 Finally once we've found that, we need to start 653 00:27:02,180 --> 00:27:04,200 looking for that synchronization word that we're going to use 654 00:27:04,200 --> 00:27:05,360 to lock onto the start of the packet. 655 00:27:06,180 --> 00:27:06,540 And 656 00:27:07,580 --> 00:27:09,380 we do that by looking at the opposite 657 00:27:09,860 --> 00:27:12,060 D chirp signal. So again remember 658 00:27:12,060 --> 00:27:14,060 we found the preamble in the D chirp 659 00:27:14,060 --> 00:27:16,200 up chirp signal. So we're now 660 00:27:16,200 --> 00:27:17,960 going to look at the D chirp to down chirp signal 661 00:27:17,960 --> 00:27:19,460 and look for that SFD. 662 00:27:21,220 --> 00:27:21,920 And in 663 00:27:22,160 --> 00:27:24,080 the Laura Phi I found it to be 664 00:27:24,080 --> 00:27:25,500 two symbols so we just look for 665 00:27:25,500 --> 00:27:28,060 two symbols that have the same value 666 00:27:28,060 --> 00:27:29,820 and then we can use that to synchronize. 667 00:27:30,600 --> 00:27:31,860 We're missing something important here 668 00:27:31,860 --> 00:27:33,800 and that's that SFD 669 00:27:33,800 --> 00:27:35,960 detection is essential for having accurate 670 00:27:36,840 --> 00:27:37,260 synchronization. 671 00:27:37,980 --> 00:27:40,000 And if we have a bad sync, in 672 00:27:40,000 --> 00:27:41,840 this case what can happen is we can wind up 673 00:27:41,840 --> 00:27:43,600 spreading energy between multiple consecutive 674 00:27:44,010 --> 00:27:46,020 FFT bins. And that can 675 00:27:46,020 --> 00:27:47,640 lead to reading the data out incorrectly. 676 00:27:48,480 --> 00:27:49,240 Here's an illustration. 677 00:27:49,680 --> 00:27:52,120 If you look at these bits that I've 678 00:27:52,160 --> 00:27:53,460 pulled out, we have 679 00:27:54,160 --> 00:27:55,600 element 39 and element 50, 680 00:27:55,800 --> 00:27:57,820 you can see that there are basically two peaks 681 00:27:57,820 --> 00:27:59,080 in each of those FFTs. 682 00:27:59,620 --> 00:28:01,960 Ideally we should just see one because there's only 683 00:28:01,960 --> 00:28:03,860 one symbol because we're 684 00:28:03,860 --> 00:28:05,660 reading out one symbol per FFT ideally. 685 00:28:06,220 --> 00:28:08,120 So basically what's 686 00:28:08,120 --> 00:28:10,000 happening here is we have 687 00:28:10,000 --> 00:28:12,020 multiple symbols leaking into 688 00:28:12,020 --> 00:28:14,080 each FFT. You can think of it as if you have 689 00:28:14,080 --> 00:28:16,100 a buffer and each symbol is 690 00:28:16,640 --> 00:28:17,920 two to the spreading factor 691 00:28:18,660 --> 00:28:19,900 number of samples. 692 00:28:20,620 --> 00:28:21,820 In this case it would be 693 00:28:22,160 --> 00:28:23,600 256 because this is an SF8 694 00:28:24,080 --> 00:28:25,080 spreading factor 8 signal. 695 00:28:25,520 --> 00:28:27,720 You can think of it as being that 128 696 00:28:27,720 --> 00:28:29,800 samples in that buffer are from 697 00:28:29,800 --> 00:28:31,420 symbol 0 or symbol n 698 00:28:31,420 --> 00:28:33,120 and then 128 699 00:28:33,880 --> 00:28:36,000 samples in that buffer are from symbol n plus 1. 700 00:28:36,320 --> 00:28:37,960 So we need to basically realign that 701 00:28:37,960 --> 00:28:39,380 and get it so that 256 702 00:28:39,900 --> 00:28:41,780 all 256 samples in that FFT 703 00:28:42,900 --> 00:28:43,780 are from 704 00:28:43,780 --> 00:28:46,100 one symbol. So one way 705 00:28:46,100 --> 00:28:47,900 we can do that is we can increase our FFT 706 00:28:47,900 --> 00:28:49,920 resolution in time by overlapping 707 00:28:49,920 --> 00:28:52,080 them. So basically what we do 708 00:28:52,160 --> 00:28:53,780 is if you have your FFT buffer you 709 00:28:53,780 --> 00:28:55,260 kind of walk it through 710 00:28:55,260 --> 00:28:58,200 and process each sample multiple times 711 00:28:58,200 --> 00:28:59,320 as it traverses through the buffer. 712 00:28:59,800 --> 00:29:01,860 This has the effect of getting you better resolution 713 00:29:01,860 --> 00:29:03,720 in time. So we overlap 714 00:29:03,720 --> 00:29:06,060 the buffers and we get this 715 00:29:06,060 --> 00:29:08,160 nice picture on the bottom here. On the top 716 00:29:08,160 --> 00:29:10,160 we have a non-overlapped FFT, same picture 717 00:29:10,160 --> 00:29:11,440 we saw earlier with the collisions. 718 00:29:11,880 --> 00:29:13,920 On the bottom you can see that those features 719 00:29:13,920 --> 00:29:15,060 start to become much more defined. 720 00:29:16,100 --> 00:29:17,980 So if we do that when we're looking for the 721 00:29:17,980 --> 00:29:20,100 SFD, oh yeah sorry 722 00:29:20,100 --> 00:29:20,600 this is the 723 00:29:22,200 --> 00:29:22,960 overlapped FFT 724 00:29:23,860 --> 00:29:24,740 zoomed in a little bit 725 00:29:26,080 --> 00:29:27,960 here it is, looks much cleaner. 726 00:29:29,380 --> 00:29:30,160 So if 727 00:29:30,160 --> 00:29:32,140 we overlap these FFTs when we're looking for the 728 00:29:32,140 --> 00:29:34,280 sync word, we can get a very precise 729 00:29:34,280 --> 00:29:36,320 we can very precisely calibrate 730 00:29:36,320 --> 00:29:38,080 our receiver to that and read the data 731 00:29:38,080 --> 00:29:39,460 out correctly. So 732 00:29:40,720 --> 00:29:42,200 here are all three 733 00:29:42,200 --> 00:29:43,400 on the left we have 734 00:29:44,020 --> 00:29:46,080 the non-overlapped, in the middle 735 00:29:46,080 --> 00:29:47,280 we have the 736 00:29:48,440 --> 00:29:49,860 overlapped FFTs and on the right 737 00:29:49,860 --> 00:29:52,020 we have the synchronized 738 00:29:53,280 --> 00:29:54,160 the synchronized 739 00:29:54,160 --> 00:29:56,000 non-overlapped FFT that we compute after 740 00:29:56,000 --> 00:29:57,680 we find that sync. So 741 00:29:58,320 --> 00:29:59,640 we'll zoom in just a minute here 742 00:30:00,160 --> 00:30:01,320 look at line 743 00:30:01,320 --> 00:30:03,580 look at line 39 there, 38 and 39 744 00:30:03,580 --> 00:30:05,940 look at how much better that looks. I know there's 745 00:30:05,940 --> 00:30:07,720 some noise in there but 746 00:30:07,720 --> 00:30:09,980 you can see where the maximum is 747 00:30:09,980 --> 00:30:12,020 right? It's much cleaner, much more defined. 748 00:30:13,800 --> 00:30:15,700 So there it is, we went from the 749 00:30:15,700 --> 00:30:18,040 the unsynchronized 750 00:30:18,040 --> 00:30:19,640 to the synchronized and we get much better 751 00:30:20,160 --> 00:30:22,100 precision out of that. Finally step 752 00:30:22,160 --> 00:30:23,840 three, we need to extract the data 753 00:30:23,840 --> 00:30:25,980 the data from the payload 754 00:30:25,980 --> 00:30:27,220 section, which we'll get to in a minute 755 00:30:27,220 --> 00:30:29,460 and then we normalize it about the preamble 756 00:30:29,460 --> 00:30:32,020 so if we take whatever bin 757 00:30:32,020 --> 00:30:33,900 the preamble occurred in as being 758 00:30:33,900 --> 00:30:35,700 data element zero, then 759 00:30:35,700 --> 00:30:37,520 we can just rotate 760 00:30:37,960 --> 00:30:39,980 the data values within, or relative 761 00:30:39,980 --> 00:30:41,940 to that, normalize it and 762 00:30:41,940 --> 00:30:43,960 we're good to go. That's it, right? 763 00:30:44,500 --> 00:30:45,600 Hardly, we're just getting started. 764 00:30:45,900 --> 00:30:46,940 That's the demodulation 765 00:30:48,600 --> 00:30:50,140 and the data that's being 766 00:30:50,140 --> 00:30:51,440 sent over the air is being encoded. 767 00:30:53,160 --> 00:30:54,140 What is encoding? 768 00:30:54,720 --> 00:30:55,580 Basically the data 769 00:30:56,160 --> 00:30:57,940 gets transformed before it gets sent to the 770 00:30:57,940 --> 00:31:00,020 demodulator to increase 771 00:31:00,020 --> 00:31:01,740 the over-the-air resiliency of the signal. 772 00:31:02,920 --> 00:31:04,180 Why would you want to do this? 773 00:31:04,240 --> 00:31:05,980 Why would you want to add the complexity of adding 774 00:31:05,980 --> 00:31:07,780 this encoding onto your signal? 775 00:31:09,020 --> 00:31:10,220 Well, a smart guy 776 00:31:10,220 --> 00:31:12,020 once shared some information 777 00:31:12,020 --> 00:31:13,440 with me. Is he here? 778 00:31:14,220 --> 00:31:15,620 You should talk to him. 779 00:31:15,760 --> 00:31:17,100 He knows a lot. 780 00:31:17,640 --> 00:31:19,540 I didn't quite understand this at the time 781 00:31:20,560 --> 00:31:22,080 but I think what he was 782 00:31:22,160 --> 00:31:23,700 getting at is the fact that radio frequency 783 00:31:23,700 --> 00:31:25,640 is a really brutal environment to operate in. 784 00:31:26,360 --> 00:31:27,800 All systems can see interference 785 00:31:27,800 --> 00:31:30,020 from the environment, whether 786 00:31:30,020 --> 00:31:32,240 it's weather, other devices, 787 00:31:32,520 --> 00:31:34,080 and then add in the fact that 788 00:31:34,080 --> 00:31:35,720 this PHY is designed to operate 789 00:31:35,720 --> 00:31:38,080 an unlicensed spectrum where you're guaranteed 790 00:31:38,080 --> 00:31:39,480 to have lots of other traffic, right? 791 00:31:39,680 --> 00:31:41,980 You have to contend with Wi-Fi, you have to contend with 792 00:31:41,980 --> 00:31:44,000 Bluetooth. If somebody is microwaving 793 00:31:44,000 --> 00:31:45,780 their leftovers, that's going to produce some emissions 794 00:31:45,780 --> 00:31:47,560 in 2.4 and that's going to interfere 795 00:31:47,560 --> 00:31:49,940 with you, right? So encoding 796 00:31:50,460 --> 00:31:52,060 scrambles and replicates the data within 797 00:31:52,160 --> 00:31:53,400 the frame to increase resiliency. 798 00:31:54,720 --> 00:31:56,020 So what do we think 799 00:31:56,020 --> 00:31:58,140 we have here? Let's take a closer 800 00:31:58,140 --> 00:32:00,200 look. We have some clues 801 00:32:00,200 --> 00:32:01,640 from those documents that we looked at earlier. 802 00:32:02,120 --> 00:32:03,400 Specifically, the patent suggests 803 00:32:03,960 --> 00:32:05,900 that there are four stages of encoding 804 00:32:05,900 --> 00:32:07,140 being applied here. 805 00:32:07,880 --> 00:32:09,620 First, we have this thing called gray indexing 806 00:32:10,080 --> 00:32:12,100 which adds error tolerance for off-by-one 807 00:32:12,100 --> 00:32:13,860 symbol errors. So if when you do that 808 00:32:13,860 --> 00:32:15,340 FFT on your DTRIP signal, 809 00:32:15,580 --> 00:32:17,920 the power accidentally registers as being 810 00:32:17,920 --> 00:32:19,520 off by plus or minus one bin, 811 00:32:19,740 --> 00:32:21,680 the gray coding will correct that when you 812 00:32:22,240 --> 00:32:23,040 apply it. 813 00:32:25,800 --> 00:32:26,200 Secondly, 814 00:32:26,340 --> 00:32:27,680 we have data whitening, which 815 00:32:28,400 --> 00:32:30,140 induces randomness, lots of little 816 00:32:30,140 --> 00:32:31,780 transitions for your receiver to synchronize on. 817 00:32:33,620 --> 00:32:34,020 Third, 818 00:32:34,160 --> 00:32:36,000 we have interleaving, which scrambles the 819 00:32:36,000 --> 00:32:38,100 bits within the frame, just takes all 820 00:32:38,100 --> 00:32:39,140 the bits that are there and moves them around. 821 00:32:39,480 --> 00:32:41,980 We'll talk about that in a minute. And finally, forward error correction, 822 00:32:42,200 --> 00:32:43,960 which adds correcting parity bits. 823 00:32:45,200 --> 00:32:46,140 So we have 824 00:32:46,140 --> 00:32:47,980 some, from our open source intelligence, 825 00:32:48,160 --> 00:32:49,900 we have these four distinct operations to reverse. 826 00:32:51,040 --> 00:32:51,840 So when 827 00:32:52,160 --> 00:32:54,020 the order that's being presented here 828 00:32:54,020 --> 00:32:56,380 is the receive, the receiver's, 829 00:32:56,440 --> 00:32:58,020 the order that the receiver's gonna process 830 00:32:58,020 --> 00:33:00,120 them in. So the receiver would start 831 00:33:00,120 --> 00:33:02,140 with step one, you know, 832 00:33:02,140 --> 00:33:04,020 go through two, three, and four. The transmitter 833 00:33:04,020 --> 00:33:05,280 does the inverse. So 834 00:33:06,200 --> 00:33:08,040 steps go four through one when the 835 00:33:08,040 --> 00:33:10,240 transmitter's preparing this data. But again, we're reversing 836 00:33:10,240 --> 00:33:11,600 this, so we're thinking about this from the receiver 837 00:33:11,600 --> 00:33:14,160 perspective. Now, 838 00:33:15,020 --> 00:33:16,140 I'm gonna do, I'm gonna go 839 00:33:16,140 --> 00:33:18,040 a little bit out of order here, and I'll 840 00:33:18,040 --> 00:33:20,000 explain why. I'm gonna start 841 00:33:20,000 --> 00:33:21,420 by explaining the forward error correction. 842 00:33:22,160 --> 00:33:24,180 The reason why is because the forward error correction 843 00:33:24,180 --> 00:33:26,040 is essential for reversing 844 00:33:26,040 --> 00:33:28,040 the other steps. We're gonna exploit some properties 845 00:33:28,040 --> 00:33:30,160 there that make the other steps a little 846 00:33:30,160 --> 00:33:31,940 easier to understand if we can understand 847 00:33:31,940 --> 00:33:34,020 what the FEC does to the data 848 00:33:34,020 --> 00:33:34,700 before it gets sent. 849 00:33:36,100 --> 00:33:38,160 So forward error correction, you can think of 850 00:33:38,160 --> 00:33:39,700 it as being like parity bits on steroids. 851 00:33:40,840 --> 00:33:42,200 They are parity bits 852 00:33:42,200 --> 00:33:44,000 that, in addition to detecting errors, can 853 00:33:44,000 --> 00:33:45,980 repair them. A common 854 00:33:45,980 --> 00:33:47,840 FEC scheme is the Hamming 855 00:33:47,840 --> 00:33:48,420 scheme, 856 00:33:50,020 --> 00:33:51,860 where, depending on how many bits you have, 857 00:33:52,160 --> 00:33:53,720 or some, you know, some 858 00:33:53,720 --> 00:33:56,060 little rules that define how many 859 00:33:56,060 --> 00:33:57,380 bits get you a certain amount of tolerance, 860 00:33:57,940 --> 00:33:59,180 you can repair errors. 861 00:33:59,640 --> 00:34:00,660 So if you have, 862 00:34:02,060 --> 00:34:03,640 let me explain these numbers here. 863 00:34:04,080 --> 00:34:05,960 So we have two pairs of numbers in each 864 00:34:05,960 --> 00:34:08,020 of these different modes. The first number 865 00:34:08,020 --> 00:34:09,700 is the total number of bits in the 866 00:34:10,280 --> 00:34:11,420 encoded data code word, 867 00:34:11,540 --> 00:34:13,980 and the second number is the number of data bits that get 868 00:34:13,980 --> 00:34:15,580 input. So 869 00:34:15,580 --> 00:34:17,860 the difference of the two is the number of 870 00:34:17,860 --> 00:34:19,240 error correcting bits that get added. 871 00:34:19,700 --> 00:34:21,980 And if you have one or two error correcting 872 00:34:22,160 --> 00:34:23,420 bits for four data bits, 873 00:34:23,580 --> 00:34:26,080 you can compute parity, just like having a parity 874 00:34:26,080 --> 00:34:27,980 bit in, like, RS232 or something like that. 875 00:34:28,780 --> 00:34:29,740 But if you have three, 876 00:34:29,920 --> 00:34:32,220 then you can go a step further and correct 877 00:34:32,220 --> 00:34:34,140 an error bit. And then if you 878 00:34:34,140 --> 00:34:36,100 have four parity 879 00:34:36,100 --> 00:34:37,680 bits, in addition to correcting that bit error, 880 00:34:37,880 --> 00:34:40,020 you can detect if there were two. You can't correct two, 881 00:34:40,100 --> 00:34:41,880 but you can, you know, you can at least know. 882 00:34:44,780 --> 00:34:45,600 Okay, so 883 00:34:45,600 --> 00:34:48,200 I'm missing a slide here. 884 00:34:48,300 --> 00:34:48,860 No, I'm not. Okay. 885 00:34:50,220 --> 00:34:51,040 So we're gonna 886 00:34:52,160 --> 00:34:54,040 come back to this later, but just remember that when 887 00:34:54,040 --> 00:34:56,100 we're talking about FEC, we're adding parity bits 888 00:34:56,100 --> 00:34:58,060 to the data bits. So you're increasing 889 00:34:58,060 --> 00:34:59,560 your data size as you apply FEC. 890 00:35:01,320 --> 00:35:02,160 Okay, so 891 00:35:03,220 --> 00:35:04,040 going back 892 00:35:04,040 --> 00:35:05,900 to that flow graph, right, this is step one, 893 00:35:06,020 --> 00:35:06,840 the gray indexing. 894 00:35:07,900 --> 00:35:09,920 The patent suggested that 895 00:35:09,920 --> 00:35:12,100 gray coding was applied to the signal before 896 00:35:12,100 --> 00:35:14,120 it was sent, and in fact, experimentally 897 00:35:14,120 --> 00:35:15,060 it was determined that the 898 00:35:16,080 --> 00:35:17,580 gray encoding was actually the reverse. 899 00:35:17,860 --> 00:35:19,980 The payloads that were sent were 900 00:35:19,980 --> 00:35:21,720 de-grayed before they 901 00:35:22,160 --> 00:35:23,960 went over the air. And we were able to 902 00:35:23,960 --> 00:35:26,080 determine that experimentally 903 00:35:26,820 --> 00:35:28,180 while working on the whitening. 904 00:35:28,420 --> 00:35:30,100 Again, the whitening is that step two, 905 00:35:30,240 --> 00:35:32,080 which is, induces the 906 00:35:32,080 --> 00:35:32,960 randomness into the data. 907 00:35:33,840 --> 00:35:35,740 So the way the whitening works is 908 00:35:35,740 --> 00:35:38,140 the transmitter will XOR the data 909 00:35:38,140 --> 00:35:39,940 against a pseudo-random sequence 910 00:35:39,940 --> 00:35:42,040 that is known to both the transmitter 911 00:35:42,040 --> 00:35:42,460 and the receiver. 912 00:35:43,920 --> 00:35:46,260 So this basically takes your data, 913 00:35:46,360 --> 00:35:48,180 applies it to some mask, and then sends it. 914 00:35:49,160 --> 00:35:50,000 The receiver 915 00:35:50,000 --> 00:35:52,140 will then XOR the received data 916 00:35:52,160 --> 00:35:53,940 against that same pseudo-random sequence. 917 00:35:54,280 --> 00:35:55,880 And that will return the original frame 918 00:35:55,880 --> 00:35:57,160 because XOR is its own inverse. 919 00:35:58,220 --> 00:35:59,540 Why would you want to do this? 920 00:36:00,480 --> 00:36:01,360 Randomizing the data 921 00:36:02,100 --> 00:36:03,880 adds some features to it 922 00:36:03,880 --> 00:36:05,440 that make it easier for the receiver 923 00:36:05,940 --> 00:36:08,180 to lock onto. You can think of it 924 00:36:08,180 --> 00:36:10,000 as being like line coding, like Manchester 925 00:36:10,000 --> 00:36:11,980 encoding. However, 926 00:36:12,180 --> 00:36:13,960 whitening has an advantage in that it doesn't 927 00:36:14,660 --> 00:36:15,900 reduce the effective 928 00:36:15,900 --> 00:36:17,280 bitrate that your signal can use. 929 00:36:18,020 --> 00:36:19,900 Manchester imposes a penalty of 930 00:36:19,900 --> 00:36:21,620 I guess, your 931 00:36:22,160 --> 00:36:23,660 effective bitrate becomes half of what it would be 932 00:36:23,660 --> 00:36:24,720 if you weren't applying Manchester encoding. 933 00:36:25,560 --> 00:36:27,300 Whereas whitening, since it's just an XOR, 934 00:36:28,080 --> 00:36:29,480 there's no penalty there, no overhead. 935 00:36:30,940 --> 00:36:31,320 So, 936 00:36:32,560 --> 00:36:33,920 we had to find this whitening 937 00:36:33,920 --> 00:36:35,800 sequence to know what to XOR 938 00:36:35,800 --> 00:36:36,680 or receive data against. 939 00:36:37,720 --> 00:36:39,720 There are a couple of different whitening algorithms to find 940 00:36:39,720 --> 00:36:40,920 in one of those reference designs, 941 00:36:41,620 --> 00:36:43,140 one of those application notes I mentioned, 942 00:36:43,900 --> 00:36:45,140 also a few that were 943 00:36:46,020 --> 00:36:48,060 published in RTL Strangelove, that open source 944 00:36:48,060 --> 00:36:50,140 project. However, none of them 945 00:36:50,140 --> 00:36:51,820 worked. I implemented them all. I tried them against 946 00:36:52,160 --> 00:36:53,700 receive data and it just didn't 947 00:36:53,700 --> 00:36:54,900 make any sense. 948 00:36:56,720 --> 00:36:57,900 However, we can again 949 00:36:57,900 --> 00:36:59,940 go back to our friend the XOR operator and start 950 00:36:59,940 --> 00:37:01,200 to do something clever to back this out. 951 00:37:02,640 --> 00:37:04,040 One awesome property of 952 00:37:04,040 --> 00:37:05,760 XOR is that if you 953 00:37:05,760 --> 00:37:07,680 XOR data against a stream 954 00:37:07,680 --> 00:37:09,380 of zero bits, 955 00:37:09,560 --> 00:37:12,040 you get the data out, you get the original 956 00:37:12,040 --> 00:37:14,100 data out. So, if we transmit 957 00:37:14,100 --> 00:37:15,040 a frame of all zeros, 958 00:37:16,160 --> 00:37:17,640 from the transmitter's perspective, 959 00:37:17,880 --> 00:37:19,860 the receiver is going to get the whitening sequence 960 00:37:19,860 --> 00:37:21,380 out of that. So, 961 00:37:22,160 --> 00:37:22,960 that's kind of cool, right? 962 00:37:24,620 --> 00:37:25,140 So, 963 00:37:25,900 --> 00:37:26,760 we're going to do that. 964 00:37:27,980 --> 00:37:29,200 Some things that 965 00:37:29,200 --> 00:37:31,940 help us get this right is we mentioned the 966 00:37:31,940 --> 00:37:32,520 Hamming correction. 967 00:37:34,840 --> 00:37:35,360 Hamming 968 00:37:36,440 --> 00:37:37,300 8.4, 969 00:37:38,420 --> 00:37:40,080 all of the code words contain 970 00:37:40,080 --> 00:37:42,000 four one bits and four zero 971 00:37:42,000 --> 00:37:43,760 bits, except for the code words 972 00:37:43,760 --> 00:37:45,920 for data zero and data F. 973 00:37:47,020 --> 00:37:48,200 The code word 974 00:37:48,200 --> 00:37:49,760 for data zero is just all zeros. 975 00:37:50,020 --> 00:37:51,720 So, there's no FEC being applied here. 976 00:37:52,160 --> 00:37:53,800 It doesn't mess with our receive-whitening sequence. 977 00:37:54,380 --> 00:37:55,060 And also, 978 00:37:55,960 --> 00:37:57,740 if the interleaving is non-additive, 979 00:37:57,920 --> 00:37:59,340 then there are no bits being added. 980 00:37:59,540 --> 00:38:01,980 So, basically, by sending all zeros, 981 00:38:02,200 --> 00:38:04,020 these two stages fall away. We don't have to 982 00:38:04,020 --> 00:38:04,520 worry about them. 983 00:38:05,620 --> 00:38:07,840 The only other thing that we need to control for 984 00:38:07,840 --> 00:38:08,920 is the gray indexing. 985 00:38:09,780 --> 00:38:11,900 So, there are just three different 986 00:38:11,900 --> 00:38:13,600 states that we could try. Graying, 987 00:38:13,620 --> 00:38:15,520 no graying, and degraying. 988 00:38:15,900 --> 00:38:17,840 And then, when we get the zeros out, 989 00:38:17,880 --> 00:38:18,400 we know we got it right. 990 00:38:18,400 --> 00:38:20,420 So, that's how we were kind of able 991 00:38:20,420 --> 00:38:22,080 to solve for these first two steps, the gray 992 00:38:22,080 --> 00:38:24,160 indexing and the whitening, kind of in one go. 993 00:38:25,420 --> 00:38:26,420 Alright, step three. 994 00:38:26,660 --> 00:38:27,580 Finding the interleaver. 995 00:38:28,340 --> 00:38:30,200 There was an interleaver to find in 996 00:38:30,200 --> 00:38:32,440 the Semtech European patent application 997 00:38:32,440 --> 00:38:34,180 that I mentioned. And it 998 00:38:34,180 --> 00:38:36,200 suggests a diagonal interleaver abiding by that 999 00:38:37,100 --> 00:38:37,880 formula there. 1000 00:38:38,880 --> 00:38:40,320 Guess what? That also didn't 1001 00:38:40,320 --> 00:38:42,320 work. Fantastic. So, we're 1002 00:38:42,320 --> 00:38:44,060 one for four on documented features right now. 1003 00:38:44,660 --> 00:38:46,260 The gray indexing 1004 00:38:46,260 --> 00:38:48,000 was actually degray, like the 1005 00:38:48,400 --> 00:38:50,280 first before it got sent. The whitening 1006 00:38:50,280 --> 00:38:52,060 algorithms that they gave us did not work. 1007 00:38:52,180 --> 00:38:54,080 I still have no idea what those algorithms are applied to. 1008 00:38:56,280 --> 00:38:57,900 You know, they're in the documentation, but they're 1009 00:38:57,900 --> 00:38:58,640 not what 1010 00:38:59,800 --> 00:39:01,860 were actually implemented in the PHI. 1011 00:39:02,220 --> 00:39:04,140 And now this. The interleaver that's in the patent 1012 00:39:04,140 --> 00:39:05,060 is not the one that's there. 1013 00:39:07,060 --> 00:39:08,280 So, we're going to have to figure 1014 00:39:08,280 --> 00:39:09,280 this out experimentally. 1015 00:39:10,720 --> 00:39:12,240 Okay. So, deducing 1016 00:39:12,240 --> 00:39:14,260 the interleaver. This was hard. 1017 00:39:14,500 --> 00:39:15,620 This was the hardest part of all this. 1018 00:39:16,700 --> 00:39:17,480 Bear with me. 1019 00:39:18,400 --> 00:39:19,840 I have some graphics that I think will make it a little 1020 00:39:20,220 --> 00:39:22,320 easier to understand. But just like we did 1021 00:39:22,320 --> 00:39:24,220 with the whitening, we're going to exploit properties 1022 00:39:24,220 --> 00:39:25,580 of the Hamming-Ford error correction 1023 00:39:25,580 --> 00:39:27,880 to get the interleaver to reveal some 1024 00:39:28,680 --> 00:39:29,540 patterns about itself. 1025 00:39:30,220 --> 00:39:32,160 So, remember that most Hamming code words 1026 00:39:32,160 --> 00:39:33,780 contain four set bits except for 1027 00:39:34,340 --> 00:39:35,640 zero and F, right? 1028 00:39:36,780 --> 00:39:37,180 So, 1029 00:39:38,060 --> 00:39:39,660 zero contains no set bits. 1030 00:39:40,100 --> 00:39:41,380 F, all the bits are set. 1031 00:39:42,460 --> 00:39:43,480 So, if we 1032 00:39:45,320 --> 00:39:46,120 craft transmissions 1033 00:39:46,120 --> 00:39:48,020 that are all 1034 00:39:48,400 --> 00:39:50,060 zeros except for one set of Fs, 1035 00:39:50,080 --> 00:39:52,140 and we walk where the 1036 00:39:52,140 --> 00:39:53,680 F is through the packet, 1037 00:39:54,020 --> 00:39:56,220 we can start to reveal some properties of the 1038 00:39:56,220 --> 00:39:58,340 interleaver here. I'll make it 1039 00:39:58,340 --> 00:39:59,000 easy for you. 1040 00:39:59,840 --> 00:40:01,440 Does anybody see what's happening here? 1041 00:40:03,000 --> 00:40:04,380 So, I'll draw your attention to 1042 00:40:04,380 --> 00:40:06,260 the bottom row 1043 00:40:06,260 --> 00:40:06,940 second from the right. 1044 00:40:08,020 --> 00:40:09,760 That's payload for zero F 1045 00:40:09,760 --> 00:40:12,200 and then the rest is zeros. And you can see that 1046 00:40:12,200 --> 00:40:13,840 it's almost perfectly diagonal, right? 1047 00:40:13,960 --> 00:40:15,600 And if you look at the other ones, you can see that 1048 00:40:15,600 --> 00:40:18,240 it's also similarly diagonal with an offset 1049 00:40:18,400 --> 00:40:20,460 one other thing that I'll call your attention 1050 00:40:20,460 --> 00:40:22,220 to is that the most significant bits 1051 00:40:22,220 --> 00:40:23,920 in each interleaver block are flipped. 1052 00:40:24,400 --> 00:40:24,800 So, 1053 00:40:25,940 --> 00:40:27,180 looking at the data 1054 00:40:28,020 --> 00:40:29,700 didn't make any sense until I 1055 00:40:31,060 --> 00:40:32,360 constructed these payloads 1056 00:40:32,360 --> 00:40:33,980 to try to back this out. 1057 00:40:34,660 --> 00:40:35,140 And 1058 00:40:36,220 --> 00:40:38,180 this was the first step 1059 00:40:38,180 --> 00:40:39,300 to start seeing the patterns here. 1060 00:40:39,980 --> 00:40:42,380 Okay, so with this 1061 00:40:42,380 --> 00:40:44,240 we've mapped out which diagonals 1062 00:40:44,240 --> 00:40:45,080 correspond to each 1063 00:40:45,940 --> 00:40:48,300 four-bit positions within, or to each 1064 00:40:48,400 --> 00:40:49,680 of the bit positions within the 1065 00:40:51,440 --> 00:40:52,240 transmitted payload. 1066 00:40:54,400 --> 00:40:56,280 So, with that in hand, we need to 1067 00:40:56,280 --> 00:40:58,240 think about aligning each of those code words 1068 00:40:58,900 --> 00:41:00,400 within each diagonal, right? 1069 00:41:01,800 --> 00:41:02,200 So, 1070 00:41:02,280 --> 00:41:04,040 we can map the diagonals to the code word, 1071 00:41:04,160 --> 00:41:06,240 but the bits that 1072 00:41:06,240 --> 00:41:07,940 we get out of each code word are scrambled around. 1073 00:41:08,440 --> 00:41:10,360 So, we need to start looking a little 1074 00:41:10,360 --> 00:41:12,280 more granularly into each of those diagonals to figure 1075 00:41:12,280 --> 00:41:13,240 out what's actually happening there. 1076 00:41:14,460 --> 00:41:16,120 So, our solution again, just like before, 1077 00:41:16,260 --> 00:41:17,920 is to transmit some known words 1078 00:41:18,520 --> 00:41:20,360 and look for the Hamming-encoded, 1079 00:41:20,480 --> 00:41:22,080 the Hamming-Feck-encoded signals 1080 00:41:22,080 --> 00:41:22,980 within each diagonal. 1081 00:41:24,380 --> 00:41:25,620 So, we'll take a known, you know, 1082 00:41:25,700 --> 00:41:27,680 well-loved known payload here 1083 00:41:28,320 --> 00:41:30,540 and we will map out the diagonals 1084 00:41:30,540 --> 00:41:32,180 into a table. You guys see what's going on here? 1085 00:41:33,420 --> 00:41:34,320 Basically, we know the 1086 00:41:34,320 --> 00:41:36,240 diagonal position from that exercise that we did before. 1087 00:41:36,660 --> 00:41:38,480 So, we're just reading each position 1088 00:41:38,920 --> 00:41:40,380 that we know from where the F was 1089 00:41:40,380 --> 00:41:41,400 into this table here. 1090 00:41:43,560 --> 00:41:44,360 We populate 1091 00:41:44,360 --> 00:41:45,180 this little matrix here. 1092 00:41:46,500 --> 00:41:46,900 And 1093 00:41:48,440 --> 00:41:50,280 here it is next to the data that we're expecting 1094 00:41:50,280 --> 00:41:51,100 on the left, right? 1095 00:41:51,680 --> 00:41:52,980 So, we have the 1096 00:41:54,380 --> 00:41:56,380 unencoded data in the middle column 1097 00:41:56,380 --> 00:41:58,400 there, and finally the parity bits that we expect 1098 00:41:58,400 --> 00:41:59,560 to be applied to it on the right. 1099 00:42:00,520 --> 00:42:02,440 Does anybody see anything here 1100 00:42:02,440 --> 00:42:03,060 right off the bat? 1101 00:42:03,700 --> 00:42:04,680 This might be a little bit harder. 1102 00:42:05,580 --> 00:42:07,800 Again, I'll make it easy. Oh, wait, no. 1103 00:42:07,880 --> 00:42:09,060 Sorry. Jumping the gun. 1104 00:42:11,060 --> 00:42:12,000 One thing that 1105 00:42:12,000 --> 00:42:14,240 just to help us along here, 1106 00:42:14,340 --> 00:42:15,920 if you reverse the endiness of this, 1107 00:42:17,120 --> 00:42:17,520 then 1108 00:42:18,400 --> 00:42:19,340 we start to see patterns here. 1109 00:42:20,280 --> 00:42:22,040 So here, we've got the data 1110 00:42:22,040 --> 00:42:23,700 that we find in these bit positions here. 1111 00:42:24,640 --> 00:42:26,320 And if we go a step further, we can 1112 00:42:26,320 --> 00:42:28,280 start to correlate and map some of those Hamming-Fech fields 1113 00:42:28,280 --> 00:42:29,480 into these interleaver 1114 00:42:30,040 --> 00:42:30,740 codeword positions. 1115 00:42:32,420 --> 00:42:34,300 So, these two fell out pretty, or 1116 00:42:34,300 --> 00:42:35,520 these six fell out pretty nicely. 1117 00:42:36,880 --> 00:42:37,300 Interestingly, 1118 00:42:38,960 --> 00:42:40,260 Hamming parity bits three and four 1119 00:42:40,260 --> 00:42:42,220 were flipped, and that's something that 1120 00:42:42,220 --> 00:42:44,140 was just deduced experimentally by looking at 1121 00:42:44,140 --> 00:42:46,300 the actual values versus the expected 1122 00:42:46,300 --> 00:42:47,020 parity here. 1123 00:42:49,460 --> 00:42:49,860 And, 1124 00:42:50,760 --> 00:42:52,560 yeah, so that's a huge step. 1125 00:42:52,620 --> 00:42:53,060 We're almost there. 1126 00:42:54,960 --> 00:42:56,380 If we apply the forward error 1127 00:42:56,380 --> 00:42:57,720 correction to these 1128 00:42:58,500 --> 00:42:59,500 bits that we have here, 1129 00:43:01,400 --> 00:43:02,100 we've got it. 1130 00:43:02,160 --> 00:43:03,140 That's it. That's the whole thing. 1131 00:43:03,520 --> 00:43:05,900 So, that's the fight. We just went from 1132 00:43:05,900 --> 00:43:08,460 that weird, you know, diagonal chirped 1133 00:43:08,460 --> 00:43:09,600 modulated signal 1134 00:43:09,600 --> 00:43:11,500 to the data that's in there. 1135 00:43:12,320 --> 00:43:14,140 Just based on some open source documentation 1136 00:43:14,140 --> 00:43:16,060 and gumption. 1137 00:43:17,460 --> 00:43:18,360 So, how are we 1138 00:43:18,400 --> 00:43:19,040 able to do 1139 00:43:20,180 --> 00:43:20,600 this? 1140 00:43:23,240 --> 00:43:24,340 So, we have these 1141 00:43:24,340 --> 00:43:26,360 four steps, right? And I hinted at this 1142 00:43:26,360 --> 00:43:27,780 earlier that 1143 00:43:28,210 --> 00:43:29,820 we were able to control for the first two 1144 00:43:30,350 --> 00:43:32,180 and make an assumption about the last 1145 00:43:32,180 --> 00:43:34,260 step, the fec, based on some documentation that 1146 00:43:34,260 --> 00:43:36,300 were leaked. And basically what 1147 00:43:36,300 --> 00:43:37,960 that meant is that the only experimental 1148 00:43:38,420 --> 00:43:40,360 variable that we really had to solve for 1149 00:43:40,360 --> 00:43:42,260 that was really hard was the interleaving. 1150 00:43:42,440 --> 00:43:44,240 But since we were able to control these other three, 1151 00:43:44,440 --> 00:43:46,300 then we had one that was 1152 00:43:46,300 --> 00:43:47,480 we only had one 1153 00:43:48,400 --> 00:43:50,200 variable that was unbounded and then 1154 00:43:50,200 --> 00:43:51,160 we could solve it. It's like algebra. 1155 00:43:52,740 --> 00:43:53,820 Okay. So, what's next? 1156 00:43:54,080 --> 00:43:55,240 You guys want to play with this, right? 1157 00:43:55,360 --> 00:43:57,160 You guys want some tools. 1158 00:43:59,180 --> 00:43:59,960 I'm working on that. 1159 00:44:00,900 --> 00:44:02,440 So, I want to briefly introduce 1160 00:44:02,440 --> 00:44:04,180 GNU Radio LoRa. It's an out-of-tree GNU 1161 00:44:04,180 --> 00:44:06,020 radio module that implements the LoRa PHY. 1162 00:44:07,700 --> 00:44:08,320 I'm working on it 1163 00:44:08,320 --> 00:44:10,120 currently. It's going to be released between now and 1164 00:44:10,120 --> 00:44:11,920 GNU Radio conference in September. 1165 00:44:12,120 --> 00:44:14,160 So, this will be out there. You guys can grab it and play with it. 1166 00:44:17,100 --> 00:44:18,000 You know, it's going to have 1167 00:44:18,400 --> 00:44:19,320 all that good stuff. 1168 00:44:20,180 --> 00:44:21,340 I have a proof of concept 1169 00:44:22,520 --> 00:44:24,320 receiver complete. I just got 1170 00:44:24,320 --> 00:44:26,380 the time warning. I don't think I have time for a full live demo. 1171 00:44:26,500 --> 00:44:27,480 But if anyone wants to see it, 1172 00:44:27,980 --> 00:44:29,860 I will be happy to show it to you right after this talk. 1173 00:44:31,300 --> 00:44:32,360 So, finally, to conclude, 1174 00:44:32,980 --> 00:44:34,060 these LP WANs 1175 00:44:34,060 --> 00:44:36,580 have a ton of momentum and are rapidly proliferating. 1176 00:44:36,720 --> 00:44:38,480 I mean, you're going to be seeing these everywhere with all the money 1177 00:44:38,480 --> 00:44:39,880 they're raising, with how 1178 00:44:40,440 --> 00:44:41,720 much everybody's emphasizing IoT. 1179 00:44:42,160 --> 00:44:44,400 It's inevitable. These things are going to be everywhere. 1180 00:44:45,600 --> 00:44:46,340 One other point 1181 00:44:46,340 --> 00:44:48,320 I want to make is that RF stacks are becoming more diverse. 1182 00:44:48,400 --> 00:44:49,800 When you think about wireless, 1183 00:44:50,000 --> 00:44:52,500 oftentimes in the enterprise we think about 802.11. 1184 00:44:52,860 --> 00:44:54,300 But wireless is not just 1185 00:44:54,300 --> 00:44:56,100 Wi-Fi anymore. You have to start to think about 1186 00:44:56,100 --> 00:44:57,660 these protocols. Bluetooth, 1187 00:44:58,420 --> 00:45:00,520 cellular, it's all out there 1188 00:45:00,520 --> 00:45:02,260 and it's all starting to become connected 1189 00:45:02,260 --> 00:45:03,660 to the internet and more and more interrelated. 1190 00:45:05,200 --> 00:45:06,180 Third, we've 1191 00:45:06,180 --> 00:45:08,100 shown how to go from some obscure RF 1192 00:45:08,100 --> 00:45:09,940 signal to bits. And 1193 00:45:09,940 --> 00:45:12,340 fourth, we're adding a new tool to 1194 00:45:12,340 --> 00:45:13,340 the RF security researchers 1195 00:45:14,160 --> 00:45:15,540 arsenal. So you can start 1196 00:45:15,980 --> 00:45:18,220 to take a look at this brand new network that is 1197 00:45:18,400 --> 00:45:20,240 totally greenfield and start to 1198 00:45:20,240 --> 00:45:21,960 find things and make it better. 1199 00:45:22,840 --> 00:45:24,320 Finally, I want to acknowledge my team at 1200 00:45:24,320 --> 00:45:26,300 Bastille, especially Bell and Sieber 1201 00:45:26,300 --> 00:45:28,260 for helping make this happen. 1202 00:45:28,420 --> 00:45:30,440 The open source contributors for starting 1203 00:45:30,440 --> 00:45:31,840 to look at this and 1204 00:45:32,860 --> 00:45:34,300 the wireless village for hosting. 1205 00:45:35,000 --> 00:45:36,320 Thank you very much. I'm happy to take 1206 00:45:36,320 --> 00:45:36,660 your questions. 1207 00:45:44,660 --> 00:45:48,260 Okay, so the first 1208 00:45:48,400 --> 00:45:50,020 question is, have I heard from the company in question? 1209 00:45:50,540 --> 00:45:52,080 And I actually have. 1210 00:45:52,320 --> 00:45:53,400 So, you know, I 1211 00:45:53,980 --> 00:45:55,700 first published this research back in May 1212 00:45:56,280 --> 00:45:58,280 and, you know, not too 1213 00:45:58,280 --> 00:45:59,800 much happened. But finally, 1214 00:46:00,340 --> 00:46:02,000 I did get an email from 1215 00:46:02,980 --> 00:46:04,260 one of the guys 1216 00:46:04,260 --> 00:46:06,300 who worked at the, from one of 1217 00:46:06,300 --> 00:46:08,280 the founders of the startup that invented this modulation 1218 00:46:08,280 --> 00:46:10,300 that was bought by Laura. So the guy that 1219 00:46:10,300 --> 00:46:12,120 invented Laura shot me a note 1220 00:46:12,120 --> 00:46:13,260 and said he thought it was awesome. 1221 00:46:13,640 --> 00:46:15,820 I haven't gotten any 1222 00:46:16,300 --> 00:46:18,240 CNDs or anything legal, but I 1223 00:46:18,400 --> 00:46:19,960 did get a digital high-five from the 1224 00:46:20,600 --> 00:46:21,600 guy that made the PHY. 1225 00:46:25,060 --> 00:46:29,980 No, it's being applied in 1226 00:46:29,980 --> 00:46:31,380 the inverse order. 1227 00:46:31,980 --> 00:46:32,820 So, yeah. 1228 00:46:41,440 --> 00:46:42,360 That's a good question. 1229 00:46:42,540 --> 00:46:44,160 I actually haven't looked at that because 1230 00:46:44,160 --> 00:46:44,960 I only have one radio. 1231 00:46:47,020 --> 00:46:48,280 Yeah, I did do 1232 00:46:48,400 --> 00:46:50,240 some look at some basic jamming. 1233 00:46:50,900 --> 00:46:52,380 Laura's really good in 1234 00:46:52,880 --> 00:46:53,880 contested channels, so 1235 00:46:54,400 --> 00:46:56,340 even just using a usurp on max power, I 1236 00:46:56,340 --> 00:46:58,400 wasn't really able to, you know, jam it with wideband noise 1237 00:46:58,400 --> 00:47:00,360 or anything. I really wonder what would 1238 00:47:00,360 --> 00:47:02,300 happen if you were to stack a whole bunch of Laura carriers 1239 00:47:02,300 --> 00:47:04,240 on top of each other, if that would just totally 1240 00:47:04,240 --> 00:47:06,240 throw a receiver out. Yeah, exactly. Just 1241 00:47:06,240 --> 00:47:08,180 imagine just drawing diagonals all over the 1242 00:47:08,180 --> 00:47:09,040 900 MHz spectrum. 1243 00:47:09,660 --> 00:47:12,360 The other question was, was there any 1244 00:47:12,360 --> 00:47:13,700 particular reason you used 1245 00:47:15,120 --> 00:47:16,280 you didn't do, like, 1246 00:47:16,280 --> 00:47:17,320 quasi-demodulation? 1247 00:47:17,640 --> 00:47:22,500 Would that work for MFSK? 1248 00:47:22,640 --> 00:47:24,020 Basically, the whole point of de-chirping 1249 00:47:24,020 --> 00:47:26,320 is that it converts those signals 1250 00:47:26,320 --> 00:47:28,320 from the chirps to those nice 1251 00:47:28,320 --> 00:47:30,200 linear pulses, so we can basically treat the whole 1252 00:47:30,200 --> 00:47:32,060 thing like multiple frequency shift keying. 1253 00:47:36,640 --> 00:47:42,200 No, I hadn't thought 1254 00:47:42,200 --> 00:47:42,360 of that. 1255 00:47:43,760 --> 00:47:45,500 Where can you get Laura hardware? 1256 00:47:46,480 --> 00:47:48,160 So, hardware's out there. You can get dev 1257 00:47:48,160 --> 00:47:49,680 modules on DigiKey. 1258 00:47:49,960 --> 00:47:50,840 They're not too expensive. 1259 00:47:52,160 --> 00:47:54,160 Of course, you know, ICs are available in volume, 1260 00:47:55,460 --> 00:47:55,820 but 1261 00:47:55,820 --> 00:47:58,000 honestly, like, there are more and more signals in the wild. 1262 00:47:58,140 --> 00:48:00,200 I mentioned, I had that slide about my road trip to Portsmouth. 1263 00:48:00,740 --> 00:48:02,220 I had to go to the source 1264 00:48:02,220 --> 00:48:04,000 to find it there. I see Laura everywhere 1265 00:48:04,000 --> 00:48:06,120 now. I actually haven't checked here in Vegas, but 1266 00:48:06,120 --> 00:48:08,260 you know, all over Boston, all over San Francisco, 1267 00:48:08,460 --> 00:48:09,560 it's popping up, so 1268 00:48:10,240 --> 00:48:10,800 it's out there. 1269 00:48:11,060 --> 00:48:14,320 Mainly being used for, like, industrial type stuff, like monitoring 1270 00:48:14,320 --> 00:48:16,260 applications, or just, like, tourist stuff? 1271 00:48:16,780 --> 00:48:18,260 So, it's kind of all over the 1272 00:48:18,260 --> 00:48:19,720 board. You know, I mentioned the 1273 00:48:20,560 --> 00:48:22,280 heating oil company, Senet, that 1274 00:48:22,280 --> 00:48:24,200 is monitoring gas tanks in New 1275 00:48:24,200 --> 00:48:26,220 England. I think 1276 00:48:26,220 --> 00:48:28,220 there are people doing vehicle fleet monitoring, you know, 1277 00:48:28,240 --> 00:48:30,160 just reporting GPS and things like that. 1278 00:48:30,360 --> 00:48:32,020 One really interesting case that I 1279 00:48:32,020 --> 00:48:33,640 heard about, I met this guy at a conference 1280 00:48:34,340 --> 00:48:34,780 who 1281 00:48:34,780 --> 00:48:38,240 he was making 802-15-4 connected 1282 00:48:38,240 --> 00:48:39,700 rat traps. These are 1283 00:48:39,700 --> 00:48:42,080 things, I know, right? IOT, 1284 00:48:42,260 --> 00:48:42,340 woo! 1285 00:48:43,900 --> 00:48:46,120 You put these things in your crawl space or whatever, 1286 00:48:46,280 --> 00:48:48,020 and it used 1287 00:48:48,020 --> 00:48:50,120 a thermal sensor to 1288 00:48:50,120 --> 00:48:52,260 detect when a rat had been caught 1289 00:48:52,260 --> 00:48:54,200 and actually killed, right? 1290 00:48:54,240 --> 00:48:56,100 It looked for, like, the temperature going down to 1291 00:48:56,100 --> 00:48:56,580 room temperature. 1292 00:48:59,480 --> 00:49:00,320 This is 1293 00:49:00,320 --> 00:49:01,680 a real thing. I'm not making this up. 1294 00:49:03,260 --> 00:49:04,040 But yeah, so 1295 00:49:04,040 --> 00:49:06,080 he had made that on 802-15-4 in Zigbee, 1296 00:49:06,200 --> 00:49:07,440 and he was 1297 00:49:08,340 --> 00:49:09,940 psyched about Laura and couldn't wait to make 1298 00:49:10,900 --> 00:49:12,120 Laura-connected euthanization 1299 00:49:12,120 --> 00:49:12,640 for rats. 1300 00:49:15,900 --> 00:49:16,460 Anyone else? 1301 00:49:17,340 --> 00:49:17,960 Okay, I'll be around. 1302 00:49:18,300 --> 00:49:20,120 Come find me if you want to talk about this. Thanks again. 1303 00:49:25,060 --> 00:49:25,900 Okay, thanks, Matt.