Networking Forums

Networking Forums > Computer Networking > Linux Networking > Linux stuck when serial cable is disconnected

Reply
Thread Tools Display Modes

Linux stuck when serial cable is disconnected

 
 
hagit
Guest
Posts: n/a

 
      10-20-2007, 05:15 PM
Hi all,
I am running on a MIPS machine, with my kernel and debian distribution
(file system).
The kernel messages are configured to get out from the serial
connection, i.e. serial console.
When the serial output of my MIPS is connected to my PC everything is
OK and I can see the outputs in the terminal.
When I disconnect the serial cable my Linux get stuck. Even my telnet
connection doesnt responds.
When I re-connect the serial everything is OK again.
Do you know what can be the problem?
I am working with HW flow control? can it be the problem?

Thanks a lot!
Hagit

 
Reply With Quote
 
 
 
 
Nikhil
Guest
Posts: n/a

 
      10-21-2007, 10:56 AM
hagit wrote:
> Hi all,
> I am running on a MIPS machine, with my kernel and debian distribution
> (file system).
> The kernel messages are configured to get out from the serial
> connection, i.e. serial console.
> When the serial output of my MIPS is connected to my PC everything is
> OK and I can see the outputs in the terminal.
> When I disconnect the serial cable my Linux get stuck. Even my telnet
> connection doesnt responds.
> When I re-connect the serial everything is OK again.
> Do you know what can be the problem?
> I am working with HW flow control? can it be the problem?
>
> Thanks a lot!
> Hagit
>

check the speed of the terminal, with the terminal speed set on the
bootloader. Assumingly if its grub, then the bootloader configuration
line in grub.conf would read the kernel parameter as

'console=ttyS0,9600', this means to redirect the console to ttS0 at a
speed of 9600bps(which is most commonly followed).

Additionally the inittab also should read :

s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux

This would mean that the console would listen for the logins starting at
115200bps but downgrade to 9600bps if it detects the console connection
to be a speed mismatches.

HTH, Nikhil
 
Reply With Quote
 
Nikhil
Guest
Posts: n/a

 
      10-21-2007, 10:59 AM
Nikhil wrote:
> hagit wrote:
>> Hi all,
>> I am running on a MIPS machine, with my kernel and debian distribution
>> (file system).
>> The kernel messages are configured to get out from the serial
>> connection, i.e. serial console.
>> When the serial output of my MIPS is connected to my PC everything is
>> OK and I can see the outputs in the terminal.
>> When I disconnect the serial cable my Linux get stuck. Even my telnet
>> connection doesnt responds.
>> When I re-connect the serial everything is OK again.
>> Do you know what can be the problem?
>> I am working with HW flow control? can it be the problem?
>>
>> Thanks a lot!
>> Hagit
>>

> check the speed of the terminal, with the terminal speed set on the
> bootloader. Assumingly if its grub, then the bootloader configuration
> line in grub.conf would read the kernel parameter as
>
> 'console=ttyS0,9600', this means to redirect the console to ttS0 at a
> speed of 9600bps(which is most commonly followed).
>
> Additionally the inittab also should read :
>
> s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux
>
> This would mean that the console would listen for the logins starting at
> 115200bps but downgrade to 9600bps if it detects the console connection
> to be a speed mismatches.
>
> HTH, Nikhil


more at http://www.vanemery.com/Linux/Serial...l-console.html
 
Reply With Quote
 
hagit
Guest
Posts: n/a

 
      10-21-2007, 12:07 PM
On Oct 21, 12:59 pm, Nikhil <Nik...@nik.com> wrote:
> Nikhil wrote:
> > hagit wrote:
> >> Hi all,
> >> I am running on a MIPS machine, with my kernel and debian distribution
> >> (file system).
> >> The kernel messages are configured to get out from the serial
> >> connection, i.e. serial console.
> >> When the serial output of my MIPS is connected to my PC everything is
> >> OK and I can see the outputs in the terminal.
> >> When I disconnect the serial cable my Linux get stuck. Even my telnet
> >> connection doesnt responds.
> >> When I re-connect the serial everything is OK again.
> >> Do you know what can be the problem?
> >> I am working with HW flow control? can it be the problem?

>
> >> Thanks a lot!
> >> Hagit

>
> > check the speed of the terminal, with the terminal speed set on the
> > bootloader. Assumingly if its grub, then the bootloader configuration
> > line in grub.conf would read the kernel parameter as

>
> > 'console=ttyS0,9600', this means to redirect the console to ttS0 at a
> > speed of 9600bps(which is most commonly followed).

>
> > Additionally the inittab also should read :

>
> > s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux

>
> > This would mean that the console would listen for the logins starting at
> > 115200bps but downgrade to 9600bps if it detects the console connection
> > to be a speed mismatches.

>
> > HTH, Nikhil

>
> more athttp://www.vanemery.com/Linux/Serial/serial-console.html- Hide quoted text -
>
> - Show quoted text -


Thanks a lot, but I still cant figure the reason that the linux get
stuck when the cable is disconnected.
I am working with 38400bps, 8N1 and HW Flow control.

 
Reply With Quote
 
Bob Hauck
Guest
Posts: n/a

 
      10-21-2007, 04:42 PM
On Sun, 21 Oct 2007 05:07:56 -0700, hagit <(E-Mail Removed)> wrote:

> Thanks a lot, but I still cant figure the reason that the linux get
> stuck when the cable is disconnected.
> I am working with 38400bps, 8N1 and HW Flow control.


Um, what do you think happens if you use HW flow control and then
disconnect the cable? Perhaps you should turn that off.

OTOH, I didn't know you could get the kernel to use flow control on a
serial console.


--
-| Bob Hauck
-| "Reality has a well-known liberal bias." -- Stephen Colbert
-| http://www.haucks.org/
 
Reply With Quote
 
Nikhil
Guest
Posts: n/a

 
      10-21-2007, 06:44 PM
hagit wrote:
> On Oct 21, 12:59 pm, Nikhil <Nik...@nik.com> wrote:
>> Nikhil wrote:
>>> hagit wrote:
>>>> Hi all,
>>>> I am running on a MIPS machine, with my kernel and debian distribution
>>>> (file system).
>>>> The kernel messages are configured to get out from the serial
>>>> connection, i.e. serial console.
>>>> When the serial output of my MIPS is connected to my PC everything is
>>>> OK and I can see the outputs in the terminal.
>>>> When I disconnect the serial cable my Linux get stuck. Even my telnet
>>>> connection doesnt responds.
>>>> When I re-connect the serial everything is OK again.
>>>> Do you know what can be the problem?
>>>> I am working with HW flow control? can it be the problem?
>>>> Thanks a lot!
>>>> Hagit
>>> check the speed of the terminal, with the terminal speed set on the
>>> bootloader. Assumingly if its grub, then the bootloader configuration
>>> line in grub.conf would read the kernel parameter as
>>> 'console=ttyS0,9600', this means to redirect the console to ttS0 at a
>>> speed of 9600bps(which is most commonly followed).
>>> Additionally the inittab also should read :
>>> s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux
>>> This would mean that the console would listen for the logins starting at
>>> 115200bps but downgrade to 9600bps if it detects the console connection
>>> to be a speed mismatches.
>>> HTH, Nikhil

>> more athttp://www.vanemery.com/Linux/Serial/serial-console.html- Hide quoted text -
>>
>> - Show quoted text -

>
> Thanks a lot, but I still cant figure the reason that the linux get
> stuck when the cable is disconnected.
> I am working with 38400bps, 8N1 and HW Flow control.
>

oh.. ok. 'Magic SysRq' is probably also worth looking at
http://tldp.org/HOWTO/Remote-Serial-...ity-sysrq.html
 
Reply With Quote
 
Nikhil
Guest
Posts: n/a

 
      10-21-2007, 07:03 PM
Nikhil wrote:
> hagit wrote:
>> On Oct 21, 12:59 pm, Nikhil <Nik...@nik.com> wrote:
>>> Nikhil wrote:
>>>> hagit wrote:
>>>>> Hi all,
>>>>> I am running on a MIPS machine, with my kernel and debian distribution
>>>>> (file system).
>>>>> The kernel messages are configured to get out from the serial
>>>>> connection, i.e. serial console.
>>>>> When the serial output of my MIPS is connected to my PC everything is
>>>>> OK and I can see the outputs in the terminal.
>>>>> When I disconnect the serial cable my Linux get stuck. Even my telnet
>>>>> connection doesnt responds.
>>>>> When I re-connect the serial everything is OK again.
>>>>> Do you know what can be the problem?
>>>>> I am working with HW flow control? can it be the problem?
>>>>> Thanks a lot!
>>>>> Hagit
>>>> check the speed of the terminal, with the terminal speed set on the
>>>> bootloader. Assumingly if its grub, then the bootloader configuration
>>>> line in grub.conf would read the kernel parameter as
>>>> 'console=ttyS0,9600', this means to redirect the console to ttS0 at a
>>>> speed of 9600bps(which is most commonly followed).
>>>> Additionally the inittab also should read :
>>>> s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux
>>>> This would mean that the console would listen for the logins
>>>> starting at
>>>> 115200bps but downgrade to 9600bps if it detects the console connection
>>>> to be a speed mismatches.
>>>> HTH, Nikhil
>>> more athttp://www.vanemery.com/Linux/Serial/serial-console.html- Hide
>>> quoted text -
>>>
>>> - Show quoted text -

>>
>> Thanks a lot, but I still cant figure the reason that the linux get
>> stuck when the cable is disconnected.
>> I am working with 38400bps, 8N1 and HW Flow control.
>>

> oh.. ok. 'Magic SysRq' is probably also worth looking at
> http://tldp.org/HOWTO/Remote-Serial-...ity-sysrq.html

Sorry I misunderstood earlier. I have not heard of anything like kernel
getting stuck when the console cable is disconnected. Do you find
anything in the messages? dmesg?
Do you have these lines I mentioned in the earlier post made in
/etc/inittab and ran 'telinit q' ?

Thanks, Nikhil
 
Reply With Quote
 
david
Guest
Posts: n/a

 
      10-21-2007, 07:13 PM
On Sat, 20 Oct 2007 10:15:24 -0700, hagit rearranged some electrons to
say:

>
> I am working with HW flow control? can it be the problem?


Turn off flow control.

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      10-21-2007, 08:00 PM
Bob Hauck <(E-Mail Removed)> writes:

>On Sun, 21 Oct 2007 05:07:56 -0700, hagit <(E-Mail Removed)> wrote:


>> Thanks a lot, but I still cant figure the reason that the linux get
>> stuck when the cable is disconnected.
>> I am working with 38400bps, 8N1 and HW Flow control.


>Um, what do you think happens if you use HW flow control and then
>disconnect the cable? Perhaps you should turn that off.


That should not disable Linux. Flow control is limiting the data put onto
or received from the serial cable.

>OTOH, I didn't know you could get the kernel to use flow control on a
>serial console.



>--
> -| Bob Hauck
> -| "Reality has a well-known liberal bias." -- Stephen Colbert
> -| http://www.haucks.org/

 
Reply With Quote
 
Wolfgang Draxinger
Guest
Posts: n/a

 
      10-22-2007, 06:11 AM
Unruh wrote:

> That should not disable Linux. Flow control is limiting the
> data put onto or received from the serial cable.


Well yes, and if a program writes data to a disconnected serial
connection it will block until the data has been sent (or the
connection is in asynchronous mode).

Now consider some program in die init process writing to the
console and blocking, before the init process has finished, thus
blocking the whole further boot sequence. I think you can figure
the rest out yourself.

Wolfgang Draxinger
--
E-Mail address works, Jabber: (E-Mail Removed), ICQ: 134682867

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAT-5 cable stuck in ethernet port - can't remove patiwatp@gmail.com Network Routers 6 09-06-2006 04:15 AM
CAT-5 cable stuck in ethernet port - can't remove patiwatp@gmail.com Linux Networking 5 04-27-2006 03:05 AM
Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows ) nurxb01@gmail.com Linux Networking 5 04-20-2006 12:37 AM
Linux-HA serial cable pin-out configuration details sipitai Linux Networking 2 11-01-2004 11:17 AM
Cat5 cable used as serial cable. pmg Windows Networking 8 08-16-2003 08:44 AM



1 2 3 4 5 6 7 8 9 10 11