Connecting a tremial program to an external rs323 port
I would like to connect a couple of on premises computers to a computer running Suse 9.3 using rs232 ports, running from 1200 to 19200 baud. How do I connect the terminal program to the physical port? which terminal program is best to use? tia, -- John R. Sowden AMERICAN SENTRY SYSTEMS, INC. Residential & Commercial Alarm Service UL Listed Central Station Serving the San Francisco Bay Area Since 1967 mail@americansentry.net www.americansentry.net
On Saturday 07 October 2006 22:51, John R. Sowden wrote:
I would like to connect a couple of on premises computers to a computer running Suse 9.3 using rs232 ports, running from 1200 to 19200 baud. How do I connect the terminal program to the physical port? which terminal program is best to use?
If a serial port is the only way, than look at this: http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/getty-getty.html It is not written specially for the SUSE, but the principles are the same. -- Regards, Rajko M.
On 10/8/06, Rajko M <rmatov101@charter.net> wrote:
On Saturday 07 October 2006 22:51, John R. Sowden wrote:
I would like to connect a couple of on premises computers to a computer running Suse 9.3 using rs232 ports, running from 1200 to 19200 baud. How do I connect the terminal program to the physical port? which terminal program is best to use?
If a serial port is the only way, than look at this: http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/getty-getty.html
It is not written specially for the SUSE, but the principles are the same.
This how-to is written for SUSE: http://en.opensuse.org/Serial_Null_Modem_Connection#Client
On Sunday 08 October 2006 05:15, Alexey Eremenko wrote:
On 10/8/06, Rajko M <rmatov101@charter.net> wrote:
On Saturday 07 October 2006 22:51, John R. Sowden wrote:
I would like to connect a couple of on premises computers to a computer running Suse 9.3 using rs232 ports, running from 1200 to 19200
baud. How
do I connect the terminal program to the physical port? which terminal program is best to use?
If a serial port is the only way, than look at this: http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/getty-getty.html
It is not written specially for the SUSE, but the principles are the same.
This how-to is written for SUSE: http://en.opensuse.org/Serial_Null_Modem_Connection#Client
Yes, it is written with different goal in mind, but it explains all that is necessary. Though the first link will help too. -- Regards, Rajko M.
On Saturday 07 October 2006 22:51, John R. Sowden wrote:
I would like to connect a couple of on premises computers to a computer running Suse 9.3 using rs232 ports, running from 1200 to 19200 baud. How do I connect the terminal program to the physical port? which terminal program is best to use? The links the other guys provided are fine... as they go... but there are some things you are going to run into with Suse that you need to be aware of.
I provide at least one serial agetty for all my boxes because that provides one more physical entry point into the system should other things fail... network, or video. This is particularly important for headless servers... if the network drops for some reason you can still get to the headless machine by running a temp null modem cable to it and accessing it via the agetty... to shutdown, restart, take off-line, etc. On a Suse box the agetty program is loaded by default and a commented entry in the /etc/inittab file provides the syntax to turn on the serial port for the agetty: (from inittab) S0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt102 You should set the speed to 115200 (usually, but it can be slower) and you may change the device from ttyS0 to another--- for instance /dev/ttyUSB0... By uncommenting the agetty line and booting (or running init) the agetty will sit waiting for a terminal program like minicom. From the Linux box minicom is the terminal emulator of choice... but the problem with Suse is that (unlike some other distros) permissions on devices are usually set for crw rw r root uucp which prevents a normal user from connecting to the device with minicom. So, you have two choices: 1) either run minicom as root like this: su - -c "minicom -s" or, 2) change the owner of the serial device to some standard user: crw rw r myuser uucp /dev/ttyUSB0 or crw rw r myuser uucp /dev/ttyS0 Usually minicom is not loaded on Suse machines by default... so, you'll have to install it with yast... just search for minicom. You will need to run minicom the first time with the -s switch set: su - -c "minicom -s" The reason is that minicom will not have a default config file and will not be able to find the serial port, etc. You will want to set at least the modem strings (set all of them to null *blanks* for use with a null modem cable), and the serial comm settings... device, speed (115200, etc), and the comm stuff ( 8N1 ). The modem init string should be set to ^M which will press the carriage return button on connect giving you the login screen from the other machine... if you don't set this, then you will have to press the enter key when the null modem cable connects... all other strings should be blanked out... you will not need them because you aren't going to be dialing and you aren't going to be using a modem. Disconnecting is a little tricky... but not bad... first exit from the remote signon... then press ( Ctrl + a ) to get the command menu on minicom... then press the ( q ) key to exit without reset... then press enter. Read the minicom man page completely. Now, a quick word about machines that do not have a serial port (many modern systems have multiple memory stick slots, four or five USB ports, a couple of fire wire ports... and *no* DB9 RS-232 serial port... :-( But, not to worry... you can purchase a dongle that will provide the usb connector, short cable, and DB9 connector including an internal PL-2303 converter... usually by Prolific. I am using the Dynex model DX-UBDB9... works great... and fairly cheap... $17 to $34, depending. The converter is plug and play... just plug it in and Suse will create a device for you ... /dev/ttyUSBx (numbering x starts with 0). Use this device in minicom .... again, by default normal users cannot attach to the device directly... change permissions or run minicom as super user. By the way... the listening machine can use the dongle also... if it doesn't have a serial DB9 port. An of course, you are going to need a null modem cable... which is getting harder and harder to find these days. You can make it with null modem adapter, gender changer, and standard serial cable.... or you can sometimes still find commercial null modem cables at places like BestBuy with the gender changers and "null" capability built into the cable. Be sure to get a cable with "all" pins through... some cables cheat and don't run all pins which can sometimes cause problems with handshaking signals... unless you turn them off. If you turn the handshaking signals off (minicom settings) it is very important that the two machines are set for the same baud rate... most modern machines can run easily 115200 on null modem lines less then 12'. Back in the days when I was commercially supporting servers (IBM) I setup my laptop as the minicom linux box... and then I had agetty access to any of the servers as I needed by plugging the serial cable. This of course requires physical security on the servers... you don't want just anybody walking up with a serial line/laptop and getting a tty. Another thing this is good for is remote server support via dialup as an emergency backup. The main remote server box is on the network... and a "secondary" access box sits next to it (connected via serial link) with dialup access. When the network backbone is down for some reason... or the tech needs to take the main machine off-line via remote, she can dial into the access box and then run minicom into the main server (the access box acts as a terminal). Direct phone access is not permitted on the main server... and the access box is not on the network. Have lots of fun... and don't hesitate to call when you get into this and have questions.... there are usually minor problems getting serial ports configured and working... but its mostly painless. -- Kind regards, M Harris <><
On Sun October 8 2006 22:07, M Harris wrote:
On Saturday 07 October 2006 22:51, John R. Sowden wrote:
I would like to connect a couple of on premises computers to a computer running Suse 9.3 using rs232 ports, running from 1200 to 19200 baud. How do I connect the terminal program to the physical port? which terminal program is best to use?
The links the other guys provided are fine... as they go... but there are some things you are going to run into with Suse that you need to be aware of.
I provide at least one serial agetty for all my boxes because that provides one more physical entry point into the system should other things fail... network, or video. This is particularly important for headless servers... if the network drops for some reason you can still get to the headless machine by running a temp null modem cable to it and accessing it via the agetty... to shutdown, restart, take off-line, etc.
On a Suse box the agetty program is loaded by default and a commented entry in the /etc/inittab file provides the syntax to turn on the serial port for the agetty: (from inittab)
S0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt102
You should set the speed to 115200 (usually, but it can be slower) and you may change the device from ttyS0 to another--- for instance /dev/ttyUSB0...
By uncommenting the agetty line and booting (or running init) the agetty will sit waiting for a terminal program like minicom.
From the Linux box minicom is the terminal emulator of choice... but the problem with Suse is that (unlike some other distros) permissions on devices are usually set for crw rw r root uucp which prevents a normal user from connecting to the device with minicom. So, you have two choices: 1) either run minicom as root like this:
su - -c "minicom -s"
or, 2) change the owner of the serial device to some standard user:
crw rw r myuser uucp /dev/ttyUSB0 or crw rw r myuser uucp /dev/ttyS0
Usually minicom is not loaded on Suse machines by default... so, you'll have to install it with yast... just search for minicom. You will need to run minicom the first time with the -s switch set:
su - -c "minicom -s"
The reason is that minicom will not have a default config file and will not be able to find the serial port, etc. You will want to set at least the modem strings (set all of them to null *blanks* for use with a null modem cable), and the serial comm settings... device, speed (115200, etc), and the comm stuff ( 8N1 ).
The modem init string should be set to ^M which will press the carriage return button on connect giving you the login screen from the other machine... if you don't set this, then you will have to press the enter key when the null modem cable connects... all other strings should be blanked out... you will not need them because you aren't going to be dialing and you aren't going to be using a modem.
Disconnecting is a little tricky... but not bad... first exit from the remote signon... then press ( Ctrl + a ) to get the command menu on minicom... then press the ( q ) key to exit without reset... then press enter.
Read the minicom man page completely.
Now, a quick word about machines that do not have a serial port (many modern systems have multiple memory stick slots, four or five USB ports, a couple of fire wire ports... and *no* DB9 RS-232 serial port... :-( But, not to worry... you can purchase a dongle that will provide the usb connector, short cable, and DB9 connector including an internal PL-2303 converter... usually by Prolific. I am using the Dynex model DX-UBDB9... works great... and fairly cheap... $17 to $34, depending. The converter is plug and play... just plug it in and Suse will create a device for you ... /dev/ttyUSBx (numbering x starts with 0). Use this device in minicom .... again, by default normal users cannot attach to the device directly... change permissions or run minicom as super user.
By the way... the listening machine can use the dongle also... if it doesn't have a serial DB9 port.
An of course, you are going to need a null modem cable... which is getting harder and harder to find these days. You can make it with null modem adapter, gender changer, and standard serial cable.... or you can sometimes still find commercial null modem cables at places like BestBuy with the gender changers and "null" capability built into the cable. Be sure to get a cable with "all" pins through... some cables cheat and don't run all pins which can sometimes cause problems with handshaking signals... unless you turn them off. If you turn the handshaking signals off (minicom settings) it is very important that the two machines are set for the same baud rate... most modern machines can run easily 115200 on null modem lines less then 12'.
Back in the days when I was commercially supporting servers (IBM) I setup my laptop as the minicom linux box... and then I had agetty access to any of the servers as I needed by plugging the serial cable. This of course requires physical security on the servers... you don't want just anybody walking up with a serial line/laptop and getting a tty.
Another thing this is good for is remote server support via dialup as an emergency backup. The main remote server box is on the network... and a "secondary" access box sits next to it (connected via serial link) with dialup access. When the network backbone is down for some reason... or the tech needs to take the main machine off-line via remote, she can dial into the access box and then run minicom into the main server (the access box acts as a terminal). Direct phone access is not permitted on the main server... and the access box is not on the network.
Have lots of fun... and don't hesitate to call when you get into this and have questions.... there are usually minor problems getting serial ports configured and working... but its mostly painless.
-- Kind regards,
M Harris <>< Thank you very much for your input. Being in the security business, and needing to keep Central Station equipment up and running all the time, I find your idea of a 'back door' serial port simple, yet effective. I don't think I stated my objective clearly. I have a PC, that I wish to operate from a window in Suse 9.3/KDE. This PC is running DOS, and on a separate network. I have done this before, using a standard terminal and, I believe, the CON: setting in DOS 6.2. The other device that I wish to receive data from is an alarm signal receiver with an RS232 port. I do not know off hand if it is a 'terminal' or a 'computer', or it may have separate ports for both. What I want linux to do is provide me with 'virtual' terminals in kde windows, so I can see what is being received on the receiver, and so I can access the DOS network from my linux box in a window. The null modem issues are no problem, as I have to wire the connector manually and have experience doing so.
What I am trying to determine is: what is the best 'terminal emulation' program to run, e.g. xterm, Konsole, etc. how do I link the terminal program to the RS232 port on my Suse computer. tia, -- John R. Sowden AMERICAN SENTRY SYSTEMS, INC. Residential & Commercial Alarm Service UL Listed Central Station Serving the San Francisco Bay Area Since 1967 mail@americansentry.net www.americansentry.net
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2006-10-09 at 13:02 -0700, John R. Sowden wrote:
What I am trying to determine is: what is the best 'terminal emulation' program to run, e.g. xterm, Konsole, etc. how do I link the terminal program to the RS232 port on my Suse computer.
Fire up any terminal, like xterm. Do ssh to the remote computer. Here, start up minicom, to connect to the serial port going to the other machine (dos?). Done. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFKr5AtTMYHG2NR9URAmTgAJ9NRpMHbIEA6cRIw2aReZqf7tBPDwCfVPHQ qnraEocxgPJ3Sb2r0v/agfk= =3hzq -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2006-10-09 at 00:07 -0500, M Harris wrote: ...
Another thing this is good for is remote server support via dialup as an emergency backup. The main remote server box is on the network... and a "secondary" access box sits next to it (connected via serial link) with dialup access. When the network backbone is down for some reason... or the tech needs to take the main machine off-line via remote, she can dial into the access box and then run minicom into the main server (the access box acts as a terminal). Direct phone access is not permitted on the main server... and the access box is not on the network.
I understand you can convince some modems to only answer when the incoming call id is a certain number; ie, you can dial to it only from a certain phone. In this way, you can connect the modem directly to the supervised machine. The other technique is call back: when dialled, the modem will hang and call back a preconfigured number, the one of the technicians. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFKsC4tTMYHG2NR9URAkeFAJsEX0oEbUroD1ReV1AXblpb8k3yrQCePQqY Xx+xKuvzrsm0L5Low0brtYY= =SSjp -----END PGP SIGNATURE-----
I like the Novell's idea of "Lessons for Lizards" to ship community docs with the distro, and willing to participate. One thing that I find problematic - is the totally new format, DocBook, which I never used. It would be good to "mark targets" - that is - decide our goals *what* to write. We will transfer wikified documents into the new system, and update the articles during rewrite. Another thing to think about is a searching mechanism: Can we have our own "mini-google" to search within the articles on the desktop? (even if our input is not very correct?) -Fenix*NBK*, openSUSE supporter. 10.10.2006.
participants (5)
-
Alexey Eremenko
-
Carlos E. R.
-
John R. Sowden
-
M Harris
-
Rajko M