简体   繁体   中英

How to use "Azure IoT Hub Device Provisioning Service" from Android Application to register device and send telemetry reading to Azure IoT Hub?

We need to connect Android Application with Azure IoT Hub to send the telemetry readings at continuous intervals. For this communication, we would need to register the device with Azure IoT Hub. This process is easy and smooth if we have few handful of devices to connect. But, the android app can be installed by anyone from Play Store. To register the device at run time, we can use another Azure service Azure IoT Hub Device Provisioning Service (DPS) . But, the current SDKs that are available to connect with DPS belongs to C#, Node, Java etc.

Can anyone guide how we can connect android device/mobile phones to DPS and then send data to Azure IoT Hub?

FYI: So far, I have provisioned Azure IoT Hub, Azure IoT Hub Device Provisioning Service, linked my IoT Hub in DPS. Under Enrollment Groups, I have created a group and have "Symmetric Keys" with me to use.

References: This is good to start if android device is registered with Azure IoT Hub -> https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-android .

Please comment if you need any additional information.

TIA..

I think maybe I'm missing the point. You said the app was written in Java, right? if so, can't you just use the Java DPS SDK? Here is a link to a sample https://github.com/Azure/azure-iot-sdk-java/tree/master/provisioning/provisioning-samples/provisioning-symmetrickey-sample

I'm probably missing your question.

if you can't use Java, then we also have guidance on how to do it over either raw MQTT, or via the DPS REST API. Let me know and I can link those samples too (but Java SDK is simpler)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM