Tcp request data length

I am using TCP request node to communicate with an instrument teh problem is the node only retreives part of of the recieved data (my data is approximatly 2800 bytes ) , when I use an other software it works fine and all the message is received , I have tried incresing timout but the same behaviour occures , my question is what is the size of the recieve buffer of tcp request node and how to increse it in order to retreive all my data.

Are you sure the TCP node is missing data or could it be the debug node's limit?

To be sure you can divert debug output to the log file. (Can't remember exactly what it's called) That should show the whole payload.

I have tried logging the recieved data to a text file but without any success the , it only logs the amount of data displayed in the debug window

Is it that messages are sometimes split across multiple messages?

I have tried sniffing data packets using wireshark with TCP RESQUEST NODE what I receive is what I get from sniffing
using an other software like putty or docklight works fine and all data is retreived
seems that there is a problem with TCP node with large data messages

You haven't answered my question.

Yes the message contain several CR , LF caracters it is composed of 8 messages , this is the message using docklight :

01/06/2023 17:20:09.102 [TX] - FE 7956

01/06/2023 17:20:09.157 [RX] -
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................OK

Resetting...ÿ
rst type: 0xaService components: 17, DB size: 370 bytes.
Cosem objects: 488, DB size: 4402 bytes, 2 records.
Total DB size: 4772 bytes.

Welcome on the CLI monitor
Type - at any time to go back to root menu
(Press ? for help or ? for help on a specific command)

and this is the message using node red tcp request :

..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

But other shorter messages works fine with node red , here a similar shorter message with an other instrument :

................................................................................................................................................................................................................................................................OK

Resetting...

Welcome on the CLI monitor

Type - at any time to go back to root menu

(Press ? for help or ? for help on a specific command)

What I meant was, in the failing case does all the data arrive correctly eventually, but it is split over two or more messages from the TCP node?

No the data does not arrive correctly only part of it arrives as described in the previous reply and it is a one message reply

When I keep connection open and logs the output to a text file I receive all the message , but this is a problem as I am sending multiple commands and I am using the same host and port again in my flow , so I need the connection to close after a certain timeout

I deleted my previous post as it crossed with yours.

So the data is coming back, but in multiple chunks. That is normal for TCP, it has no direct knowledge of records, only bytes. How have you configured the request node?

Try setting it to return after a timeout longer that you ever expect it to take (but less than your repeat interval obviously).

TCP_TIMEOUT
timout is 45 s , when msg is logged in a text file , it works well for now but when displayed in debug or in a global variable it stores only part of it . what is the maximum size of a global variable in node red ?

There is no maximum size.

I think perhaps there is a simple reason. Do you mean that the debug node shows a truncated output, but the message itself is all there? That is just the debug node showing only a portion of the data, to save overloading the browser.

I changed the debugMaxLength: 1000, in the settings.js file and it works fine

It was working fine before, it was only the debug display that was truncated.

That doesn't agree with what you said yesterday when I suggested you check the debug output.

There must have been some other change which resolved it.

yes I concur yesterday I was only receiving part of the msg , I did not change any thing accept trying to update node red

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.