Leverage IoT SDK in module, propagate to device










0















I have a scenario where we have devices that can communicate via MQTT, but it is not possible to use the C SDK on them. I'd like to use the SDK in a edge module instead, and the edge module is responsible for intercepting device twin changes, and then using MQTT send them to the correct device.



I'd like for it to work like a transparent gateway, but the gateway will offload the need for the device to implement the SDK and simply know of a contract that we decide beforehand.



Is this possible? Is it a bad idea? Should I simply implement the parts of the SDK I need straight on the device instead?










share|improve this question






















  • Let me clarify a few things before I post an answer. 1) Can you share more details on why you cannot use the C SDK on the leaf devices? Is it due to size constraint? If so, please share the specification of the leaf devices. 2) In the scenario you are describing, the identity of the leaf devices is created in the module. Hence you are looking at an identity translation scenario (docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway). This is definitely possible. How many leaf devices are connected?

    – Yi Zhong - MSFT
    Nov 13 '18 at 19:12











  • Identity translation is exactly what I'm after. I've read all the documentation but I still don't understand how the edge module is supposed to do this. The transparent gateway is the simplest scenario and the only one that is documented. Regarding the SDK, the chip is simply too limited. It has a pre existing API using sockets that we'd like to leverage. The number of devices is pretty small, ranging in the hundreds in different regions at the moment I'd guess.

    – hochas
    Nov 14 '18 at 20:37















0















I have a scenario where we have devices that can communicate via MQTT, but it is not possible to use the C SDK on them. I'd like to use the SDK in a edge module instead, and the edge module is responsible for intercepting device twin changes, and then using MQTT send them to the correct device.



I'd like for it to work like a transparent gateway, but the gateway will offload the need for the device to implement the SDK and simply know of a contract that we decide beforehand.



Is this possible? Is it a bad idea? Should I simply implement the parts of the SDK I need straight on the device instead?










share|improve this question






















  • Let me clarify a few things before I post an answer. 1) Can you share more details on why you cannot use the C SDK on the leaf devices? Is it due to size constraint? If so, please share the specification of the leaf devices. 2) In the scenario you are describing, the identity of the leaf devices is created in the module. Hence you are looking at an identity translation scenario (docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway). This is definitely possible. How many leaf devices are connected?

    – Yi Zhong - MSFT
    Nov 13 '18 at 19:12











  • Identity translation is exactly what I'm after. I've read all the documentation but I still don't understand how the edge module is supposed to do this. The transparent gateway is the simplest scenario and the only one that is documented. Regarding the SDK, the chip is simply too limited. It has a pre existing API using sockets that we'd like to leverage. The number of devices is pretty small, ranging in the hundreds in different regions at the moment I'd guess.

    – hochas
    Nov 14 '18 at 20:37













0












0








0








I have a scenario where we have devices that can communicate via MQTT, but it is not possible to use the C SDK on them. I'd like to use the SDK in a edge module instead, and the edge module is responsible for intercepting device twin changes, and then using MQTT send them to the correct device.



I'd like for it to work like a transparent gateway, but the gateway will offload the need for the device to implement the SDK and simply know of a contract that we decide beforehand.



Is this possible? Is it a bad idea? Should I simply implement the parts of the SDK I need straight on the device instead?










share|improve this question














I have a scenario where we have devices that can communicate via MQTT, but it is not possible to use the C SDK on them. I'd like to use the SDK in a edge module instead, and the edge module is responsible for intercepting device twin changes, and then using MQTT send them to the correct device.



I'd like for it to work like a transparent gateway, but the gateway will offload the need for the device to implement the SDK and simply know of a contract that we decide beforehand.



Is this possible? Is it a bad idea? Should I simply implement the parts of the SDK I need straight on the device instead?







azure-iot-edge azure-iot-sdk






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 11:14









hochashochas

406415




406415












  • Let me clarify a few things before I post an answer. 1) Can you share more details on why you cannot use the C SDK on the leaf devices? Is it due to size constraint? If so, please share the specification of the leaf devices. 2) In the scenario you are describing, the identity of the leaf devices is created in the module. Hence you are looking at an identity translation scenario (docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway). This is definitely possible. How many leaf devices are connected?

    – Yi Zhong - MSFT
    Nov 13 '18 at 19:12











  • Identity translation is exactly what I'm after. I've read all the documentation but I still don't understand how the edge module is supposed to do this. The transparent gateway is the simplest scenario and the only one that is documented. Regarding the SDK, the chip is simply too limited. It has a pre existing API using sockets that we'd like to leverage. The number of devices is pretty small, ranging in the hundreds in different regions at the moment I'd guess.

    – hochas
    Nov 14 '18 at 20:37

















  • Let me clarify a few things before I post an answer. 1) Can you share more details on why you cannot use the C SDK on the leaf devices? Is it due to size constraint? If so, please share the specification of the leaf devices. 2) In the scenario you are describing, the identity of the leaf devices is created in the module. Hence you are looking at an identity translation scenario (docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway). This is definitely possible. How many leaf devices are connected?

    – Yi Zhong - MSFT
    Nov 13 '18 at 19:12











  • Identity translation is exactly what I'm after. I've read all the documentation but I still don't understand how the edge module is supposed to do this. The transparent gateway is the simplest scenario and the only one that is documented. Regarding the SDK, the chip is simply too limited. It has a pre existing API using sockets that we'd like to leverage. The number of devices is pretty small, ranging in the hundreds in different regions at the moment I'd guess.

    – hochas
    Nov 14 '18 at 20:37
















Let me clarify a few things before I post an answer. 1) Can you share more details on why you cannot use the C SDK on the leaf devices? Is it due to size constraint? If so, please share the specification of the leaf devices. 2) In the scenario you are describing, the identity of the leaf devices is created in the module. Hence you are looking at an identity translation scenario (docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway). This is definitely possible. How many leaf devices are connected?

– Yi Zhong - MSFT
Nov 13 '18 at 19:12





Let me clarify a few things before I post an answer. 1) Can you share more details on why you cannot use the C SDK on the leaf devices? Is it due to size constraint? If so, please share the specification of the leaf devices. 2) In the scenario you are describing, the identity of the leaf devices is created in the module. Hence you are looking at an identity translation scenario (docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway). This is definitely possible. How many leaf devices are connected?

– Yi Zhong - MSFT
Nov 13 '18 at 19:12













Identity translation is exactly what I'm after. I've read all the documentation but I still don't understand how the edge module is supposed to do this. The transparent gateway is the simplest scenario and the only one that is documented. Regarding the SDK, the chip is simply too limited. It has a pre existing API using sockets that we'd like to leverage. The number of devices is pretty small, ranging in the hundreds in different regions at the moment I'd guess.

– hochas
Nov 14 '18 at 20:37





Identity translation is exactly what I'm after. I've read all the documentation but I still don't understand how the edge module is supposed to do this. The transparent gateway is the simplest scenario and the only one that is documented. Regarding the SDK, the chip is simply too limited. It has a pre existing API using sockets that we'd like to leverage. The number of devices is pretty small, ranging in the hundreds in different regions at the moment I'd guess.

– hochas
Nov 14 '18 at 20:37












1 Answer
1






active

oldest

votes


















0














If anyone stumbles over this, we resolved it in a satisfactory way.



Downstream leaf devices connect to a module gateway and present their credentials. The module sends the credentials to the IoT Hub using a ProvisioningDeviceClient. The module is then responsible for handling the returned DeviceClient, and if a direct method or twin update is detected, the module propagates the change or method request to the leaf device using the appropriate transport method. In our case, this is either SFTP or sockets.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279792%2fleverage-iot-sdk-in-module-propagate-to-device%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    If anyone stumbles over this, we resolved it in a satisfactory way.



    Downstream leaf devices connect to a module gateway and present their credentials. The module sends the credentials to the IoT Hub using a ProvisioningDeviceClient. The module is then responsible for handling the returned DeviceClient, and if a direct method or twin update is detected, the module propagates the change or method request to the leaf device using the appropriate transport method. In our case, this is either SFTP or sockets.






    share|improve this answer



























      0














      If anyone stumbles over this, we resolved it in a satisfactory way.



      Downstream leaf devices connect to a module gateway and present their credentials. The module sends the credentials to the IoT Hub using a ProvisioningDeviceClient. The module is then responsible for handling the returned DeviceClient, and if a direct method or twin update is detected, the module propagates the change or method request to the leaf device using the appropriate transport method. In our case, this is either SFTP or sockets.






      share|improve this answer

























        0












        0








        0







        If anyone stumbles over this, we resolved it in a satisfactory way.



        Downstream leaf devices connect to a module gateway and present their credentials. The module sends the credentials to the IoT Hub using a ProvisioningDeviceClient. The module is then responsible for handling the returned DeviceClient, and if a direct method or twin update is detected, the module propagates the change or method request to the leaf device using the appropriate transport method. In our case, this is either SFTP or sockets.






        share|improve this answer













        If anyone stumbles over this, we resolved it in a satisfactory way.



        Downstream leaf devices connect to a module gateway and present their credentials. The module sends the credentials to the IoT Hub using a ProvisioningDeviceClient. The module is then responsible for handling the returned DeviceClient, and if a direct method or twin update is detected, the module propagates the change or method request to the leaf device using the appropriate transport method. In our case, this is either SFTP or sockets.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        hochashochas

        406415




        406415



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279792%2fleverage-iot-sdk-in-module-propagate-to-device%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Barbados

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3