Monday, June 13, 2005

Serial Device Administration in Solaris


Terms
DCE – Data communications equipment: modems
DTE – Data terminal equipment: the serial ports on terminals & computers
Note: In RS-232 standard, DTE uses pin 2 to transmit data & pin 3 to receive, DCE does the reverse.
RS-232 standard – a standard for the function of the (up to) 25 pins found on serial connections.
serial port – a port that uses RS-232 standard (Solaris 7 systems have serial ports a & b [/dev/term/a & /dev/term/b])
modem – converts digital data to & from electrical analog signals
null modem cable – allows two DTE devices to communicate via serial ports
data carrier detect – connection established (RS-232 pin 8)
port monitor program – monitors RS-232 circuits on it’s serial ports and provides info to applications

Modem Access Modes - Three Configurations

  • Inbound – answers incoming calls
  • Oubound – makes outgoing calls
  • Bidirectional – both answers incoming and makes outgoing calls
Service Access Facility - SAF

SAF provides services for serial ports & network connections. Under the SAF, systems may access services using a variety of port monitors, including ttymon, the listener, and port monitors written expressly for a user's application.

SAF consists of two levels: the top administrative level is concerned with port monitor administration, the lower level with service administration.

SAF Terms:

service- a service is a process that is started, these processes monitor & setup connections using serial ports & network interfaces.

port - an externally seen access point on a system, a port may be an incoming phone line, serial port, etc.

Service Access Controller – sacthe controlling process (the upper-level program of SAF), starts & controls the lower-level SAF programs (port monitors)
  • sac daemon is started in /etc/inittab (system levels 2, 3 & 4)
  • reads: /etc/saf/_sysconfig the sac configuration file
  • reads: /etc/saf/_sactab lists port monitors to start

Port Monitorsmanage & monitor ports (lower-level SAF program), port monitors are processes that are responsible for monitoring a set of incoming ports on a machine.

  • A port monitor's major purpose is to detect incoming service requests and to dispatch them appropriately.
  • Some examples of port management are setting the line speed on incoming phone connections, binding an appropriate network address, reinitializing the port when the service terminates, outputting a prompt, etc.
  • A port monitor's administrative file is named /var/saf/pmtag/_pmtab (where pmtag is the tag of the port monitor); _pmtab is maintained by the pmadm command in conjunction with a port monitor specific administrative command (ie ttyadm for ttymon, nlsadmin for listen)
Port Monitors:
  • ttymon – monitors serial ports, connects a specified service to a port, uses /etc/ttydefs for communications settings (baud rate, etc.). {Default tag is zsmon}
  • listen – network listener daemon, this process ``listens'' to a network for service requests, accepts requests when they arrive, and invokes servers in response to those service requests. {Default tag is tcp}
SAF Commands
  • sacadm – admin command for the SAC (add, remove, start, stop port monitors)·
  • pmadm –admin command for the Port Monitors (add, remove, enable, disable services) (modifies _pmtab file)
  • ttyadm – formats ttymon data for the pmadm & sacadm commands
  • nlsadmin – formats listener data for the pmadm & sacadm commands

Admintool

  1. Select Browse -> Serial Ports
  2. Click on the port
  3. Select Edit -> Modify
  4. For Template select Terminal – Hardwired
  5. Select the baud rate
  6. Modify the name in the Terminal Type field if desired (terminfo entry)
  7. Click on OK
Adding Bidirectional Modem
  1. Select Browse -> Serial Ports
  2. Click on the port
  3. Select Edit -> Modify
  4. For Template select Modem – Bidirectional
  5. Select the baud rate
  6. Modify the name in the Terminal Type field if desired (terminfo entry)

Tip Commands

  • The tip utility establishes a full-duplex terminal connection to a remote host.Once the connection is established, a remote session using tip behaves like an interactivesession on a local terminal.
  • Typed characters are normally transmitted directly to the remote machine (which does the echoing as well).
  • Escape commands starting with a tilde (~) can be used to perform some functions (like drop connection, file copy, BREAK, etc.)
  • Uses /etc/remote file which contains entries describing remote systems & line speeds used by tip.
  • Configured by the .tiprc file in the user’s home directory which is read when tip command is used.
Examples:

Using device: tip /dev/term/b
Using hostname: tip dbserver
Using phone #: tip 703-855-5555

/etc/remote has descriptions of remote hosts such as serial port to use, baud rate, modem settings,& phone number.
/etc/phones if the phone number in the /etc/remote file is an @ symbol, tip uses the /etc/phones file which associates hostnames with a phone number. Each phone number found for a system is tried until either a connection is established, or an end of file is reached

Format of lines:
system-name phone-number

Friday, June 10, 2005

Zuerich-2005

This article I am publishing very late. Although I tried to publish earlier. But because of some problem I am not able to do so. This is related to my travel to Switzerland. Zurich an important journey of my life might be a milestone. I will keep on incrementing some of my thoughts in this article.

I started my Journey on 12 th of April 2005 for Zurich my flight is scheduled for Munich at early morning I am not able to recall the exact time for the same. So we all decided (me my brother and one of my friend Rajesh Jain) that we will spend some time at theater and we all watch Movie at center stage (Its in Noida Atta Market) because its very difficult for me to get waked up so early so its better that we will not sleep to catch my flight. Hence we all watched movie so called LUCKY- No time for Love. Movie is very beautifully picturised all the locations where its pictures is also quite attractive. But unfortunately we r able to manage last three tickets of that movie. (Ah how lucky I am). And it’s on first row J. This is the first time I am experiencing the Cinema from front Row. Jain and me laughed that what a movie because at the startup (Text on screen) when we tried to cover right hand left hand is skipped and when we tried to cover right hand left hand is skipped. The complete movie costs us approx 250 bugs per person. Hence I am thinking at that moment what a stupidity is that because after spending almost 1000 bugs still we have watch movie like tennis play (By keep on rotating my head left and right.). What a co incidence that at my earlier visit to US again we three watched movie at that time its Rajesh Jain his wife and of course me it’s quite a heavy rainy day and we went to watch movie because we already purchased an tickets for that so decided that we will go to movie by Riksha (Man driven Three tire cycle having sitting capacity of two person excluding rikshaw driver).

After movie we went back to my home and a light chat between us. Then we all reached at airport. That’s the first time when I have seen water in my younger brother eyes due to emotions. I don’t know what’s in his mind at that time but it’s really an ever-memorable time for me.

Most of the things I forgot till date but still trying to recollect all the beautiful observations that I am able to made. There is one instance in COOP (an retail chain in Switzerland) after collecting all of the e items, which I needed for a week I was in a queue. Suddenly I observer some lady having trouble in both legs is also standing in a queue. Queue is of almost 3 to 4 people, I thought that I should give her a preference because might be she is in pain (I am able to feel that pain because just three months before I also had an accident). I am not able to understand their language neither able to explain any thing to them .So I requested her that she can go first (all facial and body expressions), But suddenly what I observed that she says “NO NO OK”, and after a short interval “MERCY” that’s what I am able to understand. So that’s the sprit in her. Initially I thought that she is telling me “don’t get mercy on me” because her voice is very loud.

I feel that I am doing some thing wrong. But later on get to know that mercy means thanks in French. In that small conversation I understood with her facial expression that “I am ok in how and where I am” Its Ur kindness but I didn’t need Ur help? Don’t feel pretty abt me. That’s a really courageous effort. Then after that instance I thought why our people r always looking for help, why we cant do our things our self’s.

There is another instance that I had today i.e. on 9th June 2005 and I recollected it too. But currently I forgot. I will let u know about this later on.