PDA

View Full Version : Setting of comm ports - adding second com port - redirection



stukennedyuk
10-20-2003, 11:31 AM
I've found 'lx-viewer' which should let me view and plot '.DXF' format CAD files to my HP (hpgl) plotter. A couple of things are stopping me from doing this! How do I set up baud, parity, bits and handshaking on my serial port, how do I get the second coms port recognised by Knoppix and what is the best way of outputting the plot file to the device?

cp plot.hpgl /dev/ttys0 ?????

Many thanks, I'll do a 'google' in the meantime!

Stu.....

Dave_Bechtel
10-20-2003, 05:52 PM
--See ' man setserial ', and /etc/init.d/setserial. To check your serial port current config:
' setserial -a /dev/ttyS0 ' as root.

--You can also:
' cat /proc/tty/driver/serial ' as any user:
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:16550A port:3F8 irq:4 baud:9600 tx:8 rx:60 brk:3
1: uart:16550A port:2F8 irq:3 baud:9600 tx:6 rx:0

--From google, here is example of something you could put into /etc/serial.conf:
/dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test

--As far as getting the plot to the device, maybe use cat(?) But you did say lx-viewer should let you do the plot directly to the device...


I've found 'lx-viewer' which should let me view and plot '.DXF' format CAD files to my HP (hpgl) plotter. A couple of things are stopping me from doing this! How do I set up baud, parity, bits and handshaking on my serial port, how do I get the second coms port recognised by Knoppix and what is the best way of outputting the plot file to the device?

cp plot.hpgl /dev/ttys0 ?????

Many thanks, I'll do a 'google' in the meantime!

Stu.....

stukennedyuk
10-20-2003, 10:57 PM
Thanks for that. I found a command 'stty' - set tty (set teletype) which lets you change bits per second, parity and handshake. e.g.

stty 19200 cs8 -parenb crtscts -echo -F /dev/ttyS0

-would set baud to 19200, number of bits to 8, turn parity off, e.g. 'none'set hardware handshake and turn off echo on serial port ttyS0 (the first one)

Stu.....

stukennedyuk
10-21-2003, 11:02 AM
Looking at the qcad website (http://www.ribbonsoft.com/qcad.html) shows that support for hp/gl is postponed. LX-viewer will open qcad .dxf files and will output them to the plotter (use print to file first them cat filename.hpgl /dev/ttySx ) but it's not a practical solution, for a couple of reasons. (font scaling and pen handling).

Time to check out some other cad packages!

Just thought you'd like to know!

Stu.....