serial howto 7 oq4el6o7urgwgoohqk52udyxgcwkix7flx7yw5y oq4el6o7urgwgoohqk52udyxgcwkix7flx7yw5y OQ4EL6O7URGWGOOHQK52UDYXGCWKIX7FLX7YW5Y


The Linux Serial HOWTO: uugetty 7. uugetty 7.1 Setting up uugettyMake sure that you have an outgoing and incoming device for the serial port your modem is on. If you have your modem on ttyS3 you will need the /dev/cua3, and /dev/ttyS3 devices. If you don't have the correct devices, see section Creating Devices In <tt>/dev</tt> on how to create devices, and create the devices. If you want to be able to dial out with your modem while uugetty is watching the port for logins, use the /dev/cuaN device instead of the /dev/ttySN device [One wouldn't need cua if the software was written to avoid it.]uugetty does important lock file checking. Update /etc/gettydefs to include an entry for your modem. When you are done editing /etc/gettydefs, you can verify that the syntax is correct by doing: linux# getty -c /etc/gettydefsModern ModemsIf you have a 9600 bps or faster modem with data compression, you can lock your serial port to one speed. For example: # 115200 fixed speed F115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #F115200If you have your modem set up to do RTS/CTS hardware flow control, you can add CRTSCTS to the entries: # 115200 fixed speed with hardware flow control F115200# B115200 CS8 CRTSCTS # B115200 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F115200Old slow modemsIf you have a slow modem (under 9600 bps) Then, instead of one line for a single speed, your need several lines to try a number of speeds. Note the these lines are linked to each other by the last "word" in the line such as #38400. Blank lines are needed between each entry. # Modem entries 115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #57600 57600# B57600 CS8 # B57600 SANE -ISTRIP HUPCL #@S @L @B login: #38400 38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200 19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600 9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400 2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #115200Login BannerIf you want, you can make uugetty print interesting things in the login banner. In my examples, I have the system name, the serial line, and the current bps rate. You can add other things: @B The current (evaluated at the time the @B is seen) bps rate. @D The current date, in MM/DD/YY. @L The serial line to which getty is attached. @S The system name. @T The current time, in HH:MM:SS (24-hour). @U The number of currently signed-on users. This is a count of the number of entries in the /etc/utmp file that have a non-null ut_name field. @V The value of VERSION, as given in the defaults file. To display a single '@' character, use either '\@' or '@@'.7.2 Customizing uugettyThere are lots of parameters you can tweak for each port you have. These are implemented in separate config files for each port. The file /etc/conf.uugetty will be used by all instances of uugetty, and /etc/conf.uugetty.ttySN will only be used by that one port. Sample default config files can be found with the getty_ps source files, which come with most Linux distributions. Due to space concerns, they are not listed here. Note that if you are using older versions of getty (older than 2.0.7e), or aren't using FSSTND, then the default file will be /etc/default/uugetty.ttySN. Greg's /etc/conf.uugetty.ttyS3 looked like this: # sample uugetty configuration file for a Hayes compatible modem to allow # incoming modem connections # # alternate lock file to check... if this lock file exists, then uugetty is # restarted so that the modem is re-initialized ALTLOCK=cua3 ALTLINE=cua3 # line to initialize INITLINE=cua3 # timeout to disconnect if idle... TIMEOUT=60 # modem initialization string... # format: <expect> <send> ... (chat sequence) INIT="" AT\r OK\r\n WAITFOR=RING CONNECT="" ATA\r CONNECT\s\A # this line sets the time to delay before sending the login banner DELAY=1 #DEBUG=010Add the following line to your /etc/inittab, so that uugetty is run on your serial port (substituting in the correct information for your environment - config file location, port, speed, and default terminal type): S3:456:respawn:/sbin/uugetty -d /etc/default/uugetty.ttyS3 ttyS3 F115200 vt100Restart init: linux# init q For the speed parameter in your /etc/inittab, you want to use the highest bps rate that your modem supports.Now Linux will be watching your serial port for connections. Dial in from another machine and login to you Linux system.uugetty has a lot more options, see the man page for getty(1m) for a full description. Among other things there is a scheduling feature, and a ringback feature. n

Wyszukiwarka

Podobne podstrony:
serial howto 5 kgcppz4s5yl52f7evqakks2dmarwh2apafjtjjy kgcppz4s5yl52f7evqakks2dmarwh2apafjtjjy
serial howto 14 bogki47jxc7niejiu2e7iehvhsrs4fcpiuxwhki bogki47jxc7niejiu2e7iehvhsrs4fcpiuxwhki
serial howto 2 4l23zy2wgmqr6ixrbj35vzerr34rhdnhjqsyfdy 4l23zy2wgmqr6ixrbj35vzerr34rhdnhjqsyfdy
serial howto 16 tilcajp42ykm7ohtcai5s4icqvobriamsldzuai tilcajp42ykm7ohtcai5s4icqvobriamsldzuai
Serial HOWTO pl 6 (2)
Serial HOWTO pl 1 (2)
Serial HOWTO pl (2)
Serial HOWTO pl 2 (2)
serial howto 13 nced7hdj74kcnerobynufpvjdxlvrf64mwwdk4a nced7hdj74kcnerobynufpvjdxlvrf64mwwdk4a
Serial HOWTO pl 8 (2)
Serial HOWTO pl (3)
serial howto 4
serial howto 3 dm2syfylkjnb2i6ns4v4a3zywrepq7lymr54zga dm2syfylkjnb2i6ns4v4a3zywrepq7lymr54zga
Serial HOWTO pl 14 (2)
serial howto 8 ogmvuhhs43oshictmcisim7amxti4b3ewhrjxiq ogmvuhhs43oshictmcisim7amxti4b3ewhrjxiq
serial howto 6l77gi7bpub6rb6vaita7h4owbtiqgv3tllovla 6l77gi7bpub6rb6vaita7h4owbtiqgv3tllovla
Serial HOWTO pl 7 (2)

więcej podobnych podstron