 Hi, everyone. My name is Pamela Cortez. I am from Microsoft. I'm on the Azure IoT team. I'm a senior PM and developer advocate. My role is to train developers, and my background is embedded development. I'm excited to be at this event, to be able to walk through how to connect your device to Azure IoT. Let's go ahead and jump into it. For this session, we're going to create a managed IoT device leveraging Microsoft Azure IoT services and the STM32L4 plus Discovery Kit IoT node. Even though I'm going to be using this particular Discovery Kit, you can actually use the F746 Discovery Kit as well. We have a couple of examples to get you started quickly. Now, I'm going to make sure that this presentation is going to be less slideware and then jump into the demo. But before we can do that, I'm going to go over what are some of the products that are going to be mentioned in this demo. That way, we can all level set and understand why we're using particular products when connecting this board to the Cloud. To start off with, we have a great partnership with ST, with Microsoft because we really wanted to make sure that we are having a positive experience for all developers who are trying to connect their devices to the Cloud. In order to do that, we're working very closely with the microcontroller lines. We're making sure that the development kits, our inner device catalog, works nicely with our services and products, and that the tooling is integrated as well. We're working really, really closely with ST Micro to make that happen. We also are providing projects with the new Azure Embedded SDK using Azure IoT Plug and Play Convention. We'll continue leveraging this existing development kits and reference design to add support for Azure IoT. Keep looking at our samples, we're continuing to grow support there. High-level Microsoft IoT actually has a lot of products and services when you're building IoT solutions. We have anywhere to help you connect your different types of devices. These could be research resource constrained devices, these could be gateway devices, any type of devices, we can get connected to Azure IoT. We also have managed services as well. If you're trying to create an application and you want Microsoft to manage services for you, we do have something called Azure IoT Central, which we won't really cover in this session, but just throwing that out there that we do have the ability for you to quickly connect your device and then visualize the data coming in and take actions out of it. We all have a list of different IoT core services. Really, I like to think of each one of these services like IoT Hub, Azure Defender for IoT, all of these different products and services as Lego blocks when you're building an IoT solution, because you don't have to use Azure IoT Central, that's one way to build an IoT solution, but you can use and make your own custom solution by using our core platform services. If you're curious about how to use these products, I didn't want to throw on the screen all of the products that support building IoT solutions, because IoT solutions are very, very ranges many different industries, many different scenarios, so you really need to be able to have these different Lego blocks to customize your own solution. But we do have this Azure IoT reference architecture that will help you on which products and services to use. Then what are the common scenarios and common architecture that you can leverage to get started quickly? Because at the end of the day, really most IoT solutions have things, insights, and actions, and most of them are pretty similar when it comes to having those core subsystems of building an architecture. Definitely check that out if you're interested in learning more after this event. One of the products we're going to be using is Azure RTOS. Now, Bill from the Microsoft team is doing a session here at this event about Azure RTOS. I won't deep dive too much about it, but I just wanted to cover that really Azure RTOS is a full suite of components that really helps you in developing for embedded IoT applications. We have the Azure RTOS ThreadX, which is really our small, fast, reliable real-time operating system, and that's already powering more than 6.2 billion devices worldwide. Each of our Azure RTOS components are fully supported and easy to use to help developers get to market quickly. This is the different components part of that suite. As I mentioned just now, we have ThreadX which is a real-time operating system, but we have all of these other components to make it really easy to get started when you're thinking about embedded development, especially if you need something that requires a real-time operating system and you want to be able to connect resource constrained devices to Azure IoT. We have support there. In order to connect to Azure IoT, especially Azure IoT Hub, which I'll get to in a moment, which what that is, we have what we call the Embedded SDK for seat. What this is is really a set of libraries designed to simplify the process of sending your messages and receiving messages from Azure IoT services, like device provisioning service, IoT Hub, and works with plug-and-play as well. If you're maybe have already been following Azure IoT and wondering, hey, didn't you have device SDKs in the past? We did and we still do, but for these smaller devices, we have that special embedded SDK meant for those type of devices. Great for MCUs. Now, what we have when it comes to a Cloud Gateway is Azure IoT Hub. Now, this is meant for when you connect a device, you need some sort of managed service to be able to send those messages to the Cloud, and also be able to send messages back to the device. Really, that is Azure IoT Hub. You can send up to millions of devices, we have full support for open source SDKs, and then you're able to do your device management with IoT Hub as well. Then we have end-to-end security, which is really important. I think all of us understand the importance of security. We have X509 certificate support, and many other different types of support when it comes on the security end. Then we have this helper service for IoT Hub called Device Provisioning Service. Really think of this as zero-touch provisioning. You need to be able to register your device, configure your device, and get it connected to Azure IoT Hub. Look at device provisioning service, especially if you're connecting thousands and millions of devices, and you want to do that quickly in that zero-touch provisioning type of way. We recommend checking that out, but that's all about IoT scale automated provisioning. We just GA'd for our Platform Services IoT Plug and Play. What IoT Plug and Play is, it really takes away that idea of that tight coupling between devices and solutions. Because that is a huge, huge problem right now for connecting devices and the solution builders, is that these devices are coupled really tightly to particular solutions. But what if you want devices that can happen and go into any type of solution, and instead of just taking the device, doing custom code every single time on a device for every different type of solution, that could be time-consuming. We came up with this open modeling language, which is called IoT Plug and Play, that has support there to simplify that device interaction and IoT solutions. Think of this as Windows Plug and Play, because Windows had this issue a long time before as well when it comes to connecting peripherals or mics or headphones or anything like that. We solved this issue with that tight coupling with Windows Plug and Play, and we're doing the same when it comes to IoT. We also have an extra layer of security called Azure Defender for IoT. Azure RTOS can easily pull in that extra security from Azure Defender with seamless connectivity. At the end, what that really means is that you can manage those same security across all of your on-premise and Cloud workloads. You could prevent, detect, mitigate attacks on all IoT deployment components. You could continuously monitor your security of IoT devices, machines, networks, Azure services, and then you can automatically discover and onboard new devices and apply security policies to ensure compliance with security standards. I'll go into this a little bit at the end, but this is just a really nice extra layer of security because you really understand your solution the best and how your device will be in your solution, and that knowledge is going to help you when it comes to working with Azure Defender. I'll explain that a little bit more towards the end of the demo. Here's high level what we're going to be doing and stepping through is we're going to go ahead and take that discovery kit. We're going to go and have Azure RTOS deployed on it within Bennett CSDK leveraging that to connect to IoT Hub that we've created, and then I'll also talk about plug-and-play and the device provisioning service with that as well, and then I've created a time series insights environment so we can visualize the data. But all of this is really quickly to get started, so let's jump right into it. Now, one of the first things you're going to want to do when you're getting started is go ahead and get your development board. This particular one we are using the STL32L4 plus discovery kit IoT node. I'm really a big fan of this board because it already has the sensors on there. I can tell you as someone who teaches a lot, it's just nice to have a development board has all the sensors on there. Even gesture detection sensor too, which is really nice, and then it has that Arduino Uno footprint. If you already have shields, you can already plug it in, reuse those sensors for this particular board. I'm also a huge fan of the other discovery kit, the F746 because it has that LCD screen already on there, so I've been using that a lot as well, but moving to this particular demo, we're going to go ahead and use this kit. Once you get this board, you're going to want to go ahead and select your IDE and your preferred tooling really. Today, we're going to use STM32 Cube, but if you're using IAR and you're used to it, you can definitely use IAR and have that support when it comes to Azure RTOS and our Azure IoT products and services. Even Kaio and other popular IDEs too. I've already downloaded, I've already had this on my machine, the STM32 Cube. The next piece of tooling you're going to want to install, and this is actually optional, and I'm going to show you why I like to use this, but this is the Azure IoT Explorer. It's a cross-platform UI for interacting with devices attached to the IoT Hub. You'll see in a moment why I'm a big fan of this, but it's all of the codes here. You can download it for free, and you can actually see all of the code on. We try to have this nice and open for you to view. The next thing you're going to want to do is go ahead and head to the Azure RTOS GitHub page. We're going to have all of our repos here. One thing that's really nice about Azure RTOS is that we have everything on GitHub. This is nice for you. If you want to go ahead and would say, test and explore the source code, you could do that at zero cost. The full source code is here on GitHub. You can explore, develop, test, even adopt Azure RTOS to suit your needs for a managed IoT application. You can see I have ThreadX, which is my real-time operating system, GUIX and other components, but we do have getting started guides and samples. For this particular demo, I am actually going to use samples. One thing we just want to always want to make sure is after we do these talks that you could get your hands on it quickly. If you have the discovery kit, you could go ahead and leverage these samples or in zip files, but it has nice documentation that comes with it for you to get started. You're going to go ahead, download that zip file and then take the project files and put it into your IDE. I already have already selected the sample project files. The one I'm going to be using today is sample Azure IoT Embedded SDK plug-and-play. A lot of our services all in this one project file to get started. Before, we can actually put our information of what we need here because there's really two files you're going to change and add some information, but before we do that, we're going to need to create an Azure IoT Hub. There's quite a few ways to do this. We try to make it really easy for you, but one way to do this is, you're going to want to sign up for an Azure account. Actually, you need to sign up for an Azure account to work with our products and services. But I just want to mention that we do have Azure Free Account that you can get started. They have 12 months of extra free services. Even though it's 12 months of extra free services, keep in mind that IoT Hub has a free tier. It has all of the features that you're going to need. It just has limited amount of messaging. If you wanted to get started for free, even after the 12 months or after you've run out of credits, we have that free tier for the lifetime. When you're building your proof of concept all the way into production. I'm going to go ahead jump into the portal. I am on my demo account here, and let me zoom in so it's a little bit easier for everyone to see. Now that I have my account set up, I'm going to go ahead and create a new IoT Hub. Because I use IoT Hub a lot, I see it in my Azure services when I join into the portal. Just keep in mind, you might not see that when you first join in and create an Azure account. But a way for you to go ahead and create a resource is, you can go to the Marketplace, go to Internet of Things, and then go ahead and find IoT Hub. You can actually type in IoT Hub here. You can do it this way. You can even do it through, let's say if you're using VS Code, we have extension for VS Code to create IoT Hub. We even have, if you prefer to do everything in PowerShell, or in Bash, or even Cloud Shell, which is a really fun feature in the Azure portal, you could do that as well. All right. I'm going to go ahead, create my IoT Hub. Now, I was going to ask for your subscription. You should have a subscription that's tied to your Azure account. Then you're going to create a resource group. Resource group is just a group to host all of your products and services, your resources. For this particular one, I'm going to go ahead and create a new one. I'm just going to say my resource group demo. You're going to select the region. You're going to always want to select the region that's closest to you. Keep in mind when you do this and deploy to create an IoT Hub, doesn't mean that that IoT Hub is forever in that region. There is options where you can change regions based on, I would say you have a device with a device provisioning service and you have a device that is made in the US and then has shipped over to Europe. There are nice features within device provisioning service where it can go to the particular region which is great because you want to be able to lower that latency. You're going to go ahead and name your IoT Hub, so I'm just going to have this TDevCon01 and that's not taken, which is great and then at default, it's going to say standard tier. Standard tier does have a cost to it, but if you're wanting to get started, go ahead and hit that free tier. You get all the features that you want to leverage off of the free tier to get started. I'm going to select that and then I'm going to review and create. After I review, everything looks good and then hit create. This is going to create a new IoT Hub, which is our Cloud Gateway and while that deployment is in process, I have already created an IoT Hub for this event. Normally, this creating an IoT Hub can be a couple of minutes, it could be a couple of seconds, but since we're limited on time and I want to make sure everyone sees how to get started, we're going to just jump into this one I've already created. I've created two devices and for you getting started to create a device, you're going to go ahead and hit new and you're going to add your device ID. Your device ID is a way for you to identify that particular device. This one, I can go ahead and say my DevKit, old three and I'm actually going to show on the Azure IoT Explorer. When we look at devices, we don't have that right now and I'm going to hit Save. It's already created an IoT device for us. If you go into that device, you can see your information about your primary key, secondary key, your connection string, all of the information you're going to need to get connected to Azure IoT. That's all you needed to do to create an IoT Hub. I'm going to go ahead and go to the Azure IoT Explorer. You're going to see that there's not going to be anything here, and there's going to be a button called Add Connection. I've already added that particular connection to this IoT Hub, but in order for you to be able to visualize your device and be able to see that telemetry come in, you're going to want to hit the connection string of that IoT Hub. In order to find that, you can go to Share Access Policy, IoT Hub owner and go ahead and click on your connection string and add it here. You can see that says, hey, it's already listed because I have already done that here. When I click on this, you can see that it's added that their device. The device that we're going to use today is the My Dev Kit device. Now I'm going to go back to my project. As I mentioned before, there's going to be two files that you're going to want to update. One is a board setup. The board setup, this is where you're going to make changes or add your Wi-Fi information. I'm not actually going to click on that right now because I am recording live, so I'm not going to click on that just because I'm too busy to change my Wi-Fi password. The next file you're going to want to change is your sample config file. This is that particular file. Click on it and you're going to have three places that you're going to want to add information to. One is your host name. The second is that device ID, and then the third is your device key. In order to find your host name, you can find that in the portal. Let me go back to the portal and that is easy to find an overview. Again, you don't have to do this in the portal. You could do this all through a command line, but the host name is right here. We're going to go ahead and copy that to the clipboard. I place that here. I've already done that. My device ID, remember, this is how we identify our device. Now that we have our endpoint with our host name, so we know where to go to for IoT Hub and we know which device in that particular IoT Hub, now we need our credentials, our device security credentials, which is symmetric key. I've already used this one. If you're going to try to connect quickly, I've already deleted. I'll already delete this device, but security practice, don't ever share this out with people. The good thing is to, we're really using a symmetric key, but you should be able to use certificates and other security practices as well. All right. Now that I have all three of that information in there, I have saved, I'm going to go ahead and build all. And what this is going to do is build all of the projects that we need for this particular example. And I've hit that before, but this sample code goes over and has the embedded SDK plug and play, all of that for you, nicely ready for you. So if you're curious on what that looks like, I know our session is really short today, but I recommend taking a look at that code. And it even talks about how to enable your device provisioning as well. So after you build, you're going to go ahead and debug. You could do that a couple of different ways. You could hit F11, you could debug this way, but what's going to happen is it's going to download, run on the device. And I have had this device running for a little bit now. You can see I'm using termite, but really I didn't need to do this. It was just another way for me to kind of showcase what's going on. I see that telemetry come in. But when you're in the Azure IoT Explorer, you can hit your particular device. So this is one that I've created, the My Dev Kit. You can go ahead and start seeing that telemetry come in. So I'm going to go ahead and hit start. And you can see the telemetry is being sent, the timestamp and that it is working and is being sent up to the hub. And if you're even curious on how that looks in the portal, we do have a view of seeing, oh, you've been sending messages up here and you can start to see device to cloud messages that are coming in and how many connected devices you have for that particular hub. Now I'm going to go ahead and stop. We have the state call direct methods. This is a great way to go ahead and invoke a method with on your board. So for this particular example, you could see here, I got telemetry going. Let's scroll all the way down. I'm going to hit reboot and I'm going to say for the payload, I'm going to time out. So for example, I'm going to do a reboot right now and I'm going to hit invoke method, but let's say you had an LED on this dashboard, which you do, you could go ahead within your code do sets or set LED state and then change it to true or false to turn the LED on and off, which is a nice feature, but really direct methods is to be able to kind of send that command down. So I'm going to invoke this message and it was successful. So let's see if it happened. Yes, okay. We reboot with a payload of timeout 500. Perfect. You can even do cloud to device messages if you need to have that for your solution. And here is the IoT plug and play component. For this particular one, you could see that the models are nicely set already for us for this particular example. We have our type, which is telemetry. We have name, which is temperature. We have the description, which is temperature and degrees Celsius. The schema, which is double unit degrees Celsius. We could set our properties, which is target property. So this is a great way for you to get quickly started with plug and play with this particular sample. One last thing or second to last thing I wanted to show you is time series insights. So you could use time series insights to store and visualize your data. And this is really great, especially if you have a lot of devices or even one device. For example, if you have, would say, a sensor on a machine on the factory floor. I used to work in a factory floor running pick and place machines, if you have a sensor on there and the machine stops working or anything like that, you can nicely visualize that. So for this one, I can see what my temperature data is for this particular device. I can see how many events that I sent up to the cloud. I'm sending up an event every five seconds, but you could see that. But what's nice about time series insights and our other products and services is that you could start visualizing quickly but also gather those insights. As I mentioned before, if it's like a pick and place machine goes down on the factory floor and you will be able to visualize the change. And then you would be able to create an alert to then message or email your service worker on the factory floor, which is really nice to be able to take those insights and actually do something with them quickly because of lots of times, if you have a machine on the floor that's not working, I think we all can understand that that is time where people are standing around and when we should be building our next product. So it helps with that downtime and less latency for us to be able to send alerts quickly. I made a mention of Azure Defender. If you're interested in learning more about that, if you go into the security blade under settings, you could set up custom alerts. You have different views in the Azure Defender and you could set it up, but what's really nice about Azure Defender is not just for IoT Hub, it's for all different products and services at Azure. So you can actually see security across your whole workload. This is really great if you would say you have a VM running and it's gonna give you security recommendations on that VM and tell you the health of that VM or if you have your devices or your storage, you get to see that full workload and you're able to create custom alerts too. For example, for this particular one, I can create alert that says, hey, for this particular device, outbound connection to IP address is not allowed, you can set those. Another great example is these other custom alerts for one that I really like to mention, number of file uploads that allowed range or unauthorized operations or login of a user that wasn't supposed to be in there or messing with the device or message size too, with that threshold is, which is really important. So you can see there's a lot of different options to create the custom alert rule. It's just an extra layer of protection for your IoT solution and for your devices. All right, so that was an end-to-end demo of our products and services when it comes to connecting to Azure IoT and getting started quickly. So I'm gonna list off a couple of different resources for you. One is our Azure RTOS landing page. If you're wanting to get started with Azure RTOS and get to the documentation where you have the samples to go ahead and connect with the discovery kits, go ahead and go to that link. And then the link to the GitHub is right there as well. Next is a full documentation for all of the components. There's, you can find that on our doc site. And then if you have technical questions. So if you have a technical question about Azure RTOS or about our SDKs or IoT central or anything like that, we do have Microsoft Q&A. Think of this as Stack Overflow, even though myself and fellow engineers were on Stack Overflow and other places, monitoring and making sure that, hey, do folks need help in the community? Microsoft Q&A, we have a full dedicated team or we're watching for those technical questions there. So you can submit any question that you have to that form. And then for latest announcements and online training, we have the Microsoft IoT Dev Channel. This is a YouTube channel where you could go ahead and hear, as I mentioned the latest announcements, but we have these deep dives where I run every Wednesday and we train on a new product and service, we bring in different partners. So it's just a great way for you to stay up to date and go ahead and do some more online training. And then we have a full IoT tech community at Microsoft. We have one for Azure RTOS, but we have one for all things IoT. So if you have a project that you love to share with us, maybe with a discovery kit, we would love to see it. We're on there monitoring and wanting to hear your feedback. If there's a feature that you wanna see or samples built, let us know and that's a great way to provide that feedback. So I wanna thank all of you for staying and listening to the presentation and hopefully this gives you a little bit more insights on how to get started. You could see that in less than 10 minutes, I was able to go ahead, get the code and start connecting and sending data up to the cloud and then visualizing. Great, I had the tooling setup, which is, if you already have STM32Q, it goes a lot quicker, but keep in mind, I would say if you're just downloading everything from scratch, learning and following this video, you could probably get started in under 20 minutes. So thank you so much again and I hope all of you are staying safe and having a great day. Okay, bye.