Code Monkey home page Code Monkey logo

azure-iot-pal-arduino's Introduction

azure-iot-pal-arduino

Stop! Before you proceed:

This Arduino Library is deprecated.

It is kept here for reference only and should not be used for any new development.

If you’re looking for an Arduino Library you should use the new version: aka.ms/arduino

You can find more information about it in this IoT Tech Community blog post.

This repository contains all of the Arduino-specific source files for the Azure IoT Arduino libraries.

Published libraries

The published Azure IoT Arduino libraries are here:

Contributions should not be made to these locations, as they are auto-generated.

Arduino-specific library sources

Arduino-specific sources for the Azure IoT Arduino libraries are kept in this repository:

Arduino-specific contributions should be made to these locations.

Non-Arduino-specific Azure IoT sources

The non-Arduino-specific portions of the Azure IoT C SDK are found here:

Contributions which are not Arduino-specific should be made to these locations.

Azure IoT Arduino Library README.md sources

The README.txt files for the Arduino libraries are auto-generated during the release process from a template file using a script. Contributions to the README.md files for any of the four Azure IoT Arduino libraries should be made by modifying one or both of

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

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.

azure-iot-pal-arduino's People

Contributors

cipop avatar codycodes avatar danewalton avatar ericwol-msft avatar ewertons avatar jbobotek avatar jetstreamroysprowl avatar markrad avatar microsoftopensource avatar msftgits avatar photomoose avatar yodama avatar

Stargazers

 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

azure-iot-pal-arduino's Issues

Setting socket_io_instance->socke to NULL in socketio_esp32wifi.cpp

Hi, I hope i have added this in the correct repo.

Description of Issue:
After trying to connect to a socket in line 315:

else if (!socket_io_instance->socket->connect(socket_io_instance->hostname, socket_io_instance->port) != 0)

If the socket connect fails then the socket pointer is not being set to NULL. Rather the code does a compare at line 340.

if (socket_io_instance->socket != NULL)
{
         delete socket_io_instance->socket;
          socket_io_instance->socket == NULL;
}

I believe the code:

socket_io_instance->socket == NULL;

should be:

socket_io_instance->socket = NULL;

This is causing exceptions when calling IoTHubDeviceClient_LL_Destroy(_clientHandle) . When calling IoTHubDeviceClient_LL_Destroy(_clientHandle), it will call to destroy the socket:

void socketio_destroy(CONCRETE_IO_HANDLE socket_io)

which causes the exception assertion "head != NULL" failed.... when trying to do another

delete socket_io_instance->socket;

at line 250

Thank you.

blob.h is missing

The make_sdk.cmd script was changed in PR-7 so that blob.c and blob.h were removed from the SDK output (see https://github.com/Azure/azure-iot-pal-arduino/pull/7/files#diff-7f02498a82d4fb59d389401ff9928bb2R137).

When building the SDK locally or using the published libraries from the Arduino IDE, I get the following compilation error on my machine:

ResolveLibrary(internal/blob.h)
  -> candidates: []
In file included from /Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/azure_c_shared_utility/constbuffer.h:16:0,
                 from /Users/tom.davis/Documents/Arduino/libraries/AzureIoTHub/src/internal/iothub_client_private.h:9,
                 from /Users/tom.davis/Documents/Arduino/libraries/AzureIoTHub/src/iothub_client_ll_uploadtoblob.c:20:
/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/umock_c/umock_c_prod.h:114:30: error: pasting "MOCKABLE_" and "/*this creates a new constbuffer from a memory area*/" does not give a valid preprocessing token
 #define EXPAND_PROD_ENTRY(A) MOCKABLE_##A
                              ^
/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/umock_c/umock_c_prod.h:114:30: note: in definition of macro 'EXPAND_PROD_ENTRY'
 #define EXPAND_PROD_ENTRY(A) MOCKABLE_##A
                              ^~~~~~~~~

It appears that AzureIoTHub/src/iothub_client_ll_uploadtoblob.c is still referencing internal/blob.h, which no longer exists. If I remove the two lines which delete blob.h and blob.h from make_sdk.cmd, I am able to compile my project successfully.

Add Wio Terminal support

The Wio Terminal board from Seed is getting a lot of love from Azure (for example it's one of the boards available as an IoT Central PnP device). Unfortunately it doesn't work with the Arduino libraries. Although it is uses the ARDUINO_ARCH_SAMD architecture, the libraries it comes with are not the ones this library expects when compiled with that flag.

It would be good if the Azure Arduino libraries support this board.

Network outage or DNS issues cause Arduino to freeze

AzureIoTUtility: 1.1.12
AzureIoTHub: 1.3.6
AzureIoTProtocol_MQTT: 1.1.12

I've been experiencing issues where my Arduino eventually freezes after a few hours, despite there being enough memory available. From what I can tell, it appears to happen soon after a "mqtt_client timed out waiting for CONNACK" error - presumably a result of a transient DNS failure or something when attempting to renew the SAS token.

The following log shows what happens. For simplicity, I have configured the client to refresh the SAS token every 30 seconds and I am not sending any telemetry - all that happens is the SAS token gets renewed every 30 seconds or so. I have modified the SDK to log entry ("--> ") and exit ("<-- ") points in the code along with some other debug info (e.g. pointer values, dereferenced values etc.):

Info: Connection Status: IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED | Reason: IOTHUB_CLIENT_CONNECTION_EXPIRED_SAS_TOKEN
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: --> STRING_delete
Info: address of STRING* is 536881632
Info: about to access value->s
Info: value->s = +xJm0U3WHg3t********2q6wDPL6ZpU73jyg=
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881624
Info: about to access value->s
Info: value->s = %2bxJm0U3WHg3t*********2q6wDPL6ZpU73jyg%3d
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881680
Info: about to access value->s
Info: STRING_delete: 686
Info: value->s = *****.azure-devices.net/devices/greenhouse
                                                                1580069317
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881656
Info: about to access value->s
Info: value->s = SharedAccessSignature sr=*****.azure-devices.net/devices/greenhouse&sig=%2bxJm0U3WHg**********02q6wDPL6ZpU73jyg%3d&se=1580069317
Info: <-- STRING_delete
Info: --> tlsio_arduino_create
Info: str->s: *****.azure-devices.net
Info: result->hostname: 536881632
Info: <-- tlsio_arduino_create
Info: --> STRING_delete
Info: address of STRING* is 536881752
Info: about to access value->s
Info: value->s = greenhouse
Info: <-- STRING_delete
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_DNS
Info: --> dowork_poll_dns
Info: <-- dowork_poll_dns
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_SOCKET
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_SSL
Error: Time:Sun Jan 26 20:08:28 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:dowork_poll_open_ssl Line:562 Error opening socket 0
Info: --> enter_tlsio_error_state
Info: Calling error callback
Info: Connection Status: IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED | Reason: IOTHUB_CLIENT_CONNECTION_NO_NETWORK
Info: <-- enter_tlsio_error_state
Error: Time:Sun Jan 26 20:08:28 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTProtocol_MQTT/src/azure_umqtt_c/mqtt_client.c Func:onOpenComplete Line:454 Error: failure opening connection to endpoint
Info: Connection Status: IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED | Reason: IOTHUB_CLIENT_CONNECTION_NO_NETWORK
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: --> DisconnectFromClient
Info: --> xio_destroy
Info: --> tlsio_arduino_destroy
Error: Time:Sun Jan 26 20:08:28 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_destroy Line:198 tlsio_arduino_destroy called while not in TLSIO_STATE_CLOSED.
Info: --> internal_close
Info: --> process_and_destroy_head_message
Info: <-- process_and_destroy_head_message
Info: <-- internal_close
Info: about to call STRING_delete(tls_io_instance->hostname)...
Info: --> STRING_delete
Info: address of STRING* is 536881632
Info: about to access value->s
Info: value->s = *****.azure-devices.net
Info: <-- STRING_delete
Info: called STRING_delete(tls_io_instance->hostname)
Info: --> tlsio_options_release_resources
Info: <-- tlsio_options_release_resources
Info: --> singlylinkedlist_destroy
Info: <-- singlylinkedlist_destroy
Info: <-- tlsio_arduino_destroy
Info: <-- xio_destroy
Info: <-- DisconnectFromClient
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: --> STRING_delete
Info: address of STRING* is 536881648
Info: about to access value->s
Info: value->s = QXerzhfRYcAwORb*********IqQvSazbRJ8KDU=
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881992
Info: about to access value->s
Info: value->s = QXerzhfRYcAwORb*********IqQvSazbRJ8KDU%3d
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881664
Info: about to access value->s
Info: value->s = ******.azure-devices.net/devices/greenhouse
                                                                1580069338
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881640
Info: about to access value->s
Info: value->s = SharedAccessSignature sr=*****.azure-devices.net/devices/greenhouse&sig=QXerzhfRYcA*************vSazbRJ8KDU%3d&se=1580069338
Info: <-- STRING_delete
Info: --> tlsio_arduino_create
Info: str->s: *****.azure-devices.net
Info: result->hostname: 536882120
Info: <-- tlsio_arduino_create
Info: --> STRING_delete
Info: address of STRING* is 536881736
Info: about to access value->s
Info: value->s = greenhouse
Info: <-- STRING_delete
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_DNS
Info: --> dowork_poll_dns
Info: <-- dowork_poll_dns
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_SOCKET
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_SSL
Error: Time:Sun Jan 26 20:08:48 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:dowork_poll_open_ssl Line:562 Error opening socket 0
Info: --> enter_tlsio_error_state
Info: Calling error callback
Info: Connection Status: IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED | Reason: IOTHUB_CLIENT_CONNECTION_NO_NETWORK
Info: <-- enter_tlsio_error_state
Error: Time:Sun Jan 26 20:08:49 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTProtocol_MQTT/src/azure_umqtt_c/mqtt_client.c Func:onOpenComplete Line:454 Error: failure opening connection to endpoint
Info: Connection Status: IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED | Reason: IOTHUB_CLIENT_CONNECTION_NO_NETWORK
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: --> DisconnectFromClient
Info: --> xio_destroy
Info: --> tlsio_arduino_destroy
Error: Time:Sun Jan 26 20:08:49 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_destroy Line:198 tlsio_arduino_destroy called while not in TLSIO_STATE_CLOSED.
Info: --> internal_close
Info: --> process_and_destroy_head_message
Info: <-- process_and_destroy_head_message
Info: <-- internal_close
Info: about to call STRING_delete(tls_io_instance->hostname)...
Info: --> STRING_delete
Info: address of STRING* is 536882120
Info: about to access value->s
Info: value->s = *****.azure-devices.net
Info: <-- STRING_delete
Info: called STRING_delete(tls_io_instance->hostname)
Info: --> tlsio_options_release_resources
Info: options: 536881668
Info: trusted_certs: 0
Info: x509_cert: 0
Info: x509_key: 0
Info: <-- tlsio_options_release_resources
Info: --> singlylinkedlist_destroy
Info: <-- singlylinkedlist_destroy
Info: tlsio_arduino_destroy: 222
Info: <-- tlsio_arduino_destroy
Info: <-- xio_destroy
Info: <-- DisconnectFromClient
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: --> STRING_delete
Info: address of STRING* is 536881624
Info: about to access value->s
Info: value->s = LLMaPyznr8p08*************EYdEA1xkjgaOkUdA=
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881816
Info: about to access value->s
Info: value->s = LLMaPyznr8p08KA***************OkUdA%3d
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881640
Info: about to access value->s
Info: value->s = ******.azure-devices.net/devices/greenhouse
                                                                1580069359
Info: <-- STRING_delete
Info: --> STRING_delete
Info: address of STRING* is 536881848
Info: about to access value->s
Info: value->s = SharedAccessSignature sr=*******.azure-devices.net/devices/greenhouse&sig=LLMaPyznr8p08KAKhqzYOtFnHgu************UdA%3d&se=1580069359
Info: <-- STRING_delete
Info: --> tlsio_arduino_create
Info: str->s: *****.azure-devices.net
Info: result->hostname: 536881664
Info: <-- tlsio_arduino_create
Info: --> STRING_delete
Info: address of STRING* is 536881712
Info: about to access value->s
Info: value->s = greenhouse
Info: <-- STRING_delete
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Info: dowork TLSIO_STATE_OPENING_WAITING_DNS
Info: --> dowork_poll_dns
Error: Time:Sun Jan 26 20:09:09 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:dowork_poll_dns Line:530 Host *****.azure-devices.net not found
Info: --> STRING_delete
Info: address of STRING* is 536881664
Info: about to access value->s
Info: value->s = *******.azure-devices.net
Info: <-- STRING_delete
Info: <-- dowork_poll_dns
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Requesting time from uk.pool.ntp.org...
Info: Failed to receive time
Info: Free memory: 15511
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Error: Time:Sun Jan 26 20:09:30 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTHub/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2385 mqtt_client timed out waiting for CONNACK
Info: --> DisconnectFromClient
Info: --> xio_destroy
Info: --> tlsio_arduino_destroy
Error: Time:Sun Jan 26 20:09:30 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_destroy Line:198 tlsio_arduino_destroy called while not in TLSIO_STATE_CLOSED.
Info: --> internal_close
Info: --> process_and_destroy_head_message
Info: <-- process_and_destroy_head_message
Info: <-- internal_close
Info: about to call STRING_delete(tls_io_instance->hostname)...
Info: --> STRING_delete
Info: address of STRING* is 536881664
Info: about to access value->s
Info: value->s = �

The Arduino completely freezes at this point, with no further iterations of the loop() function.

Similar behaviour is observed if Wifi connectivity drops and I continue to call IoTHubClient_LL_DoWork() - strangely, it seems that the pointer named tls_io_instance->hostname has an address value of 1, and calling STRING_delete() on it bricks the Arduino:

Info: Free memory: 18571
Info: Free memory: 18571
Info: Free memory: 18571
Info: Polling IOT Hub...
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Error: Time:Sun Jan 26 13:47:49 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_dowork Line:611 Unexpected internal tlsio state: 49
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Polling IOT Hub complete
Info: Free memory: 18571
Info: Free memory: 18571
Info: Free memory: 18571
Info: Polling IOT Hub...
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Info: <-- InitializeConnection
Info: --> mqtt_client_dowork
Info: --> xio_dowork
Info: --> tlsio_arduino_dowork
Error: Time:Sun Jan 26 13:47:49 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_dowork Line:611 Unexpected internal tlsio state: 49
Info: <-- tlsio_arduino_dowork
Info: <-- xio_dowork
Info: <-- mqtt_client_dowork
Info: <-- IoTHubTransport_MQTT_Common_DoWork
Info: <-- IoTHubClientCore_LL_DoWork
Info: Polling IOT Hub complete
Info: Free memory: 18571
Info: Free memory: 18571
Info: Free memory: 18571
Info: Polling IOT Hub...
Info: --> IoTHubClientCore_LL_DoWork
Info: --> IoTHubTransport_MQTT_Common_DoWork
Info: --> InitializeConnection
Error: Time:Sun Jan 26 13:47:50 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTHub/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2385 mqtt_client timed out waiting for CONNACK
Info: --> DisconnectFromClient
Info: --> xio_destroy
Info: --> tlsio_arduino_destroy
Error: Time:Sun Jan 26 13:47:50 2020 File:/Users/tom.davis/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_destroy Line:198 tlsio_arduino_destroy called while not in TLSIO_STATE_CLOSED.
Info: --> internal_close
Info: --> process_and_destroy_head_message
Info: <-- process_and_destroy_head_message
Info: <-- internal_close
Info: about to call STRING_delete(tls_io_instance->hostname)...
Info: --> STRING_delete
Info: address of STRING* is 1
Info: about to access value->s

Any advice on why this is happening would be greatly appreciated; this has had me stumbled for weeks now.

On a side note, are there any conditions as to when I should be invoking IoTHubClient_LL_DoWork()? Can I call this continuously, every 100ms or so - or should I only invoke this function when there is network connectivity?

Need to use WifiNINA.h

Hi
I have Arduino MKR WIFI 1010 board and it uses <WiFiNINA.h> not "WiFi101.h", how can you fix this?
Thank you,
Murat

Just need to add this line among the ifdefs

#elif ARDUINO_SAMD_MKRWIFI1010
#include <WiFiNINA.h>

Arduino libraries have incorrect folder structure

I installed the Arduino libraries from the Arduino library manager. I was not able to compile the samples. It turns out that the folder layout of the Arduino libraries has the .c and .h files under a src directory. These files should be at the root of the library folder. I copied the files from the src folder into the root of the library folder and was able to compile.

Provisioning service for Arduino

Hi!
the Azure IoT SDK for C now includes the provisioning_service_client folder which includes all necessary to automatically provision the device.
Unfortunatelly the build_all/build.cmd does not prepare that folder and I cannot build the SDK for Arduino. I tried to do it manually but I got some conflicts and it seems too hard for me.

Any plan to align the project?

Thanks

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.