How to provision ESP32 based device to IOT hub?

kian79
Posts: 30
Joined: Thu Jun 13, 2019 3:27 am

How to provision ESP32 based device to IOT hub?

Postby kian79 » Tue Nov 19, 2019 7:49 am

Hi all,

I am a question about provisioning an ESP32 device to Microsoft Azure IOT hub (or any other IOT based cloud sevice).

Basically, I am using MQTT to publish to a topic and subscribe a topic. I want to be able to upload sensor data to the cloud and also remotely control a device (through the cloud) via a mobile phone app. While I am prototyping this application, I do not have any problems. I just need to hardcode the MQTT server address, port number, username and password into the ESP device.

However, if I am exploring this in a commercial application, where users will buy a ESP32 based sensor product. They install the manufacturer's app on the phone, register an account with them via the app. Then the user should be able to start using the device. They can on/off the device via the app or read sensor data from the app.

So as a manufacturer, how do I actually set this up at the back end? I presume there should be an automated way to provision (if this is the right word to use) the device to the cloud service and auto create a MQTT username and password for the device? Is there any services out there that can do this? Are there any tutorials, examples, documentations that I can refer to? Eg. Azure, IBM, Amazon AWS, Google etc?

Thanks in advance!

Serena Yeoh
Posts: 8
Joined: Fri Sep 20, 2019 8:42 am

Re: How to provision ESP32 based device to IOT hub?

Postby Serena Yeoh » Tue Nov 26, 2019 9:04 am

Hi,

I am not sure if this idea helps, but you can get the users to sign-up on your page (hosted on Azure) and from there, you can use your azure credentials to create the device for the user. It is up to you to design how you want it to be - multi-tenant or shared-tenant. You can run scripts to provision Azure services.

Best Regards,

Who is online

Users browsing this forum: No registered users and 43 guests