ESP8266 Developer Zone The Official ESP8266 Forum 2016-05-11T18:59:06+08:00 https://bbs.espressif.com:443/feed.php?f=65&t=2154 2016-05-11T18:59:06+08:00 2016-05-11T18:59:06+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2154&p=6828#p6828 <![CDATA[Re: Long tcp write seems impossible? using open-sdk 1.5.2]]>

Hi Jon Have you tried breaking your writes into smaller chunks?

Currently I am writing 256 byte chunks.

Looks like my code must be broken as the test worked.

I will publish my full application when finished, in the meantime I wrote a tcp test to clarify what is going on.
I found a good tcp example and modified it, original is here:
http://cholla.mmto.org/esp8266/OLD/sdk/tcp_server.c

My simple tcp test here, it is a telnet server that just sends lines back :
http://www.jonshouse.co.uk/download/tcp_test_v_0.1.tar

All noted on the RF API, I will have a look at that later.

Thanks,
Jon

PS

Statistics: Posted by jonshouse — Wed May 11, 2016 6:59 pm


]]>
2016-05-11T14:47:16+08:00 2016-05-11T14:47:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2154&p=6821#p6821 <![CDATA[Re: Long tcp write seems impossible? using open-sdk 1.5.2]]> https://en.wikipedia.org/wiki/Chunked_transfer_encoding

Statistics: Posted by mikexmas — Wed May 11, 2016 2:47 pm


]]>
2016-05-11T04:26:13+08:00 2016-05-11T04:26:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2154&p=6807#p6807 <![CDATA[Re: Long tcp write seems impossible? using open-sdk 1.5.2]]>

Code:

/*
 * user_rf_pre_init
 */
void user_rf_pre_init(void)
{
   system_phy_set_powerup_option(3);
   system_phy_set_max_tpw(82);
}

The power up funcs calibrates the RF black box stuff and set it to max power. Hope this helps.

Statistics: Posted by peter@steininc.net — Wed May 11, 2016 4:26 am


]]>
2016-05-10T21:49:20+08:00 2016-05-10T21:49:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2154&p=6803#p6803 <![CDATA[Long tcp write seems impossible? using open-sdk 1.5.2]]>
According to what passes documentation (LOL) "espconn_regist_write_finish()" will register a callback that will execute when the tcp chunk of data has been sent? I assume? However it does not seem to work at all ?

espconn_regist_sentcb(), the callback is unreliable, often not firing.

I've tried polling to see if I can send data with "espconn_get_packet_info" but that simply shows typical values like
"send_buf_size=2855, snd_queuelen=7" with no sign of either ever changing, I would expect to see them decrease.

It is really starting to piss me off, I don't see why this SDK/OS cant provide a simple cumulative write() for tcp like any other OS !

Anyhew, does anyone have a simple example of doing a long tcp write - hundreds of K/Bytes.

A tcp server that sends the same line of text a few hundred times would be great if anyone has such a thing?

Many thanks,
Jon

Statistics: Posted by jonshouse — Tue May 10, 2016 9:49 pm


]]>