question

samuelmeddows avatar image
0 Votes"
samuelmeddows asked AshokPeddakotla-MSFT commented

MXChip not connecting to IoT Hub

I am following the Azure MXChip Get Started guide but am not able to connect the device to IoT Hub.
https://docs.microsoft.com/en-us/samples/azure-samples/mxchip-iot-devkit-get-started/sample/

configuration-ui.png



I have tried the connection string for both the device and iothubowner however neither work.
The device after rebooting just has the text Running... > IoT Hub.

HostName=my-hub-name.azure-devices.net;DeviceId=MXChip-Dev;SharedAccessKey=STRING=

HostName=my-hub-name.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=STRING=

I can't see the device inside IoT Hub.

As this was last updated July 2020, has there been changes to the way the device needs to connect or do I need to set up any type of permissions for the device in IoT Hub?

Thanks.

azure-iot-hubazure-iot
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@samuelmeddows Please confirm on the ask? Let us know if you are still blocked and need further help?

1 Vote 1 ·


Hi @AshokPeddakotla-MSFT,

Thank you very much for your reply and apologies for the delay.

I checked the device connection string and following the process it is now working!
I must have had tired eyes or some network issues at the time.

Thank you for confirming the documentation is up to date.

Regards,

Samuel

0 Votes 0 ·

@samuelmeddows Glad to hear that!
If the response is helpful, please click "Accept Answer" and upvote it.

0 Votes 0 ·

1 Answer

AshokPeddakotla-MSFT avatar image
1 Vote"
AshokPeddakotla-MSFT answered

@samuelmeddows Welcome to Microsoft Q&A forum!

Documentation works as expected. Could you confirm, if you have registered a device and got the connection string as per the documentation?

Below is an example of the device connection string.

HostName={YourIoTHubName}.azure-devices.net;DeviceId=MyNodeDevice;SharedAccessKey={YourSharedAccessKey}

You have mentioned, I can't see the device inside IoT Hub. where are you looking for the device?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.