# TCP/IP packet size

**URL:** <https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319>\
**Category:** Open AT\
**Created:** [June 9, 2009, 11:18am UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319 "2009-06-09T11:18:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenFT01](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@BenFT01](https://forum.sierrawireless.com/u/BenFT01)\
**Post date:** [June 9, 2009, 11:18am UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319/1 "2009-06-09T11:18:30Z")

</div>

Hi Masters of Wavecom,  
I’m trying to increase the packet size of my transmissions. They are currently 536B. Using NO\_DELAY the data is forced out as soon as it comes in and I see sizes of 56B typically. So i can see some effect there which is understandable. Is there a way to increase the size more?  
I tried altering WIP\_COPT\_SND\_LOWAT which didn’t seem to have much effect. To be honest I don’t understand the description in the document

> [@](#):
>
> Minimum amount of available space that must be available in the emission buffer before triggering a WIP\_CEV\_WRITE event. default:1024

should that “available” be “used” instead, that would seem to make more sense.  
Any other hints on packet control size.

The reason I’m following this route is that with very short packet sizes (as found with NO\_DELAY) I found that the processor was getting was running out of IP buffers and missing incoming UART data. With the longer packets it is behaving. I also increased the buffer size with WIP\_COPT\_SND\_BUFSIZE while I was at it.

---

<div class="post-metadata">

**Author:** ![xxgghh](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xxgghh](https://forum.sierrawireless.com/u/xxgghh)\
**Post date:** [May 19, 2010, 4:38pm UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319/2 "2010-05-19T16:38:25Z")

</div>

Hey ,you should try to set the WIP\_COPT\_MAXSEG,this is the size of TCP packet size.

my problem is:the default value of WIP\_COPT\_MAXSEG is 536B,when I set it to 5000 and I checked it again, the value of WIP\_COPT\_MAXSEG is 1440,I can’t increase any more!

Is there anybody know why?

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)\
**Post date:** [May 21, 2010, 4:22am UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319/3 "2010-05-21T04:22:31Z")

</div>

Hiya,

> [@xxgghh](#):
>
> my problem is:the default value of WIP\_COPT\_MAXSEG is 536B,when I set it to 5000 and I checked it again, the value of WIP\_COPT\_MAXSEG is 1440,I can’t increase any more!

In the ADL user guide (Revision 11 for OS 6.31), page 109 it notes that the maximum size of data packets for GPRS Port FCM handler is 1500 bytes. This is the maximum packet size allowed by ethernet (and hence most IP based networks - Gigabit Jumbo Frames excluded).

I wonder if the 1440 value is the maximum packet payload size - 1500 minus some overhead (CRC, address etc) - to stop packet fragmentation?

No idea why the default packet size was 536 bytes though - maybe the WIP stack is reading something from the network and adapting packet size to be some sort of _optimum_?

Just my thoughts.  
ciao, Dave

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 21, 2010, 6:27am UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319/4 "2010-05-21T06:27:02Z")

</div>

> [@davidc](#):
>
> I wonder if the 1440 value is the maximum packet payload size

It does sound familiar…

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)\
**Post date:** [May 21, 2010, 11:03pm UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319/5 "2010-05-21T23:03:03Z")

</div>

Hiya,

> [@davidc](#):
>
> No idea why the default packet size was 536 bytes though

Should have done a bit more research.  
536 bytes is the minimum packet size that must be accepted by an IP host…

ciao, Dave

---

<div class="post-metadata">

**Author:** ![xxgghh](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xxgghh](https://forum.sierrawireless.com/u/xxgghh)\
**Post date:** [May 23, 2010, 12:21pm UTC](https://forum.sierrawireless.com/t/tcp-ip-packet-size/3319/6 "2010-05-23T12:21:01Z")

</div>

> [@davidc](#):
>
> Hiya,
> 
> > [@xxgghh](#):
> >
> > my problem is:the default value of WIP\_COPT\_MAXSEG is 536B,when I set it to 5000 and I checked it again, the value of WIP\_COPT\_MAXSEG is 1440,I can’t increase any more!
> 
> In the ADL user guide (Revision 11 for OS 6.31), page 109 it notes that the maximum size of data packets for GPRS Port FCM handler is 1500 bytes. This is the maximum packet size allowed by ethernet (and hence most IP based networks - Gigabit Jumbo Frames excluded).
> 
> I wonder if the 1440 value is the maximum packet payload size - 1500 minus some overhead (CRC, address etc) - to stop packet fragmentation?
> 
> No idea why the default packet size was 536 bytes though - maybe the WIP stack is reading something from the network and adapting packet size to be some sort of _optimum_?
> 
> Just my thoughts.  
> ciao, Dave

Whey the max IP packet size is 1500 bytes,and the default TCP packet is 536 bytes,you can foud them in the TCP/IP protocol.  
the 1440 bytes is what you can write ,not include any other overhead of tcp header.  
You may need this: [faqs.org/rfcs/rfc879.html](http://www.faqs.org/rfcs/rfc879.html)
