Serial Splitter redirect jumbling long packets?(Read 2295 times)
Serial Splitter redirect jumbling long packets? on: March 14, 2016, 04:24:33 PM
Hi,

I've got a bit of an issue using Serial Splitter. One of my devices is sending a packet of ~75 bytes at a time. When I use Serial Port Monitor to view the data coming in, I can see it get split into two separate reads by SPM as you can see here:



However, when I'm using Serial Splitter to redirect my data to a different port, it seems to be tacking on the end of the packet before the beginning, as seen here:



The options I use to open the port in SPM are the same for all ports involved in Serial Splitter: 115.2k baud, 8 data bits, 1 stop bit, no parity, no flow control.

 Any guesses as to why my data seems to be getting flipped there?



Re: Serial Splitter redirect jumbling long packets? Reply #1 on: March 14, 2016, 04:42:17 PM
You are probably seeing the end of one packet and the beginning of the next one.



Re: Serial Splitter redirect jumbling long packets? Reply #2 on: March 14, 2016, 05:08:43 PM
Thanks for the fast reply!

I thought that at first too. I've slowed my packet rate to 1Hz, and still see the behavior at nearly a second apart:



I've also noticed that it occurs on the very first packet after adding the redirect in Serial Splitter too:
(Larger screenshot, so I'll just link: )
http://i.imgur.com/DoEeCqj.png


Edit: It apparently can seem to work itself out for a few packets too; http://i.imgur.com/5GRZJWs.png. Though the behavior reoccurs after a few packets.
« Last Edit: March 14, 2016, 05:20:01 PM by cmd »



Re: Serial Splitter redirect jumbling long packets? Reply #3 on: March 15, 2016, 12:04:16 PM
Are you able to reproduce the problem without Serial Splitter? I mean, if you attach the device to your computer's COM port, open this port with some application (HyperTerminal, Putty, Eltima Serial Port Terminal, etc.) and monitor it with SPM, does your data get flipped as well?



Re: Serial Splitter redirect jumbling long packets? Reply #4 on: March 15, 2016, 01:11:01 PM
It's a little more difficult to see in putty, because it read it one byte at a time, but the packet always seems to start and end in the proper place (as you can see here with the timeout between the end of one packet and start of the next: http://i.imgur.com/Tqlr7yS.png)

This was using MobaXterm: http://i.imgur.com/EEkyO51.png It catches the remainder of a packet, and then each second reads the full 75 byte packet starting with the STX.

I don't have HyperTerminal, but I could download the trial for Eltima Serial Port Terminal if you'd like me to try that too!

Edit: This is what Serial Splitter looks like when I filtered out the other functions: http://i.imgur.com/BrZNJAm.png

You can see how it so often seems to see the packets starting with the end of the packet, then for a few it breaks the packet into two, but getting everything in the right order (starts on line 20483), but then eventually falls back into the previous pattern.

This is truly one of the most odd things I've seen with serial applications :)
« Last Edit: March 15, 2016, 01:49:48 PM by cmd »



Re: Serial Splitter redirect jumbling long packets? Reply #5 on: March 16, 2016, 12:43:20 PM
We'll need to understand whether the problem is in Serial Splitter or Serial Port Monitor.

Does your data arrive into Serial Splitter's virtual ports already flipped? - You check it by opening the port with our Terminal.



Re: Serial Splitter redirect jumbling long packets? Reply #6 on: March 16, 2016, 04:39:47 PM
Unless I'm misunderstanding your question, I'm not actually using any virtual ports from Serial Splitter. I'm just redirecting data from a usb to serial port to an actual physical (PCI) serial port.

When I first open the port in Serial Terminal, I get a portion of the end of one packet, and a full packet following it all at once. (Likely, this is the amount of the data that's still buffered in the usb to serial chip that was waiting to be read.) After that, the packets seem to come in once at a time in the proper order.

This is a screenshot from after I cleared the edit view: http://i.imgur.com/JWcUBBu.png

Here's an animated image of the data coming in: http://i.imgur.com/FAt6bRr.gifv You can see each packet starts with the ".Ɖ", (the hex 0x02D0 that is my STX)

Here's another animated image of me transitioning from Serial Terminal to Serial Port Monitor: http://i.imgur.com/OTjk9at.gifv -- You can see the data coming in as expected in SMP -- the 0x02D0 leading the packet.

And here's Serial Splitter in action: http://i.imgur.com/WTJ62ZN.gifv

In this image, I add the redirect, and then click back over to Serial Port monitor, and you can see that each packet it sees there is starting with 0x3800 rather than the 0x02D0, as in the screenshots before.

It definitely seems like the Serial Splitter is somehow reading differently from the port than the Serial Terminal does.

Is there anything else I can try and get you an image/gif of?

Thanks again!



Re: Serial Splitter redirect jumbling long packets? Reply #7 on: March 21, 2016, 05:04:00 PM
Thanks for the clarification, we mistakenly assumed that you were using Serial Splitter to redirect data to a virtual COM port.

Anyway, we'll probably need to see the issue ourselves in order to figure out what's causing it. How about having a TeamViewer session sometime this week? Please drop us a line at support@eltima.com when you are available.



 

Sitemap 1 2 3 4 5