Skip to content

uart transmission #1538

@mauroForlimpopoli

Description

@mauroForlimpopoli

Good afternoon,
i'm using uart with this code:

let serial17 = new device.io.Serial({
		receive: 2,
		transmit: 3,
		baud: 9600,
		port: 1,
		format: "buffer",
		onReadable: function(count) {
// other code
	});	 

and I send periodically (every 10 sec.) with che instruction

serial17.write(ArrayBuffer.fromString("sting fo about 40 just for example hallo world"))

and all words, and on my app "teraTerm" appears

sting fo about 40 just for example hallo world
sting fo about 40 just for example hallo world

but sometimes the synco is lost and it trasmits:

hallo world
sting fo about 40 just for example hallo world
hallo world

I think maybe the example is not clear, but in other words the buffer transmitted is:

example hallo world
sting fo about 40 just for 

It is like if the part of the previus buffer is not transimitted and with the next transmission it finish the first and transmit a part of the new one.
It is possible or my error? Can I reset the buffer not trasmitted to syncronize it?
It seems that the problem is at the first start
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions