We are attempting to connect a vite react web app to an azure iot hub.
We’d like to use a .pem, and .key file to register the device with gobal.azure-devices-provisioning.net as shown in their github repo example
https://github.com/Azure-Samples/azure-iot-samples-node/blob/5e06db800818cf5a4d0dcfeea19c749f62a3c2d7/provisioning/Samples/device/register_x509.js#L52
but the “azure-iot-provisioning-device-http”, “azure-iot-security-x509″, and”azure-iot-provisioning-device” rely on node packages that are not included in the device version, so having the web app do the registration/communication appears to be off the table.
Since the app is going to be running in a wrapper on a tablet we then tried both iOS and android SDKs and found similar missing packages in their versions. they don’t seem to come with the capability to use the ProvisioningDeviceClient. I suspect that all of the microsoft sdk stuff is only intended for node.js or java servers, but they I didn’t notice them specifying that anywhere in their docs
So with that set up, are we trying to do something super rare and weird? did I miss some important setup step? Any guidance, or tutorials for this would be amazing. Thank you all in advance.
in the react app we imported
"azure-iot-device": "^1.18.3",
"azure-iot-device-mqtt": "^1.16.3",
"azure-iot-provisioning-device": "^1.9.1",
"azure-iot-provisioning-device-mqtt": "^1.8.1",
"azure-iot-security-x509": "^1.8.2",
but ran into those packages needing access to missing node.js packages like net and others to function. when i attempted the same thing in a simple node.js server app there was no problem and i was able to register with the server and connect.
in the iOS app we pod installed
pod 'AzureIoTUtility', '=1.5.0'
pod 'AzureIoTuMqtt', '=1.5.0'
pod 'AzureIoTuAmqp', '=1.5.0'
pod 'AzureIoTHubClient', '=1.5.0'
I went crawling around in their c code for a day and didn’t find anything for registering the device
in the android app we added to the gradle.build
implementation("com.microsoft.azure.sdk.iot:iot-device-client:1.30.1")
implementation("com.microsoft.azure.sdk.iot:iot-service-client:1.30.1")
implementation("com.microsoft.azure.sdk.iot:iot-device-client-provisioning:1.30.1")
but the com.microsoft.azure.sdk.iot.provisioning.device package doesn’t exist so we can’t get to the com.microsoft.azure.sdk.iot.provisioning.device.ProvisioningDeviceClient class