Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.03k stars 1.19k forks source link

Device provision service in React Native. #30455

Closed Shahanshah-TA closed 1 month ago

Shahanshah-TA commented 1 month ago

I want to do Device provision for Azure IOT hub in React Native.

  1. Device provision with symmetric key
  2. Send telemetry message
  3. Device provision with certificate and key

How can I do that with React Native using SDK.

github-actions[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xirzec.

xirzec commented 1 month ago

We have a basic example of using an SDK with React Native here: https://github.com/Azure/azure-sdk-for-js/tree/main/samples/frameworks/react-native/appconfigBasic

Is there a specific issue you are running into with IOT Hub, @Shahanshah-TA ?

github-actions[bot] commented 1 month ago

Hi @Shahanshah-TA. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Shahanshah-TA commented 1 month ago

Hi @xirzec I am looking for equivalent of x509 register functionality from azure-iot-sdk-node in sdk-for-js to use it in React Native but I am not able to find it, as I can not use azure-iot-sdk-node

Shahanshah-TA commented 1 month ago

Hi @xirzec any update on this?

xirzec commented 1 month ago

@Shahanshah-TA I'm confused about what package you are using that you are having trouble with. I see there was a previous issue opened here: https://github.com/Azure/azure-sdk-for-js/issues/29142

Is there an @azure/ package in this repository you need help with? We cannot provide support for packages outside of this repository.

github-actions[bot] commented 1 month ago

Hi @Shahanshah-TA. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Shahanshah-TA commented 1 month ago

Hi @xirzec I was initially using azure-iot-sdk-node and I found out that azure-iot-sdk-node is specifically for node and doesn't support React Native and later I found out that Azure-sdk-for-js support React Native, so I switched Azure-sdk-for-js only. But now I am not able to find the functions which I need.

Requirement: My requirement is to Provision a device on IOT hub using symmetric key, after registration send telemetry message to IOT hub assigned, and Provision device with x509 certificate with React Native. For reference: Provision with symmetric key: https://learn.microsoft.com/en-us/rest/api/iot-dps/device/runtime-registration/register-device?view=rest-iot-dps-device-2021-10-01&viewFallbackFrom=rest-iot-dps-device-2021-06-01 Send telemetry message with MQTT: https://learn.microsoft.com/en-us/azure/iot/iot-mqtt-connect-to-iot-hub Provision device using x509 certificate: https://learn.microsoft.com/en-us/azure/iot-dps/how-to-control-access#certificate-based-authentication

Shahanshah-TA commented 1 month ago

Hi @xirzec Any update on this?

jeremymeng commented 1 month ago

@Shahanshah-TA as far as I know, we only have one management package related to iot hub in this repo https://github.com/Azure/azure-sdk-for-js/blob/ea4c874241b10e2bd72ea864ae362e14379d7e2c/sdk/iothub/arm-iothub/README.md#L9.

You probably would need to ask for help in the azure-iot-sdk-node repo.

Shahanshah-TA commented 1 month ago

Hi @jeremymeng azure-iot-sdk-node doesn't have React Native or browser support, anyway thanks for response. If I would have even 1% chance to switch to any other platform like AWS, I would have done that because documentation of Azure is so so bad that I can't even explain, you guys doesn't have browser supported package, you guys doesn't have iOS supported package. And luckily if you will find any package which support browser or iOS then you will not find all the functionality needed.