Closed tcochunk closed 2 months ago
Hi @tcochunk , these are the variables the azure-iot-sdk-c require for using *CreateFromEnvironment(): https://github.com/Azure/azure-iot-sdk-c/blob/main/iothub_client/src/iothub_client_core_ll.c#L160 https://github.com/Azure/azure-iot-sdk-c/blob/main/provisioning_client/adapters/hsm_client_http_edge.c#L46
Are you hitting any of these issues by any chance? https://stackoverflow.com/questions/59847753/getting-iotedge-workloaduri-is-required-exception-while-debugging-iot-edge-so
Hi @tcochunk , we will close this issue for now, but please feel free to reopen it if you would like to follow up. Thanks, Azure IoT SDKs Team.
I am pretty new to IOT development and VERY new to C development, so this may be an ignorant question. I am trying to create a very basic C based IOT module to give a co-worker as a sample/POC. I ma trying to create the solution in VS Code because that is what they use but i typically use Visual Studio for my c# development.
I followed the instructions here.
To reduce complexity and help debugging, I am using docker to pull and run the images on a raspberry pi (taking azure module deployment out of the picture). Once i did that, i am getting messages about Environment Variables not specified (no idea how there is a beginner tutorial that doesn't say anything about needing ENV variables). It looks like the following line is trying to get the ENV values (but i am VERY new to C so maybe not):
else if ((iotHubModuleClientHandle = IoTHubModuleClient_LL_CreateFromEnvironment (MQTT_Protocol)) == NULL)
in the IoTHubModuleClient_LL_CreateFromEnvironment method call.
From googling and the error messages, I think these are the values I need:
IOTEDGE_MODULEID - from azure IOTEDGE_DEVICEID - from azure IOTEDGE_IOTHUBHOSTNAME - from azure IOTEDGE_MODULEGENERATIONID - no idea IOTEDGE_GATEWAYHOSTNAME - hostname of host IOTEDGE_APIVERSION - not sure what this should be IOTEDGE_WORKLOADURI - no idea
I have 2 questions:
Thank you for your assistance.