Connecting Intrinsyc Dev-kits to the Cloud
It’s fair to say that most IoT devices are connected to a public or private network of some sort – if not always-connected then sporadically connected. It used to be that significant heavy lifting would be required to get data off a device and into a database somewhere but not anymore. All of today’s cloud providers provide sample code in pretty much any language or operating system to easily get data off a device. A few lines of code and a link to a library and some secret keys is all that is required. It’s no longer a daunting task and no developer should be worried about the details of establishing a cloud connection.
In this blog post we’ll discuss the steps required to connect our Open-Q™ 410 Development Kit running Android on Microsoft Azure. You can find our Open-Q™ 410 Development Kit in the Azure Certified for IoT device catalog.
This blog will only speak to the high-level concepts and not the details. It is pedantic to say it, but all our dev kits can simply connect with any cloud provider with very little effort.
Cloud Connection Concepts
Our Open-Q™ 410 development kit is full featured development kit based on our 410 SOM. We’ve ported Linux, Android 7 and Windows 10 IoT to the kit so the choice is yours. The 410 SOM plugged into our carrier board with an LCD is a great starting point for developing value-based IoT products such as IoT gateways, wearables and edge devices. Our Open-Q 410 dev kit is pictured in Figure 1 below and here is a link to the detailed specs. You can buy one on our store and we’ll ship you one right away.
Figure 1 Open-Q™ 410 Development Kit with LCD
Azure is of course Microsoft’s Cloud and within the many Azure offerings, Microsoft’s IoT Hub is built for connecting billions of devices to the Cloud.
To connect our Open-Q™ 410 dev-kit to Azure is really quite straightforward; see Figure 2. The detailed instructions outlined in our technote uses:
- Our 410 dev-kit (but it equally applies to any of other dev kits)
running a Microsoft supplied Java sample app,
- a PC running Windows 10,
- a few apps including Android Studio & Microsoft’s Device Explorer app (Figure 3),
- an Internet connection and
- an Azure account (free or paid) (Figure 4).
Figure 2 Open-Q™ 410 development kit Azure Setup
Figure 3 Microsoft’s Azure IoT Hub Device Explorer
Figure 4 Microsoft’s Azure Console from a web browser
Here we go …
On your PC point your web browser at your Azure account and then fire up the Microsoft “Device Explorer” app (free download) – Device Explorer connects to the Azure IoT Hub and allows you to connect your devices to the IoT Hub via unique keys. To talk with your dev kit you will need Android Studio running an adb connection to the dev kit.
From Android Studio open the Azure IoT sample Java project and replace the device connection string supplied by the IoT Hub so the dev kit knows where to connect in the IoT Hub and run the Java sample app. As soon as the sample app is up and running on the dev kit it will begin sending messages to the IoT Hub. On the PC select “monitor” in Device Explore and you’ll see the messages appear in Device Explorer – voilà.
Optimizing for the Cloud
Obviously, there is a whole lot more that you can do with Azure and the IoT Hub! And that’s beyond the scope of this blog. One thing to keep in mind that our dev kits are really powerful computing devices equipped with high-performance CPU cores, GPUs and DSPs. Given this are many tasks (image processing, DSP processing, etc) that can be performed on the device rather than in the cloud. This means you can architect your cloud-connected device to minimize bandwidth, latency and cloud transaction charges. For example, rather than sending images to the cloud for facial recognition processing, you can easily perform facial recognition on the device and just send a small packet of data to the cloud to indicate a person’s face has been recognized. When you architect your system this way, you reduce the data making its way to the cloud (remembering bandwidth, latency, security, issues) which means you will be paying less in the cloud – after all, everything you do in the cloud has a transaction fee associated with it; but that’s a whole other topic.
It’s fair to say that pretty much every intelligent device will be network connected. In the case where you are designing your device to be connected to a public or private cloud; we’re here to help. We are experts in IoT devices and their network and cloud connections. Whether you are designing a derivative product from one of our kits or using off the shelf components, we can help with the design, development and building of your cloud connected device. In this example, we connected our dev kit to Azure, but it’s equally as simple to connect to AWS or any other public or private cloud.