serial on lombard

4 messages, 4 authors, 1999-10-14 · open the first message on its own page

serial on lombard

From: Mario Scarpa <hidden>
Date: 1999-10-14 19:12:24

Hi there,

there's something I cannot get rid of. When I try to
use minicom to dial with the internal modem of my
lombard 400MHz I get a "/dev/ttyS0 no such file or dir"
error; when I try to use setserial or stty on the same
device everything works ok. I'm using debian potato.
Attached there 's the 'strace minicom' output: hope this helps.

Thanks guys and ... great work !

-- 
Mario Scarpa

Mondonet NOC
Phone: +39 06 52.47.37.02

Re: serial on lombard

From: Benjamin Herrenschmidt <hidden>
Date: 1999-10-14 11:06:16

On Thu, Oct 14, 1999, Mario Scarpa [off-list ref] wrote:
there's something I cannot get rid of. When I try to
use minicom to dial with the internal modem of my
lombard 400MHz I get a "/dev/ttyS0 no such file or dir"
error; when I try to use setserial or stty on the same
device everything works ok. I'm using debian potato.
Attached there 's the 'strace minicom' output: hope this helps.
This exact same problem happens on my wallstreet. I'm not yet 100% sure,
but I think this is because minicom sets up some kind of timeout on the
open call via an alarm signal which fails since the powerbook internal
modem will block the opening process for about 2.5 second in the open
call. We added this tempo since the modem is only powered up when the
port is opened, and it needs approximately this time before beeing able
to answer commands. This used to cause most connection scripts
(especially default PPP scripts) to fail.

Fixing minicom is in my todolist, I'll try to give it a look next we.

-- 
           Perso. e-mail: <mailto:bh40@calva.net>
           Work   e-mail: <mailto:benh@mipsys.com>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: serial on lombard

From: Michael Schmitz <hidden>
Date: 1999-10-14 11:19:17

quoted hunk
alarm(0x2, 0x7ffff7b4, 0, 0x8, 0x7f7f7f7f) = 0
open("/dev/ttyS0", O_RDWR|O_NONBLOCK)   = 3
--- SIGALRM (Alarm clock) ---
alarm(0, 0x1, 0, 0x8, 0x7f7f7f7f)       = 0
rt_sigaction(0xe, 0x7ffff698, 0x7ffff728, 0x8) = 0
write(2, "minicom: cannot open /dev/ttyS0:"..., 59minicom: cannot open /dev/ttyS0: No such file or directory
) = 59
The port blocks on open, and you get a timeout. 

The serial port won't open without carrier detected. minicom fails to set
the port characteristics properly (or the Mac serial driver doesn't honor
minicom's port settings), and gives a very confusing error message (open
/dev/ttyS0 timed out would have been more accurate). 

Set ttyS0 to ignore DCD with stty clocal </dev/ttyS0, perhaps.

	Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: serial on lombard

From: Momchil Velikov <hidden>
Date: 1999-10-14 11:31:51

Michael Schmitz wrote:
quoted
alarm(0x2, 0x7ffff7b4, 0, 0x8, 0x7f7f7f7f) = 0
open("/dev/ttyS0", O_RDWR|O_NONBLOCK)   = 3
--- SIGALRM (Alarm clock) ---
alarm(0, 0x1, 0, 0x8, 0x7f7f7f7f)       = 0
rt_sigaction(0xe, 0x7ffff698, 0x7ffff728, 0x8) = 0
write(2, "minicom: cannot open /dev/ttyS0:"..., 59minicom: cannot open /dev/ttyS0: No such file or directory
) = 59
The port blocks on open, and you get a timeout.
But there is O_NONBLOCK, and according to POSIX, 
" ... if O_NONBLOCK flags is set or if CLOCAL has been set,
  the open() function shall return immediately without
  waiting for the connection."

Note that this is the/a way to set CLOCAL -- open the device with O_NONBLOCK
and then tcsetattr() or whatever.
The serial port won't open without carrier detected. minicom fails to set
the port characteristics properly (or the Mac serial driver doesn't honor
minicom's port settings), and gives a very confusing error message (open
/dev/ttyS0 timed out would have been more accurate).

Set ttyS0 to ignore DCD with stty clocal </dev/ttyS0, perhaps.
This should help, but the problem is in the driver.

Regards,
-velco

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help