* Timeout broken with serial port @ 2011-08-24 9:16 Michal Suchanek 2011-08-24 9:40 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 1 reply; 10+ messages in thread From: Michal Suchanek @ 2011-08-24 9:16 UTC (permalink / raw) To: The development of GRUB 2 Hello, I was experiencing a mysterious error with grub. It would not boot with timeout set. It turns out that setting serial IO disables timeout. grub-pc 1.99-11ubuntu1 I think it used to work with earlier grub, I have this file for ages: # cat /etc/grub.d/03_serial #!/bin/sh echo serial --unit=0 --speed=115200 echo terminal_input --append serial\; terminal_output --append serial ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-08-24 9:16 Timeout broken with serial port Michal Suchanek @ 2011-08-24 9:40 ` Vladimir 'φ-coder/phcoder' Serbinenko 2011-09-05 19:40 ` Michal Suchanek 0 siblings, 1 reply; 10+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-08-24 9:40 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 805 bytes --] On 24.08.2011 11:16, Michal Suchanek wrote: > Hello, > > I was experiencing a mysterious error with grub. It would not boot > with timeout set. > > It turns out that setting serial IO disables timeout. Check your contacts. Bad contacts are known to send noise on I/O which GRUB interprets as keypresses. > grub-pc 1.99-11ubuntu1 > > I think it used to work with earlier grub, I have this file for ages: > > # cat /etc/grub.d/03_serial > #!/bin/sh > > echo serial --unit=0 --speed=115200 > echo terminal_input --append serial\; terminal_output --append serial > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 294 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-08-24 9:40 ` Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-09-05 19:40 ` Michal Suchanek 2011-09-05 20:51 ` Aleš Nesrsta 2011-09-05 22:05 ` Lennart Sorensen 0 siblings, 2 replies; 10+ messages in thread From: Michal Suchanek @ 2011-09-05 19:40 UTC (permalink / raw) To: The development of GNU GRUB 2011/8/24 Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>: > On 24.08.2011 11:16, Michal Suchanek wrote: >> Hello, >> >> I was experiencing a mysterious error with grub. It would not boot >> with timeout set. >> >> It turns out that setting serial IO disables timeout. > Check your contacts. Bad contacts are known to send noise on I/O which > GRUB interprets as keypresses. I did not have the cable connected at all at the other end. Connecting it to my notebook resolves the problem. Still it is definitely a bug in Grub that it interprets noise as keypresses. Is there not DTR line? If every switch with serial console failed to boot when there is nothing connected to it there would be no internet. This is not how a serial enabled device should behave. Thanks Michal ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-05 19:40 ` Michal Suchanek @ 2011-09-05 20:51 ` Aleš Nesrsta 2011-09-06 6:55 ` Michal Suchanek 2011-09-06 20:36 ` richardvoigt 2011-09-05 22:05 ` Lennart Sorensen 1 sibling, 2 replies; 10+ messages in thread From: Aleš Nesrsta @ 2011-09-05 20:51 UTC (permalink / raw) To: The development of GNU GRUB Hi, I think it is not GRUB related problem, more probably there is some HW problem on Your serial port. Try to check idle voltage on RxD pin of serial port (best with oscilloscope... :-) ). Or You can have some unwanted "leakage" between pins of connector or wires in cable (check resistance between wires of cable) etc. Normal serial port should NEVER do anything if there is nothing connected to it. According to RS232 (V24) specification there should be voltage in range from -12V to -3V on RxD pin in idle state (in simplest case there is some internal pull-up resistor connected from RxD to -Vcc directly inside UART or something else...). In this normal case nothing is received by serial port and nothing will be interpreted as keypress in GRUB, i.e. GRUB will boot normally. In Your case, probably something causes some noise on RxD pin or there is bad voltage level on RxD pin (e.g. >= +3V or near to 0V etc.) when nothing is connected - so serial port interprets it as receiving some character(s). When You connect Your serial port to another device (notebook in Your case), RxD is set to correct idle voltage from connected idle TxD, so the problem is corrected. From my long praxis with serial ports on different PCs and another (non-PC) devices, manufacturers very very often don't respect RS232 (V24) specification (mainly for RxD/TxD signals voltage levels). It often caused bad situations, some of them were in fact the same as Your case. Using of DTR line is fine but if You have some HW problem on RxD line, there could be the same problem also on DTR (RTS, CTS ...) line and final effect will be the same... Additionally, lot of devices are working without using any additional link/modem state signals (i.e., only signals RxD, TxD and GND are used), it is simplest and almost working solution (and working well - of course it depends of kind of communication and it also expects that RS232 specification is not violated and all HW is in order...). Best regards Ales Michal Suchanek wrote: > 2011/8/24 Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>: > > On 24.08.2011 11:16, Michal Suchanek wrote: > >> Hello, > >> > >> I was experiencing a mysterious error with grub. It would not boot > >> with timeout set. > >> > >> It turns out that setting serial IO disables timeout. > > Check your contacts. Bad contacts are known to send noise on I/O which > > GRUB interprets as keypresses. > > I did not have the cable connected at all at the other end. Connecting > it to my notebook resolves the problem. > > Still it is definitely a bug in Grub that it interprets noise as keypresses. > > Is there not DTR line? > > If every switch with serial console failed to boot when there is > nothing connected to it there would be no internet. This is not how a > serial enabled device should behave. > > Thanks > > Michal > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-05 20:51 ` Aleš Nesrsta @ 2011-09-06 6:55 ` Michal Suchanek 2011-09-06 18:07 ` starous 2011-09-06 20:36 ` richardvoigt 1 sibling, 1 reply; 10+ messages in thread From: Michal Suchanek @ 2011-09-06 6:55 UTC (permalink / raw) To: The development of GNU GRUB On 5 September 2011 22:51, Aleš Nesrsta <starous@volny.cz> wrote: > Hi, > > I think it is not GRUB related problem, more probably there is some HW > problem on Your serial port. Try to check idle voltage on RxD pin of > serial port (best with oscilloscope... :-) ). Or You can have some > unwanted "leakage" between pins of connector or wires in cable (check > resistance between wires of cable) etc. > > Normal serial port should NEVER do anything if there is nothing > connected to it. According to RS232 (V24) specification there should be > voltage in range from -12V to -3V on RxD pin in idle state (in simplest > case there is some internal pull-up resistor connected from RxD to -Vcc > directly inside UART or something else...). > In this normal case nothing is received by serial port and nothing will > be interpreted as keypress in GRUB, i.e. GRUB will boot normally. > > In Your case, probably something causes some noise on RxD pin or there > is bad voltage level on RxD pin (e.g. >= +3V or near to 0V etc.) when > nothing is connected - so serial port interprets it as receiving some > character(s). > When You connect Your serial port to another device (notebook in Your > case), RxD is set to correct idle voltage from connected idle TxD, so > the problem is corrected. > > From my long praxis with serial ports on different PCs and another > (non-PC) devices, manufacturers very very often don't respect RS232 > (V24) specification (mainly for RxD/TxD signals voltage levels). It > often caused bad situations, some of them were in fact the same as Your > case. > > Using of DTR line is fine but if You have some HW problem on RxD line, > there could be the same problem also on DTR (RTS, CTS ...) line and > final effect will be the same... > Additionally, lot of devices are working without using any additional > link/modem state signals (i.e., only signals RxD, TxD and GND are used), > it is simplest and almost working solution (and working well - of course > it depends of kind of communication and it also expects that RS232 > specification is not violated and all HW is in order...). > FWIW I am using description: Motherboard product: DQ45CB vendor: Intel Corporation physical id: 0 version: AAE30148-302 Since the BIOS does not support serial boot it is not tested for this I guess. I don't have an oscilloscope so I can't tell what is going on on the wires. Is there some alternative to using the onboard port? Does Grub support some serial addon cards? Also since this seems to be a common problem with PC hardware perhaps a warning in the manual and the configuration file should be added. Thanks Michal ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-06 6:55 ` Michal Suchanek @ 2011-09-06 18:07 ` starous 2011-09-06 18:45 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 1 reply; 10+ messages in thread From: starous @ 2011-09-06 18:07 UTC (permalink / raw) To: The development of GNU GRUB <Michal Suchanek"> wrote: > On 5 September 2011 22:51, Aleš Nesrsta > <starous@volny.cz> wrote: > > Hi, > > > > I think it is not GRUB related problem, more > > probably there is some HW > > > problem on Your serial port. Try to check idle > > voltage on RxD pin of > > > serial port (best with oscilloscope... :-) ). Or > > You can have some > > > unwanted "leakage" between pins of connector or > > wires in cable (check > > > resistance between wires of cable) etc. > > > > Normal serial port should NEVER do anything if > > there is nothing > > > connected to it. According to RS232 (V24) > > specification there should be > > > voltage in range from -12V to -3V on RxD pin in > > idle state (in simplest > > > case there is some internal pull-up resistor > > connected from RxD to -Vcc > > > directly inside UART or something else...). > > In this normal case nothing is received by > > serial port and nothing will > > > be interpreted as keypress in GRUB, i.e. GRUB > > will boot normally. > > > > > In Your case, probably something causes some > > noise on RxD pin or there > > > is bad voltage level on RxD pin (e.g. >= +3V or > > near to 0V etc.) when > > > nothing is connected - so serial port interprets > > it as receiving some > > > character(s). > > When You connect Your serial port to another > > device (notebook in Your > > > case), RxD is set to correct idle voltage from > > connected idle TxD, so > > > the problem is corrected. > > > > From my long praxis with serial ports on > > different PCs and another > > > (non-PC) devices, manufacturers very very often > > don't respect RS232 > > > (V24) specification (mainly for RxD/TxD signals > > voltage levels). It > > > often caused bad situations, some of them were > > in fact the same as Your > > > case. > > > > Using of DTR line is fine but if You have some > > HW problem on RxD line, > > > there could be the same problem also on DTR > > (RTS, CTS ...) line and > > > final effect will be the same... > > Additionally, lot of devices are working without > > using any additional > > > link/modem state signals (i.e., only signals > > RxD, TxD and GND are used), > > > it is simplest and almost working solution (and > > working well - of course > > > it depends of kind of communication and it also > > expects that RS232 > > > specification is not violated and all HW is in > > order...). > > > > > FWIW I am using > > description: Motherboard > product: DQ45CB > vendor: Intel Corporation > physical id: 0 > version: AAE30148-302 > > Since the BIOS does not support serial boot it is > not tested for this > I guess. I don't have an oscilloscope so I can't > tell what is going on > on the wires. If You can, try at least simply measure voltage between pins 2 (RxD) and 5 (GND) - if You have commonly used 9 pins connector on PC. Common ("minus" - often black color) measuring wire should be connected to pin 5 (GND). If You will measure voltage outside the range approx. <-12..-3V> then most probably there is something wrong with Your serial port - from HW point of view. There is also question (but maybe I don't understand Your original post) - why do You use serial module in GRUB when You don't need serial port ? I think, if serial module will not be loaded in GRUB, You should don't care about serial port even if it is broken or buggy... > > Is there some alternative to using the onboard > port? Does Grub support > some serial addon cards? AFAIK, GRUB supports at least USB serial port converter. Or probably any addon card which looks from HW side as standard COM port... > > Also since this seems to be a common problem with > PC hardware perhaps > a warning in the manual and the configuration file > should be added. Hm, why not, it is maybe not bad idea - but I am not maintainer of related GRUB parts (serial port nor configuration etc.), maybe somebody else will discuse it with You... But, generally, there could be many partially or fully broken HW parts on PC and it is impossible to warn everybody against all of them... :-) BR, Ales > > Thanks > > Michal > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > -- Užitečné rady a tipy pro studenty i jejich rodiče a blízké čtěte ve speciálu portálu VOLNÝ.cz Škola volá. http://web.volny.cz/data/click.php?id=1267 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-06 18:07 ` starous @ 2011-09-06 18:45 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 0 replies; 10+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-09-06 18:45 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 719 bytes --] > But, generally, there could be many partially or fully broken HW > parts on PC and it is impossible to warn everybody against all of > them... :-) > Why not? "Your computer is manufactured by Sony/Apple/..., it may have hardware defects and exhibit any kind of known or unknown, predictable or unpredictable, explainable or mysterious misbehavior subject to laws of physics as we know them or yet undiscovered proprietary extensions" > BR, > Ales > >> Thanks >> >> Michal > >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel >> > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 294 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-05 20:51 ` Aleš Nesrsta 2011-09-06 6:55 ` Michal Suchanek @ 2011-09-06 20:36 ` richardvoigt 1 sibling, 0 replies; 10+ messages in thread From: richardvoigt @ 2011-09-06 20:36 UTC (permalink / raw) To: The development of GNU GRUB On Mon, Sep 5, 2011 at 3:51 PM, Aleš Nesrsta <starous@volny.cz> wrote: > Hi, > > I think it is not GRUB related problem, more probably there is some HW > problem on Your serial port. Try to check idle voltage on RxD pin of > serial port (best with oscilloscope... :-) ). Or You can have some > unwanted "leakage" between pins of connector or wires in cable (check > resistance between wires of cable) etc. > > Normal serial port should NEVER do anything if there is nothing > connected to it. According to RS232 (V24) specification there should be > voltage in range from -12V to -3V on RxD pin in idle state (in simplest > case there is some internal pull-up resistor connected from RxD to -Vcc > directly inside UART or something else...). > In this normal case nothing is received by serial port and nothing will > be interpreted as keypress in GRUB, i.e. GRUB will boot normally. > > In Your case, probably something causes some noise on RxD pin or there > is bad voltage level on RxD pin (e.g. >= +3V or near to 0V etc.) when > nothing is connected - so serial port interprets it as receiving some > character(s). An idle transmitter should be in the range -3V...-12V. But here there is no transmitter. I would not be at all surprised if some hardware implements "cable detect" using a weak pull to 0V. Still, data shouldn't be reported by the receiver unless the voltage is in the valid range, and the input should not be left floating either. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-05 19:40 ` Michal Suchanek 2011-09-05 20:51 ` Aleš Nesrsta @ 2011-09-05 22:05 ` Lennart Sorensen 2011-09-06 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko 1 sibling, 1 reply; 10+ messages in thread From: Lennart Sorensen @ 2011-09-05 22:05 UTC (permalink / raw) To: The development of GNU GRUB On Mon, Sep 05, 2011 at 09:40:42PM +0200, Michal Suchanek wrote: > I did not have the cable connected at all at the other end. Connecting > it to my notebook resolves the problem. > > Still it is definitely a bug in Grub that it interprets noise as keypresses. > > Is there not DTR line? > > If every switch with serial console failed to boot when there is > nothing connected to it there would be no internet. This is not how a > serial enabled device should behave. If the UART (not grub) interprets noise as valid data, then it will pass that to grub which legitimately sees that as keypresses. Not a bug in software, just bad hardware. DTR is used for modems and such, generally not for consoles, and besides who is the terminal? The serial port on many devices can be the terminal if you connect it to a modem, but might just as well be the client device connected to some other terminal (like when used as the grub interface). -- Len Sorensen ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Timeout broken with serial port 2011-09-05 22:05 ` Lennart Sorensen @ 2011-09-06 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 0 replies; 10+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-09-06 18:33 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 716 bytes --] On 06.09.2011 02:05, Lennart Sorensen wrote: > If the UART (not grub) interprets noise as valid data, then it will pass > that to grub which legitimately sees that as keypresses. I agree with both sides of dispute. It's a hardware bug but GRUB has reliability and unattended boot as one of its goals. And this noise can be detected. Noise is likely to have two neighbouring bits equal (due to noise not being on the same frequency as serial speed) and unlikely to produce a lot of valid characters. I propose to buffer serial input for 200/speed seconds and after this period do a small analysis and in case of bad data discard the whole buffer. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 294 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-09-06 20:36 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-24 9:16 Timeout broken with serial port Michal Suchanek 2011-08-24 9:40 ` Vladimir 'φ-coder/phcoder' Serbinenko 2011-09-05 19:40 ` Michal Suchanek 2011-09-05 20:51 ` Aleš Nesrsta 2011-09-06 6:55 ` Michal Suchanek 2011-09-06 18:07 ` starous 2011-09-06 18:45 ` Vladimir 'φ-coder/phcoder' Serbinenko 2011-09-06 20:36 ` richardvoigt 2011-09-05 22:05 ` Lennart Sorensen 2011-09-06 18:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.