-
Notifications
You must be signed in to change notification settings - Fork 8
TLS failed to start the connection process. #44
Comments
I don't believe MQTT is a supported option for the Arduino and FeatherM0. Http only, there is commitment to MQTT going forward based on an issue posted in the azure-iot-arduino repo (see link below). |
Thanks for reply :) Then I guess this should be updated in the code or the guide for this starter-pack. Because I followed the guide several times and ended up with the error above. |
Hi tebones, |
Hi mamokarz, changed my code to use http and it worked, but stops again after about 3 hours. Motivated with my luck I went ahead with your second example making really sure all my keys are ok. Node is up, all azure devices is up, even my feather is online but I end up with the same error as the previous example: "TLS failed to start the connection process". There must be something wrong somewhere :) Pls advice :) I need to get this working for a showcase on IoT for my co-workers ;) |
I too was unable to get things working with MQTT due to this connection error. Gave the HTTP example a try, and it worked. I can't seem to get Wireshark to read my traffic today so I can't be sure, but any chance that this device doesn't support TLS 1.2 and the Azure IoT HTTP endpoint is allowing an older TLS version, but the MQTT endpoint isn't? MQTT works fine from C#, just not from this Arduino Feather M0. |
Can you please activate the MQTT logs, localize IoTHubClient_LL_CreateFromConnectionString on #if defined(IOT_CONFIG_MQTT)
iotHubClientHandle = IoTHubClient_LL_CreateFromConnectionString(IOT_CONFIG_CONNECTION_STRING, MQTT_Protocol);
#elif defined(IOT_CONFIG_HTTP)
iotHubClientHandle = IoTHubClient_LL_CreateFromConnectionString(IOT_CONFIG_CONNECTION_STRING, HTTP_Protocol);
#else
iotHubClientHandle = NULL;
#endif
bool traceOn = true;
IoTHubClient_LL_SetOption(iotHubClientHandle, "logtrace", &traceOn); |
Added that, but didn't result in any more logging. I'm guessing that's because the connection is what's failing - it's not a MQTT protocol error - it's the raw TLS connection setup that's failing. Ie. where To help debug, I've tried using the WiFiSSLClient example to connect to my *.azure-devices.net hostname. When I connect on 443, I get a successful connection. When I connect to 8883 (the port my C# MQTT example connects to), I don't get a successful connection (Adafruit_WINC1500SSLClient.connect returns false). |
Routing my traffic through my desktop so I can sniff it in Wireshark, I see a difference in how the connection setup process goes on 443 vs. 8883. Here's what the port 443 connection looks like: And here's the port 8883 connection (same for first 3 parts): Shouldn't the TLS handshake process work the same on both ports? And to add more fun, here's what the port 8883 conversation looks like from my .Net test app: Of possible interest, both of the connections from the Arduino use cipher suite: TLS_RSA_WITH_AES_128_GCM_SHA256 (0x009c), while the one from .Net uses TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (0xc028). |
I’m wondering if we are running in some contamination problem. Sometimes, the Arduino IDE do not recognize changes in the library and just reuse parts of the previous compilation. To avoid it, can you please totally delete the previous result? It is located in a temporary directory with the name arduino_build_#####
You will find |
Still not getting any debug output :( Doesn't really surprise me though, as all that output comes after the connection happens. The underlying SSL/TLS connection isn't getting established - that's the issue. |
And @mamokarz - re: the address you suggested on the other thread - I can't get a TLS connection to MokaFeatherM0Suite.azure-devices.net:8883 either, but :443 works just fine (same thing I'm experiencing on the IoT hub I'm testing with). It's got to be something with the details of how the TLS security handshake is working between the Feather M0 w/ WINC1500 and the MQTT-SSL endpoint of the IoT Hub. |
I'm investigating. |
Hi, at my first glance I know I have exactly the same problem with @jorupp , and it's definitely a problem of the TLS connection establishment. For M0 trying to establish TLS connection via port 8883, it's all the way good UNTIL here:
And it finally leads to a
My tests
Following are my Arduino related specs, FYI. Board
AzureIoT Libraries
WiFi LibraryBoth @mamokarz So is there any positive news? If needed I can provide my source code and connection string. |
I also have the same problem: HTTP is working, but MQTT isn't.
|
@mamokarz Just wanted to check in on this issue. I am also experiencing the same problems with the same libraries as others in this thread. Any outlook on a possible solution? Thanks |
Same here. And now with the Direct Methods feature only working over MQTT, protocol isn't much of a choice anymore. I've always used @ IoT Hub product group folks, is this MQTT sample working for you on ATWINC1500? |
@snobu It seems to be firmware issue, look at the related issue here |
Solved by this new firmware |
I've also verified this. I couldn't use MQTT with the 19.4.4 firmware and it worked with the 19.5.2 firmware. |
After one year I faced the same problem; Firmware update and uploading personal Azure IoT hub address' certificate (<name>.azure-devices.net) into the WiFi module exactly solved it. Thank you very much. |
Hi @berkaysit could you elaborate a bit more and provide all the library versions and the chip used by you,
|
Hi @mysaggar I was using Arduino MKR1000. I have made the firmware update by original Arduino IDE desktop software. Since over a year has passed, I can't check the library versions. Maybe you should use https or http prefix at your adress. |
Is There any workaround for Adafruit Feather HUZZAH ESP8266 board? Or you received this error right?, so what firmware update did you install ? |
Hi all, I am new to this and are haveing som issues sending my sensor data to the IoT Azure Hub. I have cheked my setup several times, this is last resort.
In the serial logger I get this statuses:
Any help leading me in the right direction would be appreciated :)
Looking at the address the port definition ":0" looks somewhat strange to a newbee like me?
Best regards
Trond Erik
The text was updated successfully, but these errors were encountered: