Sponsored Content
Operating Systems Solaris Carrier Detection in Solaris 8 for Dial in and Null Modem Connections Post 302820883 by rstor on Thursday 13th of June 2013 03:09:33 PM
Old 06-13-2013
Carrier Detection in Solaris 8 for Dial in and Null Modem Connections

I am having troubles with carrier detection for dialing in via a modem or direct connection via a null modem connection under Solaris 8 (i.e. login session remains active after the modem disconnects). I tried two different dumb modems (which do not respond to AT commands) on the machine that I am dialling into . I tested the CD output on one of the modems and found the appropriate voltage on the CD line when a carrier is detected/not detected (I have confirmed this using a volt meter and applying the appropriate carrier tone via a function generator). If you dial in, login, then hang up, and call back the previous session continues without prompting to login.

I then decided to try a null modem connection. When accessing the serial console on the Solaris 8 system using a null modem cable, the login session remains active when disconnecting the cable and plugging it back in. To my understanding this should not happen, in the first case with the modem, or with the null modem cable as I disabled software carrier detection:

Code:
eeprom ttya-ignore-cd=true  
eeprom ttya-rts-dtr-off=true

Also I've specified the -S n parameter to disable software carrier detection:

Code:
/usr/sbin/pmadm -a -p zsmon -s ttya -i root \
-v `/usr/sbin/ttyadm -V` -fu -m "`/usr/sbin/ttyadm \
-p "login:" -d /dev/term/a -s /usr/bin/login -l contty2H from  -b \
-S n -m ldterm,ttcompat`" -y "dial in/out on serial port"


The instructions that I followed to setup the dial in connection was from Celeste Stokely’s Tutorial on Solaris 2.x Modems and Terminals.

I decided to test out carrier detection on FreeBSD 9.1 on a different machine running within virtual box. I used a usb-serial dongle which shows up as ttyu0 on the BSD machine. Carrier detection appears to work. When I establish a null modem connection (using the same null modem cable that I tried on the Solaris machine) I receive a login prompt. If I login, and then unplug and plug back the null modem cable, I get the login prompt again and the old session does not continue.

I have read a post on-line about carrier detection in Solaris not working and being "broken".

It this correct? Is carrier detection a known bug/issue in Solaris 8?

Last edited by Scott; 06-13-2013 at 06:52 PM.. Reason: Please use code tags
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Got connected with Modem but cannot dial Telephone no. to connect to host

Hello There, I configure my Modem as follow. Step1. # admintool & Then from Browse --> Serial Port i select tta port and Edit --> Modify From that i select Template : Modem:Dial Out Baud Rate: 9600 Ok Step 2 # tip /dev/cua/a connected (1 Reply)
Discussion started by: abidmalik
1 Replies

2. UNIX for Dummies Questions & Answers

Hyperterminal null modem connection to Solaris

I am new to Unix. I just got my SUN box from ebay with Solaris supposedly preloaded. The problem is I am unable to connect via Hyperterminal to Solaris, or more to the point, cannot tell if I have a successful connection and that solaris is the one not properly booted up. I hooked up a null... (3 Replies)
Discussion started by: seethams
3 Replies

3. UNIX for Dummies Questions & Answers

Dial-Up Modem

Im using Kinternet with a Lucent modem on Suse 9.0 Ive installed the ltmodem driver and suse says the device is ready and configured. Ive configured it at /dev/ttyS0 This is the log that Kinternet gives after trying to connect: SuSE Meta pppd (smpppd-ifcfg), Version 1.06 on linux. Status... (0 Replies)
Discussion started by: Synbios
0 Replies

4. SCO

Dial-Out & Dial-In Connections in OpenServer 5.0.6.

Friends, I am facing a problem in connecting two SCO Openserver 5.0.6 servers through Dial-Up connectivity as is done in the case of two Windows PCs. Please help me out with the following problems: (a) How to configure the modem? (b) How to setup a Dial-In connection? (c) How to... (1 Reply)
Discussion started by: thecobolguy
1 Replies

5. Solaris

null modem for testing

hi all.. sorry for repeating the same question many times, i just set up a null modem, i am using this as reference : DB25 DB9 -- - 2 TD ---- 2 RD 3 RD ---- 3 TD 4 RTS ---- 8 CTS 5 CTS ---- 7 RTS 7 GND ---- 5 GND 6 DSR -+ +--- 4 DTR 8... (0 Replies)
Discussion started by: waterbear
0 Replies

6. Solaris

help me!!!! how configure modem dial up with smc in solaris 10

Dear All, i have problem during install modem dial up with smc in solaris 10. i can't find "login" because it's stop in _receive started transmit started. thanks for your attention. this is the list during i dial to this number : altconn called Device Type ACU wanted... (0 Replies)
Discussion started by: mr.ridho
0 Replies

7. IP Networking

modem detection

How to get information that where is my modem configured in /dev. I have two modems configured in my device .. one is USB and other is PCI modem.. USB is detected as /dev/USB0. but how to see about PCI modem? (0 Replies)
Discussion started by: s123.radha
0 Replies

8. UNIX for Advanced & Expert Users

Modem (dial up) connecton to Unix machine

Hello to all, I have one problem and hope you'll be able to help me. It's about connecting Windows PC machine to Unix machine via dial up through Hyper terminal. Connection was working in the past. In the meantime, windows machine is replaced (win XP) and unix machine stayed as is. So nothing is... (1 Reply)
Discussion started by: Mick
1 Replies

9. BSD

Carrier Detection in FreeBSD

Regarding carrier detection on FreeBSD 9.1 being run within Virtual Box: I used a usb-serial dongle which shows up as ttyu0 on the BSD machine. Carrier detection appears to work. When I establish a null modem connection I receive a login prompt. If I login, and then unplug and plug back the... (2 Replies)
Discussion started by: rstor
2 Replies
acucntrl(8)						      System Manager's Manual						       acucntrl(8)

NAME
acucntrl - turn around tty line between dialin and dialout SYNOPSIS
/usr/libexec/acucntrl keyword ttyline DESCRIPTION
Acucntrl turns around terminal line, enabling it to be used for both dialin and dialout. On dialin a terminal line is assumed to have modem control enabled and a getty process in existence waiting for logins. On dialout modem control is disabled and there is no getty process. This program must be run setuid to root. keyword is chosen from the list: disable or dialout, to condition a line for dialout; and enable or dialin, to condition a line for dialin. When the line is conditioned for dialing out, the login name of the real uid of the process is placed in /var/run/utmp in capitals. This declares that the line is in use and acts as an additional locking mechanism. Acucntrl will refuse to act if the /var/run/utmp entry for the line is not null, is not the the user's login name (capitalized or not), and if the process is not running as the superuser. The last condition is to allow the superuser to clear the state of the line. Turning modem control on or off is handled by poking into /dev/kmem. It is currently implemented for dz, dh, and dmf lines. Under 4.2 BSD the program will also refuse to disable a line if carrier is sensed on it. This is to avoid the dead period where someone has just dialed in and made the connection but has not yet logged in. Ttyline can be either of the form tty* or /dev/tty*. Enabling/disabling a line whose name does not begin with ttyd? is prohibited unless the real uid of the process is 0 or if the login name corresponding to the real uid is uucp. This is a security precaution. Steps taken when disabling (i.e. setup for dialing out) 1) check input arguments 2) look in /var/run/utmp to check that the line is not in use by another user 3) disable modem control on line 4) check for carrier on device 5) change owner of device to real uid 6) edit /etc/ttys, changing the first character of the appropriate line to 0 7) send a hangup to process 1 to poke init to disable getty 8) post uid name in capitals in /var/run/utmp to let world know device has been grabbed 9) make sure that DTR is on Steps taken when enabling (i.e. setup for dialin) 1) check input arguments 2) look in /var/run/utmp to check that the line is not in use by another user 3) make sure modem control on line is disabled 4) turn off DTR to make sure line is hung up 5) condition line: clear exclusive use and set hangup on close modes 6) turn on modem control 7) edit /etc/ttys, changing the first character of the appropriate line to 1 8) send a hangup to process 1 to poke init to enable getty 9) clear uid name for /var/run/utmp HISTORY
First written by Allan Wilkes (fisher!allan) Modified June 8,1983 by W.Sebok (astrovax!wls) to poke the kernel rather than use a kernel hack to turn on/off modem control, using a sub- routine stolen from a program written by Tsutomu Shimomura {astrovax,escher}!tsutomu Worked over many times by W.Sebok (i.e. hacked to death) FILES
/dev/kmem, /vmunix, /etc/ttys, /var/run/utmp, /dev/tty* BUGS
Sensing carrier requires the 4.2 BSD TIOCMGET ioctl call. Unfortunately this ioctl is not implemented in the vanilla 4.2 BSD dh driver even though the dz and dmf drivers use an emulation of the DH11's modem control bits. This has been fixed here. Some time (currently 2 seconds) is required between disabling modem control and opening the device. This is probably because of a race with getty whose open is finally being allowed to complete. This time interval may not be enough on a loaded system. Because of this problem and the above problem with the dh driver there is deliberately no error message given when the TIOCMGET ioctl fails. Previously there was similar synchronization problem with the init process. When dialins are disabled the capitalized name of the process cannot be posted into /var/run/utmp until init has finished clearing /var/run/utmp. However one does not know how long that will take, and, on a loaded system, it can take quite a while. This was solved by the strategy of 1) posting the name, 2) poking init, 3) going into a loop where the process repeatedly waits a second and checks whether the entry has been cleared from /var/run/utmp, and 4) posting the name again. 4.3 Berkeley Distribution November 27, 1996 acucntrl(8)
All times are GMT -4. The time now is 11:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy