Enabling use of Azure IoT Edge Transparent Gateway between device and Azure IoT Hub

I am using a nrf52840-based custom board with Nordic Connect SDK v2.3 and Openthread. A Raspberry Pi is my Thread Border Router and NAT64 translator (Thread is ipv6 while Azure IoT Hub is ipv4-only). The nrf52840-based device can successfully provision itself using the Azure Device Provisioning Service and then connect to its assigned Azure IoT Hub. I am now attempting to place an Azure IoT Edge "transparent gateway" between the NAT64 translator and Azure IoT Hub.

I have configured my Raspberry Pi as a transparent gateway using these instructions - its IoT Edge device name in IoT Hub is "my-pi-edge-device". I provisioned another device called "my-sensor" and assigned "my-pi-edge-device" as its parent device (see picture below).

However, "my-sensor" does not attempt to reach "my-pi-edge-device" and instead goes straight to "my-azure-iot-hub" after provisioning. How can I point "my-sensor" to use "my-pi-edge-device" as a transparent gateway?

What I am trying to do seems similar to this Microsoft sample, where GatewayHostName in the connectionString equals the IoT Edge device's hostname. However, I do not know how (or if) a GatewayHostName and connectionString are used in the Connect SDK.

  • Hi,

    This is just an update to let you know I've queried for any input if you're on the right track with your work around and I will let you know when I hear back from them. 

    Kind regards,
    Andreas

  • Hi,

    After going back and forth in the Azure team we've landed on that we can't really give you any other pointers than relatively vague speculation, but to us it seems like you're on the correct path with your design and approach. It seems that there is a lacking DNS64 support on the OTBR side (which should create the artificial address in the reply for NAT64), if that's the case, then generating the NAT64 IPv6 address from IPv4 on the app side seems ok. But it might also be a matter of configuring the DNS64 properly on the OTBR side.

    Again to clarify, this information is just some input and pointers and hopefully it does not confuse more than it verifies the process you're already on.

    Kind regards;
    Andreas

  • Ok, thank you for the update. I was out last week but I am resuming my work today.

  • After extensive development and debugging, I was able to connect my device to an Azure IoT Edge transparent gateway instance running on a Raspberry Pi. This same Raspberry Pi is also running my border router and NAT64. Since the Azure library within the Nordic Connect SDK does not use a connection string, I instead pointed my device to the IoT Edge's IP address (see my "broker_init()" function in an earlier comment, to which I have made slight changes). This meets all of our needs and will be a good solution for us.

Related