 Good afternoon. My name is Benedict Gaster, but I'm supposed to start exactly on 12, so it's 12 now, so I get enough time to plan the streams going out, and so we're going to do that. I had no idea if I'm in front of the camera. So I'm from the University of West of England in the UK. Some of my students are here, which is great. And I teach, and I also do research, and at the moment my research is into the internet things, and I'll talk about what that is, and particularly into radio technologies, but I'm also interested in how that can reach out to communities and actually have an impact, rather than just being, as you'll see in a minute, to buy stuff or whatever. But before I start, I want to say, so I'm from England, and I have to say this because it's a terrible time at the moment, and I did not vote to leave the opinion, and it was a fucking stupid thing to do. And all of this hatred and all of this stuff, we have to work as citizens and everything to stop it, because it is horrible, and many of the people that are contributing to the open source communities come from all over the world, including these countries that are now banned, and it's just awful. And so I wanted to say that because I'm in a public stance, and I need to stand up, I think we all need to stand up and say that all the time, and tell our government, and the internet as things. And this talk will mostly just be introducing you to, I'm not going to get into lots of really low level, regular stuff, whatever it is, some really interesting ideas around the modulation of that technology and everything, but it also, I think, has a cultural impact. I've probably talked for way too long, so I'll try to keep it nice and fast. If you do have questions, just ask as we go along. These are the kind of things I'm going to cover, what I mean by the internet of things, which is low power, where there are networks, more itself, the things network, which is this amazing open source, crowd source community that's come out of Holland, and is now approaching on the world, that is encouraging access, open source, and free access to the internet of things for everyone. And I'm not going to be talking about very much, but I do have the work that we're doing in Bristol, I just have a link to it really. But internet of things, well, it can mean a million things to different people, and it's the idea, I suppose, literally that we're going to connect devices together, potentially in a meshed network, and then they're going to communicate with other devices, you know, systems, the cloud, and other things via the internet, and whatever we might find the internet thing. And I really think that it's a slightly misnomer, because in some places you don't need to be connected to the internet at all, right? It could just be an internet cable going to a cloud service and running devices locally, but lots of that technology and the things that we develop over the next few years could apply in these different situations. And okay, I don't like Amazon Dash, but I'm sure many of you have heard of this thing, Amazon. They're quite a good company. I do use them all the time, but I'm not going to deny it. But they also like this thing where you can buy, if it's like five bucks, or five pounds, whatever, or five euros, and you get a little button that you can press and you put it, touch it to your fucking washing machine and press. You know, when you run out, a purse that is in the UK that a lot of people use, you can automatically buy it from Amazon, it will be sent to you. I mean, the thing is horrific, but it exists. I suppose the most famous one, I lived in the US for a long time, the most famous one that people did was, you know, control that. You can use your phone to control how hot your house is from, I don't know. I'm sure it's useful, but not things. So there are lots of different things. I think the kind of things that have to consume the side of the internet things. But I think a real problem that I have with all this is that, you know, these are fine applications and everything, but I don't know if we really need to build a billion devices just so we can buy something or control the heat in our house, because if that's really it, then I think we've fallen quite short of anything that's useful. So from my perspective, and all reports are saying that over the next two to three years, we'll have a billion devices enabled via the internet of things. I don't know whether that's exactly true, what will happen, but by 2030, they're talking, you know, multiple billions, maybe a trillion. You know, if that's the case, then we can do a lot better than just buying things, right? You know, it can change lives. You know, I don't need to be able to automatically buy some washing liquid. I know how to go to the shop and do that. You know, that's not going to change my life that much. We could, for example, these guys can't go into this bin because it's unstable, there could be gas leaks and everything. We could build devices which we could just power shoe in and use them to tell us whether it's safe to go. Obviously, it couldn't tell us it's structurally safe, but it could measure gas levels, things like that. There's leaks and things like that. You know, that would be amazing. We might have off-coats who had one just in Italy, not too long ago. And just in Bristol itself, air pollution kills up to about 200 people a year and there's some parts where Brussels is a very hilly city and you go into it and some parts down there where kids are walking to school and they're coughing when they're getting to school, right? It's really easy for us to build. I mean, you know, you can buy one of these as a little media sensor, but you could buy a knock sensor, pollution sensors, you know, very cheap, right? And we could put these in schools of virtually nothing if... And this is the real question, the real thing, if it's easy for those things to get online and to build data and make it easy accessible. One of the real problems that people have is this thing called onboarding, where, you know, you come up with your amazing device, you take it into somewhere like a house, a medical device or a school, and then there's all sorts of ladders and hoops. You have to jump through to get it onto their bloody Wi-Fi network if it even works, doesn't drop out and things like that. And of course, then you have to make sure you're in the right range, whereas the potential is if, imagine you just turn up with device, it was already connected, because the radio network that you were connecting to was just, you know, covered miles, kilometers for you people here, you know, oh, okay, confused and whatever. But you know, imagine we could do that, that would have, you know, could have real implications on that. So one of the products we talked about earlier, I've been working on with Bristol City Council and a place called Melmedia Centre, was they developed these little frogs that people could put in their houses to measure the damp humidity, it's just measuring humidity and things like that in an area. And they had a little frog because it made it a bit more, what people would think it was, the implications. And the first version just uses an SD card, right? They just stuck it in, so it's just a Raspberry Pi with humidity. I mean, it's really simple stuff, a little SD card. But that meant that every couple of weeks they had to go and pick up this SD card and do it, and then they had to transfer and do something with the data. These are just volunteers mostly in community centres and things like that. That's really painful, right? So they went up and put it onto a Wi-Fi system and then it turned out, you know, some of these people who are living in accommodation where damp is a real problem and landlords are not willing to fix it, they don't have Wi-Fi, right? These are some of the poorest people in Bristol. Some of these people we just talked about in the previous, my speech, you know, refugees coming from the most awful places in the world, you know, in terms of war and stuff, not awful. But they didn't have it, you know. So it was amazing. I think it was something like 62% of the houses they went to in this one area where they were looking at them, didn't have broadband, all Wi-Fi of any sort, so they couldn't do it. And so it was really annoying, right? That's really annoying. None of those houses could do it. We couldn't do the SD card work, of course, but then you had other problems. So there's lots of things, OK, that I think the IOT could do. There's lots of applications, you've got a business that can make you money, too, or whatever, but I'm less interested in that, from my perspective. I'm lucky now to work for a university that wants to make money, but they don't make me have to make money. OK, so that was a brief introduction to kind of what I think internet things could do, some very simple applications. But what is it from a kind of high-level perspective? Well, here on this left-hand side is what we see as the devices that, you know, you might build. And mostly I'm looking at sensors. They don't have to be, but, you know, I think if you want them to be very low-power and so forth. So these little red dots on the left-hand side. But in the middle, there's going to be some way that we're communicating to, I suppose all of these are actually, there's little blue boxes here, the routers are called the gateways, and these are the things that are receiving the radio signals from the devices. And then, literally, these are just repeaters, right? They're really just taking the radio signal, converting it into an IP packet, and then transferring it onto the internet. And once you're on the internet, you know, you're at that point. And the class, the way that we handle most of this stuff today is we use cloud services. And I'll talk a bit about this later on. The Things Network, which is this organization out of Holland, that's what they really provide. That's the killer thing that they provide is they provide an open-source and free back-end or back-haul service for routing all of your information from these devices into their cloud services, you know, into their back-haul, and then you giving it back out by node QTT or whatever, you know. All that stuff is new in terms of technology. It already exists, you know. We know how to do all that stuff, whether it's via Amazon or Microsoft or whether we have open-source software. We know how to do these things. And what is the interesting part is that it's the way that it kind of, it works as a conduit and feeds us through. And of course, at the other end, you're going to have your app, whether it's running on a server as a database or whether it's just feeding straight into a web page, you know, whatever. That's actually consuming that data and making use of it. Okay? So, in the end, it can be many things to many people. And the material that next few slides I'm going to show you is really just the things network that we kind of used in. We manipulated, I can't say I've come up for it, but this is how they, and we visualize how the Internet of Things work, and it's what I've just described you. So here on the left-hand side, we've got devices. This one, the next one in is gateways to the network, then the cloud, and then not forgetting that, you know, at some point you need to make use of everything that you've consumed. And a lot of stuff, certainly when I started working on these projects, I really only made it up to here and made sure that it was all nicely sitting in the cloud, and I was like, yes, my device has worked, but that's really not that useful if we actually want to change real lives and everything we need to be able to present that data to them. And I think there is a whole, something that I've learned, and I'm not going to talk about it at all in this talk other than now, is it's really important to understand that whilst we maybe have a look at graphs and actually just read spreadsheets or read data that comes through, when you try to take it to people who have all sorts of things and haven't had that much technology experience and stuff, presenting it to them is not a way that they can consume that data very easily. So that's just as important to think about that we can generate huge amounts of open data, but if it just sits there on these cloud servers and it's just not some ones and that sort of thing, it's really not that useful. You know, we have to be able to take that and present it to the world. And I do want to say that I think the open source community maybe has not been brilliant in the past of doing that, you know, and, you know, it's the technical side, not, but I think if we really want our thing to have an impact beyond the Linux and the cloud and stuff, then I think that's an important aspect to look at. And I need to do that too. Okay. So devices just connect things to the internet world via the cloud network, nothing really interesting, I'll show what device looks like in a bit. And gateways, they allow you to extend the reach of the network. And so forth. And of course, the cloud is just really just like any other cloud service, but it's designed specifically in this case to handle the internet traffic coming, the internet things traffic coming from these lower devices. And I suppose the real thing, it's only really useful in my perspective if we can make applications that are actually really making use of it and present it. They do use a phone for this. I have some troubles that they use. This has a little icon, things network, because I think it should be more than that. You know, it could be to produce reports. You know, if we want to actually change legislation in the UK, then it's not about having phone apps. It's about actually producing reports and stories that we can take to the government or the council initially that we're working with to persuade them to consider legislation against landlords who are not compliant to damp, for example. You know, we respect to things. Okay. So that's my introduction to that. And I'm going to talk about now about low-power, wide-area networks. So before we get to more, I just wanted to introduce what I mean for this. So this is LP1. I'm sure many of you have already heard of this. But the key thing is that it leads to low power. We really want these devices to be able to live out in the wild for potentially years. Right? You know, so Microsoft, I know we want to talk about them here, but they talked about five to ten years would be a reasonable battery life for these kind of devices. I have to say, the moment we're looking at two years, because, you know, it's hard to, you know, imagine doing the same job in ten years, you know, or whatever, but realistically, we want them to be able to take them out, put them into the environment or whatever, and not have to, that's the critical thing, is not have to go and maintain them regularly. That's important as well because of we put these networks, these guys up in Bristol, the locals on Bristol City Council, lamp posts, and that was really the first time they were like, great, then every time we wanted to go and modify them, they said it would be a hundred pound, just to get 100 euros or whatever, to get someone to come out with a ladder. Of course, we couldn't get that ladder, they had to get that ladder because of it. So, you know, that's a real serious issue. If it's a hundred pound over two years, that's maybe not such a big issue, but if it's a hundred pounds every month, or years, then it's a real pain in there. So it's just basically a type of wireless communication, telecommunication network, I'm not going to go into that too much, and the cortical thing is that it supports communication over a long range, okay? So one gateway, and this is, you know, looking at the numbers from this venture company that I'll talk about in a second, could potentially be up to 10, 20 kilometers. Now, five miles in any realistic, I think the best we've seen is maybe two to three kilometers, but before you start going outside, that doesn't really look anything that's ever going to be useful or just not getting any connection at all. And the way that it works, which I won't go into too much detail here, the further you are away from a gateway, the less the bandwidth, you know, it's similar to what they do that, but they can reduce the, so I've got to be honest, realistically, I think two to three kilometers is good, and of course then you're going to have an antenna, full wave antenna, that's very high up, no interference, things like that. So again, depending on your city, that can change. I'd be really interested if anyone is here from Amsterdam, how they found, because their city is so different from ours in terms of geography and the way the hills, and that'd be really interesting to see what they found for coverage. So it's not an idyllic world, when you do really data sheet, everything's always perfect, it all works at 3.3 volts until it doesn't, and that sort of thing, but it is pretty good. And it does, amazing thing about this, it does give you the idea that you could go out of an urban space, you don't no longer have to be in an urban space to make this work potentially, people have talked about doing it with rhinos, I don't know if it's just an advertising thing on their website, but they've talked about doing rhinos in Africa or in Dublin, they've been trying to look at, or in Ireland at least, looking at dolphin populations and stuff and things. So it doesn't just have to be in the city, can be done there, but it is very morbid rate, the bandwidth we're talking is pretty low and so we're not going to be streaming high definition 4K video, but then that's not the idea of this thing. The devices are operated by battery, now they don't have to be, absolutely, we're doing this with the Bristol City Council, we're putting them around in these maps and they actually use street lighting power into these maps and so we debated for ages should we just run them on batteries, but we couldn't really justify it when we could just get a 5 volt, you know, coming out. So, but the idea is that they can be run off battery and the lifetime should be a good long time, okay. So as I say, again these are just marketing slides from the companies or even from the things network or whatever, I'm not making any claims you need to get out there and actually do measurements, we have been doing measurements and the range is not quite what they're claiming, but you know, you know, maybe you boost the signal or whatever. But here we're seeing that you know, cellular networks, you know, along the ranges and along the battery life are, the range is actually pretty good for cellular networks but battery, anyone's at their phone, of course if you turn Wi-Fi off and you're trying to find the battery, Wi-Fi would be better. Look at all the next way, it's Wi-Fi is not brilliant for battery, but it does have reasonably long range, not brilliant, but up here, the network is supposed to be the kind of compromise between these things. Again, it's always trade-offs and you do that and I think that, I don't know if you're aware, but Bluetooth is a technology that's been, there's quite a lot of front and out things and people talk about it quite a lot. It's pretty nice because it runs at high frequency so you get good indoor penetration which you don't get with Laura for example, but the range has not been great but then Bluetooth 5, which has just been announced apparently four times the size of range, can't get my hands on a device so I couldn't tell you whether that's true or not, at least that on paper that's what they're claiming. So there's going to be some more trade-offs over the next few years and there's absolutely lots of different technologies for these wide area networks, low power, where the SIGFox is one for example and they all have different trade-offs and I've got to be honest, I'm not going to talk too much about that in this talk, but I think Laura is a good compromise between all the things about price, about range and power. Other people might argue different things and so I'm not at all proclaiming that one is better than the other. Here, from a more data-rape perspective, you can start to see that, you know, everyone's talking about, we're not everyone, but you know 5G at the moment that seems to be the big topic in the UK, you can get lots of money if you're doing research into 5G or some startup. So we're looking at these huge data rates and things. It's point-to-point radio communication, you know, I don't know, maybe a hundred meters if it rains, maybe your signal doesn't work as well, that sort of thing, but you can stream 25 video channels at the same time, whatever. I've got those, someone actually told me they're in the startup company and they said, oh, your application is that you'll be able to go to the train station and download five HD videos concurrently. And yeah, exactly, I tried to keep a straight face but I honestly couldn't see what the advantage of that was. But anyway, I'm not interested in that, I don't work for that company. So, there we go. And let's have a look, let's have a look at standards, H02P11, H02.11P, for example, is the, the IEEE WAVE standard, which is looking at auto, you know, vernacular, for vernacular networks, they're providing latency guarantees, not just bandwidth guarantees, and so that's important, I suppose, for cars that are driving around, you don't want them to crash. So again, very specific and the wide-air ones that we're looking at are very specific for a certain range of applications that don't solve everyone's problems. Oh, sorry. So it's based on regular modulation. So this is, oh, sorry, I think I've, yeah, sorry. I was teaching me to have slides that go down and across. Okay, so, just very briefly, we're going to talk about messy networks and why they're great for IoT. And what I mean by that, I'm not going to go into technical, but we're going to start looking at more now and we're just going to get a little bit of background why this works. So, what I mean by that, you need to very carefully place cell towers around, and in particular, there's a thing called, there are many more of them, but the most important thing is that you care about this handoff. And the idea is that, if you're walking with your mobile phone and you're moving between one transmitter or receiver and another receiver, you don't want to drop the audio call, right? Because you know how annoying it is to drop an audio call. And so they spend a lot of money on this. It's really hard science. Hard science does cost money. There's no getting away from it whether it comes from the government funding or company fundings. And these cell towers, if you estimate the cost, even though they might not cost 50k euros to build in terms of research and everything going into it, that's the potential what you're talking about. At least that's what they tell me. So these are not sort of things that you and I are going to be putting up around the space that much. IoT networks can be messy and all I mean by this is that we can just stick gateways in every light. They can overlap and they can we don't care about handoff, right? And actually the way that the Azure works is that you can often duplicate messages and the back end will take care of that and things. And the critical point around this whole point is that they don't carry calls, okay? We're just sending data. And of course you all know from your courses on TCIP or whatever that you know we came up with some very strange network protocols to handle that. But anyway it's important and so that means that in reality they don't really need to be very intelligent. And all I mean by that is that that means they don't need to be very expensive. You know I'm not saying they're dumb. You know they've still got pretty smart computer chips and they've done smart things over the years. All they really do is just four packets from the devices to the cloud, okay? And okay you've got all this radio modulation at a lower level but as most of us don't really need to worry about any of that you know it's interesting how it works but really you can just see it that's pretty much the same way that you would send and communicate on the internet and send over things, okay? So I think really the question of this is that with the help of an open source hardware and software where the people can build these IT networks and that's huge right and that's a real implication is that we can actually start to do it ourselves for companies like Orange or whatever to come build them for us we can do it ourselves and that's what the things network actually inspired me with their work that's exactly what they did they went on Kickstarter and raised money to fund their first gateways around Amsterdam I can't remember how much the 12 maybe initially I can't remember and then I think they're up to 39 but you know you can do it right and it's had a good impact and actually not only did that work have an impact build them in Amsterdam it had a good impact on me it was very great and one day I'm not even going to remember let's talk about that's all right let's talk about NERA and NERA WAN for another little bit okay so NERA is based on very good modulation technology developed by a French company who acquired by SEMTech in 2012 and I've got to be front of you this bit of the stack is not open source I'm sure I expect I've never checked it they've got lots of you wouldn't be able to hack it I'm not that interested in hacking now I know yes yes yes so there was an interesting talk about a group who reverse engineered law and and you can see there's actually this online there's a couple of people who have bought SDR systems to do that so you can do it absolutely and it's not that complicated and certainly if you're interested in radio technology but I'm not sure they will be able to build products with that then maybe get a bit annoyed at us after a while you know too much and to be honest you know we live in a world where you know I've got an internship in here and stuff I use a lot of open source software if I can but I'm not going to tell you I use only open source software OSX for example is not open source but we've got we've got these chips okay and that will be it is closed and we've got everything but everything above that is pretty much open so for example there's the lawyer alliance and they've developed this thing called lawyer for wide area networks called lawyerWan and especially just the Mac layer to standardize and extend the physical layer that spec is open source you can implement it yourself if you buy a chip which I'll show you in a bit for example microchip they just run them zero in here as a software stack ST have a similar thing which they've just announced they have yeah someone's got one there and you can write that stack yourself it wouldn't be a trivial piece of work but it wouldn't be that hard they're more difficult than writing a an IP stack generally okay so the specification is open sourced key features so it's end to end encryption and so security so this is really important there's a security organization in the UK and I was funding was saying the number one concern about IOT is security security security security is their motto or whatever and clearly it's incredible how many devices there's an electronic store in there where we live called maplins which be that radio shack I suppose although not as good and you can buy a carp a fish it's a carp and God knows what it does but when you get home apparently you're supposed to get a little app and you connect that carp to the internet I don't know maybe it sends humidity or whatever who knows but someone showed me it's snooping the that thing whilst you're onboarding it you have a little text messages with your like literally had a console snooping it nothing no you know your password and then the person then connected to Google and put their Google account in and there was the password I mean that's insane right and when we were when it was just yeah okay so security is really really important more has it built in from the ground up and that's great it has a adaptive database optimizations which means depending on what you're saying it can also be used to how far away you are from gateways and stuff to adapt it it has quality of service although the class there's three different types of devices that can connect to Laura and I think that class A which is what most of us have been using to date doesn't have that quality service and it's only in the 1.1 Laura Wang specification where they've started to allow class B which does have this and that will be important it's unfortunate that at that moment when they did that they then started to talk about going to that's one of the things about Laura I'm nice and spectrum at the moment so that's advantage but they're now talking about going to nice and spectrum at least that's what they've mentioned and they said maybe one day we would that was in their tweet and I don't know what the implications are that concerns me because then maybe it's not open to all if they do that and I don't know what the implications of that are but there has come some concerns okay Laura has a star of star topology so this is really good for database networks and these sorts of things and they claim there's the best compromise between a range of communication so amount of communication number of base stations gateways so you can minimise how many you could have for example and device battery life and obviously clearly these are important because we'd like to minimise the number of gateways that were actually necessary to deploy to get the cover a region and but at the same time we also want to make sure that device battery life is great and that has an implication on how your your range and what bit rates you're sending out the communication between the device and the gateway uses very different frequencies and channels and data rates it uses frequency hopping and other techniques to do this it's not straightforward but it's it's low level regular which I'm not going to go into too much but it gives reasonable range of bits per second that you can do transfer at that range it is important to know that we are talking about very small amounts of data we're not going to be sending high amounts of data per package a data rate to rate means that it can manage database of connected devices as they go dynamically and the end device so it changes channels every time it tries to send a packet it will change channel in a pseudo-random fashion and the most important thing about this is that it ends up providing diversity within the frequency range of the region that you're in so hopefully that would pretend robustness against interference now of course just like any system where you are going to get interference quite potentially you know it's interesting we have about I think probably about 50 known devices that are live as part of this council project that we're doing in Bristol's city so you're not going to get much interference but they'll claim that they are Semtech and I'm a lawyer Alliance claims that you could have tens of thousands of devices communicating and I would be really interested you know we haven't had that many you know what's going to be the implications once you have that many devices and if you really want the internet things to be successful potentially we could have that many devices so the bands I send bands they vary depending on your region as I said it's a run license at the moment and so for us we're using 433 we're just well I just use it 8668 and but frequency range because of some license it does give you some restrictions okay so it gives you your maximum duty cycle is limited to devices of 1% and 10% for gateways so that boils down to things that forgot what they call it now but they have a fair use policy effectively because where they say basically that devices to having maybe 30 seconds of online time per day and if you are there there's still quite amount of data you can send particularly if you imagine that you're only sampling every 5 to 10 minutes and but that's encoded in the back end where the gateways will probably get the information and not allow devices to do that so they call it a fair use policy and again we'll have to see how well this scales and particularly if we want to see industrial applications and if there's a standard thing that you'd expect you have the physical layers at the bottom here and basically you have these layers normally it's done by a SPI and that's just the way that SEMTech of exposed radio chips and then they have these software stacks that sit up here that actually do the communication so here's your sensor the gateway here sits in the minute you notice there's physical to physical communication and the gateway are the same the chip for the radio so that makes it really nice in terms of I mean you obviously that's weird the way that SEMTech have done it you have to get this chip but then you have to build all your noise reduction and things bake out yourself and so it makes it quite hard to actually build unless you're good at that sort of stuff to build your MPCB specifically for the radio but that aside it does keep the costs down relatively down you know there are about eight euros including the M0 as it's on here for example compared to something like SIGFox which the devices are really cheap but the gateways are actually very expensive they then have the symmetrical chipsets so as I say they're around chips they're pretty nice and just for a single one right they cost around eight euros and if you imagine obviously if you are buying them in bulk in the thousands and that price would drop considerably okay so the chips that we've been using which again this network I've been using I believe and they'd recommend them and get lots of devices this microchip here this looks quite nice with this little bit and that's what I don't think it's really needed but inside there is the the lower chip itself the physical radio chip plus an M Cortex M0 Cortex which runs the software stack for the lower one and so on it's not hugely complicated most of the chip is going to be building the the different bands and the noise reduction and things like that so it's not that complicated there are other companies that do STNO announced and announced one I don't know if you can buy it yet there's another company who can't remember the name but they do a very similar chip to this and almost all of them are just programmed by a simple serial protocol you know just break out TX and RX and you can clock it if you want but to be honest it's really straightforward it's so straightforward that this is a piece of code that I grabbed off the internet last night when I was writing this on Thursday night from an example that the Things Network brought up for their little you know compatible board that they have I'll show you and this is a slightly cut down but it's pretty much it like use a software serial library and then you get your your header file where they've implemented the commands for the RX-TX chips it's as simple as initializing the radio you simply join the network you can do not over the activation but you really recommend that's the way to do it and Things Network argue that this is where you should connect so it just means that as you connect your device to the network the first time it will set up all the keys and connect and so forth and things and I'll show a little bit in a minute there's enough time but you have these nice unique IDs each device has a unique ID and then the application what I mean by that is that a single application maybe one that's gathering information about damp sensing for example and that each application has a unique and this will connect both the device and the application to the so connect the device to the Things Network and the associated application so you'll be right there and then you can start to read that information fairly straightforwardly it's very simple and then you have the problem here just TXing and if you're interested you can look at this library and we're talking it's a few thousand lines of very simple C code you know or C++ code because it's from Arduino stuff it's really basic stuff there's nothing going on here I mean the protocol for doing the serial protocol is just basically AT commands you know okay so it's really really easy to build your own device so certainly for the people in this room maybe not for my four year old son but you know we'll get there soon hopefully but it's really easy to build your own devices and you know pick yourself up in Arduino whatever I mean we don't use those particularly would use ARM chips just a bit more interesting and robust but they're great for getting going buy one of these microchips you can get a little breakout boards they'll sell them online for like two bucks or something for that chip and then you wire it up and they program it basically with that piece of code that I just showed you it's very straightforward okay or if you really don't want to do that then you need lots of great devices just because I'm talking about them and they need to get promotion I think that's great but there are lots of other ones some of them incredibly expensive like the so that one another one's actually really cheap and he's not here today he's supposed to come by a student of mine we've brought our own board and you know if you're good at PCB layout which is not that difficult and you're willing to send it to China you can build your own board pretty damn cheap and of course you get it to do exactly what you want you know so this really comes into things network before that all that device stuff we did I've only done a bit of software I showed you to that which didn't know about the things network because it got I stole off the things network code you could really this device could connect to any more network any gateway right but once it gets to the gateway then really then you're talking to the back home it needs to know where to go okay and so this is where I think the things network and so I'm going to put this slide up there and again we'll come back to here so we're now talking about these blue boxes in the middle here and in particular this is what this looks like from a speculative slide's a bit dark isn't it so we're just going to look at the bit in the middle here which is effectively it's just a piece of code that is leading from the physical layer up it's translating what it leads into an IP packet and then it's forwarding it from and if you actually looked if I could take it's not there now is it there? oh yeah here's Adam so and this is actually the code it's called poly packet forward see I'm not going to go into this kind of detail 2,000 miles of code and this is the whole thing that runs on the gateway right it's just a thing and it connects to that and there's just a couple of threads there's one that's it requires that you read GPS locations there's one that's doing that and this one here if you look to it it's about 200 miles of code it's basically taking the radio reading from the radio via SPI and then just sending it you know turning into a packet adding a bit of information about the gateway and that and it's really basic stuff and I don't know what the things network have done they've tweaked it a little bit but the actual code is basically the reference code from Sentec and they may or may not have had stuff and I've never really spent much time looking at what they added I've looked at the code but not that but it's very straightforward stuff so it's really easy to build your own gateway here's a glass of pie you can get those for 30 years or whatever and here's an I-280 card which if I turned it over you'd see all the radio stuff on it basically this is specifically for a gateway it's the SPI there and they have a USB there as well the first one and so do that and literally if you know what the pinpatterns are you can set this up in five minutes download the software and you're off and the gateway's running literally I would say in 20 minutes so certainly once you've done it the first time maybe the first time took me a couple of hours I've read all the instructions but now I've got it down to 10 minutes you know it's really very easy and I didn't change a line of code for the first four gateways that we deployed just purely relied on the work that the things network had done which was great that documentation was a little bit hard to get through because it was in weird places take that side it was really helpful and I did it okay and we were off saw open source Raspberry Pi it's the hardware again not open source but you know what the work stack is and literally you can build it for approximately about 200 euros and that was including posters of packing to the UK initially my gateways only had antennas like these we've discovered that these aren't that great for if you want to get a nice bit of range and so we do use full wave for our deployments around the city and that costs us much for the antenna that it does for that software but it really depends on what you're trying to do and what kind of reach you're trying to do so not that many styles now I'm just going to finish up so this is what the things network really looks like they're inside right so we've got our nose we've got our gateways and the real work that they've done I'm going to not say that all of it's great but they've done but the real complicated work which is taking me ages to start and get my head around and actually wanted to modify the source code is in their back end you know the cloud they've got a pretty nice cloud service and they have a bunch of things where they're working out where to send it to and things like that where they're brokering and then they have a very standard web application interface which is just accessing their database to give you a view but what they're really providing in the middle here is bits of code you know MQTT or node interface for getting the data out of their databases into your system to take that on and they have a nice if you want to just test your back end or your application then they have these TNCTL tools for example which allow you to emulate or fake sending up data to the system without having to have a device connected to the gateway so it's really nice because that means you can then test your system you know in a nice orthogonal way and make one bits of work and check the other bits working and then bring them together just standard stuff but it's still very good there was a picture there but I know not what I have just a moment okay and if you wanted to actually once you've got all this stuff and you've made it work for the things there if you don't care about the things back end and that you'll have to implement it then you really can just look at that as a black box most of that dialogue I showed you you could just ignore and then if you're familiar with node you can very quickly on your machine write a trivial piece of node code this is actually a complete thing you notice I've got the app EUI up there and the access keys up here I connect to the things network with a TTN connect this is not connected by gateway now it's connected by the cloud and then you have these three callbacks which you can basically you get message on you know when it's activated there's an error and the most useful one here is just this line here every time your device sends some data to the things network this callback will be called then you're just in your own application you're doing your own stuff and what's this 20 lines of very trivial JavaScript you know I wouldn't write it with JavaScript I do TypeScript I do a bit of motion TypeScript there I can't stand JavaScript but it's really simple MQTT I must admit I don't use that very much but if you're into that then that works too and you're then off and going building stuff that's actually useful to real people and doing stuff so it's great so I've only got a couple of minutes left so I'm just gonna say this is actually almost it so in this though it turns out five bytes are still in every day well this is a fact from the evening post we know how newspapers like to present false facts but let's just assume this is true today and well it seems that way doesn't it and the way but there's a little doubt in my view when I was thinking up this and you know bikes we could stick something into the frame so it couldn't get stolen itself and then you could track your bike using GPS and the accelerometer and lawyer very simple idea and do that and Josh who's just there is a family of students who took this and rounded this idea and has set up a really nice little demo that we can look and this will be the end of my talk if we can get this to the best thing about working at the university is you get edge-run access and so it works everywhere but now it doesn't it's your server crash now that's it isn't it your service quiz if I was going to show that you can see that how he's designed it I mean he's designed a little bit hardware to do all this stuff with the Nord chips and everything but he's also designed to be a nice little interface just using Google APIs and the GPS data that he's getting that will show you the bike as it moves around you know and tracks it and everything and you can see the device IDs and literally you know you start monitoring it it connects via a node to the TTA network and then basically starts to consume that data and show it so it's really simple and really useful you know it's an actual useful application that you can do to monitor things and so forth but anyway I'm just really sure that hasn't worked this project is running on the hats called Moira Wamprestov so this is a whole we have a whole infrastructure going on for that and it's not just me it started off with me but I reached out and we have a bunch of other people business people and people from research both universities in Bristol that are now working on this and trying to make it a reality beyond just the two gateways that I initially put up and maybe I won't have to pay for the future gateways that's why I'm really hoping that's the real reason but you know so it's at the moment it's for the city of Bristol it's free for all and you can find out more information at that website but I realised that I've only got five more questions so I'm going to stop right there okay okay there's a microphone I think and I'll take some questions so there's a question back there so what kind of distances are we talking about if we drop the dedicated antennas under on the clients? if we if we drop the big dedicated antennas so we don't use the we will use them like this instead no no without is it possible to have a small antenna embedded in PCB? PCB printed PCB printed I'm not sure they're so good as we've known because of the way it doesn't work at that great distance because particularly in penetration so it does so one of the reasons that we put up the big antennas is that with the full wave ones at the end of the day they're running a 12 DBI and everything is that that means that your your other devices can have much smaller you know they can have quarter wave and they can be further away and you kind of trade it off and so you could still be talking I don't know about the PCB ones I've got to say but we'll be using the small ones yes yeah and we're still seeing say around and this is unscientific you know I've been riding around on my bicycle to pick out these values so I'm not going to make any claims other than 1.52 kilometers so it's still not too bad but it doesn't meet these 10 kilometers or 20 kilometers but maybe if you had if your car ran a full wave and the device maybe that would give you that but yeah but that's the sort of range thank you very much for this great talk you mentioned that you can use the same chip and the gateway but just a supply for multiple channels from my understanding you can only have one channel at a time so when you say one channel at a time would you use? so on the gateway if you want to listen on all eight channels if I recall correctly can you do this with the same chip that you use on the mode well there's two different types just right one on it does it they do it right there is a one chip which only does listens on just the one channel yeah that's the cheaper one and then but if you get the other one that will work on multiple yes the reason why you'd want to have that on the device that is true yes that is true if you want to listen on all eight channels I think you do have to have the slightly more expensive chip although it's not that much more expensive I don't think but anyway but you're right absolutely since you already have M0 MCU on the radio chip can you use that for application code or do you have to so that's interesting so a little bit of Bluetooth chips they do allow you to bring it out and do that as far as I know this chip does not allow you to access the pins although actually no it probably does I've just never done it so I think it probably does yes but I have to say that the round stack takes up quite a lot of especially you're not going to get much depending how much memory they've got and you could probably do a couple of bits yeah probably I don't know I've never done it but I don't see any reason yeah I just like to remark that in the Netherlands we have already an extensive network of this and there's a website called ttnmapper.org where you can look up if there's a gateway near you and you can also see the the signal strength I'm sorry it's one of the very hard things it was saying there's a website called ttnmapper.org I know that and you can if you're curious what to play with it you can look up the locations of the gateways on that website also see yeah thanks so it was just mentioned in the website ttnmapper which will plot different gateways in different locations and I use it a lot I should have mentioned that it's really good and you can just get to it just google it and you'll get to it okay anyone else the software stack side of 0.1 so in particular since you mentioned the Raspberry Pi early on and I've noticed that all the the right that there's a lot of code to be found on github that you can just access but many of those are using incompatible license like in particular for Raspberry Pi they're usually always using the wire and Pi library which is under lgplv3 whereas the LoRa WAN stack is actually under some gplv2 license which is really incompatible I was wondering in particular with a view on Linux on the Raspberry Pi is there any work going on for writing like real kernel drivers for LoRa WAN so