Sending http packets

hi,
Please give some pointers in regards with sending http packets,I am able to open a channel,but iam unable to send http packets over it. I am using Gprs as bearer.

1 Like

Describe what problems, precisely, you are having.
Be sure to check all return codes.

hi awneil,
Actually iam unable to create a http channel,

GPRS]: GPRS EVENT ACTIVATE OK (cid=5)
[GPRS]: GPRS: -> CONNECTED
HTTP Client Service test application : Init
[HTTP] destroy request @ 180c45d0
cannot create http data channel
[WIP] closing HTTP_CONTROL 0x180c4390
Release subLevelOptions

and iam using this to open a client channel

static s32 http_ClientTestCreate(void)
{
  s32 ret = 0;

  // HTTP Session creation
  // ---------------------------
  http_ClientTestCtx.CnxChannel = wip_HTTPClientCreateOpts(

                    NULL,  // no handler
                    NULL,  // no context

                    // default headers
                    WIP_COPT_HTTP_HEADER, "User-Agent", "WIPHTTP/1.0",

                    WIP_COPT_END);

  
  if (http_ClientTestCtx.CnxChannel == NULL)
  {
    TRACE(( 1, "cannot create http session channel\n" ));
    adl_atSendResponse ( ADL_AT_UNS, "cannot create http session channel\r\n" );
    ret = -1;
  }
  else
  {
    // HTTP GET command
    // ---------------------------
    http_ClientTestCtx.DataChannel = wip_putFileOpts(

                    http_ClientTestCtx.CnxChannel,  // session channel

                    HTTP_STR_URL,                   // requested URL

                    http_ClientTestDataHandler,     // data handler
                    &http_ClientTestCtx,            // context

                    // request headers
                    WIP_COPT_HTTP_HEADER, "Accept",          "text/html",
                    WIP_COPT_HTTP_HEADER, "Accept-Language", "fr, en",

                    WIP_COPT_END);

    if (http_ClientTestCtx.DataChannel == NULL)
    {
      TRACE(( 1, "cannot create http data channel\n" ));
      adl_atSendResponse ( ADL_AT_UNS, "cannot create http data channel\r\n" );
      wip_close( http_ClientTestCtx.CnxChannel);
      ret =-1;
    }
  }

  return(ret);
}

Do you have the internet feature enabled?

What’s your reponse to AT+WCFM=5

bit 0 should be set (the hex number should be odd).

hi,
This is the response for at+wcfm=5

at+wcfm=5
+WCFM: 00000471,0
OK

Well at least the Internet option is enabled. I’m not familiar with http connections, I use ftp. But wouldn’t it be necesary to have a handler for the http connection processing?

In ftp there’s one handler for the client connection processing and another handler for the file transfer processing.

  1. ,i got the output, if any newbie like me, want to know the things can pm me without hesitation(it’s free) or even can post here.