user49863: I am using a SIM808 with a atmega2560.
I have setup the endpoint in Azure and that works when I try a http post via postman and/or an online http post tool (I get a 202 as result and see data comming into Azure)
I want to send a json package to an Azure http endpoint (smart app) using the function httpPOST in the SIMCom library from itead.
I am connecting to the network:
logging (I printed all that is written to GSM):
AT+CIFSR
DB:STARTING NEW CONNECTION
AT+CIPSHUT
DB:SHUTTED OK
AT+CSTT="provider.net","","" DB:APN OK
AT+CIICR
DB:CONNECTION OK
AT+CIFSR
DB:ASSIGNED AN IP
GPRS status=ATTACHED
AT+CIPSTART="TCP","prod-13.westeurope.logic.azure.com",443
DB:RECVD CMD
DB:OK TCP

Then call the httpPost function from the library with the following variables:
const char server[35] = "prod-13.westeurope.logic.azure.com";
const int port = 443;
const char path[200] = "/workflows/someazureID/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=someazuretoken";
const char parameters[100] = "{\"device\":\"alive\",\"timestamp\":\"09270845\"}";

Part of the httpPost function from the library for sending the data
    int InetGSM::httpPOST(const char* server, int port, const char* path, const char* parameters, char* result, int resultlength)
         ....
    gsm.SimpleWrite("POST ");
    gsm.SimpleWrite(path);
    gsm.SimpleWrite(" HTTP/1.1\r\nHost: ");
    gsm.SimpleWrite(server);
    gsm.SimpleWrite("\r\n");
    gsm.SimpleWrite("User-Agent: Arduino\r\n");
    gsm.SimpleWrite("Content-Type: application/json\r\n");
    gsm.SimpleWrite("Content-Length: ");
    itoa(strlen(parameters),itoaBuffer,10);
    gsm.SimpleWrite(itoaBuffer);
    gsm.SimpleWrite("\r\n\r\n");
    gsm.SimpleWrite(parameters);
    gsm.SimpleWrite("\r\n\r\n");
    gsm.SimpleWrite(end_c);
....

Which gives this output on the serial monitor (I printed all that is written to GSM):
AT+CIPSEND
DB:>
POST /workflows/someazureID/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=someazuretoken HTTP/1.1
Host: prod-13.westeurope.logic.azure.com
User-Agent: Arduino
Content-Type: application/json
Content-Length: 55

{"device":"alive","timestamp":"09270845"}

DB:SENT

And then it is waiting for a response:
Starting read..
Waiting for Data............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 
CLOSED 

Done..
response:
10

CLOSED

which times out I guess.
And I see nothing coming into Azure.
(I am getting data when I try a httpGet on a random site. So hardware, sim and network is working ok I guess) 
Any ideas?
thx!

user49863: Juraj's comments put me on the right track, for SSL you need to do more then just select the port.
I did some searching and got it to work using a different GSM library that also supports SSL:
tinyGSM
in combination with ArduinoHttpClient
Jeroen
EDIT: It works, but there is a big downside. It looks like there is major overhead, each message seems to uses 13Kb of data...? I suspect this comes from the data that is returned by the endpoint.
This is way too much over GPRS so now looking into MQTT.

49863: <p>I am using a SIM808 with a atmega2560.</p>

<p>I have setup the endpoint in Azure and that works when I try a http post via postman and/or an online http post tool (I get a 202 as result and see data comming into Azure)</p>

<p>I want to send a json package to an Azure http endpoint (smart app) using the function httpPOST in the <a href="https://github.com/itead/ITEADLIB_Arduino_SIMCom" rel="nofollow noreferrer">SIMCom library from itead</a>.</p>

<p>I am connecting to the network:</p>

<p>logging (I printed all that is written to GSM):</p>

<pre><code>AT+CIFSR
DB:STARTING NEW CONNECTION
AT+CIPSHUT
DB:SHUTTED OK
AT+CSTT="provider.net","","" DB:APN OK
AT+CIICR
DB:CONNECTION OK
AT+CIFSR
DB:ASSIGNED AN IP
GPRS status=ATTACHED
AT+CIPSTART="TCP","prod-13.westeurope.logic.azure.com",443
DB:RECVD CMD
DB:OK TCP
</code></pre>

<p>Then call the httpPost function from the library with the following variables:</p>

<pre><code>const char server[35] = "prod-13.westeurope.logic.azure.com";
const int port = 443;
const char path[200] = "/workflows/someazureID/triggers/manual/paths/invoke?api-version=2016-10-01&amp;sp=%2Ftriggers%2Fmanual%2Frun&amp;sv=1.0&amp;sig=someazuretoken";
const char parameters[100] = "{\"device\":\"alive\",\"timestamp\":\"09270845\"}";
</code></pre>

<p>Part of the httpPost function from the library for sending the data</p>

<pre><code>    int InetGSM::httpPOST(const char* server, int port, const char* path, const char* parameters, char* result, int resultlength)
         ....
    gsm.SimpleWrite("POST ");
    gsm.SimpleWrite(path);
    gsm.SimpleWrite(" HTTP/1.1\r\nHost: ");
    gsm.SimpleWrite(server);
    gsm.SimpleWrite("\r\n");
    gsm.SimpleWrite("User-Agent: Arduino\r\n");
    gsm.SimpleWrite("Content-Type: application/json\r\n");
    gsm.SimpleWrite("Content-Length: ");
    itoa(strlen(parameters),itoaBuffer,10);
    gsm.SimpleWrite(itoaBuffer);
    gsm.SimpleWrite("\r\n\r\n");
    gsm.SimpleWrite(parameters);
    gsm.SimpleWrite("\r\n\r\n");
    gsm.SimpleWrite(end_c);
....
</code></pre>

<p>Which gives this output on the serial monitor (I printed all that is written to GSM):</p>

<pre><code>AT+CIPSEND
DB:&gt;
POST /workflows/someazureID/triggers/manual/paths/invoke?api-version=2016-10-01&amp;sp=%2Ftriggers%2Fmanual%2Frun&amp;sv=1.0&amp;sig=someazuretoken HTTP/1.1
Host: prod-13.westeurope.logic.azure.com
User-Agent: Arduino
Content-Type: application/json
Content-Length: 55

{"device":"alive","timestamp":"09270845"}

DB:SENT
</code></pre>

<p>And then it is waiting for a response:</p>

<pre><code>Starting read..
Waiting for Data............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 
CLOSED 

Done..
response:
10

CLOSED
</code></pre>

<p>which times out I guess.</p>

<p>And I see nothing coming into Azure.</p>

<p>(I am getting data when I try a httpGet on a random site. So hardware, sim and network is working ok I guess) </p>

<p>Any ideas?
thx!</p>
 49863: <p>Juraj's comments put me on the right track, for SSL you need to do more then just select the port.</p>

<p>I did some searching and got it to work using a different GSM library that also supports SSL:
<a href="https://github.com/vshymanskyy/TinyGSM" rel="nofollow noreferrer">tinyGSM</a></p>

<p>in combination with <a href="https://github.com/arduino-libraries/ArduinoHttpClient" rel="nofollow noreferrer">ArduinoHttpClient</a></p>

<p>Jeroen</p>

<p>EDIT: It works, but there is a big downside. It looks like there is major overhead, each message seems to uses 13Kb of data...? I suspect this comes from the data that is returned by the endpoint.
This is way too much over GPRS so now looking into MQTT.</p>
