Giter Site home page Giter Site logo

azure / azure-iot-sdk-c Goto Github PK

View Code? Open in Web Editor NEW
573.0 102.0 738.0 60.14 MB

A C99 SDK for connecting devices to Microsoft Azure IoT services

Home Page: https://azure.github.io/azure-iot-sdk-c

License: Other

CMake 2.62% Shell 0.61% Batchfile 0.14% PowerShell 0.12% C 85.76% C++ 9.76% Makefile 0.04% C# 0.51% XSLT 0.01% Dockerfile 0.06% Python 0.36% Tcl 0.01%
azure iothub iot device-sdk sdk c c99 azure-iot azure-iot-sdks service-sdk

azure-iot-sdk-c's Introduction

Azure IoT C SDKs and Libraries

Build Status

Introduction

The Azure IOT Hub Device SDK allows applications written in C99 or later or C++ to communicate easily with Azure IoT Hub, Azure IoT Central and to Azure IoT Device Provisioning. This repo includes the source code for the libraries, setup instructions, and samples demonstrating use scenarios.

For constrained devices, where memory is measured in kilobytes and not megabytes, there are even lighter weight SDK options available. See Other Azure IoT SDKs to learn more.

Table of Contents

Critical Upcoming Change Notice

All Azure IoT SDK users are advised to be aware of upcoming TLS certificate changes for Azure IoT Hub and Device Provisioning Service that will impact the SDK's ability to connect to these services. In October 2022, both services will migrate from the current Baltimore CyberTrust CA Root to the DigiCert Global G2 CA root. There will be a transition period beforehand where your IoT devices must have both the Baltimore and Digicert public certificates which may be hardcoded in their application or flashed onto your WiFi module in order to prevent connectivity issues.

Devices with only the Baltimore public certificate will lose the ability to connect to Azure IoT Hub and Device Provisioning Service in October 2022.

To prepare for this change, make sure your device's TLS stack has both of these public root of trust certificates configured.

For a more in depth explanation as to why the IoT services are doing this, please see this article.

Getting the SDK

Please note, for constrained device scenarios like mbed and Arduino, there are better, lighter weight SDK options available. See Other Azure IoT SDKs to learn more.

Packages

The simplest way to get started with the Azure IoT SDKs on supported platforms is to use the following packages and libraries:

  • Arduino: Device SDK library in the Arduino IDE

  • Windows: Device SDK on Vcpkg

  • iOS: Device SDK on CocoaPod

    iOS Limitations

    • Authentication is limited to SAS keys on iOS. No certificate-based authentication is officially supported.
    • The Device Provisioning Client is not supported on iOS. Only the Azure IoT Hub device client is supported.

    For a more complete iOS experience including the two missing features above, please see our sample native Swift library built on top of the Embedded C SDK.

Linux

For other platforms - including Linux - you need to clone and build the SDK directly. You may also build it directly for the platforms above.

Samples

There are many samples available for the SDK. More information can be found here.

SDK API Reference Documentation

The API reference documentation for the C SDKs can be found here.

Other Azure IoT SDKs

To find Azure IoT SDKs in other languages, please refer to the guidance here.

  • Azure IoT SDK for Embedded C is an alternative for constrained devices which enables the BYO (bring your own) network approach: IoT developers have the freedom of choice to bring MQTT client, TLS and Socket of their choice to create a device solution.
  • Azure IoT middleware for Azure RTOS builds on top of the embedded SDK and tightly couples with the Azure RTOS family of networking and OS products. This gives you very performant and small applications for real-time, constrained devices.
  • Azure IoT middleware for FreeRTOS builds on top of the embedded SDK and takes care of the MQTT stack while integrating with FreeRTOS. This maintains the focus on constrained devices and gives users a distilled Azure IoT feature set while allowing for flexibility with their networking stack.

Developing Azure IoT Applications

To learn more about building Azure IoT Applications, you can visit the Azure IoT Dev Center.

Key Features

Device Client SDK

IoT Hub supports multiple protocols for the device to connect with : MQTT, AMQP, and HTTPS. MQTT and AMQP can optionally run over WebSockets. The Device Client SDK allows the protocol to be chosen at connection creation time.

The Device/Module Client SDK optionally allows creation of IoT Plug and Play devices.

If you're not sure which protocol to use, you should use MQTT or MQTT-WS. MQTT requires considerably fewer resources than AMQP and supports considerably more IoT Hub functionality than HTTPS. Neither AMQP nor HTTPS are guaranteed to have Device Client SDK implementations for new features going forward, such as Azure IoT Plug and Play.

✔️ feature available ✖️ feature planned but not supported ➖ no support planned

Features mqtt mqtt-ws amqp amqp-ws https Description
Authentication ✔️ ✔️* ✔️ ✔️* ✔️* Connect your device to IoT Hub securely with supported authentication, including private key, SASToken, X-509 Self Signed and Certificate Authority (CA) Signed. *IoT Hub only supports X-509 CA Signed over AMQP and MQTT at the moment.
Send Device-to-Cloud Message ✔️* ✔️* ✔️* ✔️* ✔️* Send device-to-cloud messages (max 256KB) to IoT Hub with the option to add custom properties. IoT Hub only supports batch send over AMQP and HTTPS only at the moment. This SDK supports batch send over HTTP. * Batch send over AMQP and AMQP-WS, and add system properties on D2C messages are in progress.
Receive Cloud-to-Device Messages ✔️* ✔️* ✔️ ✔️ ✔️ Receive cloud-to-device messages and read associated custom and system properties from IoT Hub, with the option to complete/reject/abandon C2D messages. *IoT Hub supports the option to complete/reject/abandon C2D messages over HTTPS and AMQP only at the moment.
Device Twins ✔️* ✔️* ✔️* ✔️* IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin tags, subscribe to desired properties. *Send reported properties version and desired properties version are in progress.
Direct Methods ✔️ ✔️ ✔️ ✔️ IoT Hub gives you the ability to invoke direct methods on devices from the cloud. The SDK supports handler for method specific and generic operation.
Upload File to Blob ✔️ A device can initiate a file upload and notifies IoT Hub when the upload is complete. File upload requires HTTPS connection, but can be initiated from client using any protocol for other operations.
Connection Status and Error reporting ✔️* ✔️* ✔️* ✔️* ✖️ Error reporting for IoT Hub supported error code. *This SDK supports error reporting on authentication and Device Not Found.
Retry policies ✔️* ✔️* ✔️* ✔️* ✖️ Retry policy for unsuccessful device-to-cloud messages have two options: no try, exponential backoff with jitter (default). *Custom retry policy is in progress.
Devices multiplexing over single connection ✔️ ✔️ ✔️ There are more limitations to multiplexing than captured in this table. See this document for more information.
Connection Pooling - Specifying number of connections ✖️ ✖️ ✖️
Azure IoT Plug and Play Support ✔️ ✔️ Ability to build Azure IoT Plug and Play devices.

This SDK also contains options you can set and platform specific features. You can find detail list in this document.

Provisioning Client SDK

This repository contains provisioning client SDK for the Device Provisioning Service.

✔️ feature available ✖️ feature planned but not supported ➖ no support planned

Features mqtt mqtt-ws amqp amqp-ws https Description
TPM Individual Enrollment ⚠️ ⚠️ ⚠️ 🚨We are announcing the deprecation of the utpm-c library support and DPS-TPM authentication support within the Azure IoT C-SDK.🚨 Starting May 2023, Microsoft will not provide support for this library. Existing applications using this library will continue to work as-is. We strongly recommend switching to DPS-X509 authentication using the tpm2tss OpenSSL Engine.

Connecting your device to the Device Provisioning Service via individual enrollment using Trusted Platform Module will continue to work as-is. This quickstart reviews how to create a simulated device for individual enrollment with TPM. TPM over MQTT is currently not supported by the Device Provisioning Service.
X.509 Individual Enrollment ✔️ ✔️ ✔️ ✔️ ✔️ This SDK supports connecting your device to the Device Provisioning Service via individual enrollment using X.509 leaf certificate. This quickstart reviews how to create a simulated device for individual enrollment with X.509.
X.509 Enrollment Group ✔️ ✔️ ✔️ ✔️ ✔️ This SDK supports connecting your device to the Device Provisioning Service via enrollment group using X.509 root certificate.

OS Platforms and Hardware Compatibility

The IoT Hub device SDK for C can be used with a broad range of OS platforms and devices.

The minimum requirements are for the device platform to support the following:

  • Support Azure IoT TLS over TCP/IP Requirements: https://docs.microsoft.com/azure/iot-hub/iot-hub-tls-support
  • Support SHA-256 (optional): necessary to generate the secure token for authenticating the device with the service. Different authentication methods are available and not all require SHA-256.
  • Have a Real Time Clock or implement code to connect to an NTP server: necessary for both establishing the TLS connection and generating the secure token for authentication.
  • Having at least 64KB of RAM: the memory footprint of the SDK depends on the SDK and protocol used as well as the platform targeted. The smallest footprint is achieved targeting microcontrollers.

Platform support details can be found in this document. You can find an exhaustive list of the OS platforms the various SDKs have been tested against in the Azure Certified for IoT device catalog. Note that you might still be able to use the SDKs on OS and hardware platforms that are not listed on this page: all the SDKs are open sourced and designed to be portable. If you have suggestions, feedback or issues to report, refer to the Contribution and Support sections below.

Porting the Azure IoT Device Client SDK for C to New Devices

The C SDKs and Libraries:

  • Are written in ANSI C (C99) and avoids compiler extensions to maximize code portability and broad platform compatibility.
  • Expose a platform abstraction layer to isolate OS dependencies (threading and mutual exclusion mechanisms, communications protocol e.g. HTTP). Refer to our porting guide for more information about our abstraction layer.

In the repository you will find instructions and build tools to compile and run the device client SDK for C on Linux, Windows and microcontroller platforms (refer to the links above for more information on compiling the device client for C).

If you are considering porting the device client SDK for C to a new platform, check out the porting guide document.

Deprecation Notes

MBED OS

  • Packages of azure-iot-sdk-c for MBED OS have been deprecated in January, 2023.

See also Deprecated Folders below for other relevant notes.

Contribution, Feedback and Issues

If you encounter any bugs, have suggestions for new features or if you would like to become an active contributor to this project please follow the instructions provided in the contribution guidelines.

Support

  • Have a feature request for SDKs? Please post it on Azure Community Feedback to help us prioritize.
  • Have a technical question? Ask on Stack Overflow with tag "azure-iot-hub".
  • Need Support? Every customer with an active Azure subscription has access to support with guaranteed response time. Consider submitting a ticket and get assistance from Microsoft support team
  • Found a bug? Please help us fix it by thoroughly documenting it and filing an issue on our GitHub issues.

Read More

SDK Folder Structure

/c-utility, /deps, /umqtt, /uamqp -

These are git submodules that contain code, such as adapters and protocol implementations, shared with other projects.

/build, /build_all

Build and checkin gate related folders.

/certs

Contains certificates needed to communicate with Azure IoT Hub.

/doc

This folder contains application development guides and device setup instructions.

/iothub_client

Contains Azure IoT Hub client components that provide the raw messaging capabilities of the library. Refer to the API documentation and samples for information on how to use it.

  • build: has one subfolder for each platform (e.g. Windows, Linux). Contains makefiles, batch files, and solutions that are used to generate the library binaries.
  • devdoc: contains requirements, designs notes, manuals.
  • inc: public include files.
  • src: client libraries source files.
  • samples: contains simple samples.
  • tests: unit and end-to-end tests for source code.

/provisioning_client

This folder contains client library for device provisioning client.

/samples

Contains samples demonstrating more complex E2E scenarios using SDK.

/testtools

Contains tools that are used in testing the libraries.

/tools

Miscellaneous tools.

Deprecated Folders

The following folders are deprecated.

/iothub_service_client

Contains libraries that enable interactions with the IoT Hub service to perform operations such as sending messages to devices and managing the device identity registry.

/provisioning_service_client

Contains libraries that enable interactions with the Device Proviosining service to perform operations such as setting policy around the enrollments.

/serializer

Contains libraries that provide modeling and JSON serialization capabilities on top of the raw messaging library.

Releases

The C SDK offers releases for new features, critical bug fixes, and Long Term Support (LTS). General bug fixes will not receive a separate release, but are instead contained within the LTS release. Versioning follows semantic versioning, x.y.z. or major.minor.patch. Any time the version is updated, it will be tagged x.y.z.

New Features and Critical Bug Fixes

New features and critical bug fixes (including security updates) will be released on the main branch. These releases will be tagged using the date formatted yyyy-mm-dd. A feature release will bump the minor version and reset the patch version to 0. A critical bug fix will bump the patch version only.

Long Term Support (LTS)

New LTS releases branch off of main and will be tagged LTS_<mm_yyyy>_Ref01. A new LTS release will inherit the version from the main branch at the time of the release. LTS branches are named lts_mm_yyyy for the month and year the branch was created.

An updated LTS release will occur when a critical bug fix (including security updates) is ported from the main branch. These updated releases will be tagged in the same manner except for a bumped Ref##, e.g. LTS_<mm_yyyy>_Ref02. The patch version will also be bumped. No new features and no general bug fixes will be ported to an LTS update.

LTS Schedule

Below is a table showing the mapping of the LTS branches to the packages released.

Package GitHub Branch LTS Tag LTS Start Date Maintenance End Date
vcpkg: 2024-03-04 lts_03_2024 LTS_03_2024 2024-03-04 2025-03-04
vcpkg: 2023-08-07 lts_08_2023 LTS_08_2023 2023-08-07 2024-08-07
vcpkg: 2023-04-20 lts_01_2023 LTS_01_2023_Ref02 2023-04-20 2024-04-20

'Maintenance End Date' refers to the end of life support of the related version.

Release Example

Below is a hypothetical example of versioning and tagging for the C SDK. minor versions are distinguished by color.

Release Node Drawing

  • The main branch is at version 1.8.2.
  • February 23, 2020: A new feature is released on main. The version bumps to 1.9.0, is tagged 1.9.0, and the release is tagged 2020-02-23.
  • July 9, 2020: A new LTS release occurs. A new release is created, the version remains 1.9.0, and the LTS release is tagged LTS_07_2020. The main branch bumps to 1.10.0 and is tagged 1.10.0.
  • August 2, 2020: A new feature is released on main: The main branch has already been bumped for an upcoming release so the version is unchanged. The release is tagged 2020-08-02.
  • September 28, 2020: A critical bug fix is released: The version on main bumps to 1.10.1, is tagged 1.10.1, and the release is tagged 2020-09-28. The critical bug fix is ported to the lts release LTS_07_2020 (and any other existing LTS branch) by creating a branch with name lts_07_2020_ref02, its version bumps to 1.9.1 and is tagged 1.9.1 and LTS_07_2020_Ref02. Any submodules that were part of the critical bug fix will be tagged with LTS_07_2020_Ref02.
  • December 14, 2020: A new feature is released on main. The version bumps to 1.11.0, is tagged 1.11.0, and the release is tagged as 2020-12-14.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Microsoft collects performance and usage information which may be used to provide and improve Microsoft products and services and enhance your experience. To learn more, review the privacy statement.

azure-iot-sdk-c's People

Contributors

andrew-buckley avatar anhashia avatar anporumb avatar aribeironovaes avatar az-iot-builder-01 avatar bertkleewein avatar cartertinney avatar cipop avatar damonbarry avatar danewalton avatar darobs avatar dcristoloveanu avatar dominicbetts avatar erich-wang avatar ericwol-msft avatar ewertons avatar geraldschmitt avatar iluican avatar jbobotek avatar jebrando avatar jetstreamroysprowl avatar jspaith avatar mamokarz avatar markrad avatar massand avatar mhshami01 avatar momuno avatar prmathur-microsoft avatar tameraw avatar ttins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-iot-sdk-c's Issues

Memory loss in case SDK is started with no Internet Connection

This is a follow up to issue #55 which was closed.

I did a regression test (I cloned master c861ec3 from 2017-02-09) and there is still a memory loss reported by valgrind and observable in /proc in case the SDK is started with no internet connection.
Looks like one of the two reported leaks is fixed, but the second one is still there.
I don't know how to reopen an issue so I decided to create a new one.

The attached sample can be used to reproduce by either making sure that the thing is not connected or by providing a connection string for a non existing url.

Here is valgrind output:

65,832 (4,848 direct, 60,984 indirect) bytes in 6 blocks are definitely lost in loss record 86 of 86
in create_openssl_instance in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:870
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: CRYPTO_malloc in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
3: SSL_new in /lib/x86_64-linux-gnu/libssl.so.1.0.0
4: create_openssl_instance in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:870
5: tlsio_openssl_open in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:1045
6: xio_open in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:87
7: mqtt_client_connect in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:891
8: SendMqttConnectMsg in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
9: InitializeConnection in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
10: IoTHubTransport_MQTT_Common_DoWork in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
11: IoTHubTransportMqtt_DoWork in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
12: IoTHubClient_LL_DoWork in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
13: ScheduleWork_Thread in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client.c:438
14: ThreadWrapper in /home/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/adapters/threadapi_pthreads.c:34
15: start_thread in /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312
16: clone in /build/eglibc-3GlaMS/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111

test.zip

I'd appreciate if you could have a look at this again.

ReceiveMessageCallback works with sendeventasync only

Hi All,
I am facing one issue with C SDK,
My requirement is sendingTo and receiveFrom IOTHub should work independently.
But when I verify with sample code unless i send some message to IOT hub receive call back is not invoking.

how can we achieve this behavior using IOT hub client library calls?

IOTHUB_CLIENT_CONFIRMATION_BECAUSE_DESTROY does not seems to be called upon desctruction

Hi,

Running our application UT after switching from 2016-09-09 to 2017-01-27 (sorry for this big gap :s), one of our test fails. This test send a lot of messages and destroys the iothub handle immediately. The previous behavior was that the confirmation callback was called with IOTHUB_CLIENT_CONFIRMATION_BECAUSE_DESTROY as confirmation status.

Now, on 2016-09-09 we don't see this call, the callback is not called anymore.

[MQTT] ConnectionStatus / EventConfirmation callback behaviors are not consistent when network is disconnected

In the release of "2016-11-17", when running the test cases to disconnect/resume network, the callback behaviors could be different, hence making the program to use Azure IoT device SDK become difficult to manage network situations.

Usually we expect "ConnectionStatus" callback will report connection status once the connection status is changed. However when disconnect/resume network manually, we'll found it's not true always. If the program starts with network disconnected, "ConnectionStatus" callback might not be called, and this might happened maybe 7 times out of 10 tries, and there are 3 times the ConnectionStatus callback will be called when doing the first call to "IoTHubClient_LL_DoWork()". This kind of behavior make it difficult to detect network disconnection, if the program is waiting for C2D message from IoT Hub.

"EventConfirmation" callback for "IoTHubClient_LL_SendEventAsync()" is also inconsistent. If the network disconnection is detected during the time trying to send the message, "EventConfirmation" will get a error callback, and this message is then aborted/dropped, hence a message level retry could be handled within this callback. If network is not resumed, then for the next message, "EventConfirmation" callback will never be called (if "messageTimeout" is not set) to reflect network error.

So the message sent callback might have two different result in corresponding to network disconnection, one is callback with error, the other is no callback or a callback with timeout error.

Please help to make the behavior consistent, so to avoid potential defects.

[MQTT][Linux] Segmentation fault due to looping call to xio_close

Hi,

On tag 2017-01-27, we experience a crash du to a looping call to the xio close function. Here is a part of the back trace.

Thread 1 "iothubAgentUT" received signal SIGSEGV, Segmentation fault.
0x00000000005c1fd8 in onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:374
374	                mqtt_client->fnOnErrorCallBack(mqtt_client, MQTT_CLIENT_CONNECTION_ERROR, mqtt_client->errorCBCtx);
(gdb) bt
#0  0x00000000005c1fd8 in onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:374
#1  0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#2  wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff098) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#3  0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff098)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#4  0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#5  onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376
#6  0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#7  wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff138) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#8  0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff138)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#9  0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#10 onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376
#11 0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#12 wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff1d8) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#13 0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff1d8)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#14 0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#15 onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376
#16 0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#17 wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff278) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#18 0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff278)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#19 0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#20 onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376
#21 0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#22 wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff318) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#23 0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff318)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#24 0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#25 onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376
#26 0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#27 wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff3b8) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#28 0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff3b8)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#29 0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#30 onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376
#31 0x00000000005d514e in indicate_open_complete (ws_io_instance=0x7fffe4000bc0, ws_io_instance=0x7fffe4000bc0, open_result=IO_OPEN_CANCELLED) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:83
#32 wsio_close (ws_io=0x7fffe4000bc0, on_io_close_complete=0x5c1500 <on_connection_closed>, on_io_close_complete_context=0x7fffff7ff458) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/wsio.c:834
#33 0x00000000005c8bb6 in xio_close (xio=<optimized out>, on_io_close_complete=on_io_close_complete@entry=0x5c1500 <on_connection_closed>, callback_context=callback_context@entry=0x7fffff7ff458)
    at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/c-utility/src/xio.c:116
#34 0x00000000005c1ffa in close_connection (mqtt_client=0x7fffec001220) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:66
#35 onOpenComplete (context=0x7fffec001220, open_result=<optimized out>) at /home/lmussier/workspace/IoTHubAgent/externals/azure-iot-sdk-c/umqtt/src/mqtt_client.c:376

I've avoid this crash with that patch :

diff --git a/src/mqtt_client.c b/src/mqtt_client.c
index 44bf153..e4959b2 100644
--- a/src/mqtt_client.c
+++ b/src/mqtt_client.c
@@ -373,7 +373,7 @@ static void onOpenComplete(void* context, IO_OPEN_RESULT open_result)
             {
                 mqtt_client->fnOnErrorCallBack(mqtt_client, MQTT_CLIENT_CONNECTION_ERROR, mqtt_client->errorCBCtx);
             }
-            close_connection(mqtt_client);
+            //close_connection(mqtt_client);
         }
     }
     else

But it's not a good way, since close_connection is not called this part of code is not executed, the client is in a weird state

    mqtt_client->socketConnected = false;
    mqtt_client->clientConnected = false;

I end up with this patch :

diff --git a/src/mqtt_client.c b/src/mqtt_client.c
index 44bf153..cb09792 100644
--- a/src/mqtt_client.c
+++ b/src/mqtt_client.c
@@ -373,7 +373,9 @@ static void onOpenComplete(void* context, IO_OPEN_RESULT open_result)
             {
                 mqtt_client->fnOnErrorCallBack(mqtt_client, MQTT_CLIENT_CONNECTION_ERROR, mqtt_client->errorCBCtx);
             }
-            close_connection(mqtt_client);
+            //close_connection(mqtt_client);^M
+            mqtt_client->socketConnected = false;
+            mqtt_client->clientConnected = false;
         }
     }
     else

Could you tell me if this is a valid correction?
If yes I'll keep my patch until the bug is fixed.

Question with Regard to Retry Policy

It looks like that currently the Retry Policy "Exponential_BackOff_With_Jitter" is the only one implemented.
For one of my use cases I would need something which retries e.g. every 2 minutes.
Is there a way to tweak "Exponential_BackOff_With_Jitter" to behave in such a way?

Do you have plans to implement additional retry policies ?

Make device twin sample to run on ESP8266

serializer/samples/devicetwin_simplesample is one good example how to use device twin (WITH_DESIRED_PROPERTY) and device method (WITH_METHOD).

But unfortunately, it currently does not work with ESP8266 (Sparkfun Thing Dev). I am not proficient in C but when I drill down I found that parson.c use sscanf but ESP8266 does not support sscanf (issue).

I really hope the device twin sample can work because it enables ESP8266 to be invoked with device method.

Connection intermittant

Having an issue in that initial connection to the Iot Hub is intermittent, it seems to sometimes hang whenever it reaches:

/*Codes_SRS_IOTHUBCLIENT_LL_02_021: [Otherwise, IoTHubClient_LL_DoWork shall invoke the underlaying layer's _DoWork function.]*/ handleData->IoTHubTransport_DoWork(handleData->transportHandle, iotHubClientHandle);

inside iothub_client_II.c @ line 766

Im using the mBed platform and cant follow the code because i cant breakpoint where inside the function pointer it specifically holds up?

Question about IoT Hub Certificates policy

I have a question about the policy of the TLS certificates used in IoT Hub.
Updating my embedded devices with new Certificates once they are released to customers is a severe issue for me.
So I want to know how long my "things" can work with Azure IoT hub.

The IoT hub is using a certificate "*.azure-devices.net". It will expire next year.
It is signed by a certificate "MSIT". It wil lexpire next year, too.
The root certifictae "baltimore" will expire in 2025.

Will the next certificates ("*.azure-devices.net" and "MSIT") be signed with the "baltimore" root certificate again?

Certificate validation issue when I try to read the certificate from the file instead of using cert.h file

I have created new crt file with the contents in cert.c file from azure-iot-sdk.

While initiating connection I have read the crt file and set the TrustedCerts option from the content in the crt file.

I am facing certificate validation error.
Error: ERR: server's cert didn't look good, X509_V_ERR = 20: error:00000014:lib(0):func(0):SSL lib

All the content in the cert.c are matching with the crt file but certificate validation fails.

Please let me know why this issue is occur?

Protocol : WebSocket over Amqp
Branch: 2016-11-17

Attached the crt file below ::

ca-certificates.crt.txt

Note: I have observed if I create a char array as global variable and load the certificate into that char array then its working. If i create a char array inside the function its not working.

Messages come back with data length 0

Hello,

When building the iothub_client_sample_mqtt messages get sent and arrive on the server but aren't coming back. When sending messages using iothub_messaging_sample. The client sample receives them but has a PAYLOAD_LEN of 0, so no data is displayed.

Do you have any idea why this could be happening or how to fix it?
Is there any way to check what the package contains when it's being sent to check if it actually contains data or view the data on IoT-Hub?

I have built the SDK myself.
Azure IoT-Hub was set up with the guide from your documentation.

Info: IoT Hub SDK for C, version 1.1.3

<- 10:21:28 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE = 0x01 | TOPIC_NAME: devices/xxxx/messages/devicebound %24.to=%2Fdevices%2Fxxxx%2Fmessages%2FdeviceBound | PACKET_ID: 27 | PAYLOAD_LEN: 0
Received Message [1] with Data: <<<>>> & Size=0

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

Need to override libwebsockets.a proxy detection (linux)

Apparently libwebsockets.a expects an environment variable "http_proxy" set to "hostname:port".
Ref: https://libwebsockets.org/lws-api-doc-master/html/md_README_8test-apps.html

On every linux distribution I've seen, http_proxy is set to "http://hostname:port".
Ref: https://wiki.archlinux.org/index.php/proxy_settings

This breaks libwebsockets.a and consequently the azure-iot-sdk for C, when trying to use WS over proxy. At the very least it should be documented, but ideally the SDK would override libsockets' handling via lws_set_proxy(), until the websockets library developers fix it.

At least, this is the behavior I'm seeing while using MQTT over WS.

Downloading mb size files from Cloud IOTHUB

Hi All,
I wanted few inputs for downloading mb size files from Cloud IOTHUB to device.
Currently I am sending and receiving data in json format to/fro cloud.
Now I need to download big size files,I have seen Raspberry Pi example for firmware download
but its using serializer library Model methods which I dont want to use.

We should have sample example to download from cloud blob?
How Can I achieve this?

Issues cross-compiling using an ARM custom toolchain

Hello all,

I am trying to compile the SDK for C, using Cmake and a toolchain for an ARM processor. I am having the following error:

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindOpenSSL.cmake:370 (find_package_handle_standard_args)
  c-utility/CMakeLists.txt:132 (find_package)

Any tips on how to keep going from here?

Thank you

Authentication timed-out Loop

I have a try catch around my code to send messages to iothub

    try:
        # ...
        iotHubClient = iothub_client_init()   
        #...
        while True:
            iotHubClient.send_event_async(message, send_confirmation_callback, i)

    except IoTHubError as e:
        print("Unexpected error %s from IoTHub" % e)
        return
    except KeyboardInterrupt:
        print("IoTHubClient sample stopped")

However, I'm getting the following errors over and over. They never bubble up to the catch block.

Error: Time:Thu Feb  2 21:12:57 2017 File:/path/to/azure-iot-sdk-python/c/iothub_client/src/iothubtransport_amqp_common.c Func:device_DoWork Line:1273 Authentication timed-out [devicename]
Error: Time:Thu Feb  2 21:12:57 2017 File:/path/to/azure-iot-sdk-python/c/iothub_client/src/iothubtransportamqp_auth.c Func:authentication_reset Line:637 Failed to reset the authentication state (authentication status is invalid: 2)
Error: Time:Thu Feb  2 21:12:57 2017 File:/path/to/azure-iot-sdk-python/c/iothub_client/src/iothubtransport_amqp_common.c Func:prepareDeviceForConnectionRetry Line:1043 Failed resetting the authenticatication state of device ▒{▒

I'm using the python sdk which wraps the c sdk.

MQTT Direct Method execution timeout

We are using the 2016-12-06 release of the C SDK on a linux device and are experiencing that the server looses MQTT connection to the device after 10 direct method executions. When connection is lost, the C2D method execution times out for 6 method executions until device connection is automatically reestablished. Once connection is reestablished, we are again able to do 10 successful direct method executions until the device disconnects.

Looking at the output on the device it is clear that the requested method is actually invoked on the device when MQTT connection looks like it is lost from the server side. However the replies being sent from the device never reaches the server and hence it times out waiting for the device to reply.

Below is a log output from the device. When we get the TOPIC_NAME: $iothub/methods/res/200/?$rid=4 output, the server requesting the method execution never receives a reply from the device. When rid is again incremented, a reply is received. Looks like the the problem is a hex/decimal mismatch problem between server/device for the $rid value?

I tried changing the following in iothubtransport_mqtt_common.c:

line 604: *request_id = (uint16_t)strtol(request_id_value+request_id_length, NULL, 16);
...
line 844: STRING_HANDLE msg_topic = STRING_construct_sprintf("$iothub/methods/res/%d/?$rid=%x", status_code, request_id);

This looks like it solves the problem, however there might be other problems related to this issue that I have not yet discovered.

-> 19:02:16 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=45 | PAYLOAD_LEN: 44
<- 19:02:17 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=46 | PAYLOAD_LE
N: 2
-> 19:02:17 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=46 | PAYLOAD_LEN: 44
<- 19:02:18 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=47 | PAYLOAD_LE
N: 2
-> 19:02:18 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=47 | PAYLOAD_LEN: 44
<- 19:02:19 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=48 | PAYLOAD_LE
N: 2
-> 19:02:19 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=48 | PAYLOAD_LEN: 44
<- 19:02:20 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=49 | PAYLOAD_LE
N: 2
-> 19:02:20 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=49 | PAYLOAD_LEN: 44
<- 19:02:21 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=4a | PAYLOAD_LE
N: 2
-> 19:02:21 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=4 | PAYLOAD_LEN: 44
<- 19:02:22 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=4b | PAYLOAD_LE
N: 2
-> 19:02:22 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=4 | PAYLOAD_LEN: 44
<- 19:02:27 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=4c | PAYLOAD_LE
N: 2
-> 19:02:27 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=4 | PAYLOAD_LEN: 44
<- 19:02:29 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=4d | PAYLOAD_LE
N: 2
-> 19:02:29 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=4 | PAYLOAD_LEN: 44
<- 19:02:31 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=4e | PAYLOAD_LE
N: 2
-> 19:02:31 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=4 | PAYLOAD_LEN: 44
<- 19:02:36 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=4f | PAYLOAD_LE
N: 2
-> 19:02:36 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=4 | PAYLOAD_LEN: 44
<- 19:02:40 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=50 | PAYLOAD_LE
N: 2
-> 19:02:40 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=50 | PAYLOAD_LEN: 44
<- 19:16:23 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=51 | PAYLOAD_LE
N: 2
-> 19:16:23 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=51 | PAYLOAD_LEN: 44
<- 19:16:27 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=52 | PAYLOAD_LE
N: 2
-> 19:16:27 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/methods/res/200/?$rid=52 | PAYLOAD_LEN: 44
<- 19:16:29 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE = 0x00 | TOPIC_NAME: $iothub/methods/POST/WhatIsPlaying/?$rid=53 | PAYLOAD_LE
N: 2

Network transport layer error handling issues

From @GrantEdwards on February 8, 2017 16:42

I've been testing on Linux with the "simulated device" sample app that
simulates two BLE temperatures sensors. So far I've tried three
different transports: HTTP/curl, AMQT and MQTT.

All appear to have error handling problems.

  • HTTP/curl

    Failure to open a connection (CA failure, auth failure, etc.)
    generates a handlful of error messages (typically 4-6 messages). It
    then spins in a loop retrying as fast as possible. This burns up
    all available CPU time and log space.

    The usual way to handle errors like this is to delay before
    retrying -- often with a truncated binary exponential backoff.

    https://en.wikipedia.org/wiki/Exponential_backoff#Binary_exponential_backoff

  • AMQP & MQTT

    Failure to open a connection (similar causes as above) fails
    silently. The TCP connection stays open, but there is no activity
    on the connection until the gateway is shut down -- which causes
    the TCP connection to be closed.

Has nobody else run into these problems?

IMO, transport layer failures like I mentioned need to generate an
intelligible log message (one log message per failure is enough) and
should then retry with a delay.

Copied from original issue: Azure/iot-edge-v1#126

Get error when run build_all\windows\build.cmd -c

Seems the default platform Win32 is not valid for some projects, I have to specify --platform x86/x64 to work around.

1>Project "D:\IoT\azure-iot-develop\serializer\samples\remote_monitoring\windows\remote_monitoring.sln" on node 1
(Clean target(s)).
1>D:\IoT\azure-iot-develop\serializer\samples\remote_monitoring\windows\remote_monitoring.sln.metaproj : error MSB
4126: The specified solution configuration "Debug|Win32" is invalid. Please specify a valid solution configurati
on using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Plat
form="Any CPU") or leave those properties blank to use the default solution configuration. [D:\IoT\azure-iot-dev
elop\serializer\samples\remote_monitoring\windows\remote_monitoring.sln]

Valgrind reports memory loss in xio.c

I am observing a memory increase when using Azure Device SDK from 2017-01-13.
It is several 100k a day. On my embedded device this means that it will not run over a long time.
So I tested my application using valgrind and it reports a memory loss in xio.c.

Here is the report from valgrind:
131 (16 direct, 115 indirect) bytes in 1 blocks are definitely lost in loss record 877 of 1,038
in xio_create in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:39
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: xio_create in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:39
3: create_openssl_instance in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:861
4: tlsio_openssl_open in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:1051
5: xio_open in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:90
6: mqtt_client_connect in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:865
7: SendMqttConnectMsg in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1553
8: InitializeConnection in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1594
9: IoTHubTransport_MQTT_Common_DoWork in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2287
10: IoTHubTransportMqtt_DoWork in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:89
11: IoTHubClient_LL_DoWork in /home/mm/mm/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:949
12: TransmitterIoTHubLL::WaitForSdkToBecomeReady(double) in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/src/Connection/TransmitterIoTHubLL.cpp:357
13: TransmitterIoTHubLL::Run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/src/Connection/TransmitterIoTHubLL.cpp:210
14: void std::_Mem_fn<void (TransmitterIoTHubLL::)()>::operator()<, void>(TransmitterIoTHubLL) const in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/build-DataAgent-Desktop-Debug/DataAgent
15: void std::_Bind_simple<std::_Mem_fn<void (TransmitterIoTHubLL::)()> (TransmitterIoTHubLL)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) in /usr/include/c++/4.8/functional:1732
16: std::_Bind_simple<std::_Mem_fn<void (TransmitterIoTHubLL::)()> (TransmitterIoTHubLL)>::operator()() in /usr/include/c++/4.8/functional:1720
17: std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (TransmitterIoTHubLL::)()> (TransmitterIoTHubLL)> >::_M_run() in /usr/include/c++/4.8/thread:115
18: /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
19: start_thread in /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312
20: clone in /build/eglibc-3GlaMS/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111

I am using "LL" API and I have selected MQTT for transport protocol.

[MQTT][Defect] connection retry policy implementation has chance to never able to retry at all

In "azure-iot-sdks\c\iothub_client\src\iothubtransport_mqtt_common.c",
there exist chances that retry will never happen due to the implemenation of function "RetryPolicy_Exponential_BackOff_With_Jitter()", and "CanRetry()".

In "RetryPolicy_Exponential_BackOff_With_Jitter()",

 int numOfFailures = (int) retryLogic->retrycount;
 size_t halfDelta = ((1 << numOfFailures) - 1) / 4;
 *delay = halfDelta + (rand() % (int)halfDelta);

The numOfFailures comes from current retryCount, and halfDelta based on retry count it could be a very big number due to (1 << numOfFailure), and delay value will be restricted as (halfDelta <= delay < halfDelta*2).

If retryCount = 30, halfDelta could be very huge, for halfDelta will be approximately 2 powered (retryCount - 2), which is 2 powered 28, a very huge number of seconds (for days) for next retry, and it lose the meaning of retry in reality.

Suggest to restrict delay between few seconds to few minutes, or just provide a way to configure a interval that's more predicable/reliable for real world scenario.

In "CanRetry()", the flow should be review again, for there exists logics that cause result never be set to true. Especially in these two part:

    if (retryLogic->retryStarted)
    {
        double diffTime = get_difftime(now, retryLogic->lastConnect);
        if (diffTime <= ERROR_TIME_FOR_RETRY_SECS)
        {
            // Just right time to retry
            if(diffTime > WAIT_TIME_SECS)
            {
                retryLogic->lastConnect = now;
                retryLogic->retrycount++;
                result = true;
            }
            else
            {
                // As do_work can be called within as little as 1 ms, wait to avoid throtling server
                result = false;
            }
        }           

Here the code restricts retry happening only when the code entry time (since last retry) is luckly between
((ERROR_TIME_FOR_RETRY_SECS-1)< diffTime <= ERROR_TIME_FOR_RETRY_SECS). If this piece of code is not hit, then the next chance to retry is in next code section:

       else
        {
            // last retry time evaluated have crossed, determine when to try next
            bool permit = false;
            size_t delay;

            if (retryLogic->fnRetryPolicy != NULL && (retryLogic->fnRetryPolicy(&permit, &delay, retryLogic) == 0))
            {
                if ((permit == true) && ((retryLogic->retryTimeoutLimitInSeconds == 0) || retryLogic->retryTimeoutLimitInSeconds >= (delay + get_difftime(now, retryLogic->start))))
                {
                    retryLogic->delayFromLastConnectToRetry = delay;

                    LogInfo("Evaluated delay %d at %d attempt to retry\n", delay, retryLogic->retrycount);

                    if (retryLogic->delayFromLastConnectToRetry <= ERROR_TIME_FOR_RETRY_SECS)
                    {
                        retryLogic->lastConnect = now;
                        retryLogic->retrycount++;
                        result = true;
                    }
                    else
                    {
                        result = false;
                    }
                }

In the above code section, the "delay" time will be update again in "RetryPolicy_Exponential_BackOff_With_Jitter()" function, which means, when elapsed time exceeds delay time, it won't connect right away, it then updates "delay" time again, and this time, this delay time could be even larger than last time before, and hence it's possible that no connection retry will be executed ever.

Usually we expect a connection retry will be executed when the elapsed time (since last retry) exceeds "delay" time, so at the time "diffTime > retryLogic->delayFromLastConnectToRetry", it should set result to true to enable execution of connection retry, not just to update "delay" time.

The above mentioned issue is found by running the sample code with manually disconnect/resume the network, and such kind of network error handling should be taken care in the code carefully for it might happen in real world case often.

MQTT - M2M?

I am trying to accomplish M2M communication, simulating a server using IOT Hub to contact clients. Is this possible?

I'm seeing the following behaviour:

Start listener:

1484894290:0469] NOTICE: Initial logging level 7
[1484894290:0471] NOTICE: Libwebsockets version: 1.6.3 1e9c1a5
[1484894290:0471] NOTICE: IPV6 not compiled in
[1484894290:0471] NOTICE: libev support not compiled in
[1484894290:0471] NOTICE: ctx mem: 135784 bytes
[1484894290:0472] NOTICE: canonical_hostname = yxc
[1484894290:0472] NOTICE: per-conn mem: 256 + 2126 headers + protocol rx buf
-> 00:38:10 CONNECT | VER: 4 | KEEPALIVE: 240 | FLAGS: 192 | USERNAME: xxxxx.azure-devices.net/icicle0/api-version=2016-11-14&DeviceClientType=iothubclient%2F1.1.4 | PWD: XXXX | CLEAN: 0
<- 00:38:10 CONNACK | SESSION_PRESENT: true | RETURN_CODE: 0x0
-> 00:38:10 SUBSCRIBE | PACKET_ID: 2 | TOPIC_NAME: devices/icicle0/messages/devicebound/# | QOS: 1
<- 00:38:11 SUBACK | PACKET_ID: 2 | RETURN_CODE: 1
-> 00:42:01 PINGREQ
<- 00:42:01 PINGRESP
-> 00:45:52 PINGREQ
<- 00:45:52 PINGRESP
-> 00:49:43 PINGREQ
<- 00:49:43 PINGRESP
-> 00:53:34 PINGREQ
<- 00:53:34 PINGRESP

Then send:

Sender:

Client icicle1 sending CONNECT
Client icicle1 received CONNACK
Client icicle1 sending PUBLISH (d0, q0, r0, m1, 'devices/icicle0/events/', ... (14 bytes))
Client icicle1 sending DISCONNECT

Why is my message not arriving at the subscriber? What should I check? AFAIk the topics look correct. I am listening using the sample in the SDK (MQTT over websockets) and sending using mosquitto_pub. Do I have some work to do on the portal side?

Also as a side question, where is the documentation for subscribing to a specific topic (e.g. .../messages/devicebound/this/specific/topic/#) ?

Make the ubuntu thingy compile ...

The ubuntu setup did not work for me. I had to edit the CMake file to find pow and azure_c_shared_utility/lock.h.

diff --git a/iothub_client/samples/iothub_client_sample_mqtt/linux/CMakeLists.txt b/iothub_client/samples/iothub_client_sample_mqtt/linu
index eaf8ac9..3cf08b1 100644
--- a/iothub_client/samples/iothub_client_sample_mqtt/linux/CMakeLists.txt
+++ b/iothub_client/samples/iothub_client_sample_mqtt/linux/CMakeLists.txt
@@ -8,7 +8,7 @@ if(WIN32)
     message(FATAL_ERROR "This CMake file is only support Linux builds!")
 endif()
 
-set(AZUREIOT_INC_FOLDER ".." "/usr/include/azureiot")
+set(AZUREIOT_INC_FOLDER ".." "/usr/include/azureiot"  "/usr/include/azureiot/inc")
 
 include_directories(${AZUREIOT_INC_FOLDER})
 
@@ -31,4 +31,5 @@ target_link_libraries(iothub_client_sample_mqtt
     curl
     ssl
     crypto
+    m
 )

Question about usage of TLS Certificates

In the programming examples, the TLS certificates are compiled into the code (certs.c).
I realize that it is actually three certificates where only one of them is a root certificate.
The certificates for “*.azure-devices.net” and “MSIT” are provided by the example in addition to the root certificate.
In my understanding only the root certificate ("baltimore") should be passed. Is there a specifc reason to pass the non-root certificates?

Memory leaks in case network connection got broken

Hi folks!

I use azure-iot-sdk-c "2017-01-27" f348ba0. Valgrind memory check reports heavy memory losses.
I have attached reproducable example which is a slightly modified iothub_client_sample_mqtt.c
main.cpp.zip

Steps done by me

  1. Make sure network connection to IoT HUb is ok
  2. Run attached sample application with your custom connection string within valgrind
  3. Observe for some minutes that IoT Hub receives messages from sample application
  4. "Break" network connection ( i used command: iptables -A OUTPUT -p tcp --dport 8883 -j DROP)
  5. Let sample application run many hours (15 hours on my side)

Results (memory losses) on my side:
crt_abstractions.c:683 (might be fixed meanwhile on master)
tlsio_openssl.c:799
tlsio_openssl.c:864
tlsio_openssl.c:870 (might be fixed meanwhile on master)
iothub_message.c:65

Full stack traces:
433,950 bytes in 2,921 blocks are definitely lost in loss record 885 of 909
in mallocAndStrcpy_s in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/crt_abstractions.c:683
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: mallocAndStrcpy_s in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/crt_abstractions.c:683
3: cloneMqttOptions in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:453
4: mqtt_client_connect in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:875
5: SendMqttConnectMsg in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
6: InitializeConnection in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
7: IoTHubTransport_MQTT_Common_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
8: IoTHubTransportMqtt_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
9: IoTHubClient_LL_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
10: iothub_client_sample_mqtt_run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:186
11: main in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:218

1,450,422 (9,856 direct, 1,440,566 indirect) bytes in 308 blocks are definitely lost in loss record 899 of 909
in create_openssl_instance in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:799
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: CRYPTO_malloc in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
3: sk_new in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
4: X509_STORE_new in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
5: SSL_CTX_new in /lib/x86_64-linux-gnu/libssl.so.1.0.0
6: create_openssl_instance in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:799
7: tlsio_openssl_open in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:1045
8: xio_open in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:87
9: mqtt_client_connect in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:881
10: SendMqttConnectMsg in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
11: InitializeConnection in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
12: IoTHubTransport_MQTT_Common_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
13: IoTHubTransportMqtt_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
14: IoTHubClient_LL_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
15: iothub_client_sample_mqtt_run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:186
16: main in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:218

3,883,052 (26,368 direct, 3,856,684 indirect) bytes in 824 blocks are definitely lost in loss record 906 of 909
in create_openssl_instance in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:864
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: CRYPTO_malloc in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
3: X509_LOOKUP_new in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
4: X509_STORE_add_lookup in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
5: X509_STORE_set_default_paths in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
6: create_openssl_instance in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:864
7: tlsio_openssl_open in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:1045
8: xio_open in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:87
9: mqtt_client_connect in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:881
10: SendMqttConnectMsg in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
11: InitializeConnection in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
12: IoTHubTransport_MQTT_Common_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
13: IoTHubTransportMqtt_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
14: IoTHubClient_LL_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
15: iothub_client_sample_mqtt_run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:186
16: main in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:218

24,533,786 (2,356,936 direct, 22,176,850 indirect) bytes in 2,917 blocks are definitely lost in loss record 909 of 909
in create_openssl_instance in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:870
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: CRYPTO_malloc in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
3: SSL_new in /lib/x86_64-linux-gnu/libssl.so.1.0.0
4: create_openssl_instance in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:870
5: tlsio_openssl_open in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:1045
6: xio_open in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:87
7: mqtt_client_connect in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:881
8: SendMqttConnectMsg in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
9: InitializeConnection in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
10: IoTHubTransport_MQTT_Common_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
11: IoTHubTransportMqtt_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
12: IoTHubClient_LL_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
13: iothub_client_sample_mqtt_run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:186
14: main in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:218

9,507,907 (332,800 direct, 9,175,107 indirect) bytes in 8,320 blocks are definitely lost in loss record 908 of 909
in IoTHubMessage_CreateFromByteArray in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_message.c:65
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: IoTHubMessage_CreateFromByteArray in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_message.c:65
3: iothub_client_sample_mqtt_run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:160
4: main in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/tests/MemoryChecks/Test2_iothub_client_sample_mqtt/main.cpp:218

Valgrind reports memory loss in crt_abstractions.c

I am observing a memory increase when using Azure Device SDK from 2017-01-13.
It is several 100k a day. On my embedded device this means that it will not run over a long time.
So I tested my application using valgrind and it reports a memory loss in crt_abstractions.c

21 bytes in 1 blocks are definitely lost in loss record 48 of 1,038
in mallocAndStrcpy_s in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/crt_abstractions.c:689
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: mallocAndStrcpy_s in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/crt_abstractions.c:689
3: cloneMqttOptions in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:402
4: mqtt_client_connect in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:859
5: SendMqttConnectMsg in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1553
6: InitializeConnection in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1594
7: IoTHubTransport_MQTT_Common_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2287
8: IoTHubTransportMqtt_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:89
9: IoTHubClient_LL_DoWork in /home/mm/wago/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:949
10: TransmitterIoTHubLL::WaitForSdkToBecomeReady(double) in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/src/Connection/TransmitterIoTHubLL.cpp:357
11: TransmitterIoTHubLL::Run() in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/src/Connection/TransmitterIoTHubLL.cpp:210
12: void std::_Mem_fn<void (TransmitterIoTHubLL::)()>::operator()<, void>(TransmitterIoTHubLL) const in /home/mm/eclipse/workspace/DataAgent/Source/ptxproj/build-DataAgent-Desktop-Debug/DataAgent
13: void std::_Bind_simple<std::_Mem_fn<void (TransmitterIoTHubLL::)()> (TransmitterIoTHubLL)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) in /usr/include/c++/4.8/functional:1732
14: std::_Bind_simple<std::_Mem_fn<void (TransmitterIoTHubLL::)()> (TransmitterIoTHubLL)>::operator()() in /usr/include/c++/4.8/functional:1720
15: std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (TransmitterIoTHubLL::)()> (TransmitterIoTHubLL)> >::_M_run() in /usr/include/c++/4.8/thread:115
16: /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
17: start_thread in /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312
18: clone in /build/eglibc-3GlaMS/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111

I am using "LL" API and I have selected MQTT for transport protocol.

Compilation issue while compiling using cross compiler for arm platform - Look like linking issue

I have compiled the azure iot SDK and copy the *.a files into the /usr/lib inside the sysroot of the tool chain. I am getting following errors. I am sure its not taking the file aziotsharedutil.a. There is an linking issue. Could you please check and tell me what is wrong here.

arm-wrs-linux-gnueabi-g++ -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -marm -mthumb-interwork -mtune=cortex-a8 --sysroot=/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi message_objs/.o connector/.o -ljson-c -lpthread -lcurl -lsqlite3 -lz -laziotsharedutil -liothub_client -luamqp -liothub_client_amqp_transport -liothub_client_http_transport -o CloudConnector

/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function get_perDeviceDataItem': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:624: undefined reference to VECTOR_find_if'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_GetSendStatus': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:2122: undefined reference to DList_IsListEmpty'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_eventHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:160: undefined reference to HTTPHeaders_Free'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_messageHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:227: undefined reference to HTTPHeaders_Free'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_SASObject': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:302: undefined reference to HTTPAPIEX_SAS_Destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_Unregister': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:663: undefined reference to VECTOR_erase'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_Destroy': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:840: undefined reference to VECTOR_size'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:845: undefined reference to VECTOR_element' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_httpApiExHandle':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:718: undefined reference to HTTPAPIEX_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_perDeviceList':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:742: undefined reference to VECTOR_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function reversePutListBackIn':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1302: undefined reference to DList_AppendTailList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1303: undefined reference to DList_RemoveEntryList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1304: undefined reference to DList_InitializeListHead' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_DoWork':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:2074: undefined reference to VECTOR_size' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:2080: undefined reference to VECTOR_element'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoEvent': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1310: undefined reference to DList_IsListEmpty'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1320: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoMessages':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1817: undefined reference to get_time' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1818: undefined reference to get_difftime'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1821: undefined reference to HTTPHeaders_Alloc' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1829: undefined reference to BUFFER_new'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1842: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:2042: undefined reference to BUFFER_delete'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:2044: undefined reference to HTTPHeaders_Free' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoEvent':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1453: undefined reference to HTTPHeaders_Clone' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1462: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1635: undefined reference to HTTPHeaders_Free' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function makePayload':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1220: undefined reference to DList_RemoveHeadList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1221: undefined reference to DList_InsertTailList'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoEvent': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1334: undefined reference to BUFFER_new'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1343: undefined reference to BUFFER_build' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1386: undefined reference to BUFFER_delete'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function make1EventJSONitem': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1077: undefined reference to Base64_Encode_Bytes'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function makePayload': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1277: undefined reference to DList_RemoveHeadList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1278: undefined reference to DList_InsertTailList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoEvent':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1445: undefined reference to DList_RemoveHeadList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1446: undefined reference to DList_InsertTailList'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoMessages': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1848: undefined reference to HTTPAPIEX_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1915: undefined reference to HTTPHeaders_FindHeaderValue' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1935: undefined reference to BUFFER_u_char'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1935: undefined reference to BUFFER_length' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1947: undefined reference to HTTPHeaders_GetHeaderCount'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoEvent': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1353: undefined reference to HTTPAPIEX_SAS_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1493: undefined reference to DList_RemoveHeadList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1494: undefined reference to DList_InsertTailList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1635: undefined reference to HTTPHeaders_Free' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoMessages':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1873: undefined reference to HTTPAPIEX_SAS_ExecuteRequest' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoEvent':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1533: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1556: undefined reference to BUFFER_new'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1563: undefined reference to BUFFER_build' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1574: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1630: undefined reference to BUFFER_delete' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1517: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1543: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1582: undefined reference to HTTPAPIEX_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1619: undefined reference to DList_RemoveHeadList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1620: undefined reference to DList_InsertTailList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1599: undefined reference to HTTPAPIEX_SAS_ExecuteRequest' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function DoMessages':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1959: undefined reference to HTTPHeaders_GetHeader' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_Register':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:503: undefined reference to VECTOR_find_if' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:567: undefined reference to VECTOR_push_back'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_SASObject': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:302: undefined reference to HTTPAPIEX_SAS_Destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_deviceSASObject': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:311: undefined reference to URL_EncodeString'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:348: undefined reference to HTTPAPIEX_SAS_Create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_Register':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:567: undefined reference to VECTOR_push_back' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:578: undefined reference to DList_InitializeListHead'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_eventHTTPrelativePath': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:98: undefined reference to URL_EncodeString'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_messageHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:246: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_Register': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:567: undefined reference to VECTOR_push_back'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_messageHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:227: undefined reference to HTTPHeaders_Free'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_eventHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:160: undefined reference to HTTPHeaders_Free'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_messageHTTPrelativePath': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:137: undefined reference to URL_EncodeString'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_eventHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:170: undefined reference to HTTPHeaders_Alloc'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:188: undefined reference to URL_EncodeString' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_eventHTTPrequestHeaders':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:160: undefined reference to HTTPHeaders_Free' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:160: undefined reference to HTTPHeaders_Free'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_eventHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:201: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:202: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:203: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:204: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:205: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_messageHTTPrequestHeaders': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:236: undefined reference to HTTPHeaders_Alloc'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:245: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_abandonHTTPrelativePathBegin':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:280: undefined reference to URL_EncodeString' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_messageHTTPrequestHeaders':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:227: undefined reference to HTTPHeaders_Free' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_httpApiExHandle':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:727: undefined reference to HTTPAPIEX_Create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function create_perDeviceList':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:750: undefined reference to VECTOR_create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function destroy_httpApiExHandle':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:718: undefined reference to HTTPAPIEX_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function IoTHubTransportHttp_SetOption':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:2175: undefined reference to HTTPAPIEX_SetOption' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_http_transport.a(iothubtransporthttp.c.o): In function abandonOrAcceptMessage':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1714: undefined reference to HTTPHeaders_Alloc' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1725: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1726: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1727: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1742: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1748: undefined reference to HTTPAPIEX_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1765: undefined reference to HTTPAPIEX_SAS_ExecuteRequest' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransporthttp.c:1800: undefined reference to HTTPHeaders_Free'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_message.c.o): In function IoTHubMessage_CreateFromByteArray': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:102: undefined reference to BUFFER_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:114: undefined reference to BUFFER_delete' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_message.c.o): In function IoTHubMessage_Clone':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:217: undefined reference to BUFFER_clone' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:239: undefined reference to BUFFER_delete'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_message.c.o): In function IoTHubMessage_GetByteArray': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:335: undefined reference to BUFFER_u_char'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:337: undefined reference to BUFFER_length' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_message.c.o): In function IoTHubMessage_Destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_message.c:512: undefined reference to BUFFER_delete' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_Destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:712: undefined reference to DList_RemoveHeadList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function device_twin_data_destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:72: undefined reference to CONSTBUFFER_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_Destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:725: undefined reference to DList_RemoveHeadList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function device_twin_data_destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:72: undefined reference to CONSTBUFFER_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_Destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:730: undefined reference to DList_RemoveHeadList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:737: undefined reference to tickcounter_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_SendEventAsync': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:820: undefined reference to DList_InsertTailList'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function attach_ms_timesOutAfter': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:759: undefined reference to tickcounter_get_current_ms'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function DoTimeouts': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:875: undefined reference to tickcounter_get_current_ms'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_DoWork': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:935: undefined reference to DList_InsertTailList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:931: undefined reference to DList_RemoveEntryList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function device_twin_data_destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:72: undefined reference to CONSTBUFFER_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function DoTimeouts':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:889: undefined reference to DList_RemoveEntryList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_SendComplete':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:991: undefined reference to DList_RemoveHeadList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_DeviceMethodComplete':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:1026: undefined reference to BUFFER_build' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_ReportedStateComplete':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:1097: undefined reference to DList_RemoveEntryList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function device_twin_data_destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:72: undefined reference to CONSTBUFFER_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_MessageCallback':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:1120: undefined reference to get_time' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_Create':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:452: undefined reference to tickcounter_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:466: undefined reference to DList_InitializeListHead'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:467: undefined reference to DList_InitializeListHead' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:468: undefined reference to DList_InitializeListHead'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:493: undefined reference to tickcounter_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:514: undefined reference to tickcounter_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_CreateFromConnectionString': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:181: undefined reference to STRING_TOKENIZER_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:211: undefined reference to STRING_TOKENIZER_get_next_token' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:213: undefined reference to STRING_TOKENIZER_get_next_token'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:386: undefined reference to STRING_TOKENIZER_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:248: undefined reference to STRING_TOKENIZER_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:228: undefined reference to STRING_TOKENIZER_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:236: undefined reference to STRING_TOKENIZER_get_next_token'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:245: undefined reference to STRING_TOKENIZER_get_next_token' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:256: undefined reference to STRING_TOKENIZER_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_CreateWithTransport': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:624: undefined reference to tickcounter_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:637: undefined reference to DList_InitializeListHead' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:638: undefined reference to DList_InitializeListHead'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:639: undefined reference to DList_InitializeListHead' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:664: undefined reference to tickcounter_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function dev_twin_data_create': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:94: undefined reference to CONSTBUFFER_Create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:101: undefined reference to tickcounter_get_current_ms' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function device_twin_data_destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:72: undefined reference to CONSTBUFFER_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function dev_twin_data_create':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:104: undefined reference to CONSTBUFFER_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll.c.o): In function IoTHubClient_LL_SendReportedState':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll.c:1408: undefined reference to DList_InsertTailList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll_uploadtoblob.c.o): In function IoTHubClient_LL_UploadToBlob_step3':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:665: undefined reference to HTTPAPIEX_ExecuteRequest' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:579: undefined reference to HTTPAPIEX_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:617: undefined reference to HTTPAPIEX_SAS_Create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:626: undefined reference to HTTPAPIEX_SAS_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:656: undefined reference to HTTPAPIEX_SAS_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll_uploadtoblob.c.o): In function IoTHubClient_LL_UploadToBlob_Impl':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:727: undefined reference to HTTPAPIEX_Create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:771: undefined reference to HTTPHeaders_Alloc'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:858: undefined reference to HTTPHeaders_Free' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:865: undefined reference to HTTPAPIEX_Destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:743: undefined reference to HTTPAPIEX_SetOption' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:744: undefined reference to HTTPAPIEX_SetOption'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll_uploadtoblob.c.o): In function IoTHubClient_LL_UploadToBlob_step1and2': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:184: undefined reference to BUFFER_new'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:196: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:510: undefined reference to BUFFER_delete'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:197: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:198: undefined reference to HTTPHeaders_AddHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:199: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:258: undefined reference to HTTPHeaders_ReplaceHeaderNameValuePair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:268: undefined reference to HTTPAPIEX_ExecuteRequest' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:386: undefined reference to BUFFER_u_char'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:387: undefined reference to BUFFER_length' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:510: undefined reference to BUFFER_delete'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll_uploadtoblob.c.o): In function IoTHubClient_LL_UploadToBlob_Impl': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:790: undefined reference to BUFFER_new'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:821: undefined reference to BUFFER_u_char' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:832: undefined reference to BUFFER_u_char'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:833: undefined reference to BUFFER_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:850: undefined reference to BUFFER_delete'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:855: undefined reference to BUFFER_delete' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:808: undefined reference to BUFFER_build'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothub_client_ll_uploadtoblob.c.o): In function IoTHubClient_LL_UploadToBlob_step1and2': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:331: undefined reference to HTTPAPIEX_SAS_Create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:341: undefined reference to HTTPAPIEX_SAS_ExecuteRequest' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothub_client_ll_uploadtoblob.c:370: undefined reference to HTTPAPIEX_SAS_Destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransportamqp.c.o): In function getTLSIOTransport': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp.c:19: undefined reference to platform_get_default_tlsio'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp.c:23: undefined reference to xio_create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(blob.c.o): In function Blob_UploadFromSasUri':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:87: undefined reference to HTTPAPIEX_Create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:355: undefined reference to HTTPAPIEX_Destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:103: undefined reference to BUFFER_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:113: undefined reference to HTTPHeaders_Alloc'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:122: undefined reference to HTTPHeaders_AddHeaderNameValuePair' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:143: undefined reference to HTTPHeaders_Free'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:145: undefined reference to BUFFER_delete' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:181: undefined reference to Base64_Encode_Bytes'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:131: undefined reference to HTTPAPIEX_ExecuteRequest' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:229: undefined reference to BUFFER_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:240: undefined reference to HTTPAPIEX_ExecuteRequest' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:267: undefined reference to BUFFER_delete'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:316: undefined reference to BUFFER_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:325: undefined reference to HTTPAPIEX_ExecuteRequest'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/blob.c:345: undefined reference to BUFFER_delete' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function destroyConnection':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:384: undefined reference to cbs_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:390: undefined reference to session_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:396: undefined reference to connection_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:402: undefined reference to xio_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:408: undefined reference to saslmechanism_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:415: undefined reference to xio_retrieveoptions'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:421: undefined reference to xio_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function attachDeviceClientTypeToLink':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:705: undefined reference to amqpvalue_create_map' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:711: undefined reference to amqpvalue_create_symbol'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:717: undefined reference to amqpvalue_create_string' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:723: undefined reference to amqpvalue_set_map_value'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:732: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:735: undefined reference to amqpvalue_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:738: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:727: undefined reference to link_set_attach_properties'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function isEventInInProgressList': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:274: undefined reference to DList_IsListEmpty'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function removeEventFromInProgressList': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:279: undefined reference to DList_RemoveEntryList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:280: undefined reference to DList_InitializeListHead' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function on_message_received':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:373: undefined reference to messaging_delivery_rejected' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:348: undefined reference to messaging_delivery_rejected'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:363: undefined reference to messaging_delivery_accepted' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:368: undefined reference to messaging_delivery_released'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function destroyMessageReceiver': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:871: undefined reference to messagereceiver_close'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:878: undefined reference to messagereceiver_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:882: undefined reference to link_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function removeEventFromInProgressList': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:279: undefined reference to DList_RemoveEntryList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:280: undefined reference to DList_InitializeListHead' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function rollEventBackToWaitList':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:286: undefined reference to DList_InsertTailList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_Create':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1203: undefined reference to VECTOR_create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_DoWork':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1333: undefined reference to VECTOR_size' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1357: undefined reference to VECTOR_element'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1375: undefined reference to connection_dowork' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function createMessageReceiver':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:935: undefined reference to messaging_create_source' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:940: undefined reference to messaging_create_target'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:946: undefined reference to link_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:953: undefined reference to link_set_rcv_settle_mode'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1001: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1003: undefined reference to amqpvalue_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function establishConnection': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:561: undefined reference to OptionHandler_FeedOptions'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:579: undefined reference to saslmssbcbs_get_interface' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:579: undefined reference to saslmechanism_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:591: undefined reference to saslclientio_get_interface_description' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:591: undefined reference to xio_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:598: undefined reference to connection_create2' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:605: undefined reference to session_create'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function set_session_options': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:532: undefined reference to session_set_incoming_window'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:538: undefined reference to session_set_outgoing_window' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function establishConnection':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:616: undefined reference to cbs_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:623: undefined reference to cbs_open'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function prepareForConnectionRetry': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1086: undefined reference to VECTOR_size'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1090: undefined reference to VECTOR_element' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function destroyEventSender':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:746: undefined reference to messagesender_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:749: undefined reference to link_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function getNextEventToSend': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:259: undefined reference to DList_IsListEmpty'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function trackEventInProgress': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:251: undefined reference to DList_RemoveEntryList'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:252: undefined reference to DList_InsertTailList' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function sendPendingEvents':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1045: undefined reference to message_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function getNextEventToSend':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:259: undefined reference to DList_IsListEmpty' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function sendPendingEvents':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1031: undefined reference to messagesender_send' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1045: undefined reference to message_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function createEventSender': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:795: undefined reference to messaging_create_source'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:801: undefined reference to messaging_create_target' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:807: undefined reference to link_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:816: undefined reference to link_set_max_message_size' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:827: undefined reference to messagesender_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:836: undefined reference to messagesender_open' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:854: undefined reference to amqpvalue_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:856: undefined reference to amqpvalue_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function sendPendingEvents':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1045: undefined reference to message_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function removeEventFromInProgressList':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:279: undefined reference to DList_RemoveEntryList' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:280: undefined reference to DList_InitializeListHead'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function rollEventBackToWaitList': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:286: undefined reference to DList_InsertTailList'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function establishConnection': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:645: undefined reference to connection_create2'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:654: undefined reference to session_create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function set_session_options':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:532: undefined reference to session_set_incoming_window' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:538: undefined reference to session_set_outgoing_window'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function establishConnection': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:665: undefined reference to connection_set_trace'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:667: undefined reference to xio_setoption' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:568: undefined reference to OptionHandler_Destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:632: undefined reference to connection_set_trace' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:634: undefined reference to xio_setoption'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function createMessageReceiver': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:962: undefined reference to link_set_max_message_size'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:973: undefined reference to messagereceiver_create' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:983: undefined reference to messagereceiver_open'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_GetSendStatus': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1506: undefined reference to DList_IsListEmpty'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1506: undefined reference to DList_IsListEmpty' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_SetOption':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1568: undefined reference to connection_set_trace' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1573: undefined reference to xio_setoption'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1632: undefined reference to OptionHandler_FeedOptions' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1643: undefined reference to xio_setoption'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1638: undefined reference to OptionHandler_Destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_Register':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1704: undefined reference to VECTOR_find_if' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1725: undefined reference to DList_InitializeListHead'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1786: undefined reference to VECTOR_push_back' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1811: undefined reference to VECTOR_size'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_Unregister': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1867: undefined reference to VECTOR_find_if'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function destroyEventSender': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:746: undefined reference to messagesender_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:749: undefined reference to link_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_Unregister':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1898: undefined reference to VECTOR_erase' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransport_amqp_common.c.o): In function IoTHubTransport_AMQP_Common_Destroy':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1913: undefined reference to VECTOR_size' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1918: undefined reference to VECTOR_element'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1922: undefined reference to VECTOR_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransport_amqp_common.c:1938: undefined reference to OptionHandler_Destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransportamqp_auth.c.o): In function getSecondsSinceEpoch': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp_auth.c:41: undefined reference to get_time'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp_auth.c:48: undefined reference to get_difftime' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransportamqp_auth.c.o): In function handSASTokenToCbs':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp_auth.c:105: undefined reference to cbs_put_token' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransportamqp_auth.c.o): In function authentication_authenticate':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp_auth.c:393: undefined reference to SASToken_Create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(iothubtransportamqp_auth.c.o): In function authentication_reset':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/iothubtransportamqp_auth.c:646: undefined reference to cbs_delete_token' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function IoTHubMessage_CreateFromUamqpMessage':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:403: undefined reference to message_get_body_type' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:416: undefined reference to message_get_body_amqp_data'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function readPropertiesFromuAMQPMessage': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:220: undefined reference to message_get_properties'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:231: undefined reference to properties_get_message_id' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:257: undefined reference to properties_get_correlation_id'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:282: undefined reference to properties_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function readApplicationPropertiesFromuAMQPMessage':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:304: undefined reference to message_get_application_properties' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:320: undefined reference to amqpvalue_get_inplace_described_value'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:327: undefined reference to amqpvalue_get_map_pair_count' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:377: undefined reference to amqpvalue_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:382: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:345: undefined reference to amqpvalue_get_map_key_value_pair'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:353: undefined reference to amqpvalue_get_string' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:360: undefined reference to amqpvalue_get_string'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:388: undefined reference to amqpvalue_destroy' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function readPropertiesFromuAMQPMessage':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:238: undefined reference to amqpvalue_get_type' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:241: undefined reference to amqpvalue_get_string'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:257: undefined reference to properties_get_correlation_id' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:282: undefined reference to properties_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:264: undefined reference to amqpvalue_get_type' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:267: undefined reference to amqpvalue_get_string'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:282: undefined reference to properties_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:264: undefined reference to amqpvalue_get_type'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function readApplicationPropertiesFromuAMQPMessage': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:388: undefined reference to amqpvalue_destroy'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function message_create_from_iothub_message': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:488: undefined reference to message_create'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:508: undefined reference to message_add_body_amqp_data' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:534: undefined reference to message_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:488: undefined reference to message_create' /opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function addPropertiesTouAMQPMessage':
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:25: undefined reference to message_get_properties' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:103: undefined reference to properties_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:47: undefined reference to amqpvalue_create_string' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:56: undefined reference to properties_set_message_id'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:63: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:73: undefined reference to amqpvalue_create_string'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:82: undefined reference to properties_set_correlation_id' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:90: undefined reference to amqpvalue_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:94: undefined reference to message_set_properties' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:103: undefined reference to properties_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:94: undefined reference to message_set_properties' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:33: undefined reference to properties_create'
/opt/windriver/wrlinux/7.0-ti-am335x/sysroots/armv7at2-vfp-wrs-linux-gnueabi/usr/lib/libiothub_client_amqp_transport.a(uamqp_messaging.c.o): In function addApplicationPropertiesTouAMQPMessage': /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:139: undefined reference to amqpvalue_create_map'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:153: undefined reference to amqpvalue_create_string' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:160: undefined reference to amqpvalue_create_string'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:167: undefined reference to amqpvalue_set_map_value' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:176: undefined reference to amqpvalue_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:179: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:176: undefined reference to amqpvalue_destroy'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:198: undefined reference to amqpvalue_destroy' /home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:185: undefined reference to message_set_application_properties'
/home/avenger/GIT/azure-iot-sdks/c/iothub_client/src/uamqp_messaging.c:198: undefined reference to `amqpvalue_destroy'

[ServiceClient] Messages ID is not sent

tHi,

I believe I should have open a new issue right after this one #34 but anyway, here is what we saw.

Hi @anporumb,

I've check df13ec1, we have the message properties et correctly. But we are missing the message Id.

IoTHubMessage_SetMessageId(messageHandle, "42");

Does not make 42 being the id of the message received on the device side.
I can't tell you if this a regression of the fix or a part of the previous bug I've don't seen.

Here is how we set message id

    IoTHubMessage_SetMessageId(messageHandle, "the id");
    IoTHubMessage_SetCorrelationId(messageHandle, "the correlation id));

    _iotHubMessagingResult = (int)IoTHubMessaging_LL_Send((IOTHUB_MESSAGING_HANDLE)_iotHubMessagingHandle, deviceId, messageHandle, (IOTHUB_SEND_COMPLETE_CALLBACK)_sendCompleteCallback, (void*)SEND_CONTEXT_STRING);

On the device side the message is received with no ID.
I've also check with 2017-02-10 and we encounter the same behavior.

Valgrind reports memory loss during SAS token renewal via MQTT

I got a valgrind report like this https://gist.github.com/vjrantal/bbf91a11f24b472d86cd632fecceafc6 with the following steps:

  1. The repository was checked out at commit 1865cd1
  2. I applied this diff https://gist.github.com/vjrantal/59c7edec8bdf5dbe6e67ecfc8de427ea so that SAS token got expired and renewed every now and then
  3. Run the app with command like this:
vjrantal@ubuntu:~/Software/azure-iot-sdk-c/cmake/iotsdk_linux/iothub_client/samples/iothub_client_sample_mqtt$ valgrind --leak-check=full ./iothub_client_sample_mqtt
  1. After the 200 messages were sent, sent a C2D message "quit" to the device so that it calls IoTHubClient_LL_Destroy and exists cleanly.

[mbed] Is there a plan to support mbed-os ?

Hi,

We are looking at mbed support in the SDK.
It seems thats sample are based on mbed (the lib) and mbed-rtos. While trying to upgrade (don't know if upgrade is appropriate here) to mbed-os we found that the mbed adapter is based on mbed/mbed-rtos/EthernetInterface.
So upgrading requires slight changes at the adapter level. Is there a plan to do so or mbed-os is not a tarrget for the SDK ?

Thanks.

[parson] Undefined behavoiur sanitizer runtime errors

Hi there,

I'm on c861ec3 and switched on the undefined behaviour sanitizer on clang. That gives me two runtime errors according to parson.

  1. c/parson/parson.c:388:24: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')
    #0 0x42bc0c in json_object_free c/parson/parson.c:388

  2. c/parson/parson.c:443:24: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')
    #0 0x42c209 in json_array_free /c/parson/parson.c:443

Best Regards,

Ingo

[Linux] Installation seems to be broken

Hi,

I've used to compile and install the SDK in a specific location before using it into my project. But it seems that the installation process is broken at least on linux.

1 - Using ./build.sh --install-path-prefix install_folder --use-websockets
Nothings is installed, note that I can't event find the folder install_folder

2 - Trigger the build from cmake : cmake ../azure-iot-sdk-c/ -DCMAKE_INSTALL_PREFIX=install_folder -Duse_wsio=ON
The only thing being installed is libwebsocket

> Install the project...
> -- Install configuration: ""
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/lib/pkgconfig/libwebsockets.pc
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/lib/libwebsockets.a
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/include/libwebsockets.h
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/include/lws_config.h
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/lib/libwebsockets.so.6
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/lib/libwebsockets.so
> -- Up-to-date: /home/lmussier/workspace/build-sdk/install_folder/include/libwebsockets.h
> -- Up-to-date: /home/lmussier/workspace/build-sdk/install_folder/include/lws_config.h
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-client
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-server
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-server-pthreads
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-server-extpoll
> -- Up-to-date: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-client
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-fraggle
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-ping
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/bin/libwebsockets-test-echo
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/share/libwebsockets-test-server/favicon.ico
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/share/libwebsockets-test-server/leaf.jpg
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/share/libwebsockets-test-server/libwebsockets.org-logo.png
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/share/libwebsockets-test-server/test.html
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/share/libwebsockets-test-server/libwebsockets-test-server.key.pem
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/share/libwebsockets-test-server/libwebsockets-test-server.pem
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/lib/cmake/libwebsockets/LibwebsocketsConfig.cmake
> -- Installing: /home/lmussier/workspace/build-sdk/install_folder/lib/cmake/libwebsockets/LibwebsocketsConfigVersion.cmake

In the two cases we can read

CMake Warning at CMakeLists.txt:238 (message):
  This package may only be installed when 'use_installed_dependencies' is ON

Could you explain how to build and install the SDK in a defined folder?
Thanks

IoTHub blob storage upload from file

AFAIU, the upload to the blob storage using the C SDK is limited to data that is 100% in-memory.

Is that correct?
Are there plans to support FILE* or callback methods to read large files in chunks but still upload them as one file to the cloud?

Having to buffer the whole file would either significantly limit the file size or require a chunking / dechunking mechanism on top of the blog storage.

Unfortunately, using C# is not option; C or C++ is set.

Will you upgrade libwebsocket ?

Hi,

My understanding is that the SDK uses libwebsocket 1.6.0, on the same branch we have 1.6.3 which bring some corrections (we are chasing a weird crash, always showing ws cleanup, occurring time to time after weeks of runs..)
Between 1.6.0 and 1.6.3 it seems libwebsocket gets some bug fixes (especially e7f9232c1aa48f505c6a317bc25f0430933dab4e).

I don't read all release notes from 1.6.0 to 2.1.0, but it seems we also have bug fixes on the way, the drawback is, the SDK won't compile out of the box with a 2.1.0 upgrade.
Could we, at least, imagine we go from 1.6.0 to 1.6.3 ?

[C][Linux][AMQP] Send a message from a message call back

From @lmussier on June 21, 2016 15:15

Hi,

I'm trying to send a message from a message received callback.
The use case it to sent a message upon message reception.

But it seems that I can't use IoTHubClient_SendEventAsync from within the message callback set via IoTHubClient_SetMessageCallback, I'm experiencing a dead lock when IoTHubClient_SendEventAsync try to lock the instance lock.

/* Codes_SRS_IOTHUBCLIENT_01_025: [IoTHubClient_SendEventAsync shall be made thread-safe by using the lock created in IoTHubClient_Create.] */
        if (Lock(iotHubClientInstance->LockHandle) != LOCK_OK)

The solution on my side would be to create a queue where I'll put messages to send, but this is more or less what is it done in the SDK.
Is the impossibility to use IoTHubClient_SendEventAsync from within message reception call back a wished behavior ?

Copied from original issue: Azure/azure-iot-sdks#646

Unable to Statically Link VC runtime (/MT, /MTd) in IoT Client Samples

From @don-noonan on December 28, 2016 15:5

We need to be able to statically link the VC runtime for Win32 builds, however when attempting to do so we get ~50 unresolved external symbol errors like the following:

Error LNK2019 unresolved external symbol __imp____stdio_common_vsscanf referenced in function __vsscanf_l iothub_client_sample_amqp_websockets C:\AzureIoT\azure-iot-sdk-c\cmake\iotsdk_win32\iothub_client\samples\iothub_client_sample_amqp_websockets\iothub_client_amqp_ws_transport.lib(parson.obj) 1

You can reproduce the errors by simply changing the Runtime Library setting in VS 2015 Configuration Properties > C/C++ > Code Generation > Runtime Libary.
For example, grab the sample iothub_client_sample_amqp_websockets and while in debug mode change the option to statically link the VC runtime by selecting Multi-threaded Debug (/MTd).

Sample Used:
iothub_client_sample_amqp_websockets

Development Environment:
Windows 10 Pro
Visual Studio Enterprise 2015 Update 3

Thanks for your help.

Don

Copied from original issue: Azure/azure-iot-sdks#1036

curl 27 Out of memory after change the protocol from amqp to websocket

In my application i am using libcurl and Iot SDK with websocket support. Recently I am facing one issue curl "curl 27 Out warning Out of memory" whenever i call API using libcurl to get SAS token.

My application execute in the below order.

  1. It use libcurl library to get SAS token
  2. Once it get SAS token then it use that token to connect to IoTHub and start sending messages using websocket over amqp
  3. In case if the token expired then it will use libcurl to request for new token.

I am facing out of memory in step 3. Initially in step 1 it is working but later if it ask SAS token for second time after connected with IotHub its start failing. But if I change the protocol from websocket to AMQP then all working good. I am doubting there is an issue in libwebsocket implementation. Its not releasing the resources properly.

Note: Both libWebsocket and libcurl using same openssl library version 1.0.1

Memory loss in case there is no Network

I am experiencing memory loss in case the sdk is started with no internet connection.
I have attached a minimum example which can be used to reproduce by either making sure that the thing is not connected or by providing a connection string for a non existing url.

Valgind reports the follwoing two definite memory losses:

100 bytes in 5 blocks are definitely lost in loss record 17 of 94
in mallocAndStrcpy_s in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/crt_abstractions.c:683
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: mallocAndStrcpy_s in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/crt_abstractions.c:683
3: cloneMqttOptions in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:421
4: mqtt_client_connect in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:875
5: SendMqttConnectMsg in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
6: InitializeConnection in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
7: IoTHubTransport_MQTT_Common_DoWork in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
8: IoTHubTransportMqtt_DoWork in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
9: IoTHubClient_LL_DoWork in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
10: ScheduleWork_Thread in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client.c:438
11: ThreadWrapper in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/adapters/threadapi_pthreads.c:34
12: start_thread in /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312
13: clone in /build/eglibc-3GlaMS/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111

54,860 (4,040 direct, 50,820 indirect) bytes in 5 blocks are definitely lost in loss record 94 of 94
in create_openssl_instance in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:870
1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: CRYPTO_malloc in /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
3: SSL_new in /lib/x86_64-linux-gnu/libssl.so.1.0.0
4: create_openssl_instance in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:870
5: tlsio_openssl_open in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/tlsio_openssl.c:1045
6: xio_open in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/src/xio.c:87
7: mqtt_client_connect in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/umqtt/src/mqtt_client.c:881
8: SendMqttConnectMsg in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1596
9: InitializeConnection in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:1637
10: IoTHubTransport_MQTT_Common_DoWork in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransport_mqtt_common.c:2371
11: IoTHubTransportMqtt_DoWork in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothubtransportmqtt.c:95
12: IoTHubClient_LL_DoWork in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client_ll.c:950
13: ScheduleWork_Thread in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/iothub_client/src/iothub_client.c:438
14: ThreadWrapper in /home/ptxproj-2.5.23/local_src/azure-iot-sdks-master/c/c-utility/adapters/threadapi_pthreads.c:34
15: start_thread in /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312
16: clone in /build/eglibc-3GlaMS/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111

test.zip

compiler warnings

Hi there,

I'm on c861ec3 and compiling with my own makefile which turned on -Wall which gives roughly 100 warnings. Our coding guideline requires -Wall and that there are no warning et all. Some are more cosmetically but some are more serious ones like forgotten enums in a switch e.g.
Please give your code base a review with some modern compiler like clang 3.9 and turned on all warnings.

Best Regards,

Ingo

Valgrind reports use of uninitialized memory

When sending a cloud to device message valgrind reports usage of uninitialized memory.
I am not able to tell if this is a false positive or not.
So I'd like you to kindly ask you to have a look at this.

This can be reproduced like this:

  1. Start the iot hub client sample with valgrind.
    (https://github.com/Azure/azure-iot-sdk-c/tree/master/iothub_client/samples/iothub_client_sample_mqtt)
  2. Send any Cloud to device message (e.g. using Device Explorer)
    -> Valgrind reports the use of uninitialized memory.

Calling convention not explicitly declared in headers

From @paulmon on December 2, 2016 0:7

The calling convention of the nuget libraries is __cdecl but it's not explicitly declared in the headers. This means if the compiler option /Gd is not specified for msvc projects that there will by unresolved symbol errors because of the differing calling conventions.

Copied from original issue: Azure/azure-iot-sdks#1005

[upload2blob] Some question about upload to blob

Hi,

We may wan to use the upload to blob feature from the SDK, and we have some unanswered questions:

  • If we use MQTT/WS as transport for messaging stuff, do we have to create another iotHubClientHandle with HTPP as transport for the blob upload ?
  • Does the upload to blob feature support a kind of stream upload.
    i.e call multiple IoTHubClient_LL_UploadToBlob with the same destination file.

Thanks.

[ServiceClient] Messages properties are not sent

Hi,

On master branch, it seems that adding properties to sent messages does not work anymore.
I've slightly modified iothub_messaging_ll_sample.c to illustrate the issue.

for (int i = 0; i < MESSAGE_COUNT; i++)
{
	double avgWindSpeed = 10.0;
	static char msgText[1024];
	sprintf_s(msgText, sizeof(msgText), "{\"deviceId\":%s,\"windSpeed\":%.2f, \"i\":%d}", deviceId, avgWindSpeed + (rand() % 4 + 2), i);
	IOTHUB_MESSAGE_HANDLE messageHandle = IoTHubMessage_CreateFromByteArray((const unsigned char*)msgText, strlen(msgText));
	if (messageHandle == NULL)
	{
		(void)printf("IoTHubMessage_CreateFromByteArray failed\n");
		break;
	}
	else
	{
	/* Here comes the mod */
		MAP_HANDLE properties = IoTHubMessage_Properties(messageHandle);
		if(Map_Add(properties, "the key", "the value") != MAP_ERROR) {
		(void)printf("Property added\n");
		}
	/* End of mod */
		iotHubMessagingResult = IoTHubMessaging_LL_Send(iotHubMessagingHandle, deviceId, messageHandle, sendCompleteCallback, NULL);
		if (iotHubMessagingResult != IOTHUB_MESSAGING_OK)
		{
			(void)printf("IoTHubMessaging_LL_Send failed\n");
		}
		else
		{
			(void)printf("IoTHubMessaging_LL_Send accepted data for transmission to IoT Hub.\r\n");
		}
	}
	IoTHubMessage_Destroy(messageHandle);
}

The API does not return error when properties are added, however the message does not contains any properties on the amqp wire (I've check with one of my AMQP device, not check in hub, not check with other transports).

Is this a bug or a new (it was working on november 2016 for sure) limitation of the service_client?

Thanks.

Better documentation for C and Device Management features [enhancement]

I am working on quite a few projects from different companies looking to implement IoT Hub with device management, using C.

A few problems/suggestions I've came across in my journey:

  • The section for device management in C is missing entirely in the MSDN docs, and it would be preferable if the sample & tutorials are in the same format as the node/.NET
  • Serializer and device management methods are missing in the API Reference
  • Device Twin sample is sitting under the serializer folder, very hard to find. I would prefer to have a 'samples' folder in the root of the project, instead of one each for iothub_client/iothub_service_client/serializer
  • Maybe have links/description to individual samples in the readme?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.