RS485

Hi,

How to control “RTS” or other output lines on /dev/ser1 to enable/disable
TX_EN of RS485 driver chip in a multi-drop RS-485 configuration.

Wen Chang
Tuboscope

Previously, wen chang wrote in qdn.public.qnx4:

Hi,

How to control “RTS” or other output lines on /dev/ser1 to enable/disable
TX_EN of RS485 driver chip in a multi-drop RS-485 configuration.

Wen Chang
Tuboscope

You can raise/lower RS232 control lines from C using the qnx_ioctl()
call (look in <sys/qioctl.h> for QCTL_DEV_CTL), but unless your rs485
timing is very loose you probably won’t get the results you need.

You could also grab the source to Dev.ser (I think this is still
available) and modify it to handle RTS the way you require.

Another way is to skip Dev entirely, and write your own uart handler
stuff. If you don’t know uarts, thought, you would be in for a
learning experience.

These days many folks skip all of the above and just buy RS232-RS485
converters that handle RTS switching automatically. One source for
them is B&B Electronics at http://www.bb-elec.com

“wen chang” <wchang@tubosope.com> wrote in message
news:9tb5fb$q91$1@inn.qnx.com

Hi,

How to control “RTS” or other output lines on /dev/ser1 to enable/disable
TX_EN of RS485 driver chip in a multi-drop RS-485 configuration.

I believe that stty command can control the RTS/CTS lines

-Adam

Ken is correct, at this time RS485 is not supported. If you are feeling keen
you can get the source for Dev.ser here:

http://quics.qnx.com/cgi-bin/search/usr/free/?srch=Dev.ser&submit=submit&select=1

and you can modify it to support the RS485 protocol, but if there is a
converter, that may be a quicker easier solution.

Erick



Ken Schumm <kwschumm@ih8spamqsolv.com> wrote:

Previously, wen chang wrote in qdn.public.qnx4:
Hi,

How to control “RTS” or other output lines on /dev/ser1 to enable/disable
TX_EN of RS485 driver chip in a multi-drop RS-485 configuration.

Wen Chang
Tuboscope


You can raise/lower RS232 control lines from C using the qnx_ioctl()
call (look in <sys/qioctl.h> for QCTL_DEV_CTL), but unless your rs485
timing is very loose you probably won’t get the results you need.

You could also grab the source to Dev.ser (I think this is still
available) and modify it to handle RTS the way you require.

Another way is to skip Dev entirely, and write your own uart handler
stuff. If you don’t know uarts, thought, you would be in for a
learning experience.

These days many folks skip all of the above and just buy RS232-RS485
converters that handle RTS switching automatically. One source for
them is B&B Electronics at > http://www.bb-elec.com