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
STRUCT 
REGULATOR_OPS(9) API reference STRUCT REGULATOR_OPS(9) NAME
struct_regulator_ops - regulator operations. SYNOPSIS
struct regulator_ops { int (* list_voltage) (struct regulator_dev *, unsigned selector); int (* set_voltage) (struct regulator_dev *, int min_uV, int max_uV,unsigned *selector); int (* map_voltage) (struct regulator_dev *, int min_uV, int max_uV); int (* set_voltage_sel) (struct regulator_dev *, unsigned selector); int (* get_voltage) (struct regulator_dev *); int (* get_voltage_sel) (struct regulator_dev *); int (* set_current_limit) (struct regulator_dev *,int min_uA, int max_uA); int (* get_current_limit) (struct regulator_dev *); int (* enable) (struct regulator_dev *); int (* disable) (struct regulator_dev *); int (* is_enabled) (struct regulator_dev *); int (* set_mode) (struct regulator_dev *, unsigned int mode); unsigned int (* get_mode) (struct regulator_dev *); int (* enable_time) (struct regulator_dev *); int (* set_ramp_delay) (struct regulator_dev *, int ramp_delay); int (* set_voltage_time_sel) (struct regulator_dev *,unsigned int old_selector,unsigned int new_selector); int (* get_status) (struct regulator_dev *); unsigned int (* get_optimum_mode) (struct regulator_dev *, int input_uV,int output_uV, int load_uA); int (* set_bypass) (struct regulator_dev *dev, bool enable); int (* get_bypass) (struct regulator_dev *dev, bool *enable); int (* set_suspend_voltage) (struct regulator_dev *, int uV); int (* set_suspend_enable) (struct regulator_dev *); int (* set_suspend_disable) (struct regulator_dev *); int (* set_suspend_mode) (struct regulator_dev *, unsigned int mode); }; MEMBERS
list_voltage Return one of the supported voltages, in microvolts; zero if the selector indicates a voltage that is unusable on this system; or negative errno. Selectors range from zero to one less than regulator_desc.n_voltages. Voltages may be reported in any order. set_voltage Set the voltage for the regulator within the range specified. The driver should select the voltage closest to min_uV. map_voltage Convert a voltage into a selector set_voltage_sel Set the voltage for the regulator using the specified selector. get_voltage Return the currently configured voltage for the regulator. get_voltage_sel Return the currently configured voltage selector for the regulator. set_current_limit Configure a limit for a current-limited regulator. The driver should select the current closest to max_uA. get_current_limit Get the configured limit for a current-limited regulator. enable Configure the regulator as enabled. disable Configure the regulator as disabled. is_enabled Return 1 if the regulator is enabled, 0 if not. May also return negative errno. set_mode Set the configured operating mode for the regulator. get_mode Get the configured operating mode for the regulator. enable_time Time taken for the regulator voltage output voltage to stabilise after being enabled, in microseconds. set_ramp_delay Set the ramp delay for the regulator. The driver should select ramp delay equal to or less than(closest) ramp_delay. set_voltage_time_sel Time taken for the regulator voltage output voltage to stabilise after being set to a new value, in microseconds. The function provides the from and to voltage selector, the function should return the worst case. get_status Return actual (not as-configured) status of regulator, as a REGULATOR_STATUS value (or negative errno) get_optimum_mode Get the most efficient operating mode for the regulator when running with the specified parameters. set_bypass Set the regulator in bypass mode. get_bypass Get the regulator bypass mode state. set_suspend_voltage Set the voltage for the regulator when the system is suspended. set_suspend_enable Mark the regulator as enabled when the system is suspended. set_suspend_disable Mark the regulator as disabled when the system is suspended. set_suspend_mode Set the operating mode for the regulator when the system is suspended. DESCRIPTION
This struct describes regulator operations which can be implemented by regulator chip drivers. AUTHORS
Liam Girdwood <lrg@slimlogic.co.uk> Author. Mark Brown <broonie@opensource.wolfsonmicro.com> Wolfson Microelectronics, Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT REGULATOR_OPS(9)
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy