locked
Azure IoT hub reading messages issue RRS feed

Answers

All replies

  • Hi

    Where exactly you receive "No Content". Kindly take a look at this Device Explorer, It connects to the IoT hub you specify and you can monitor the messages flowing, add remove devices etc. Should help you debug. If you can elaborate on where you get the "No content" I might be of more help.

    Since the console application connects and you can receive messages, I think the IoT hub functioning correctly. What comes to mind is, your connected devices/simulators should be added as devices (since IoT Hubs have per-device security and SAS keys). And the connection string changes with the corresponding deviceID. This might be the issue.

    Hope this helps!

    Mert

    Monday, May 16, 2016 7:01 AM
  • Let me explain. I have check my connection string and I have only one device.

    I have two console applications. They are working with IoT hub and working correct. Here is screen:

    But..

    If I send message from Arduino - I can get result in console application.

    If I send message from UWP - I can get result in console application.

    I also can receive message in Device explorer.

    So, everything working fine exept that I can't recieve message in UWP and in Arduino.

    Here is Arduino code: https://gist.github.com/programmersommer/66cd7945d67615634866ad7b0377fc09

    And my UWP application is based on this example (have tried different transport types)

    Please confirm that you can recieve message from iot hub with Arduino or UWP App or may be better you can give me idea how to do it.



    Monday, May 16, 2016 6:42 PM
  • Can you share the connection string that you are using in the UWP app?

    Tuesday, May 17, 2016 5:30 AM
  • const string deviceConnectionString = "HostName=alexey.azure-devices.net;DeviceId=myDevice;SharedAccessKey=6mgzjotEzfbB0GL2ASlap3zXuMRqxWLGfhTHgtIW1FE=";

    PS: I can send message with this string

    PPS: By the way I have tried also string from console application (with DeviceId specified):

    const string deviceConnectionString = "HostName=alexey.azure-devices.net;DeviceId=myDevice;SharedAccessKeyName=iothubowner;SharedAccessKey=xrzUfBj8gaq2i310MhRCcSEs08t3lk7zbCNI4Tltqp4=";

    this string also working for sending messages (strange isn't?)


    Tuesday, May 17, 2016 7:16 PM
  • This sample demonstrate how to imitate iot device with UWP application.

    And sure one device can't read message from another device.

    Message should be send from cloud.

    To send message from cloud with UWP app it should be used Microsoft Azure IoT Service SDK

    Wednesday, September 14, 2016 3:31 PM