0
\$\begingroup\$

I'm going to use that module for internet connection and to send data to a server. https://www.waveshare.com/wiki/SIM7020E_NB-IoT_HAT My question is I know that TCP stack only supports max of 1200 bytes to be sent to the server. How do you guys over come that limitation.

The problem is I'm sending a JSON which is more than 1KByte and The server expects a Full Json without chunked ones.

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Send multiple packets ? \$\endgroup\$
    – Eugene Sh.
    Oct 23, 2019 at 17:02
  • \$\begingroup\$ @EugeneSh. How can I make sure that they are combined into one JSON string. I have to send a full JSON string to the server, otherwise it won't be processed by the server correctly. \$\endgroup\$
    – andre
    Oct 23, 2019 at 17:06
  • \$\begingroup\$ This is up to your server. Looks like you are confusing between different link layers. \$\endgroup\$
    – Eugene Sh.
    Oct 23, 2019 at 17:07
  • \$\begingroup\$ Send it using POST rather than GET. \$\endgroup\$
    – Transistor
    Oct 23, 2019 at 17:11
  • \$\begingroup\$ @EugeneSh. I can't control the server at all \$\endgroup\$
    – andre
    Oct 23, 2019 at 17:14

1 Answer 1

0
\$\begingroup\$

HTTP is layered on top of TCP. TCP is a connection-oriented protocol — you establish a connection, you send data through that connection, and then you break the connection. Once the connection is established, you can send as many bytes of data as you like, using multiple AT+CSOSEND=0,0,"...." commands if necessary. The underlying TCP protocol will make sure that the stream comes out the far end in the same order that you put it in at your end.

You don't need to worry about the maximum packet size (MTU in IP-speak) at all. The lower level layers in the protocol stack hide that detail from the upper layers.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.