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 <><