Problem with HTTP GET method

I am using HTTP GET method to download a file with the WMP100. But I’m experiencing a very frustrating problem.

I set up the channels with following:

http_channel = wip_HTTPClientCreateOpts (NULL, NULL,

data_channel = wip_getFileOpts (http_channel, MyDestinationUrl,
httpEventHandler, NULL,

Then in httpEventHandler I get WIP_CEV_OPEN, followed by WIP_CEV_READ if all works well.

The problem is that sometimes WIP_CEV_READ would never come. The WIP_CEV_OPEN event always occurs but then no other events follows after it. Then I reboot the WMP and re-connect to GPRS and all of a sudden the WIP_CEV_OPEN event comes in perfectly. I can not understand why the WIP_CEV_READ event sometimes occurs and other times not.

Has anyone else experienced the same?

In wavecom’s example it mentions that you have to read all data from the buffer when a WIP_CEV_READ event comes otherwise you don’t trigger the next event. Are you certain you do so?

The problem is that it does not even get the WIP_CEV_READ event. Just the WIP_CEV_OPEN event fires and then nothing else.

I have made a kind of work-around by having a timer that checks if the nothing else happens after WIP_CEV_READ for 30 seconds, then it disconnects GPRS and try again and again. It usually works after a couple of tries. Its just just ugly and slow.

I’m convinced there is a problem with HTTP GET. This problem was giving us so much problems that we finally decided to use HTTP POST method instead to download the file. This did require us to write a small server side app that would read the file and stream it back as server response. This works very well. The only change we made to our WMP100 code was to change from GET to POST.

I am still interested to know why HTTP GET did not work as expected, but at least HTTP POST is working correctly.

I had problems with HTTP GET because the Wavecom documentation was (maybe still is?) wrong about what events you get, and when. :angry:

Sorry I don’t have time to dig it out at the moment, but try a search here on “WIP_CEV_” - I think I posted about it…