Skip to main content
mbuczek
Associate
Nov 23, 2016 2:58 PM UTC
Question

SPWF01S Nagle

Posted on November 23, 2016 at 15:58

Hi,

how can I configure/deactivate the Nagle-Algorithm in SPWF01S?

Thanks!

MBU
    This topic has been closed for replies.

    5 replies

    Gerardo GALLUCCI
    ST Employee
    Nov 23, 2016 3:13 PM UTC
    Posted on November 23, 2016 at 16:13

    Hi Michael,

    Nagle is enabled by default, and cannot be disabled.

    jerry

    mbuczek
    mbuczekAuthor
    Associate
    Nov 23, 2016 3:35 PM UTC
    Posted on November 23, 2016 at 16:35

    Hi Jerry!

    thanks for the quick response!

    Is there any chance to transmit the desired amount of bytes, flush the buffer?

    Gerardo GALLUCCI
    ST Employee
    Nov 23, 2016 4:15 PM UTC
    Posted on November 23, 2016 at 17:15

    It's not possible to explicitly flush the TCP output buffer, but AT+S.SOCKW algorithm takes care of ''more data'' flag:

    - if there aren't more data to transfer, flush the buffer;

    - if there are more data to transfer, wait and enqueue the buffer.

    Threshold to flush/enqueue is around 730 bytes (1 MSS).

    Example:

    - SOCKW(500 bytes): send(500) + flush

    - SOCKW(1000 bytes): send(730) + enqueue + send(270) + flush

    Hope helps you

    jerry

    mbuczek
    mbuczekAuthor
    Associate
    Nov 23, 2016 5:16 PM UTC
    Posted on November 23, 2016 at 18:16

    I use the socket server, when I'm connected, the wifi-module is in data-mode. I can not use the ''AT+S. SOCKW'' command...any other idea?

    Gerardo GALLUCCI
    ST Employee
    Nov 23, 2016 5:32 PM UTC
    Posted on November 23, 2016 at 18:32

    Same behavior:

    - buffer full: ''more data''

    - buffer not full: flush

    buffer size: 1024 - sizeof(escape_sequence)

    note: use flowcontrol to avoid data loss

    j