How to provision an Azure IoT device from a mobile app

允我心安 提交于 2019-12-24 14:49:16

问题


My requirement is to develop a mobile app which itself register the mobile device in an IoT hub using provisioning services.

I am developing a mobile application using react native and Azure IoT Java SDK. It is to send telemetry data to Azure IoT hub. However I don't want to hard code the IoT connection details of each and every mobile devices.

There I met the IoT provision services which can be used to register the devices programmatically. My plan was to register device upon the installation or at the first boot up of the app. But the online help sources mentions that all the security attestation should be done by the manufacturer.

It seems I should store an x.509 intermediate certificate in the app and generate a leaf certificate to register the device. I feel this is a bad idea. What is the proper method to handle my situation?


回答1:


You can consider using symmetric key to provision via the Device Provisioning Service. Here are some links for your reference:

  • Documentation on Symmetric Key
  • Commit in the Java SDK that added symmetric key support

You can also use X.509 certificate. If you have the leaf certificate on the device, you can register the signing cert with the Device Provisioning Service and use enrollment group.



来源:https://stackoverflow.com/questions/55473488/how-to-provision-an-azure-iot-device-from-a-mobile-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!