azure-iot-hub-device-management

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

Search an enrollment device on Device Provisioning Service via initialTwin tag

拥有回忆 提交于 2019-12-24 11:43:39
问题 I want to search a specific enrollment device on DPS (based on its 'OL' tag). For that, I use the next piece of code: QuerySpecification querySpecification = new QuerySpecificationBuilder("*",QuerySpecificationBuilder.FromType.ENROLLMENTS) .where("initialTwin.tags.OL='12345678ABCD'") .createSqlQuery(); Query query = provisioningServiceClient.createIndividualEnrollmentQuery(querySpecification); But, when I execute query.next() to fetch the results, always is returning all the devices in the