The Modern .NET Show

S06E11 - From Mono to Wilderness: Unleashing the Wild Side of .NET in IoT with Bryan Costanich

Embedded Player

S06E11 - From Mono to Wilderness: Unleashing the Wild Side of .NET in IoT with Bryan Costanich
The .NET Core Podcast

S06E11 - From Mono to Wilderness: Unleashing the Wild Side of .NET in IoT with Bryan Costanich

Supporting The Show

If this episode was interesting or useful to you, please consider supporting the show with one of the above options.

Episode Summary

This episode focusses on the future of IoT (Internet of Things) and features Bryan Costanich, the founder of Wilderness Labs. This episode delves into the various aspects of IoT and its potential to revolutionize the world.

Costanich, who founded Wilderness Labs in 2016 after selling Xamarin to Microsoft, highlighted the mission of his company - to enable .NET developers to build and maintain hardware as easily as web or mobile development. Wilderness Labs has a direct lineage from Mono to Xamarin to its current platform. Mono, created by Miguel de Icaza, was an alternative open-source .NET runtime for Linux. Xamarin merged with Mono, allowing .NET to run on various platforms, including iOS, Mac, and Android.

Wilderness Labs uses modern .NET, supporting .NET Standard 2.1 and working on porting to .NET 8. They have incorporated some of the latest features from .NET 8 into their platform, including a JIT backend for thumb2 microcontroller architecture. This allows developers to leverage familiar patterns and practices from web and mobile development, such as saving data locally, using HTTP clients, and utilizing threading and tasks.

The discussion in the podcast touched on the main phases of computing, which have been focused on making computing more miniature and portable. From mainframes to personal desktops to mobile devices, and now to embedded systems or IoT devices, the evolution has been driven by the desire for increased portability and accessibility.

Microcontrollers, the tiny devices that power IoT, were also discussed. Costanich explained that these all-in-one chips have processing power, memory, flash, and hardware I/O for connecting sensors and peripherals. With their small size and low power requirements, microcontrollers can run on small batteries, making them ideal for IoT applications.

One interesting observation made during the podcast was that the IoT revolution is often considered a quiet revolution, as it is not as apparent as previous computing revolutions like the internet and mobile. While consumer IoT devices are visible, they represent only a fraction of the overall market. The true impact of IoT lies in the ability to deploy connected devices in various contexts, solving different problems, and improving efficiency in sectors such as logistics, asset management, and infrastructure monitoring.

Episode Transcription

Welcome to The Modern .NET Show! Formerly known as The .NET Core Podcast, we are the go-to podcast for all .NET developers worldwide and I am your host Jamie “GaProgMan” Taylor.

In this episode, I spoke with Bryan Costanich about both IoT and Wilderness Labs. We discussed what IoT actually is, and the many differences between developing systems for IoT devices and developing modern .NET applications which run on servers, desktops, and mobile phones.

Yeah, you know, it’s funny. It’s one of those terms that is so broad and encompassing. I mean, really “Internet of things.” So things that are connected to the Internet and really, what does that mean? Is your TV an IoT device? Well, maybe. Is your car an IoT device? A lot of these cars today are connected to the Internet.

In our world. And I think colloquially what folks generally accept as IoT are non standard compute devices that are typically embedded. So they’re often small and deployed to the field generally that are connected devices, right? Typically this means an embedded device, a device that is powered by, like a microcontroller, sometimes a Raspberry Pi -which is really just a small computer. But generally anything that is what we think of a thing connected things or small devices.

- Bryan Costanich

So let’s sit back, open up a terminal, type in dotnet new podcast and we’ll dive into the core of Modern .NET.

Jamie : So Bryan, welcome to the Show. I really, really appreciate everyone who comes on the show, and we’re going to talk about some stuff today that I have absolutely no idea about. So I’m coming into this with like, nothing. So I apologize for that in advance.

Bryan : Sounds like fun.

Jamie : I’m sure it will be. I’m sure it will be. So right, so would you mind introducing yourself a little bit? Talk about yourself a little bit, maybe an elevator pitch, and talk about Wilderness Labs as well, please?

Bryan : Sure, yeah. So my name is Bryan Costanich, and I am co founder and CEO of Wilderness Labs. And Wilderness Labs is a company that I founded with some friends back in 2016. And I started Wilderness Labs after we sold Xamarin to Microsoft. Right. At Xamarin we brought the .NET developer platform and the ecosystem, of course, to mobile. Right. We enabled .NET developers to use their existing .NET skills to build mobile apps and sort of the rest is history there.

And we started Wilderness Labs with kind of a similar idea. The idea being that you’ve got a bunch of .NET developers out there and there was this emerging market, sort of the new epoch of computing was moving from mobile to being able to put computing and everything everywhere. And traditionally if you wanted to sort of participate in that, that meant that you had to write C or C++. And we wanted to bring .NET to that space. And so our mission is to make building and maintaining hardware as fast and easy as web or mobile development, which is kind of a lofty goal.

And so that’s why we created it. We just wanted to enable .NET developers to do things in the hardware space and make real physical things.

Jamie : Okay, cool. So then obviously there’s this direct lineage, I guess, from presumably Mono into Xamarin, into Wilderness Labs, into .NET on IoT devices, right?

Bryan : Yeah, that’s right. That’s exactly it. So .NET was created back in 2000/1999, ish, and released in 2000/2001. And a few years into it, Miguel de Icaza started hacking on an alternative open source .NET runtime for Linux.

Jamie : Right?

Bryan : Because originally Microsoft didn’t, they really didn’t want to participate in the Linux ecosystem. [Steve] Ballmer thought of it as a threat. So did even, Bill Gates you know, the time. And what happened was that Mono was incredibly successful and those guys really brought .NET to exotic platforms. The original .NET was really tightly coupled to Windows. It was built on a lot of the Win32 APIs and whatnot. And what Mono did is really abstracted that and let it run on Linux and eventually non Linux platforms as well. So iOS, Mac, and Android, which is of course Linux based, and that became wildly popular.

And Microsoft in the meantime also changed its open source perspective. And what happened was that Mono eventually - as we got acquired over at Xamarin - Mono and .NET really got merged, right? Because .NET would only run in the Windows environment. But .NET is really useful everywhere. Now. You can do .NET just about anywhere, right? You can write web apps, you can write mobile apps, you can write cloud apps, you can write games. And now with us, you can do full .NET on microcontrollers. And so our lineage is directly in line with that.

We really run on the Mono .NET unified platform.

Jamie : Okay, because that was going to be a thing that I was going to bring up, and I think you’ve already answered: I was going to ask about how does -and we’ll come into what IoT and all that kind of stuff is in a moment. But because you’ve said you’ve got this direct lineage back to Mono, does that mean that it’s not modern .NET, that it’s still Mono? Or is it like .NET fRAMework but with bits trimmed out? How does that work?

Bryan : Yeah, so it is modern .NET. We’re not on .NET 8 yet, but we’re working on that port. But we do support .NET Standard 2.1. The equivalent, the .NET Core 3.1 runtime is basically what we have.

What we have under the hood is that it’s effectively the Mono runtime with a bunch of the .NET 8 stuff pulled into it, or .NET 6, because we also have a JIT back end, which is something that doesn’t really a JIT back end for thumb two, which is what the initial board microcontroller architecture is. Right. And so in order to support that, there was a bunch of work and we actually pulled in some of the latest and greatest in .NET 8 so that we could support some of the JIT magic there and some of the AOT magic.

But yeah, it’s full .NET. You can go and grab NuGets off NuGet.org. And as long as they support .NET standard, they should basically run on our hardware. Now, bear in mind, there’s still a limited resource, or resource constrained device. So there’s things you have to do when you’re coding to think about that. But generally modern .NET just works.

Jamie : Cool. So I guess then, just using a silly example, I probably don’t want to pull down the entirety of NewtonsoftJSON. Right.

Bryan : You know, actually NewtonsoftJSON does run on our platform. NewtonsoftJSON is a little bit memory heavy, so we generally say use System.Text.Json, but you can Newtonson working on there. It does, you know, if your app is doing a lot of other things, you’ll find that you might get memory constraints on there. So there still are things that you need to think about, but generally things work.

Jamie : Oh, awesome. Yeah, because I should have been clearer. That’s kind of what I was alluding to. I guess if you’re writing something for a teeny tiny board with say, I don’t know, I’m just going to pull some numbers out the air, 2 or 3 megs of RAM - 2 wouldn’t work, but maybe like 8 megs of RAM or something like that a tiny amount of memory. You probably don’t want all of NewtonsoftJSON because that’s massive. I don’t know whether that tracks, but I’m just pulling numbers out the air there.

Bryan : Yeah, no, that’s right. And we actually ship a board that has 64 megs of Flash and 32 megs of memory of RAM. So that actually gives you quite a bit of overhead, quite a bit of headroom to run apps, modern .NET apps that do a lot of things.

And that’s really interesting because for our customers, our customers are really doing more complex apps in the IoT space. Generally. They are writing things that basically what they’re doing is taking a lot of the patterns and practices that they do in a mobile app or a web app in terms of saving locally on a SQLite database and using HttpClient or HttpRequest and building up those to do RESTful communications on the web, et cetera. Right? Like all the things that you would and threading and using tasks and all of those modern patterns that we’re used to with web or mobile apps. That’s what we encourage you to do on our platform, because that’s just a super productive way to code and you don’t really have to worry about a lot of the low level stuff and fighting with, “like okay, well we got this buffer in memory some place and I’m going to swap data in and out and it’s going to be a shared buffer because I only have 60k of memory or RAM or something and I’ve got to do all sorts of crazy finaggly bits just to make this work."

With our platform. The idea here is that you don’t really have to do that. This really is a modern platform and a modern way to do hardware. And you write apps as if you were generally writing other .NET apps.

Jamie : Okay, that makes sense, right? I guess as a developer, if I need to write something that’s going to run on an IoT device, we’ll come back to what IoT means. And if I’m going to use a wilderness device, I want to be able to use the conveniences of .NET, I want to be able to use dependency injection and all of the stuff that requires a little bit more set up, a little bit more like stuff with reflection and things like that. And like you said, being able to maybe, perhaps run a small database on the device as well, just for temporary storage whilst I’m sending stuff out. That makes sense, right? Being able to store all of that stuff.

Bryan : Yeah, 100%.

Jamie : Cool. Okay, so I guess for the devs who are like me, who have no idea about what actually IoT means, I mean, I know it means “Internet of Things,” but what it actually is, because in my experience, an IoT device is an Arduino or a Raspberry Pi. Is that correct? Is that not correct? What is IoT?

Bryan : Yeah, you know, it’s funny. It’s one of those terms that is so broad and encompassing. I mean, really “Internet of things.” So things that are connected to the Internet and really, what does that mean? Is your TV an IoT device? Well, maybe. Is your car an IoT device? A lot of these cars today are connected to the Internet.

In our world. And I think colloquially what folks generally accept as IoT are non standard compute devices that are typically embedded, so they’re often small and deployed to the field generally that are connected devices, right? Typically this means an embedded device, a device that is powered by, like a microcontroller, sometimes a Raspberry Pi - which is really just a small computer. But generally anything that is what we think of a thing; connected things; or small devices.

I kind of come at it from the perspective that we’ve really changed how we think about computing in terms of computing power or computing location, right? So if you think about this in historical context, computing really started we think about like, mainframes, and then those shrunk up and we got personal desktop computings, and then the Internet hit, right? And the the Internet was a huge epoch, and then the Internet sort of turned into cloud and mobile hit.

And this is sort of the next phase of computing. All of those epochs were really about making computing more miniature and being able to use it in new places. So the mainframe to personal desktop revolution meant going from a giant room or a building into something that sat on your desk. And the when mobile hit, that meant that we moved that from our desk to having a supercomputer in the palm of our hand. And with the embedded revolution or the IoT revolution, really what that means is now we have that same class of computing of really like, what I would say is capable computing, right?

Because if you look at the microcontroller on our board, it’s an STM32F7. And that has about the same processing power of a Pentium. And yet it’s the size of my pinky nail, right? It’s very tiny and it’s also incredibly ultra low power, which means that you can run it on a small battery. And so those two things mean that you can now put computing anywhere. And that’s really what I think about in terms of IoT. I think of the idea that you can take computing or take compute and you can put it anywhere. There’s a little bit of a fuzzy sort of gray area here in the sense that, okay, that’s true for microcontrollers. It’s not necessarily as true for single board computers like Raspberry Pi. Right?

So there’s this sort of like class or distinction and classes of computing when you talk about microcontroller versus a CPU in a single board computer like a Raspberry Pi, whereas a microcontroller is really an all in one. It’s got everything that you need in terms of like what you look at a motherboard, everything is in one chip. It’s the processing chips of the CPU, it’s the memory, it’s the flash. And then it’s a bunch of hardware I/O and hardware control so that you can plug sensors, and peripherals, and drive motors and things like that, that’s kind of all in one, right?

And that’s a microcontroller. And as you go up the computing stack, the next thing that you find is like app processors or CPUs. So what you find in mobile devices or what you find in a Raspberry Pi and that’s really a dedicated CPU. And then you have to add on memory and flash and some of those may or may not have a microcontroller in them, which adds the additional hardware I/O control. But when you move up to that next class of computing, then you start to look at a totally different power profile. So a lot of these, just to give you kind of a sense of the power consumption, a microcontroller, for instance, uses somewhere between 1000th and 100th of the power that you would consume in like a Raspberry Pi. And so that means that when you’re running from battery or solar, you’ve got a completely different footprint, right? So you can run from a tiny little battery on a microcontroller, whereas to run a Raspberry Pi for any length of time, you’re really starting to think about like a mobile phone size battery, those charging like the Moby packs or almost like a laptop battery. And so that makes a big difference in where those things can get installed in the sort of use cases that they are applied to. But they’re both often times used in IoT contexts, right? And it really depends on what you need in terms of your use case.

For instance, if you look at like running AI at the edge, there’s quite a lot of AI processing that you can do on a microcontroller, like vibration analysis, fast Fourier transform FFT, even some image recognition, et cetera. That’s all completely doable on a microcontroller. However, when you start to switch to video processing, especially high definition video processing; now all of a sudden you need more processing power, you need more hardware, and often times you need a GPU involved, like with a Jetson Nano.

But I really still think of those devices depending on how they’re installed, really. And this is really about installation context or use case. Those are still IoT devices. If they are things, if they’re standalone things that are connected to the Internet and are doing solving some problem, I think that those are really IoT. And I think that personally I draw the line between that and like, a car or maybe large computer installations etc. Sometimes we talk about things, computing at the edge. And there might be an edge server and that may power, that may be a gateway or that may connect to a bunch of IoT devices but that’s not really IoT to me, or I think, generally accepted that’s not really IoT.

Jamie : Sure, okay, so it’s more the end devices that are - let’s say I’m pulling an idea out the back of my head. Let’s say I have a series of vats of some kind of chemical or some kind of compound or something, and I want to check on the temperature. I could perhaps take maybe a Wilderness board, maybe an Arduino, maybe some some kind of other microcontroller based system, put some code on there that just says, “every ten minutes, take the temperature, and then send it off to this address.” Right? That’s more of an IoT kind of device and situation, I suppose, rather than I have my Raspberry Pi sitting there and it’s serving me files, it’s a web server or whatever.

Bryan : Totally, yeah, that’s the 100%. And it’s really about context.

And also one of the things that I think about is like, some people say, “oh, well, a car is an IoT device.” It’s like, well, a car is really an ecosystem of IoT devices and other things, right? So you could think of a car as an IoT installation site that’s mobile. But like in your case, where you have vats, maybe a Fermentation vats or something. Maybe you’re making beer at an industrial scale and you’ve got a bunch of little devices doing single things or maybe a small set of things and then orchestrating in some sort of larger context. Those are all IoT devices, for sure.

And that’s an interesting point because a lot of these IoT devices are not, you know, you they may be installed in a standalone capacity, but they’re not working in a vacuum. Right? Often times IoT installations might have tens or hundreds or even thousands of devices. So I heard a quote from someone that an oil rig, a modern oil rig, for instance, has tens of thousands of IoT devices. Right? And so that’s an interesting problem space because IoT, to me is interesting not only from the hardware design aspect and the actual use case and interacting with the real world, but also the other side of that, which is that these things are often installed in groups and have an orchestration aspect where there may be a big data back end, there may be a digital twin where hundreds of devices feed real time information and up in the cloud or on a device in your hand - an iPad or something - you may have some digital representation of the real life of whatever that real life installation is. And that to me is super interesting because now it takes it away from just the single device installation to, “oh, this is actually giving me live metrics, live data of some sort of installation, some sort of thing in which there is orchestration, and there is back end, and there is all that integration.”

Jamie : Okay? So using your example of a car being kind of like an IoT installation site, and what you’ve said about orchestrating all of the information coming from lots of different devices into maybe a dashboard or maybe a data store. What I’m seeing in my head is if a modern car is like an IoT installation site, then perhaps my dashboard on the car, like the literal dashboard, showing me what’s happening, showing me maybe brake temperatures or showing me the engine’s revs per minute count or the amount of gasoline it’s got in its car. That’s essentially kind of what you were talking about there with like pulling all of that information together, communicating with all of those devices, perhaps in real time, all those devices posting and saying, “hey, I’ve got an update,” publishing and pub-sub sort of stuff. Publishing, subscribing. That’s way different to anything I’ve actually ever done in my career, which is essentially forms over data, over the web.

Bryan : Yeah, that’s right. And actually, that’s a really interesting example because what you’ve just described is what we call an HMI - a human machine interface. And just as you have a dashboard in your car, often times, like at an industrial site, you’ll have dashboards around equipment, or you’ll have centralized dashboards at a desk or something where you have a screen and someone can sit the and they see a bunch of that real time information from the devices around them displayed. Right. So same sort of dashboard where you have gauges, you have your oil pressure and oil temperature, you might have the same sort of thing with equipment, et cetera. Right. And so that’s like a human machine interface and that’s kind of a local display of that information. Right.

Jamie : Sure. Okay.

So then I’m just sort of trying to extrapolate from that then. So does that mean then IoT in industry is different from IoT commercially? Like if I’m buying or if I’m building something for myself for a personal project, is that a different “kind” of IoT? Hopefully everyone can hear the bunny quotes there to the IoT used in industry as an HMI, or maybe just to collect some data, or maybe I’ve got one that’s sitting in a field somewhere that’s collecting, I don’t know, atmospheric data or whatever. Is it a different “kind” of IoT or is it all the same?

Bryan :

Yes. So that’s a super interesting question. What’s interesting here is that we generally break this down. We break IoT down into three different market segments, which is: industrial, commercial, and personal. Or it’s not residential, it’s like personal IoT, consumer IoT. There you go. Sorry. Industrial, commercial and consumer IoT.

And by breakdown, this is really interesting because we often think about computing revolutions as things that are sort of in our face. Right. When the internet happened and we all started seeing .coms and we started getting connected to the internet and things like that, we had a real hero experience on our desktop machine. And when mobile hit, we got a supercomputer in the palm of our hands. And so we had a hero experience in the palm of our hands. And so those revolutions were really, really apparent. And what’s interesting about the IoT revolution is that it’s really a quiet revolution because while we have these while there is consumer IoT, smart-fridges and smart9toasters and things like that, Ring and Nest, that’s like a tiny fraction of the overall market.

So by our market estimation, our own research, it looks to be about 60% of IoT is in the industrial space, about 30% is commercial, and 10% is consumer. And just to break that down, when we talk about those things, when you say consumer IoT, it is things that consumers would integrate with, would consume, would interact with. So smart, thermostats smart appliances, things like that. And then when you move into the commercial space, you’re talking about med-tech, so medical technology, you’re talking about smart buildings and asset tracking and commercial use, commercial scenarios, et cetera.

But by and large, the biggest place in which IoT is installed is actually in the industrial sector, and that is industrial processing. That’s logistics, transportation, that’s agriculture - agtech - manufacturing. And so the IoT revolution is this massive, massive quiet thing where we don’t really see we just see the tip of the iceberg. And what I find super fascinating about this is that often times what we see is that we see the same solutions over and over in terms of, like, the hardware solution with different application and installation contexts.

So a lot of the IoT that you see, for instance, within, like, industrial or commercial, a lot of them from a hardware perspective are often very similar. But the applications that run on them and the installation context is pretty different. And we see that a lot with our customers. Like, we’ve seen some version of a smart pump over, and, over, and over, in which you’ve got an IoT controlled valve, maybe a flow sensor, and maybe like a distance sensor that measures how much liquid is in a container, right? And that could be a cistern, it could be in a well, and it could be then you control a valve and then you measure flow. And we’ve seen that over and over and over in a bunch of different contexts. So you might have a well monitor, you might have a propane tanks, propane storage monitor. You might have a smart pump.

We’ve seen this in emerging markets where in Africa they’re providing access to water sort of in a pay-as-you-go use case. And that, again, that’s like a smart pump. And so what’s interesting about this is that you see the same hardware solution over and over, but what you have is very wildly different applications that run on that and different contexts.


A Request To You All

If you're enjoying this show, would you mind sharing it with a colleague? Check your podcatcher for a link to show notes, which has an embedded player within it and a transcription and all that stuff, and share that link with them. I'd really appreciate it if you could indeed share the show.

But if you'd like other ways to support it, you could:

I would love it if you would share the show with a friend or colleague or leave a rating or review. The other options are completely up to you, and are not required at all to continue enjoying the show.

Anyway, let's get back to it.


Jamie : Okay. So I know from a previous project that I was attached to, I wasn’t involved with the potentially IoT side of it. We’ll find out whether it’s IoT in a moment.

But I was building a dashboard that exposed a bunch of data to people who were authorized to see it. This company were involved in large scale logistics, and what they wanted to do was for a container, I’ll just say a container, right? Because you can put some stuff in a container and then they would slap on it a low powered - maybe an NFC or something like that or maybe an IoT device of some kind - some microcontroller that would be able to it would have some kind of persistent connection to the web and it would be able to post a way to somewhere, “hey, I am in this location now. Hey, I am in this location now, and I am in this location.” They also then extended that to have like smart contracts. So you could just take the container, dump the stuff in it, attach the device and say, and scan it and say, that’s my contract. Whoever needs to pay for it and pick it up can then do whatever smart contract things need to need to do. But then they could track that package throughout wherever it went in the world. They could the see where it is in the distribution centers and stuff like that.

I feel like that’s perhaps way off coming into the individual consumer sector, because obviously if we’re putting every single package that it wasn’t Amazon, but let’s use Amazon as an example, because they’re the biggest e commerce company I could think of. If Amazon decided to put these IoT devices on every single package, that could get kind of wasteful. But for large scale distribution and logistics, it made sense because they could reuse the device. Right.

But would you see that as IoT? Was I doing IoT and not realizing?

Bryan : Yes, 100%. That is like a classic IoT use case. Putting something on a shipping container that takes a GPS, receives a GPS signal so it knows where it’s at. And maybe it has an e-paper display on there or something that you could with a QR code, you could scan, which might bring up information on the web about the manifest, and then it’s updating in real time, its location, maybe even some conditions within the container. Like if they’re shipping bananas, there might be a temperature and humidity sensor in there. And that’s also feeding that up to some dashboard that’s 100% IoT. And that’s a very classic logistics IoT use case.

And what’s interesting there is that you could take that same solution, relatively speaking, that same hardware setup, and you could put it in a different context. You could put that in a building and attach it to some expensive piece of medical equipment. And now all of a sudden, you’ve got effectively the same hardware, but in a totally different context. Doing commercial IoT, doing medical, or doing smart asset management, building asset management. Again. Totally IoT. Same hardware, different context.

Jamie : Right, I see.

Personal side story and looking behind the curtains. Hey, Mark, the editor. You can keep this one in. Giving some stuff away from the listeners there. I recently had to take a trip into the hospital walk in center. There was nothing wrong with me. Well, there was, but it was not serious. They needed a piece of equipment to do some kind of check on me. They couldn’t find the piece of equipment. Perhaps if they had consumer grade sorry, commercial grade IoT devices, they could have tracked where that piece of equipment was instead of having to wait for 3 hours whilst they found it.

Bryan : Yeah, 100%.

Jamie : Cool. Okay.

As a forms over data web dev, I guess. What’s my story for interacting with one of these devices? Am I having the thing POST out to me of the web? Do they work with the cloud? Right? Because I don’t know. So you’ve said it’s like a microcontroller. So I’m thinking because a little bit of background history on me when I started my college education. So over here in the UK, 16 to 18 years old. So I guess the final few years of high school in the States, I was actually playing around with a lot of microcontrollers. I actually got to use a Flight 68k, which is a Motorola 68k CPU and you could plug it into a Windows machine, drop out to DOS, write loads of code in C or an assembler, and watch it actually run on the device.

So if I’m constrained, my ability to send data is going to be constrained. Right? You were saying earlier on about sometimes HttpClient is a great thing to be able to use in .NET, but maybe that’s memory intensive. We know from our earlier conversation, NewtonsoftJSON, you probably don’t want to use that. You probably get away with System.Text.Json because that’s probably a little bit smaller. Or maybe there’s another library that does just serialize and deserialize. But as a developer, what’s my story? Posting out to the cloud or like server side stuff? If I’m collecting data or even if I’m pushing it out, is that a confusing difficult place to be? Because I can imagine prior to you guys doing the work that you did, it was all low level C, right?

Bryan : Yeah. So there’s kind of two different stories there, right there, there’s our story and then there’s sort of the rest of the marketplace. And our story is, “listen, you can connect to the cloud in a number of ways and you can get your data up into the places that you want a number of ways."

The first one is that you can directly call to the cloud. When you use our platform, you get a full network stack and you’re not locked into some proprietary messaging format. Right. There’s a lot of different things out there, but for example, Blues Wireless is a thing that you can plug in and you get cellular connectivity on existing IoT or microcontroller devices. But what you get is a proprietary messaging format and then it goes through their server and it’s very limited, right? And then there’s other solutions like you can use Particle; and Particle, you basically post to their cloud and you get these little tiny messages where you can send one piece of data and the it brokers on, et cetera, right? So

there’s a lot of different ways to do this, but with us the idea is, “listen, you can do it any way you want. If you want to just connect directly, open up HttpClient and make a RESTful request or even Soap or something, you can,” right? You just open up a connection to the cloud and send it on. You can also use our cloud integrations in which we handle all of the basically what happens is that you can use a log provider and you can just say Logger.log(), and here’s a message it can be JSON, it can be A, Blob, whatever you want. And that will save locally. And then when there’s connectivity, so it’ll cache it locally in a SQL database. And then when there’s connectivity, it can upload and upload on specific intervals and batch things up, and that’ll send it to MeadowCloud. And then there’s a bunch of integrations so you can automatically forward those on to things like Azure Event Hub or DataCake or any number of other places where you might want to send that data. So we offer really both ways. And from a .NET developer perspective, you can do whatever you want. You’ve got a full network stack, and that network stack is available to you. Whether you’re connected via WiFi, via Ethernet, via Cellular, it doesn’t really matter. You just have a network connection and you can go at it and do whatever you want.

So from a perspective of like a .NET developer, there’s not really a lot to think about here in the sense that you just program the way that you ordinarily would program. And because we’ve got .NET and we’ve got a really advanced runtime, things that are either incredibly difficult or just outright impossible, like try to do threading in Arduino, it doesn’t exist. You can’t do multiple threads in Arduino, but unless you go down to really start going to full C++ and use the things that are available there, if you’re writing Arduino wiring code, you just don’t have that. But in our platform, you’ve got threads, you’ve got Tasks, so you can do async/await and you can shove things off on a background thread and you can spin up a task, et cetera. So it’s really the same from a .NET developer perspective.

Jamie : Okay, so if I’ve got the full .NET stack with a Wilderness Lab device, right, I know from the early days of IoT, I feel like it became a bit of a meme and it was a bit mean to do this, but I feel like a lot of the early IoT adopters who were like, “quick, let’s just release loads of stuff!” Those developers were perhaps desktop or web developers who were then given this device - not one of yours, I must say. They were given a random piece of hardware and told, “create a Linux distro and write an app that sits on there and it doesn’t matter about security."

I remember there was a story about an IoT light bulb that connected, that you could connect to your home WiFi network and control it from an app on your phone or whatever. “Oh, I’ll have a green light today, I’ll have a yellow light today,” but that it’s the an attack vector into your network because it itself wasn’t secure. So I feel like it was a bit mean to pick on these developers because obviously their job wasn’t IoT or embedded systems but they became embedded systems developers. So I guess my question here is around security with IoT, is it even possible to do like TLS or is everything just you’re going out of a plain text web requests just HTTP, right? What’s the deal here?

Bryan : Yeah, that’s right. Historically IoT devices have been woefully insecure and really I suspect that the majority of installed institute devices today basically either have minimal security or none at all. And to your point, most devices out there don’t even support TLS. They don’t support SSL or HTTPS. With our devices that security was a priority zero for us. A lot of our customers are building critical infrastructure. They’re doing things in defence contexts, they’re doing things in contexts, in enterprise contexts where security is absolutely essential. And we think of that as a table stake. Right? That’s something that even just to play in the space you need to be secure and you need to be secure by default. And so for us, security has always been a driving force of the architecture and the architecture and implementation of our platform. So absolutely TLS is supported and that’s the default. So you talk over SSL, everything that we send to the server, we have device to server is completely 100% encrypted when you do over the air updates on our platform. All of those packages are not just encrypted but they’re actually signed with… they’re encrypted with a device’s public key so only that device can decrypt it. And then there’s secure boot so the package is signed and has to match the keys that are on device. You can’t just side load an application.

So yeah, we’ve thought about security really from hardware on up because for our customers that’s really a priority zero. And for them, like I said, this is table stakes. They can’t even install or deploy a device if it’s not going to have a default level of security. And like I said, most devices out there, most platforms out there don’t have that same security level or same security posture. For instance, most IoT devices out in the wild today, and most that you would buy today don’t even support SSL, right? And so that’s super important to.

Jamie : Sure, sure. And I feel like that it kind of goes a little bit - I’m not trying to excuse the lack of TLS in the wider world outside of .NET, IoT and Wilderness Labs hardware - but it feels like it’s related to like I said, a bunch of software developers suddenly became embedded hardware developers, and they were like, “we’ve got angel funding and we need to release the product to the world tomorrow. Get it working and we’ll fix it later.”

Bryan : There’s also a hardware challenge here, right, which is that hardware is still catching up with the use cases that folks want to solve. So a lot of the hardware is kind of a race to the bottom because especially in consumer IoT contexts, everything needs to be as cheap as absolute possible, right? And so when you do that, you start to use devices that have less memory and less flash and even storing certificates. Certificates add up pretty quickly - certificates needed for SSL. And so a lot of devices don’t even have that. They don’t even have the storage capacity for that. And also a lot of those things are add ons.

And that’s one of the challenges of doing hardware with traditional platforms, is that everything’s so piecemeal. You pick a micro RTOS, a micro real-time operating system, an operating system that runs on one of these microcontroller devices, which is not Linux. These are even smaller than that. And then you have to say, “okay, well, if I want TLS, I have to go find a TLS library.” Like, “okay, so I find embed TLS, and then I fight with CMake and configuration files to get that compatible with my OS version, and then I need these other things, et cetera.” And it’s very ala carte, but then you have to compile it all at once. There’s no dynamic loading. A lot of these devices don’t even have dynamic loader. That’s a convenience that we don’t even think about as .NET developers DLLs. And when you’re writing software for these devices, all that stuff has to be baked into the very beginning. And like I said, you quickly run out of space on these devices. I have talked to many customers who had installed some microcontroller out there, and if they want to add a new feature, they have to delete up another feature, right? They’re always sort of like swapping around memory and whatnot.

And what’s happening now is that these microcontroller devices are starting to get more powerful and they’re starting to match the use cases that folks need for them. And so we’re at a real sort of turning point, or a real inflection point in IoT in which the hardware is finally catching up in terms of their capability and matching the use case or scenario that folks need to build apps for. And so a lot of this is just historical legacy reasons that these things don’t exist. And then the other side of it, like I said, is just the software side. And that’s what makes hardware hard. It’s not the hardware generally, it’s writing the applications, it’s building the software. Because you exist in such a low-level place where so much of this tooling and whatnot is so primitive, I mean, embedded-C really hasn’t changed in 40 years, right? And if you want to write something embedded-C, you’re still fighting with all these low level make files and trying to get your operating system up and running, and then trying to find all of these things to be compatible with it. Like, “okay, I want to add SSL, so I need to go find a compatible TLS library,” and it’s just a headache. And then if you want SQL, “okay, I got to go find that SQL, and I got to go find one that’s compatible with this OS, and I got to get built in and stuff."

And for us, all that stuff’s just baked in from the get go. And so what we’ve built really is more like what you would be familiar with, like a mobile OS in terms of features and functionality, but running on a microcontroller. So you get those just out of the gate and you don’t have to really think about it.

Jamie : So we’ll come back to hardware being hard in a moment. And I’ve got a question about where is IoT going, but there was something you’d said there about if you were speaking to particular customers who were saying previously with non Wilderness boards, they may have had to remove a feature to add a new feature. And you reminded me of I mentioned it earlier on the Flight 68K, the Motorola 68k board, which I think had 32K of RAM. The may have had way less than that, but that would have been like total system memory. I remember having to map out the memory that I was allocating for the project I was working on, because I had to get another 2K from somewhere. I was like, “where am I going to store this data?” And so you brought back that memory for me. So I want to thank you for that I guess, for that.

Bryan : “I really appreciate that, Bryan. Thanks."

That’s a common thing. We hear that from our customers a lot that are building on these legacy microcontrollers and whatnot they want to add a feature. They literally have there’s a big memory map, and in this memory map, it’s like an old Atari video game or something. There’s a big memory map, and that’s where your features go. That’s where the data goes. And if you need different features, if you need to store some different data, then you’ve got to juggle things around. And it’s absurd to us as modern developers, right? Have you ever considered anything like that, writing a web app or a mobile app? Of course not. That’s just insanity.

Jamie : Yeah, because we have oodles of RAM, oodles of space; storage space for us is infinite almost because we’ve also got an operating system that will do like swapping of stuff out. Right. So you start to allocate too much memory. The something that’s not being used will be dumped to the hard drive to then give you more memory to play with because you’ve got swap space in your OS. And then I guess before it even gets to that you’ve got the garbage collector, right?

Bryan : Yes, that’s right.

Jamie : Yeah. You’re reminding me of those times.

Where is IoT going then, in your opinion? Is it going to change the world? Are we all going to be because like peeking behind the curtains, listeners I’m using an M2 Mac Air, which is an Arm chip; which, crazy thing, five years ago I’d have thought that Apple would stay with intel but here we are, right? So is the future eventually going to be we’re not going to have a computer. We’ll have a bunch of IoT things that communicate with a slightly more powerful thing to help us do our daily tasks. What is that? What’s the future look like?

Bryan : Yeah, I think that’s an interesting question right there’s. Unpacking it. There’s a couple of things there which is how do we interact with compute? And that’s super interesting because while you and I are sitting here on a desktop and that’s still a relatively common compute scenario and a place in which certain use cases are really only possible; a lot of you look at generationally and in the workplace today, you look at like young kids today don’t have computers. The have mobile phones and they do 95% of their compute on a mobile phone and maybe they might go to a computer just to type out a paper or something. But a lot of folks these days their compute interaction has shifted from a desktop computing context to mobile phone.

And the thing about IoT is that the promise I have IoT is that it can make a lot of this compute sort of just transparent in the sense that everywhere you go, you might interact with compute, it might interact with your phone, it might interact with your presence, but you don’t really even have to think about it. And so that is kind of an interesting question and I don’t have an answer here except to say that well, as compute gets moved into contexts and places that we never really considered before, the world will change in the same way that the world changed with mobile. I mean, I can’t even imagine driving on a road trip anymore without a mobile device with Google Maps, right? I mean, that drastically changed how we interact with navigation and how we see the world and that was all because of the mobile revolution. And the same thing will happen with devices installed basically everywhere.

But the other piece of this to unpack is like, well, how is it actually changing the world today? And that’s super interesting because like I said, IoT is the quiet revolution. But what’s happening is that in industrial contexts, IoT has already made massive, massive changes and will continue to make massive changes here. So if you look at like, agricultural technology - agtech - you look at productivity gains in food production, for instance, you’re seeing that smart agricultural setups can now produce a lot more food for much more efficient resource input. So you can maintain and manage soil chemistry and moisture in a much more efficient way without wasting fertilizer or wasting additional watering.

Or in industrial scenarios, in industrial manufacturing contexts, we’ve seen it already making huge differences there. So you have bolt on IoT devices that listen to device vibration and noise and energy usage and can tell you, “hey, listen, this giant machine here, which has X number of motors, we detected a vibration of this particular frequency, which tells me that this motor probably has a bearing that needs to be replaced. And if you schedule some preventative maintenance, then you can do that. You can take the downtime at night when the device is when the manufacturing is offline and then you won’t have unexpected downtime when this device, when this motor fails and stopping your production lines,” right? Or same thing with frequency. You can listen to CNC machines and the chatter and as they’re milling parts, it can automatically slow down the mill as it hits chatter and stuff like that. So what that does is it extends the tooling life and makes things much more efficient. We’re seeing productivity gains, massive productivity gains already in industrial scenarios.

And what I find really heartening here, actually is that if you look at resource usage and pollution and things like that and things that we’re sort of dealing with with climate change and the Anthropocene, 70% of all resource usage goes to industrial processing, right? So if you can make modest efficiency gains in massive industrial processes, then that can drastically lessen our impact on the planet. And so that’s really heartening to me. I see IoT really helping us out in our battle against our impact on the planet and being more efficient and being sort of better stewards.

And the we’re also seeing super interesting things happen in emerging markets. So just as the mobile revolution democratized access to computing, basically, if you go to SubSaharan Africa, what happened over the last 15 years is that folks that never had access to computing were computers, now they all have a mobile phone, right? And so in these emerging markets and these developing nations, you’re actually seeing democratized access to not just compute, but resources. So we have a customer that does a lot of stuff, that does a lot of stuff around resource access. So pay-as-you-go solar, and pay-as-you-go water, and things like that, that really democratize access to scarce resources in these emerging nations. And what’s happening is that these folks are getting access to these resources in a way that’s sort of communal and shared in a way that they weren’t able to before. And they’re able to sort of participate in the economy and they’re able to sort of participate in society as a whole in a larger context than they were before.

So we’re really seeing IoT change the world in a lot of different contexts. And of course, even at our house, so many folks have smart thermostats now. Smart thermostats will help make heating and cooling much more efficient. So we’re seeing that even in our own personal lives. So, yeah, I think we’re seeing the impacts of IoT really all over the world in a lot of different contexts. And largely they’re seeming to be very positive.

Jamie : Sure, yeah, you talked about smart thermostats. I’ve got a smart energy meter so that’s reporting electricity, gas, water usage back to my providers. But also I can see that data, too. Right. So I think you’re right. I think you said “quiet revolution.” I think we’re definitely in full swing of it. Right?

Bryan : That’s right.

Jamie : Awesome.

So I do know we’re running low on time today, but if you’re interested, I would love to have the “why is hardware hard?” conversation with you. Perhaps another time on a day and time when you’ve got more time, because I feel like that’s a from the from the points you’ve raised so far. I really want to dive into that and say, “what makes hardware hardware hard other than just picking the right operating system and the right libraries and stuff?"

But I guess the big question that I want to ask is let’s say I’ve got this idea. Maybe it’s a personal project, maybe it’s a project I’m working on for the company I work for or whatever, and I’m like, I want to do IoT, I want to do .NET. Where do I go to start doing that with you guys’stuff? Is it just wildernesslabs.co, and just push a button, and then File>New project? What’s the learning curve, I guess? How do I hello, world?

Bryan : Yeah, so first of all, you can find us at wildernesslabs.co, so that’s where you can find more information about us.

And if you want to start building, what I would say is go to our store - go to store.wildernesslabs.co and pick up either a dev kit, or a Feather, or pick up a Project Lab and just start building. Just start playing. The thing that I often recommend to folks is to get a Project Lab, which is kind of an IoT in a box. It’s a microcontroller based prototyping platform that has a bunch of built in sensors and it’s got a bunch of built in IO. And you can basically it has seed studio connectors as microbus connectors. It has Adafruit connectors. So you can go to Adafruit or seed studio or Spark Fund or Microelectronica, and you can buy any number from thousands of different peripherals. You just plug them in. There’s no soldering, there’s no breadboarding. And then we have drivers for basically everything out of the gate. So it’s very plug and play. And just start building. Pick a project and just start to hack on it. And join our Slack. There’s a link to our Slack at the bottom of our website. Come in and talk to us.

But yeah, just start building. Get a Project Lab board, figure out what you want to build, plug in some stuff. And by the way, there’s also a bunch of stuff already built into the Project Lab board. So there’s a bunch of onboard sensors, there’s a light sensor, there’s an IMU (Inertial Measurement Unit), or a nine axis accelerometer. There is temperature pressure, humidity sensor on there. There’s a big screen, there’s a bunch of buttons so you can do HDMI. So it’s already a fully packed board and it has like an RS-485 out connector, so you can plug in industrial sensors. There’s a bunch of stuff on there and I would say just start to build. Just grab one of those, pick an idea, start to build.

We also have a pile of samples up on Hackster. So if you go to our website and then you go to our documentation page, there is a big link. If you scroll down, it says “View projects on Hackster.” There’s a ton of cool projects on there to provide some inspiration and kind of see what you can do.

But just start building. And if you run into challenges, come talk to us because we’ve got a really great community, just like the .NET community at large. We have a really positive and supportive community and folks really like helping people and seeing people succeed. So come and chat and run ideas past us in the community. We can help you with those and give you pointers and get you rolling.

Jamie : Awesome. I really like that. I may have to check out the store myself and pick up one of these [Project] Lab boards because I got to get the kids interested in programming somehow. And if I can get a box that they can poke at and see stuff happening, then that’d be brilliant. Get a humidity sensor for the house or maybe a temperature sensor for some of the things that the kids are growing in the garden and stuff like that, that’d be cool.

Awesome.

Bryan : Fantastic.

Jamie : Brilliant.

Well, I guess for now, I guess for the short term. Bryan, it’s been wonderful chatting with you today and I just want to thank you for enlightening me and giving me that. I don’t want to say PTSD, but that flashback of memory mapping.

Bryan : Yeah, absolutely. It’s been a pleasure. Can’t wait to come on the show again and talk about more stuff.

Jamie : Awesome. Thank you ever so much.

Wrapping Up

Thank you for listening to this episode of The Modern .NET Show with me, Jamie Taylor. I’d like to thank this episode’s guest, Bryan Costanich, for graciously sharing his time, expertise, and knowledge.

Be sure to check out the show notes for a bunch of links to some of the stuff that we covered, and full transcription of the interview. The show notes, as always, can be found at the podcast's website, and there will be a link directly to them in your podcatcher.

And don’t forget to spread the word, leave a rating or review on your podcatcher of choice - head over to dotnetcore.show/review for ways to do that - reach out via our contact page, or join out discord server at dotnetcore.show/discord - all of which are linked in the show notes.

But above all, I hope you have a fantastic rest of your day, and I hope that I’ll see you again, next time for more .NET goodness.

I will see you again real soon. See you later folks.

Follow the show

You can find the show on any of these places