-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-red azureiothub MQTT conflict with esp32 getting started device on same network #454
Comments
Just need to set some expectations here. Most of the teams are on vacation and won’t be around till the end of the coming week. I personally won’t be in till the 7th. Suggest using another protocol for now. |
Thanks Anthony. I understand, no urgency. Eventual resolution is the aim.
--------------------------------------------
On Sat, 29/12/18, Anthony V. Ercolano <[email protected]> wrote:
Subject: Re: [Azure/azure-iot-sdk-node] node-red azureiothub MQTT conflict with esp32 getting started device on same network (#454)
To: "Azure/azure-iot-sdk-node" <[email protected]>
Cc: "justoke" <[email protected]>, "Author" <[email protected]>
Date: Saturday, 29 December, 2018, 21:15
Just need to set some
expectations here. Most of the teams are on vacation and
won’t be around till the end of the coming week. I
personally won’t be in till the 7th.
Suggest using another protocol for now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view
it on GitHub, or mute
the thread.
|
@justoke would you happen to be using the same identity/connection string for both the esp32 and the node red node? Also: the node-red flow you're using and old and was meant as a sample, not for production. it does not follow node-red best practices. should you want to productize node-red nodes, I highly recommend switching to those: |
@pierreca Thank you for the suggestions. Your question actually helped me solve it - I was using the connection string for the node-red flow and a hardware device. I understand that this won't work as only one connection between device and IOT Hub can use the TLS connection - by design. I created an IoT device on the IoT hub and used that connection string in node-red flow. This works - I can send message from flow to cloud and cloud to flow. Maybe the documentation could make a point about the scope of connection strings as it the effect falsely gives the impression there is a bug in the code. As this is just the getting started examples, I did not expect this to be production ready. It's certainly works well enough, but I'll update the flow as suggested. Thanks again and to the team producing these awesome IOT SDKs! |
@justoke, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey |
Description of the issue:
Simultaneously, running node-red AzureIoTHub flow and esp32 getting started tutorial on esp32 hardware device results in failure in MQTT library and causes the IOT device to reset in a never ending cycle.
I have created the ESP32 Get Started tutorial in Visual Studio code and uploaded the device code, created the Azure IoT Hub and successfully send and receive messages from my ESP32 device. This works perfectly until I open Node-Red extension in Visual Studio Code and add the sample Azure IoT Hub flow(https://github.com/Azure/azure-iot-sdk-node/tree/master/device/node-red).
I am observing the same behaviour as described by the issue raised against the ESP32_AsureIoT_Arduino
VSChina/ESP32_AzureIoT_Arduino#12 - the ESP32 device will start logging the errors as shown below. If I stop node-red by changing the Protocol on the node-red flow to something other than mqtt, then the error goes away on the device.
Code sample exhibiting the issue:
https://github.com/Microsoft/vscode-iot-workbench/blob/master/docs/esp32/esp32-get-started.md
Console log of the issue:
Backtrace: 0x4008f6f4:0x3ffb1d60 0x4008f8f7:0x3ffb1d80 0x400e35a3:0x3ffb1da0 0x40119359:0x3ffb1dd0 0x400d3fca:0x3ffb1df0 0x400d4026:0x3ffb1e10 0x400d30f2:0x3ffb1e30 0x400d339a:0x3ffb1e70 0x400d33d1:0x3ffb1e90 0x400d34f7:0x3ffb1ed0 0x400d2481:0x3ffb1ef0 0x40147f68:0x3ffb1fa0
Rebooting...
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:808
load:0x40078000,len:6084
load:0x40080000,len:6696
entry 0x400802e4
Starting connecting WiFi.
..WiFi connected
...
dhcps: send_offer>>udp_sendto result 0
Error: Time:Sat Dec 29 11:48:58 2018 File:C:\Users\Steve\Documents\Arduino\hardware\espressif\esp32\libraries\AzureIoT\src\Esp32MQTTClient.cpp Func:SendEventOnce Line:316 Waiting for send confirmation, time is up 10004
Info: >>>Re-connect.
Error: Time:Sat Dec 29 11:48:58 2018 File:C:\Users\Steve\Documents\Arduino\hardware\espressif\esp32\libraries\AzureIoT\src\az_iot\c-utility\pal\src\tlsio_openssl_compact.c Func:tlsio_openssl_destroy Line:213 tlsio_openssl_destroy called while not in TLSIO_STATE_CLOSED.
Info: >>>Confirmation[0] received for message tracking id = 0 with result = IOTHUB_CLIENT_CONFIRMATION_BECAUSE_DESTROY
Info: Initializing SNTP
Info: SNTP initialization complete
Info: IoT Hub SDK for C, version 1.1.23
Context
Windows 10
Visual Studio Code with Node-Red extension and AzureIoTHub
The text was updated successfully, but these errors were encountered: