0
votes

I tried lot of articles,But couldn't complete this.I want to send messages from raspberry pi to IOT hub and from IoT hub to Raspberry Pi.

Currently following this documentation: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-python-python-c2d

Problem is when executing this code show an error called

Error: Time:Fri Feb  1 10:15:13 2019 File:/usr/sdk/src/c/iothub_client/src/iothub_client_core_ll.c Func:IoTHubClientCore_LL_CreateFromConnectionString Line:1463 iotHubName is not found
Error: Time:Fri Feb  1 10:15:13 2019 File:/usr/sdk/src/c/iothub_client/src/iothub_client_core.c Func:create_iothub_instance Line:941 Failure creating iothub handle
Unexpected error IoTHubClient.IoTHubClient, IoTHubClientResult.ERROR from IoTHub

code is

python SimulatedDevice.py

please help me to solve this problem. I installed python 3.5 to raspberry pi 3

What I want to know is how to use raspberry pi and Iot hub to tutn on led and turn off already on led.Please if you have any idea,tell me

1

1 Answers

2
votes

This error typically occurs if there's a problem with your connection string - it should look like this:

HostName=yourhubname.azure-devices.net;DeviceId=yourdeviceid;SharedAccessKey=yourdevicekey

There's also some useful information about library versions in these articles: