Resource Manager for Serial Port

Hi Friends,
I’m writing a resource manager to deal with some POSIX serial port
commands in a QNX 6.1 RTOS. Until now everything was ok and I’ve
implemented open(), close(), read(), write() and select() handling functions
in my resource manager.
But now I’m in trouble with tcsetattr() and tcgetattr(). I know that a
resource manager must handle devctl() of a client in order to receive or
send specific commands/data to this client (i.e. port speed, parity bit,
no.bits, etc).
My problem: no matters what values I set at the client’s side, using for
example cfsetispeed() to set the speed to 2400, 4800 or 9600, the value that
I get from dcmd inside my resource manager’s devctl() handler when the
client runs tcsetattr() is always the same: 804c7414.
Does anybody know how tcsetattr() and tcgetattr() are implemented in QNX
6.1 RTOS? Or how do they use devctl() to exchange data with a serial port
resource manager? if I could have the source code of them it would be
perfect.

Best Regards,
Douglas Mota Dias / Brazil.

Hi

Source code for devc-ser8250 is available through cvs.qnx.com. I strongly
doubt that you’re looking at right field inside your resmgr. That value
looks very much like a pointer.

Regards

  • Akhilesh Mritunjai

“Douglas Mota Dias” <douglasm@uninet.com.br> wrote in message
news:amj0sj$445$1@inn.qnx.com

Hi Friends,
I’m writing a resource manager to deal with some POSIX serial port
commands in a QNX 6.1 RTOS. Until now everything was ok and I’ve
implemented open(), close(), read(), write() and select() handling
functions
in my resource manager.
But now I’m in trouble with tcsetattr() and tcgetattr(). I know that a
resource manager must handle devctl() of a client in order to receive or
send specific commands/data to this client (i.e. port speed, parity bit,
no.bits, etc).
My problem: no matters what values I set at the client’s side, using for
example cfsetispeed() to set the speed to 2400, 4800 or 9600, the value
that
I get from dcmd inside my resource manager’s devctl() handler when the
client runs tcsetattr() is always the same: 804c7414.
Does anybody know how tcsetattr() and tcgetattr() are implemented in QNX
6.1 RTOS? Or how do they use devctl() to exchange data with a serial port
resource manager? if I could have the source code of them it would be
perfect.

Best Regards,
Douglas Mota Dias / Brazil.
\