qnet vs UDP/TCP

Hi,

If i want to write to a serial port on a different node
( Assuming that I have two computers/nodes running qnx one server and one
embedded computer, i want to write and read data from a serial port on the
embedded node to the server), which is better

use open and write calls as
write(/node2/dev/ser2,buf,n)
(ignore the syntax)

or should i open a socket transfer data via UDP/TCP and then write it
locally on the serial port

The data is about at the rate of 38400bps ( serial) .

Which is more faster. I know that if I use /node2/dev/ser2 then qnet takes
care of the data transfer. I dont mind even if some data is lost but it
should be fast.

Any help is appreciated.

Thanks
Srikanth

I do this all the time since I don’t have two serial ports on my development
box…

qtalk -m /net/testbox/dev/ser1 -b 115200

…works like a charm.

chris


Srikanth Saripalli <srik@usc.edu> wrote:

Hi,

If i want to write to a serial port on a different node
( Assuming that I have two computers/nodes running qnx one server and one
embedded computer, i want to write and read data from a serial port on the
embedded node to the server), which is better

use open and write calls as
write(/node2/dev/ser2,buf,n)
(ignore the syntax)

or should i open a socket transfer data via UDP/TCP and then write it
locally on the serial port

The data is about at the rate of 38400bps ( serial) .

Which is more faster. I know that if I use /node2/dev/ser2 then qnet takes
care of the data transfer. I dont mind even if some data is lost but it
should be fast.

Any help is appreciated.

Thanks
Srikanth


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Hi,
Yes i know it works and it is also very simple to program, but I was
worried about spped issues. Could you tell me which one qnet ot TCP-IP with
opening a serial port file descriptor is faster.

Thanks
Srikanth

I do this all the time since I don’t have two serial ports on my
development box…

qtalk -m /net/testbox/dev/ser1 -b 115200

…works like a charm.

chris


Srikanth Saripalli <> srik@usc.edu> > wrote:
Hi,

If i want to write to a serial port on a different node
( Assuming that I have two computers/nodes running qnx one server and one
embedded computer, i want to write and read data from a serial port on
the embedded node to the server), which is better

use open and write calls as
write(/node2/dev/ser2,buf,n)
(ignore the syntax)

or should i open a socket transfer data via UDP/TCP and then write it
locally on the serial port

The data is about at the rate of 38400bps ( serial) .

Which is more faster. I know that if I use /node2/dev/ser2 then qnet
takes care of the data transfer. I dont mind even if some data is lost
but it should be fast.

Any help is appreciated.

Thanks
Srikanth

Srikanth Saripalli <srik@usc.edu> wrote:

Hi,
Yes i know it works and it is also very simple to program, but I was
worried about spped issues. Could you tell me which one qnet ot TCP-IP with
opening a serial port file descriptor is faster.

qnet vs. tcp isn’t an easy answer. It is going to depend on how much data is
written at a time and retries and timeouts…

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/