Azure Sphere TCP Ports Issue / WARNING: failed to hand over the message to IoTHubClient RRS feed

  • Question

  • Hi,

    Build several examples from the Azure Samples and build some code for I2C and UART as well as the Ethernet interface. This worked all quite well, except for the fact that I can't seen to get a message deliver to the IoTHUB or returend (IoTHUBClient ?). If I connect the AzureIoT example to my WiFi it simply doesn't work. When I use my iPhone as a WiFi AP it works fine. So I guess something with the ports not being open. Added the port forwarding on my router, no luck, added the "AllowedTcpServerPorts": [ 443,  8883 ], to the app manifest, no luck either. Any suggestions are more than welcome.


    • Edited by Erik Ubels Tuesday, March 24, 2020 3:11 PM
    Tuesday, March 24, 2020 3:10 PM

All replies

  • Hello Erik,

    Thank you for your question!

    1) What is the result of "azsphere device wifi show-status" when connected at the failing WiFi?

    2) As we suspect this is related with wifi connection can we remove IoTHub of the scope and try to do the tests using HTTPS_Curl_Easy sample ?

    You can also leverage WiFi_HighLevelApp Sample to help debug any issues with your connection.

    Thank you!

    Thursday, March 26, 2020 7:17 PM
  • Hello Antonio,

    Started over again. Went through very detailed analysis and have experienced the following. First I claimed two devices (Seeed MT-3620 RDB's). Than I tested both on the Wifi Hotspot through my smartphone as well as the 'normal' WiFi. All checked against the TCO ports and DNS names on the Azure Sphere Port requirements (yes everyone of them, several times), in both cases they respond with out any problems. Than I run the default app AzureIoT sample, exactly as described. WiFi status checked, clearly connected, IP available. Here comes the crazy experiences. On the WiFi Hotspot is works all the time, 100's of time, again and again. If I than switch to the Wifi network and run the app again, it still works, so clearly no problem on the network (I just change the WiFi on the Sphere, both, just to be sure it is not a device issue). If I just change the WiFi, no reset (blue button) it keeps working. However if I hit the reset button on the device, deploy again (thus now directly against my 'normal' WiFi, it doesn't work. So there is some weird thing happening that I don't get. Why would the deployment of exactly the same work, just after changing the WiFi, while the network clearly allows this to work after running it on the Hotpsot only once first?????

    Any suggestions are more than welcome.

    Saturday, March 28, 2020 10:38 AM
  • Hello Antonio,

    In addition to the whole process of testing as in my earlier reply I went yet another step and as suggested by you I also loaded the HTTPS_Curl_Easy example. On the WiFi Hotspot this works instantly (well after you udate the CMAKE for API version 4. Then I change the WiFi on the MT3620's and back to my 'normal' WiFi, and YES, the HTTPS_Curl_Easy app run's without trouble. Even if I exit VS. As long as I do not switch off or reset the MT3620's the app run's fine as in my earlier testing this morning.

    Looking forward to hear any suggestions.


    Saturday, March 28, 2020 4:12 PM
  • Hello Antonio,

    Went on with figuring out what is happening. As the HTTPS_Curl_Easy example in debug tell's me " Not doing download because there is no internet connectivity" I thought how about ignoring the 'isNetworkingReady' status, brute force. And yes it works, tried the same on the Azure IoT example, same story. So now the big question is why does the network API return false, which is false as I think my point is. It is clear that my network is not blocking any of the traffic, I also tested it after deleting the devices from the DPS service, works fine as well, so all communication must go through my network after all.

    Sunday, March 29, 2020 9:52 AM
  • Hello Antonio,

    Just kept testing, as soon as the board is reset and or gone through a power-cycle the same problem persists.

    So still no clue what is causing this.



    • Edited by Erik Ubels Sunday, March 29, 2020 10:12 AM
    Sunday, March 29, 2020 10:12 AM
  • Hello Antonio,

    Ok, kept going at it and as suggested tested with the WiFi_HighLevelApp sample. This tells me the following:

    Connected to WiFi hotspot on mobile phone:

    INFO: Internet connectivity is available.
    INFO: The device is connected to: OppoReno : WPA2/PSK : -33 dB

    Connected to home WiFi network, device has not been reset, just deployed (debug mode) the same sample code again.

    INFO: Internet connectivity is available.
    INFO: The device is connected to: Riverside_IoT : WPA2/PSK : -60 dB

    Connected to home WiFi network, after the device has been reset, just deployed (debug mode) the same sampl code again.

    INFO: Internet connectivity is not available.
    INFO: The device is connected to: Riverside_IoT : WPA2/PSK : -61 dB

    So, once again after a reset the problem occurs or initially if not first connect through the WiFi hotspot, yet the device keeps working fine and in a connected sate and DPS, HUB all seem to work.

    So basically in a cold boot situation it doesn't seem to get through the network, but why would it once it has been connected to the WiFi hotspot.

    Really strange, no clue. 


    Sunday, March 29, 2020 11:08 AM
  • Hello Erik,

    Thank you so much for the exhausting troubleshooting and detailing all the steps taken. I am syncing with Azure Sphere Team and will follow-up soon. 

    Please confirm also the following:

    • Even after you reset the device you can always connect to your WiFi hotspot on mobile phone?

    To help us further, on the failing condition, can you please run "azsphere get-support-data --output" (see details) and send the logs to AZCommunity(at)microsoft(dot)com with a link to this MSDN thread?

    PS: If by any chance you reached out to us via an Azure Support ticket, please mention this MSDN thread on it.

    Thank you so much!

    Friday, April 3, 2020 3:35 PM
  • Hi again Erik,

    Can you also test the following:

    1. Configure only one wifi connection on your azure sphere device and try to reproduce the issue. This is, first configure your Wifi hotspot alone and try to reproduce, after remove your Wifi hotspot from the list and add your home Wifi and try to reproduce.

    For this test, when you run the command "azsphere dev wifi list" it should show only one wifi configured.


    Friday, April 3, 2020 4:12 PM
  • Thanks for reaching out via email Erik. We are analyzing your logs and will get back asap.

    Monday, April 20, 2020 8:47 AM