Sponsored Content
Full Discussion: Carrier Detection in FreeBSD
Operating Systems BSD Carrier Detection in FreeBSD Post 302820975 by rstor on Thursday 13th of June 2013 05:54:00 PM
Old 06-13-2013
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 cable, I get the login prompt again and the old session does not continue. This is the correct behaviour to my understanding however I am curious of the way the getty process behaves, esp. on bootup in FreeBSD.

Question:

The line in my /etc/ttys file is as follows:

Code:
ttyu0   "/usr/libexec/getty std.300"   dialup on

I then issued the command "kill -HUP 1" and restarted the system with nothing plugged into the serial port.

Reading the documentation online, it is my understanding that when the system starts up and no carrier is detected, when issuing the ps ax command, the result I am supposed to see should be something as follows:

Code:
  114 ??  I      0:00.10 /usr/libexec/getty std.300 ttyu0

However I instead see a similar output to the above but the question marks are replaced by letters. Per the documentation online it indicates that if something like this is displayed it means that "getty has completed its open on the communications port. This could indicate a problem with the cabling or a misconfigured modem, because getty should not be able to open the communications port until carrier detect has been asserted by the modem."

I figured that since nothing is connected into the serial port, perhaps the voltage levels may be floating, instead of being held at the negative voltage which would indicate no carrier. I therefore applied a negative voltage to the CD line and restarted the system. Upon restart I issuing the ps -ax command and the result was as before, letters instead of the question marks. I then manually applied a positive voltage to the CD line and then a negative voltage again. I had to do it a couple times however eventually it showed up with question marks. I then was able to toggle back and forth, positive voltage resulted in letters, negative voltage on CD line resulted in question marks.

Why is it that when a negative voltage is applied to the CD line, upon system start-up, getty indicates via the ps -ax command that it has opened the port? [i.e. letters appear instead of question marks] I would expect that with a negative voltage applied to the CD line, upon restart it would show up with ??

I need to toggle the voltage between negative to positive and then back to negative (sometimes I need to do it a couple times) for it to eventually show up with ?? and then it would toggle back and forth as I switch the voltages thereafter.

Last edited by Scott; 06-13-2013 at 07:06 PM.. Reason: Please use code tags for code, data and terminal output
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

no carrier

I'm getting a error le0: No Carrier - transceiver cable problem? Tried looking around to see what is the best way to fix this error. Can anyone help me I can't find anything. (2 Replies)
Discussion started by: merlin
2 Replies

2. UNIX for Dummies Questions & Answers

virus detection

IS there virus software for unix? I worked in a Solaris environment and dont remember having anything. I also ask because the current enviroment i am working on is Microsoft and they argue that they do not use unix because of virus detection. Any input would be greatly appreciated. (1 Reply)
Discussion started by: pbonilla
1 Replies

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

4. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

5. Shell Programming and Scripting

NAT detection

hellou, can anybody help me with nat detection in real time ? i prefer some detection script because i try some nat detection program's for example p0f or i'm using tcpdump, but i would get contain of specific packet. Some ideas? (1 Reply)
Discussion started by: TheTechnic
1 Replies

6. Programming

Parallel Processing Detection and Program Return Value Detection

Hey, for the purpose of a research project I need to know if a specific type of parallel processing is being utilized by any user-run programs. Is there a way to detect whether a program either returns a value to another program at the end of execution, or just utilizes any form of parallel... (4 Replies)
Discussion started by: azar.zorn
4 Replies

7. UNIX for Dummies Questions & Answers

Power Line Carrier (PLC)

hi, i am going to know if i can use n.s for power line simulating? Best Regards, (2 Replies)
Discussion started by: mohsenmahoor
2 Replies

8. Solaris

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... (6 Replies)
Discussion started by: rstor
6 Replies
getty(8)						      System Manager's Manual							  getty(8)

NAME
getty - Sets the terminal type, modes, speed, and line discipline SYNOPSIS
getty [-h] [-t time] line speed_label terminal line_discipline getty -c file FLAGS
Hold the carrier during the initialization phase;do not hang up. Set the time period to the specified number of seconds. Drop the line after that amount of time if nothing is typed. Check the specified gettydefs file. DESCRIPTION
The getty command sets and manages terminals by setting up speed, terminal flags, and the line discipline. If command flags are provided, getty adapts the system to those specifications. getty prints the login prompt, waits for the user to enter a username, and invokes the login command. getty uses the /etc/gettydefs file for terminal information. The line argument refers to the device name in /dev. The speed_label argu- ment is a pointer into the /etc/gettydefs file where the definitions for speed and other associated flags are located. The terminal argu- ment specifies the name of the terminal type. The line_discipline argument specifies the name of the line discipline. The second syntax for the getty command provides a check option. When getty is invoked with the -c option and filename argument, it checks the specified file in the same way it scans gettydefs for terminal information, then prints the results to standard output. By default, the getty daemon writes the login string specified in the message field of the /etc/gettydefs file to any terminal spawned or respawned from the /etc/inittab file. If an /etc/issue file present, getty reads the file and writes its contents to the terminal prior to writing the login string specified in the /etc/gettydefs file. FILES
Specifies the command path. Specifies the terminal line database file. Specifies the path name for the issue identification file RELATED INFORMATION
Commands: init(8), login(1), stty(1) Files: issue(4). delim off getty(8)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy