locked
Unable to connect to iot hub using client sample app in c RRS feed

  • Question

  • Hi,

    I'm trying to run the sample apps associated with the iot hub client. My current task is to get the client sample to work with amqp and then again with amqp/websockets. I'm trying to do this on Windows using C in Visual Studio. 

    I've followed the steps for pre-requisites and the build process described in the readme files. Everything compiles fine. But when I run the app I see:

    IoT Hub SDK for C, version 1.0.1
    IoTHubClient_SetMessageCallback
    IoTHubClient_SendEventAsync accepted data for transmission to IoT Hub.

    But the confirmation callback routine is never called and after 30 seconds or so I see:

    Error: Time:Tue Mar  8 16:45:29 2016 File:C:\Source\IoT\azure-iot-sdks\c\iothub_
    client\src\iothubtransportamqp.c Func:_IoTHubTransportAMQP_DoWork Line:1142 AMQP
     transport authentication timed out.
    -> [CLOSE]* {}

    I have a device created and am certain that the connection string is correct. I've compiled and run the AMQP IoT Hub Client for both Java and C#. Both of those run successfully. I've also run the HTTP IoT Hub Client for C and it runs successfully for me.

    Is it possible that there's a setup step I've missed? It seems like there's a lot of activity on the GitHub for this project - is it possible I jumped in at the wrong time?

    Thanks for any help you can provide.

    Tuesday, March 8, 2016 9:48 PM

Answers

  • Hi Brad,

    Thank you for posting here

    Concern Product team pushed a new release recently with fixes related to sample in C

    Can you try these new bits out?

     If this doesn't helps let me know we can explorer other avenues.

    Regards,

    Asha

    ---------------------------------------------------------------------------------------------

    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

    Thursday, March 17, 2016 6:50 AM

All replies

  • Hi,

     Thank you for reaching out to us. I am currently researching to gather more information with regards to your request. I shall revert back to you with an update at the earliest. Sincerely appreciate your patience.

    Regards,

    Asha

    Wednesday, March 9, 2016 11:33 AM
  • Hi,

    Look like the firewall block the port for AMQP (Port 5671).

    Are you still facing this?

    We are  released a new build  recently to fix some of the AMQP issues.

    Let me know if any of these are not fixing your issue.

    Regards,

    Asha

    Sunday, March 13, 2016 11:30 AM
  • I am still having problems. I have a co-worker that is having the exact same problem with the demo code.

    I am fairly certain this is a defect in Microsoft's AMQP C client code.

    I have successfully run the C# and Java versions of the same sample code. If this was a firewall issue then those applications should have also failed.

    If you have other suggestions I'd be happy to try them. But as of right now I am still unable to proceed with my project.

    Thanks for your assistance,

    Brad

    Tuesday, March 15, 2016 6:31 PM
  • Hi Brad,

    Thank you for posting here

    Concern Product team pushed a new release recently with fixes related to sample in C

    Can you try these new bits out?

     If this doesn't helps let me know we can explorer other avenues.

    Regards,

    Asha

    ---------------------------------------------------------------------------------------------

    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

    Thursday, March 17, 2016 6:50 AM
  • 1.0.2 of the SDK does indeed seem to solve the issue.

    Thank you so much!

    Thursday, March 17, 2016 4:02 PM