Reputation: 321
Using IoT Edge in a Nested Edge setup, I am able to send a message from a module (named senderModule) on the child IoT Edge to a module (named receiverModule) on the parent IoT Edge simply by putting the following route on the parent IoT Edge:
FROM /messages/modules/senderModule/outputs/output1 INTO BrokeredEndpoint("/modules/receiverModule/inputs/input1")
I cannot go the opposite direction (parent to child). Is there something I am missing?
Upvotes: 0
Views: 410
Reputation: 1683
There is no communication allowed from parent to child. In IoT edge communication, we can't send messages from Parent to Child. IoT edge routing is not supportive to parent to child communication.
If your downstream device is another IoT Edge device, then in the deployment manifest routes send any messages INTO $upstream
that you want to go to the gateway device.
The alternative procedure is
Python Code -> https://github.com/Azure/azure-iot-sdk-python/blob/main/azure-iot-device/samples/sync-samples/receive_direct_method.py
These two code blocks may help you for establishing direct communication.
Upvotes: 1