HTTP in buffer size?

Hi Guys,

Loving the new release, I’m having so much fun :slight_smile: but wonder if you could help me with something…

I’m successfully sending through some data to an “HTTP in” block and then handling that in an Input port server response , before writing that to UART - which all seems to work fine.

BUT… I’m finding that if I go above about 10k in terms of the incoming data size, I’m getting a “imp crashed, reason: out of memory” error.

Is there a limit to how much data I can send through in one POST and therefore could you show me the best way to “chunk” the data - or am I doing something stupid code wise and actually I need to be clearing some buffer somewhere (I’m still a relative Squirrel newbie!) on the imp side of things?

Thanks in advance, you guys supporting us all so well in the forums is making things awesome!

Code below:

`class RespInput extends InputPort
name = “response”;
type = “string”;

function set(serverresponse)


local input = RespInput(“response”, “string”);
local output = OutputPort(“request”, “string”);

//then use the input like
imp.configure(“UART Test”, [input], [output]);
hardware.uart1289.configure(115200, 8, PARITY_NONE, 1, NO_CTSRTS);“making request . . .”);
output.set(“testing 12345”);`

Apologies, all - it seems there are already a couple of posts on the forum already mentioning this…

…So I’m going to implement some chunking on my server side code that makes the request to my imps “HTTP in” block. I’ll set each chunk to around 11k and then write to the UART before sending the next chunk through.

Anyone interested then shout me and I’ll post up some example code.


With agents you can do the chunking within the imp server; release-12 also has about 20kB more free memory than the current version too :slight_smile: