none
IoT Hub connection using microcontroller RRS feed

  • Question

  • Hello every one,

    I am trying to connect with Microsoft azure using micro controller and GSM modem on AMQP protocol. I did connection with Microsoft azure but the after 240000 milliseconds connection was closed. Even though i am sending empty frames for every 2 minutes. Same thing i tried with Linux system then it is not closed until i close the application. why connection was closed with micro controller. please somebody help me with this.

    Best Regards,

    Srikanth L. 


    • Edited by Srikanth L Thursday, August 30, 2018 11:55 AM
    Thursday, August 30, 2018 11:49 AM

Answers

All replies

  • Hello Srikanth L,

    Can you detail the OS and micro controller you are using? If you are following any of the tutorials under https://docs.microsoft.com/en-us/azure/iot-hub/ let us also know so we can help you better.

    Thank you for your feedback!

    Thursday, August 30, 2018 11:20 PM
    Moderator
  • Hello,

    Thank you for replay. 

    I took a reference of C-Sdk of Iot hub client, and i am not using any OS, i am doing it in firmware. What ever data that has been sent to socket in C-Sdk, same data i am sending to EC25 modem using my micro controller with new SAS token and UUID's. And after azure connection i am able to receive messages from server, but connection was closed after 240000 milliseconds. Is there any way to make the connection stable for ever.

    Best Regards,

    Srikanth L.

      


    Saturday, September 1, 2018 5:31 AM
  • Hello Srikanth,

    Thanks for the clarification. Can you clarify also the protocol you are using?

    Because you mention 240000 milliseconds I would guess that it is AMQP. On AMQP protocol, after 4 minutes service side remote idle timeout is reached. The Azure IoT SDK handles the "keep-alive" procedures in order for your communication not being dropped. It also handles the reconnection logic.

    See:

    https://github.com/Azure/azure-iot-sdk-c/blob/master/iothub_client/inc/iothub_client_options.h

    https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/Iothub_sdk_options.md

    I strongly advise that you check the Benefits of using the Azure IoT SDKs, and pitfalls to avoid if you don’t .

    Let us know if we can help you further?

    ==========================================================

    If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here

    Monday, September 3, 2018 11:04 AM
    Moderator
  • Hello, 

    Thank you for replay.

    yes, i am using AMQP protocol, can you please give detailed information about Keep Alive procedure. So that my problem can be solved with that or can you please help me with providing C SDK for micro controller that runs with Free RTOS. Mean while i will go through the links above.

    Best Regrds,

    Srikanth L.

    Monday, September 3, 2018 1:21 PM
  • Hello, 

    Actually we trying to develop an embedded device that continuously connect to Azure Iot hub, and waiting for the data from server. we are doing this with Atmel micro controller( ATSAMV71N20 ) and Quectel GSM  modem(EC25), on AMQP protocol. we need CSDK or any procedure to maintain connection with server continuously. 

    I hope you got my problem, please help me with a solution for this.

    Thanks and Regards,

    Srikanth L.

    Monday, September 3, 2018 1:28 PM
  • Hello, 

    One main concern of mine is, Azure IOT connection should be done with GSM modem only.

    Please consider my concern and help me.

    Best Regards,

    Srikanth L.

    Monday, September 3, 2018 1:37 PM
  • Hello Srikanth L,

    Unfortunately we don't have a get_started for porting Azure IOT C SDK to ATSAMV71N20. General guidance on porting can be found hereWe have ports for Esp and STM that are running on FreeRTOS.  You can use that as a reference.

    I also advise that you Join the Azure Certified for IoT ecosystem.

    Let us know if you have further questions?

    Thank you!

    Wednesday, September 5, 2018 12:34 AM
    Moderator