I have a nanoFramework device up and running talking with Azure IoT Hub!

I have a nanoFramework device up and running talking with Azure IoT Hub!

It's not a secret that I'm committed to .NET development and I want to develop with .NET everywhere. I have done it all the last year speaking about .NET for Spark and Notebooks development, environments typical for Python development, not speaking about .NET on Linux. Obviously talk is borderline if we speak about Raspberry PI. Why borderline? Because .NET is already available on Raspberry PI. But when I experiment Azure IoT Hub with devices, many of you knows that I love microcontroller, ESP32-based device: few bucks, great value! Here is the problem: this kind of devices are necessary programmed with Arduino environment(Arduino IDE 2.0 is very nice). So what about .NET on ESP32...?

Microcontroller world is the last world where .NET was late. "was", not "is". .NET MicroFramework was a long story: not a convinced Microsoft effort, with only few specific devices supported. The story is probably 10+ years, so in a pre-.NET core world. Then two major events happened: .NET Core and nanoFramework. With (probably) the contribution of .NET Core (not sure about that) MicroFramework effort has restarted into NanoFramework project with the objective of bringing .NET on small embedded devices. Do I have to be honest? Never tried and never followed the updated status. I'll be more precise in future posts on the exact timeline and details. But something is happened recently.

On July 28th, the always nice Olivier Bloch published a new episode of the Internet of Things Show, talking with Lauren Ellerbach about .NET nanoFramework. The video is here ((441) An introduction to .NET nanoFramework - YouTube) and GitHub repo is here: https://github.com/nanoframework. What are the most important things here? Two things, in my opinion:

  1. the demo shown by Laurent works great!
  2. when you look on GitHub pages about supported boards, you find ESP32!

I'm excited, but...an issue. The versions of ESP32 supported are very specific. I have a box full of ESP32 based dev boards, all the AMICO V2 board: you recognize that ESP32 on this board is not ok because on the chip it is probably written VENDOR AI-THINKER. Well. I don't find any reference about that on the GitHub documentation. You find, about ESP32, few versions, where the most important for me are the ESP32_WROOM_32 and the ESP32_PICO. Why? Because if you search them on Amazon or EBay, you find them for about 8/10€ each. Great value.

I have spent the evening preparing to give nanoFramework a try, but I was finishing the evening with a stop (and an Amazon order for a couple of ESP32 WROOM boards). But, wait: I have a sealed, brand new ESP32_PICO board!!!!! Amazing!

Without any other specific detail that I will add into brand new community sessions, I just make a fast recap for now:

  1. installed nanoFramework extension in Visual Studio 2019
  2. installed nanoff too to flash the device with nanoFramework (nanoff --target ESP32_PICO --serialport COM3 --update --preview --verbosity detailed)
  3. created in Visual Studio the helloworld project from a new VS template. Compile, run (that means "upload")...and on the output window you see "Hello?from?nanoFramework!". Amazing!

This could be probably a great result. But wait: I'm an Azure MVP, and so hello world for this scenario should be connecting to IoT Hub. So proceed:

  1. prepare a wifi network
  2. clone the samples from GitHub (nanoframework/Samples: ?? Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours (github.com)) this is important for the first try, because the implementation of nanoFramework is not complete so you cannot download the IoTHub nuget package! You have to connect via raw MQTT protocol (I have already done it several years ago) but you also have problems with cryptography and you need an implementation (and sample contains that!)
  3. prepare in Azure an IoT Hub instance and create a device with Shared Key (but sample already contains certificate based authentication and also DPS!!!)
  4. wait that all packages are downloaded
  5. compile
  6. run

Result? Yeah!!!!!!!!!!!!! It works! Great job team!

No alt text provided for this image

I'm excited! This is a great new world! And for me a new season of great demos in community events. Experimentation starts here! And it will be an exciting journey! And obviously I don't want to discuss at this stage about the maturity of this solution as it becomes every time a war. I want to think about how the vision of .NET has become this broad, and it is important as Python and Java and Javascript one.

So for speaker friends, I use this post to announce IoT Saturday 2021 event for November 20th 2021, an online event. CfP is open, if you want to talk about the amazing world of IoT in Microsoft or Azure salsa obviously. CfP link is here (on Sessionize): IoT Saturday 2021: Call for Speakers/Papers @ Sessionize.com. Obviously, I'll speak about nanoFramework on it (that's mine!)

See you my friends!

José Sim?es

CEO & Founder @ Eclo | Microsoft MVP IoT | .NET nanoFramework co-founder

3 年

Well done! Great story and thanks for sharing your experiences with .NET nanoFramework.

回复

要查看或添加评论,请登录

Marco Parenzan的更多文章

  • "Industrial Enthusiast"

    "Industrial Enthusiast"

    Oggi avevo voglia di aggiornare il profilo Linkedin, il payoff, per riportare quanto oggi mi sento di riuscire a…

    1 条评论
  • 1nn0va After Hour FY22

    1nn0va After Hour FY22

    Ciao a tutti! Nelle ultime settimane sono stato un po' poco presente. Siamo a fine quarter (oggi!), ci sono progetti da…

    2 条评论
  • [ENG] Data Saturday #1 is finished: W Data Saturday #1

    [ENG] Data Saturday #1 is finished: W Data Saturday #1

    [La versione italiana dell'articolo è qui] [Thanks to Google Translate for English version] It's a sunny Sunday and…

  • [ITA] Data Saturday #1 è terminato: W Data Saturday #1

    [ITA] Data Saturday #1 è terminato: W Data Saturday #1

    [The english version of this article is here] E' una domenica soleggiata e #datasatpn sembra già un ricordo distante…

    20 条评论
  • Sql Saturday è morto. W Sql Saturday!

    Sql Saturday è morto. W Sql Saturday!

    La notizia ha iniziato a circolare ieri sera: il PASS, l'organizzazione che sta dietro ai SQL Saturday, "cessa le…

    8 条评论
  • Procedure di Disaster Recovery in una Community

    Procedure di Disaster Recovery in una Community

    Ciao a tutti. Dopo una notte di delusione, eccoci svegli e pronti per ripartire, ma prima spiego quello che è successo…

    10 条评论
  • Self provisioning some Azure VMs for your daily job

    Self provisioning some Azure VMs for your daily job

    Today I have verified the value of the cloud and Azure. Rendering 24 videos (that is the result of rearranging mp4…

  • 1nn0va After Hour

    1nn0va After Hour

    COVID-19 sta cambiando tutto e tutti e il mondo non è già più lo stesso. Nel mondo delle community ci si chiede: eventi…

    5 条评论
  • //build 2020 announcements and the long run of the pythonic C#

    //build 2020 announcements and the long run of the pythonic C#

    //build 2020 has shared with the world a new impressive set of services, tools, functionalities, in Azure and beyond we…

  • Virtual SQL Saturday #921, 30 maggio 2020

    Virtual SQL Saturday #921, 30 maggio 2020

    Ciao a tutti Finalmente ci siamo!!!!! Mancano meno di due settimane all'evento del SQL Saturday Pordenone, che, data la…

社区洞察

其他会员也浏览了