[MUSIC] Now we'll talk about MANETs, Mobile Ad Hoc Networks and how there used in Internet of Things to connect Internet of Things objects to bigger networks, to the Internet itself. And a we'll talk a little bit about how the code that we're gonna write. That your gonna write in class, and how it a, you won't directly have to know the details of these thing because you'll be writing generally high level code, but still it's important for you to be familiar with these concepts. So a Mobile Ad Hoc Network, a MANET, is a self-configuring network. By self-configuring we mean that the hosts in the know, in the network configure themselves because they're moving around all the time. So their connections, their connectivity can change across time. So for instance in this picture, you see a bunch of nodes, you see cell phones, some cell phones, a car, right. Whatever the IoT device is there are a set of them, and then at the top middle is this access point. So this access point is the thing that connects our MANET to the main Internet, okay? Now a MANET could be just independent and not connected to the Internet at all, but most commonly we're going to be connecting to the Internet some way through an access point. Now the access point is typically, usually not mobile. It might be, it could be mobile, but commonly it's not mobile, and often wired, right? And so it'll have wireless connections to all the IoT devices, but it might have a wired connection to the main and Internet. So, the access point maybe isn't mobile but everything else is, and the way I've drawn the diagram up there. I have lines between two nodes if they can connect, if they can communicate directly to each another. Meaning if they're in radio range and they have communication, right? So sometimes, for instance, you look at the cell phone all the way on the left versus the cell phone all the way on the right, they don't have an edge directly between them. Because maybe they're out of range of each other. But they're both within range of the same access point, so they can communicate to each other through that access point but not directly in this particular configuration. So, the connections between these components changes all the time, because these things are moving, right? So maybe, these two cell phones which couldn't talk to each other before, not directly anyway, the people who have the cell phones, they walk near each other and suddenly, there's a connection directly between them. But, maybe the car can no longer connect to them because it just got out of range, because it drove past. So these networks, their connections are coming and going overtime. So that's what a Mobile Ad Hoc Network is. Now, important aspects of MANET, one is a power budget. So you really have to worry about power when you're talking about MANET, because MANETs each one of the devices mobile, these IoT devices, they're all mobile They're all running off of batteries and the batteries can run out. So you have to generally change the protocol to be more power restrictive, right? It has to save power somehow. So that changes a lot of the way you do networking. So you send less data, for instance. You're restricted to sending less data because every piece of data you send that's gonna be some kind of power that you use to drive the antenna, right? So the battery is really important cuz the batteries are heavy, right? I mean batteries are often the heaviest component, or usually the heaviest component in these systems. I mean I think about my quad copter. The battery weighs as much as the rest of the whole copter. I mean it's so big, right? And that thing lasts for 15 minutes of flight time. It's ridiculous. But you get the same thing with cell phones and all this so where the battery is if not as heavy and everything else, at least it's the heaviest component in the system, and the biggest single component in the system. So battery power is really important when you're talking about MANET so you change the protocol to save power. In addition, you typically have lower data rate because you're using less power you have to send data more slowly. So, you have less of a data, lower data rate. An example, sort of a ball park example, is take Bluetooth. So, you're familiar with Bluetooth right? Bluetooth and compare that to Bluetooth low energy. So, Bluetooth is a network protocol, wireless. Bluetooth low energy is another, is also a network protocol derived from Bluetooth but is a low energy version of Bluetooth. So Bluetooth, you can send video across Bluetooth. You can get enough data rate sent to transmit video reasonably well, okay? Now Bluetooth low energy, there's no way you get the same data rate. It uses a lot less power but you get a lot lower data rate. So you can't send video. So the fact that you're going to low power restricts you in terms of your data rate and that restricts your functionality in a lot of different ways. Security, often security costs you in terms of power, right? So say you wanna do encryption, right? You wanna take all your messages and encrypt them before sending or something like that takes power, right? It takes power to do those operations, to encrypt the date, decrypt the data. So security, has a cost in terms of power and since your power constraint maybe you can't do as much security as you wanted to do. Also things like anti virus tools, right? You never see anti virus tools for cellphones or I think such a thing exists but it's not common, right? But if you talk about an IoT device, like a watch or something. They don't have antivirus for that because the computational power just isn't there. It doesn't have the extra cycles to be able to do antivirus tasks at the same time as doing its regular tasks. The reason for that is because these IoT devices, and we talked about this before, they're designed to be much more efficient. Meaning a desktop laptop 99.9% of the time, it is being underutilized. Very rarely are you fully utilizing that processor. So, it has extra cycles, extra power, to be spent doing antivirus tasks or something like that. Embedded systems, which IoT devices are they don't have those excess cycles, right? They use all the power they have, right? Or most of it. So they don't have extra cycles to just be doing anti-virus, without hurting the regular function of the system. So security often suffers in an IoT device, because you don't have the power budget to do it, and maybe also you might not have the cost, you might not have the money to pay for the extra hardware that you would need. Now in practice [COUGH] when we do network programming later in specialization. There are levels in the stack, right? There are different layers in the stack, Application, TCP/UDP and all this. But we don't have to touch those directly in our coding. So, when we use an Arduino or a Raspberry Pi you will be calling library functions at the application layer. So, your code is gonna be at the application layer, almost exclusively at the application layer. So, you call very simple functions which will take care of the details for you. So, for instance, as an example, you might have a function called send message an application layer function that sends an message to an IP address. Maybe you get, actually typically you'd get an IP address and a port number, which we'll talk about later, you call, send a message, and it'll send that message to that IP address and that port number. And all the details of TCP/UDP, IP and data link. That's all handled by the protocol stack, all you do is call the library function. Same thing on the receive, maybe there's a ReceiveMessage that does a similar thing. So you're making these calls at the application layer of the simple library function, and the details are being handled by the library code itself, so you don't have to worry about that. Thank you. [MUSIC]