SBL2e dividing serial messages on TCP

Discussion to talk about software related topics only.
Foxtron
Posts: 7
Joined: Thu Jul 31, 2014 5:22 am

Re: SBL2e dividing serial messages on TCP

Post by Foxtron »

Probably some devices can split TCP packets, but if there is possibility of custom packetization in SPL2e, there is no reason why it shouldn't work. The SPL2e splits the packets even if it is connected directly to computer and there is no other communication. You can see the split of the packet in following attachments. Sometimes is wireshark able to join fragments again, sometimes not. I still don't understand why the SPL2e doesn't send the data in one packet like other S2E converters. Is it such hard to solve problem?
Attachments
SBL2e_settings.PNG
SBL2e_settings.PNG (41.24 KiB) Viewed 3941 times
scope.png
scope.png (34.72 KiB) Viewed 3941 times
Capture-modbusTcp-query.PNG
Capture-modbusTcp-query.PNG (234.05 KiB) Viewed 3941 times
Capture-modbusTcp-response-fragment1.PNG
Capture-modbusTcp-response-fragment1.PNG (231.39 KiB) Viewed 3941 times
Capture-modbusTcp-response-fragment2.PNG
Capture-modbusTcp-response-fragment2.PNG (227.55 KiB) Viewed 3941 times
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: SBL2e dividing serial messages on TCP

Post by pbreed »

I answer this one...

If it has to send a packet for some other reason it sends the data it has ....

AS it should to minimize network traffic. There is no guarantee of packetization in ANY TCP system.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SBL2e dividing serial messages on TCP

Post by rnixon »

Are you able to guarantee the Modbus serial data will be spaced more than 100ms apart? You said each packet is 50 bytes. Why not set the packet settings to 50 instead of 512? That would tell you if there is any overlap.
Foxtron
Posts: 7
Joined: Thu Jul 31, 2014 5:22 am

Re: SBL2e dividing serial messages on TCP

Post by Foxtron »

Do you think it minimizes network traffic by splitting packets? It needs much more ballast around the message. The packets on TCP have it's own numbers. I can't imagine how the packets could be split somewhere on the way. But I understand they can be splitted and depends on the FW of producer how it works. But I would expect if he offers custom packetization it'll work properly.
I repeat again: I have another S2E converter and it doesn't split the packets at all. It shows it is possible.

Modbus is master-slave protocol. Master sends query and waits for the answer. If I set custom packetization time 100ms, it means the converter will wait 100ms and it will send accummulated data from serial (answer of slave). After that master can ask again. Next answer is more then 100ms after previous one from principle.
As I wrote the serial message is approx. 50 characters. It could be shorter or longer, it depends on a query. But it's never longer then 512 bytes. I set 512 to be sure the message wold be flushed after 100ms. My screenshots in previous post shows the timing. You can see the serial data and splitted message in TCP packets.
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: SBL2e dividing serial messages on TCP

Post by pbreed »

A tcp stream is a stream, it has no inherent packetization....

Other than your issues with wireshark is something broken?
Post Reply