Help using SerialPort node at fast speeds

I have this patch and many questions…

First of all, is it possible to use Tokenizer without a Prefix ?
I would like to buffer all incoming character until I hit the Postfix… or trigger the postfix via “timeout”
Lets say a device just sends me “0x01,0x02” and nothing else… I would like to buffer those 2 bytes

anyway, I did “solve” this from my “Arduino” side… I have a device sending data to the serial port, at 500000baud , just for testing I am sending a consecutive list of messages , just a stream of bytes,


I add 2 letters as header to simplify the example , the w and the z will be cutted due to the tokenizer node

If I check the arduino console, I can see the list, so no bottleneck on the sending device, cable, or receiver device

But my “queue” from the vvvv side is missing a lot of messages… BUT… if I do a S+H i get a Spread<Spread> at the output of the Tokenizer
Manualy hitting a S+H I can take a look of all the data. and its all there, and nothing is missing

So what can I do to avoid loosing data ?
I would like to be able to ceate a quewe with all the messages


I am using the PostFix node from tokenizer that does just what I am looking for…
I think I can inyect the “ending” payload after a timeout of no data to solve the first problem.

The second issue is still ongoing, also I realized there is a 0x18 at the beginning of each frame
and I am not sending that…

did you notice that there are different versions of the Tokenizer? there is one called Tokenizer (Postfix) for exactly that usecase.

this is something you’d have to simply then insert into your incoming stream, before sending it to the Tokenizer.

the LastOrDefault and HoldLatest in your patch are the problem. those strip messages and thus what you’re adding to the queue is not all you received. what the Tokenizer returns is complete. you may first use a ForEach to convert the tokens to strings using the FromBytes node in the loop. then add all those slices to a queue.

the 18 in this case is the number of slices in each slice.

1 Like

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