I'm trying to implement an Azure IOT hub connection with MQTT using a custom WiFi driver. Has anyone else had any experience with this as I am having some problems?
My problem seems to be with the Azure SDK part of it, I know the WiFI driver is functioning correctly as I've already been using it with the Paho MQTT packet and the Eclipse broker.
I have my iot socket functions currently stubbed off and the first one that seems to get called is iotSocketGetHostByName() with the first argument being a pointer to the broker URL, but the URL is empty.
I believe I have setup the connection string correctly and I can step through the code to see that the url of the azure iot hub is being extracted correctly and is being stored. However it doesn't get passed to the iotSocketGetHostByName() function as it's not stored in the dns->hostname variable.
Any thoughts please.
I have 5.26.2.0.
I tried a clean new project and initially with the default setup I got 7. However when I turned on Use MicroLIB then it failed with 0 returned.
I probably don't need to use MicroLIB, I don't remember my reason for turning it on. But I think the function should still work with it?
Microlib is an alternative to the default C library tailored for deeply embedded applications. It is highly optimized for small code size.
Microlib does not attempt to be an ISO C-compliant library. www.keil.com/.../armlib_chr1358938938181.htm
This might explain behavior of vsnprintf when using NULL pointer and 0 size.
It seems that you should not use Microlib with the Azure SDK.
I know not to use it now.
Thanks for your help in tracing this issue.