Hi guys.
I’m trying to use the SIM900 ( with PPP ) module to create a SSL connection, but the request fails.
The code works fine when requesting a normal web page, but SSL seems to fail.
I’ve had a look at the SIM900 datasheet, and it seems to support SSL, so I must be missing something.
I have updated the SSL seed, and the code works fine using the ethernet ENC module - so it is specific to the PPP connection with the SIM900
I’m using the library from @ Dave McLaughlin to use the modem , and the firmware is 2016 pre-release
Below is a code snippet which illustrates the problem.
string url = "https://httpbin.org/";
using (var req = System.Net.HttpWebRequest.Create(url))
{
using (var res = req.GetResponse()) // throws exception
{
Debug.Print("HTTP Response length: "
+ res.ContentLength.ToString());
}
}
the exception:
The thread ‘’ (0x5) has exited with code 0 (0x0).
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (1) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::getaddrinfo [IP: 0000] ####
#### System.Net.Dns::GetHostEntry [IP: 0008] ####
#### System.Net.HttpWebRequest::EstablishConnection [IP: 00e1] ####
#### System.Net.HttpWebRequest::SubmitRequest [IP: 0019] ####
#### System.Net.HttpWebRequest::GetResponse [IP: 000c] ####
I’m hoping somebody can point me in the right direction?