Debugging the OpenSocket routine in the driver, I find that var a is always “13.82.175.96:0\r\n” which is what causes the exception. My guess is that this string comes from the router.
Sorry, I was not at my PC yesterday, so my reply was not absolutely correct.
Before the command ‘OpenSocket’ returns, the string variable ‘a’ should have a content like this:
“On:52.245.4.70:0” where the part in the middle represents the Ip-Address of the requested url. The last digit represents the socket number which can be between 0 and 7 (should be 0 when the first socket is opened).
Here I see no \r\n. The ‘OpenSocket’ command regulary returns the number of the socket.
When the opening of the socket didn’t work correctly, the driver throws an exception and the application stops.
In my App I changed the driver so that it returns -1 if opening of the socket was not successful. If this is the case I try up to 15 times to open the socket before I give up.
I get errors building your app since the files that are referenced in your resources are missing on my computer.
I went over to store the Credentials for WiFi and Azure Account as resources so I can use .gitignore to prevent that I accidently publish them on GitHup.
If you want, you can comment out the lines using the Resources and hold the credentials directly in the code.
Of course you need an Azure Account (free Test Account) and must create a Storage Account (On Azure you get the credentials).