Select network interface - file upload #1986
Replies: 3 comments
-
@amitabhmodak - the short answer here that there's not really a way to do this via the SDK today. I'm wondering is it possible (both from OS perspective and your functional needs) for you to create the process the IoT SDK is running such that it is bound to the NIC you want already? Or at runtime in the process to somehow bind the entire bind itself to the NIC you want, globally? That might be the easiest way to solve this. Let's talk about why this isn't supported as of today in our SDK. The IoT SDK for sending telemetry messages, device twins, etc. only talks to IoT Hub. We plumb down to the TCP layer to do this. This means that for Linux at least, we can plumb up an option called The UploadToBlob logic, though obviously in the IoT SDK, is a bit different. It's entirely HTTPS based for both talking to IoT Hub and the backend Azure Storage. Since we only need to do HTTPS we do not plumb to the TCP layer. Instead we use an HTTP client. If you look in like This does mean that many of these options for the raw TCP layer don't necessarily have analogs in HTTPS/UploadToBlob in the way we're wired. I'm marking this as an enhancement. To set expectations though this isn't something on even our immediate term radar so I'd suggest you investigate alternative mechanisms than a SetOption. Sorry I don't have a better SDK answer for this. We have some docs cleanup work. #1702 is in flight to cleanup some of UploadToBlob misconceptions and #1711 is a cleanup of set option docs where I'll be explicit on options supported for UploadToBlob. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response @jspaith . |
Beta Was this translation helpful? Give feedback.
-
That makes sense. I'm leaving issue marked as an enhancement. If we ever made this though, learnings from this (and fixed where possible PR #1714) is we would give this a long descriptive name e.g |
Beta Was this translation helpful? Give feedback.
-
Hi,
This is a follow up from #960
This option:
IoTHubDeviceClient_SetOption(iothub_deviceclient_handle, OPTION_NET_INT_MAC_ADDRESS, mac_address);
Allows me to connect to the IoT hub through the selected network interface.
But it does not work with the file upload feature. (IoTHubDeviceClient_UploadMultipleBlocksToBlobAsync)
How can I upload a file through the selected network interface?
Amitabh
Beta Was this translation helpful? Give feedback.
All reactions