Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required ENV variables for C Iot Edge Module #2613

Closed
tcochunk opened this issue Apr 27, 2024 · 2 comments
Closed

Required ENV variables for C Iot Edge Module #2613

tcochunk opened this issue Apr 27, 2024 · 2 comments
Assignees
Labels

Comments

@tcochunk
Copy link

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:

  1. Is this the correct list of required ENV variables?
  2. Where do i get these values, specifically: IOTEDGE_MODULEGENERATIONID, IOTEDGE_APIVERSION, IOTEDGE_WORKLOADURI

Thank you for your assistance.

@ewertons ewertons self-assigned this May 8, 2024
@ewertons
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants