iperf-esp8266 and an observation
Posted: Sun Aug 02, 2015 8:26 am
Hi All,
I don't have a lot to contribute, although i did get an iperf server working!
I was inspired by a post elsewhere using an arduino with the ethernet shield,
how-ever after failing miserably trying to re-interpret that example.
(i suspect the ethernet shield takes care of a lot of stuff on it's own).
I instead took the example of "esp8266wifi/WifiTelnetToSerial",
and trimmed/modified it a little.
Actually iperf directly to the un-modified sketch also works, iperf is a really simple protocol,
just starting an "iperf -c (esp8266-IP)" works, but does generate a lot of output
to the serial port!
One thing i learnt, which i didn't find documented anywhere, although i may very well not
know how to read the documentation.....
Is that a TCP ACK is not generated until you actually read (or at least access) the read buffer.
That's what stymied me trying to adapt the ethernet shield example.
I was getting consistent crashes with the ESP, and what looked like stack dumps,
i suspect a simple buffer overflow, as i wasn't actually reading the buffer!
Performance isn't great, around 3Mbps, but considering how tiny this thing is, i think that's amazing!
I don't have a lot to contribute, although i did get an iperf server working!
I was inspired by a post elsewhere using an arduino with the ethernet shield,
how-ever after failing miserably trying to re-interpret that example.
(i suspect the ethernet shield takes care of a lot of stuff on it's own).
I instead took the example of "esp8266wifi/WifiTelnetToSerial",
and trimmed/modified it a little.
Actually iperf directly to the un-modified sketch also works, iperf is a really simple protocol,
just starting an "iperf -c (esp8266-IP)" works, but does generate a lot of output
to the serial port!
One thing i learnt, which i didn't find documented anywhere, although i may very well not
know how to read the documentation.....
Is that a TCP ACK is not generated until you actually read (or at least access) the read buffer.
That's what stymied me trying to adapt the ethernet shield example.
I was getting consistent crashes with the ESP, and what looked like stack dumps,
i suspect a simple buffer overflow, as i wasn't actually reading the buffer!
Performance isn't great, around 3Mbps, but considering how tiny this thing is, i think that's amazing!