problems to upload base64 encoded data (~ 30 kB) to our webservice by using HTTP POST

6 thoughts on “problems to upload base64 encoded data (~ 30 kB) to our webservice by using HTTP POST

  1. Our Problem – short description:
    ——————————–
    – From time to time we have problems to upload base64 encoded data (~ 30 kB) to our webservice by using HTTP POST.
    – In these cases the data cannot be send or is send incomplete resulting in HTTP 400 errors (bad request).

    Our Problem – long description:
    ——————————–
    – We are starting the transmission of the HTTP-Body to the Module
    – During the transmission the controle line CTS stops our transmission for many minutes
    – After 4 minutes we run in a timeout of our state machine
    – In most cases the transmissions of the smaller data requests work, the large requests fail much more often

    ##################################################################################################################################

    We use the following module types:
    ———————————-
    – GE910-QUAD V3 with firmware: 16.00.303
    – HE910-D with firmware: 12.00.024

    ##################################################################################################################################

    Our Commands for the different tasks:
    ————————————-

    1. Configuration of the module:
    ——————————-
    1.1.     AT#CFLO=1
    1.2.    AT+IPR=115200
    1.3.    AT+CMEE=1
    1.4.    AT#STIA=1                            //SIM-Toolkit
    1.5.    AT+CGATT=1
    1.6.    AT+CGDCONT=1,"IP","internetm2m.air.com","0.0.0.0",0,0        //PDP
    1.7.    AT#SCFG=1,1,1500,60,60,1                    //TCP/IP-Socket
    1.8.    AT#HTTPCFG=0,"Receiving-System-IP",0,"test","test",0,240,1    //HTTP-Socket
    1.9.    AT+COPS=0,0,0                            //Provider-Connection… automatic

    2. Connection preparation:
    ————————–
    2.1.    AT#SH=1                                //Socket shutdown
    2.2.    AT#SGACT=1,0                            //Context deactivation
    2.3.    AT#SGACT=1,1,"internet","internet"                //Context activation
    2.4.    AT#SD=1,0,9117,"receiving system IP address",255,0,1        //Socket dial

    3. HTTP transmission – POST:
    —————————-
    3.1.    AT#HTTPSND=0,0,"server path",data-length            //Header
    3.2.    >>>                                //wait for response "ready for HTTP-Body"
    3.3.    Sending HTTP-Body-Data to Telit-Module
    3.4.    #HTTPRING: 0,…                        //wait for HTTP-Response-Header from Telit-Module
    3.5    AT#HTTPRCV=0                            //get HTTP-Response-Body from Telit-Module

    4. HTTP transmission – GET:
    —————————
    4.1.    AT#HTTPQRY=0,0,"Server Path"
    4.2.    #HTTPRING: 0,…                        //wait for HTTP-Response-Header from Telit-Module
    4.3.    AT#HTTPRCV=0                            //get HTTP-Response-Body from Telit-Module

    ##################################################################################################################################

    Our Communication Taskflow (see the tasks above for details):
    ————————————————————-

    –    Power-On the Telit-Module

    –    (1) Configuration of the module

    –    (2) Connection preparation
    –    (3) HTTP Transmission – POST        // Transmission of device status, ca. 800 Byte HTTP-Body data upload

    do {

    –    (2) Connection preparation
    –    (3) HTTP Transmission – POST        // Transmission of base64-coded data, ca. 30.000 Byte HTTP-Body data upload

    } while(unsent data files in memory);

    –    (2) Connection preparation
    –    (4) HTTP Transmission – GET        // Time synchronisation

    –    (2) Connection preparation
    –    (3) HTTP Transmission – POST        // Transmission of device setup, ca. 650 Byte HTTP-Body data upload

    –    (2) Connection preparation
    –    (3) HTTP Transmission – POST        // Transmission of device setup Confirmation, ca. 250 Byte HTTP-Body data upload

    –    Power-Off the Telit-Module

    1. Hi,

      I have some questions that could help me to clarify the issue:


      1) Which module type hase the upload problem? GE910, HE910 or both?


      2)
      Can you please send us the exact AT command sequence with your HTTP
      settings (if it is possible) in order to try to reproduce the issue
      here?

      Thank you

      1. Hi,

         

        1) I have problems with both

         

        2)

        Config:

        AT#CFLO=1
        AT+IPR=115200
        AT+CMEE=1
        AT#STIA=1
        AT+CGATT=1
        AT+CGDCONT=1,”IP”,”internetm2m.air.com”,”0.0.0.0″,0,0
        AT#SCFG=1,1,1500,60,60,1
        AT#HTTPCFG=0,”217.69.246.84″,0,”test”,”test”,0,240,1
        AT+COPS=0,0,0

         

        Connection:

        AT#SH=1
        AT#SGACT=1,0
        AT#SGACT=1,1,”internet”,”internet”
        AT#SD=1,0,9117,”217.69.246.84″,255,0,1

        HTTP-POST:

        AT#HTTPSND=0,0,”/pm100_dev/sendstate”,800
        >>>                                //Sending of 800 Bytes HTTP-Body-Data to Telit-Module
        #HTTPRING: 0,…        //wait for HTTP-Response-Header from Telit-Module
        AT#HTTPRCV=0        //get HTTP-Response-Body from Telit-Module

         

        while(measurement_count >0)

        {

        Connection: 

        AT#SH=1
        AT#SGACT=1,0
        AT#SGACT=1,1,”internet”,”internet”
        AT#SD=1,0,9117,”217.69.246.84″,255,0,1

        HTTP-POST:

        AT#HTTPSND=0,0,”/pm100_dev/senddata”,35000
        >>>                                //Sending of 35000 Bytes HTTP-Body-Data to Telit-Module
        #HTTPRING: 0,…        //wait for HTTP-Response-Header from Telit-Module
        AT#HTTPRCV=0        //get HTTP-Response-Body from Telit-Modu

        }

         

        Connection: 

        AT#SH=1
        AT#SGACT=1,0
        AT#SGACT=1,1,”internet”,”internet”
        AT#SD=1,0,9117,”217.69.246.84″,255,0,1

        HTTP-GET:

        AT#HTTPQRY=0,0,”/pm100_dev/gettime”
        #HTTPRING: 0,…          //wait for HTTP-Response-Header from Telit-Module
         AT#HTTPRCV=0           //get HTTP-Response-Body from Telit-Module

         

        Connection:

        AT#SH=1
        AT#SGACT=1,0
        AT#SGACT=1,1,”internet”,”internet”
        AT#SD=1,0,9117,”217.69.246.84″,255,0,1

        HTTP-POST:

        AT#HTTPSND=0,0,”/pm100_dev/updatesetup”,650
        >>>                                //Sending of 650 Bytes HTTP-Body-Data to Telit-Module
        #HTTPRING: 0,…        //wait for HTTP-Response-Header from Telit-Module
        AT#HTTPRCV=0        //get HTTP-Response-Body from Telit-Modul

         

        Connection:

        AT#SH=1
        AT#SGACT=1,0
        AT#SGACT=1,1,”internet”,”internet”
        AT#SD=1,0,9117,”217.69.246.84″,255,0,1

        HTTP-POST:

        AT#HTTPSND=0,0,”/pm100_dev/updatesetup”,250
        >>>                                //Sending of 250 Bytes HTTP-Body-Data to Telit-Module
        #HTTPRING: 0,…        //wait for HTTP-Response-Header from Telit-Module
        AT#HTTPRCV=0        //get HTTP-Response-Body from Telit-Module

         

        POWER-OFF the Module

         

         

          1. Hi,

             

            Can you send me this tool for the HE910-D?

             

            Our GSM-prototypes are in a test laboratory for approval.

             

             

            Thank you very much.