Question

pihlung on Tue, 12 Sep 2017 22:24:11


Regarding https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-iot-edge-physical-device

Have followed this walkthrough successful until:

using iothub-explorer you can monitor device-to-cloud messages using the following command: 

iothub-explorer monitor-events --login "HostName=FT-IoTHub.azure-devices.net; SharedAccessKeyName=iothubowner;SharedAccessKey=2t6..................tVI=”  

that I ran in command prompt in Windows 8.1. It replyed with:

"Monitoring events from all devices…

Error: error receiving reply from Event Hub management endpoint: undefined"

The walkthrough doesn't include any instructions of creating a Event Hub or endpoint! Is that a mistake?

That I tried with some success.

I can successful login with this command:

iothub-explorer login “HostName=FT-IoTHub.azure-devices.net; SharedAccessKeyName=iothubowner;SharedAccessKey=2t6..........................tVI=”

reply: "Session started..

The next command:

"iothub-explorer create SensorTag_01 --connection-string"

replied with:

"Error: UnauthorizedError: Unauthorized"

What is causing these errors, and how to solve them? All suggestions are appreciated. Thanks.



Sponsored



Replies

Jiong Shi on Wed, 13 Sep 2017 06:11:55


Dear friend,

I think if you use Windows, you can monitor the events using Device Explore, which is available on github:

https://github.com/Azure/azure-iot-sdk-csharp/tree/master/tools/DeviceExplorer

Furthermore, you can use this tool to create device SensorTag_01 and get the connection string.

formulahendry on Thu, 14 Sep 2017 00:22:45


You could try the cross-platform Azure IoT Toolkit extension for Visual Studio Code. It could monitor device-to-cloud message, manage Iot Hub Devices (create, delete, view), and also several other features to manage your Iot Hub.

pihlung on Fri, 15 Sep 2017 18:25:59


Thanks, I will try your suggestion: running Device Explorer locally on my Windows 8.1 PC.

and let you know my results..

Just wonder what is the difference to the Device Explorer from Azure Cloud that I can access from my IoThub-Device Explorer- Device Detail of SensorTag_01? From that Device Explorer I can do three things, but not see messages from Device. 



But I can/could toggle the RED/GREEN Led and SensorTag_01 with JSON messages

pihlung on Fri, 15 Sep 2017 19:43:24


Downloaded and installed SetupDeviceExplorer.msi from above URL. I noticed a difference in the Program title. In Githubs readme.md its "Device Explorer", on my pc its called "Device Explorer Twin"?? Is that a new name for the program? It certainly acts different than expected. Will try to build the source code.

I was able to pass the configuration page..

This error came when enter the Management tab..

Tried to create device with my sensor name "SensorTag_01", it had already generated some new keys?

Push create gave me this error message..

pihlung on Fri, 15 Sep 2017 23:58:53


Thanks for your suggestion, Sun!

I installed Visual Studio Code and the IOT HUB DEVICES extension all good, but when I selected "IoT: Set IoT Hub Connection String" nothing happent, besides 

display the Error "Command 'azure-iot-tootkit.refreshDeviceTree' not found!? 



formulahendry on Sat, 16 Sep 2017 02:13:58


Hi, pihlung. Could you please uninstall an re-install the Azure IoT Toolkit extension again? Sometimes, this error is due to the extension is not installed correctly.

pihlung on Tue, 19 Sep 2017 15:32:31


Thanks for all the feedback. 

I have to put this on the back burner for a little bit..