Re: Serial boot prompt messages and a modem
In article [EMAIL PROTECTED] you write: On Tue, Dec 21, 1999 at 05:38:35PM -0800, Mike Smith wrote: Hmm, last time I checked, they were just 'serial ports'. Nope. The significance is determined by the software, and you're stuck with the fact that the first serial port is the console port. End of story. (Note: if we don't make some assumption about which port will be the console, how do you expect the software to work out which one it "should" use?) Insist that consoles be cabled-in with "real" cables, and use the first port we find with DCD asserted as the console, falling back to COM1 if we can't find any ports with DCD (indicating that someone has failed to follow our cabling insistence) Btw. I just came across a 'null modem cable' that connects DCD to: nothing! It connects DTR to DSR but _not_ to DCD... other than that the wiring appears to be normal. Well, so i hacked an `altpin' flag into sio that lets me swap the functions of DSR and DCD. (Anyone thinks that would be worth cleaning up and send-pr'ing?) And a happy new year to everyone... -- Juergen Lock [EMAIL PROTECTED] (remove dot foo from address to reply) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
Leif Neland wrote: Just configure it correctly. Don't tell it to talk to a serial device that will be sending it gibberish. A hack would be to have the loader emit ATE0 to protect itself from echoing modems. AFAIK, it would not protect against all modems. I think Winmodems, for instance, won't recognize that command. Another, but perhaps annoying would be flushing the input buffer before each read. It's not enough. At the baud rates a modem work at, even when echoing, the flush is likely to happen before the modem finishes echoing everything. -- Daniel C. Sobral(8-DCS) [EMAIL PROTECTED] [EMAIL PROTECTED] "Nice try, Lao Che." To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
Leif Neland wrote: Just configure it correctly. Don't tell it to talk to a serial device that will be sending it gibberish. A hack would be to have the loader emit ATE0 to protect itself from echoing modems. AFAIK, it would not protect against all modems. I think Winmodems, for instance, won't recognize that command. True, but until you've downloaded boot code to the modem, most winmodems won't respond at all... (Also, most winmodems that I've seen don't emulate a UART, so they won't even cause a problem) Kevin To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
On Sun, 26 Dec 1999, Daniel C. Sobral wrote: Leif Neland wrote: Just configure it correctly. Don't tell it to talk to a serial device that will be sending it gibberish. A hack would be to have the loader emit ATE0 to protect itself from echoing modems. AFAIK, it would not protect against all modems. I think Winmodems, for instance, won't recognize that command. A: AFAIK, winmodems are not connected to a serial port, they are internal boards. B: Real men don't use anything marked win* for Real Computing. Leif To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
Justin Hawkins wrote: I think (I am not positive on this) that if the boot loader talks to a modem in command mode with echo on, it gets confused and won't boot any further. Is this a known problem? I'd say this is an expected result, not a known problem. It is doing exactly what it is being told to (gibberish). Junk in, junk out. :-) Is there enough room in there for some code, which checks for this? IE if the first line output to the serial device == the first input (some version string probably) then it just ignores it and does the default action? Just configure it correctly. Don't tell it to talk to a serial device that will be sending it gibberish. -- Daniel C. Sobral(8-DCS) who is as social as a wampas [EMAIL PROTECTED] [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
On Wed, 22 Dec 1999, Daniel C. Sobral wrote: I'd say this is an expected result, not a known problem. It is doing exactly what it is being told to (gibberish). Junk in, junk out. :-) Sure. Is there enough room in there for some code, which checks for this? IE if the first line output to the serial device == the first input (some version string probably) then it just ignores it and does the default action? Just configure it correctly. Don't tell it to talk to a serial device that will be sending it gibberish. Well that was what I was trying to do. Given the relatice complexity of setting up for a serial console on the second serial port (kernel recompile, boot loader(s) recompile, boot block install etc). There is a better than even chance it's going to take someone like me a couple of reboots to get it all working. When the (previously working) boot process inexplicably stops for no apparent reason (the reason being the boot loader has been confused by the modem) it's a little disconcerting. I understand it's not really a bug and perhaps is not worth the code effort. A note in the handbook might not go astray - I am sure a lot of people who need a COM2 console will have modem on COM1. Thanks for your time. - Justin To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
Justin Hawkins wrote: I understand it's not really a bug and perhaps is not worth the code effort. A note in the handbook might not go astray - I am sure a lot of people who need a COM2 console will have modem on COM1. A note on the handbook and/or man pages can certainly be done. I'd be happy to apply any such changes you volunteer. You might add that before trying this, replacing loader.rc with one with the single line "boot" will garantee that loader will not stop. -- Daniel C. Sobral(8-DCS) who is as social as a wampas [EMAIL PROTECTED] [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
On Wed, 22 Dec 1999, Daniel C. Sobral wrote: Justin Hawkins wrote: I understand it's not really a bug and perhaps is not worth the code effort. A note in the handbook might not go astray - I am sure a lot of people who need a COM2 console will have modem on COM1. A note on the handbook and/or man pages can certainly be done. I'd be happy to apply any such changes you volunteer. You might add that before trying this, replacing loader.rc with one with the single line "boot" will garantee that loader will not stop. Where is the 'boot' option documented - I couldn't find it in loader.conf(5). What does it do - does it disable all input, or does it create a failsafe where is does something sensible in case garbage is received over the serial line/keyboard. Regarding the documentation change, something like: -- Note that if you cannot use sio0 because a modem lives on that port, be sure to have it switched off while you are making the changes below. If you reboot while the changes are not complete, and the boot loader is still looking at sio0, the modem will echo the boot loaders banner back at the boot loader, most likely causing the boot process to stop. Once you are sure that the boot loader is looking at sio1 (or whichever port you have changed it to) the modem can be safely left on during bootup. -- This probably fits under the paragraph: Using a port other than sio0 as the console requires some recompiling. If you want to use another serial port for whatever reasons, recompile the boot blocks, the boot loader and the kernel as follows. in 14.5.4.2. I think I need to have a look at how to submit documtation changes properly :-) While I think of it, it might be worth a bit more explanation in step 7: 7. Write the boot blocks to the boot disk with disklabel(8) and boot from the new kernel. Maybe something like: 7. Write the boot blocks to the boot disk with disklabel(8) with the -B option. For instance, if your boot disk is wd0, use 'disklabel -B wd0' 8. Boot from the new kernel. (Well I hope that's the right way to use disklabel, worked for me :-) - Justin To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
I've recently had .. ahem .. fun trying to get my headless FreeBSD box to spit messages at the console. I've got the kernel doing it right, but not the boot loaders. The boot loader will print to the serial device - but it won't load my kernel :-( I haven't exhausted all oppurtunities here yet - this isn't a cry for help on that. The reason I need to play around with the boot loaders is that I need the serial console on COM2. I have a modem on COM1. Before you ask, I can't swap them over easily, I'd need to swap the connectors internally or buy some 9-25 adaptors. But I digress. "Swapping them internally" would probably involve about 30 seconds of work. It's not hard, really. 8) I think (I am not positive on this) that if the boot loader talks to a modem in command mode with echo on, it gets confused and won't boot any further. Is this a known problem? Yes. The solution is "do not connect a modem with echo enabled to the console". The loader will spend endless hours talking to the modem (and if _it_ didn't, getty would a few seconds later). Is there enough room in there for some code, which checks for this? IE if the first line output to the serial device == the first input (some version string probably) then it just ignores it and does the default action? No. Wrong solution. Connect your console to the console port and your modem to the modem port. Sorry about the vagueness - I didn't have time to test this or gain any real empirical evidence - I needed to get the machine back in action ASAP. Sorry about the fascist attitude, but you really do just need to Do The Right Thing here. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ [EMAIL PROTECTED] \\ and he'll hate you for a lifetime. \\ [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
On Tue, 21 Dec 1999, Mike Smith wrote: "Swapping them internally" would probably involve about 30 seconds of work. It's not hard, really. 8) Yes I know I could have done that. Then reconfigured my getty's, my minicom etc. It's the principle of the thing - I prefer to bend the software to my will rather than have to open the case. Yes. The solution is "do not connect a modem with echo enabled to the console". The loader will spend endless hours talking to the modem (and if _it_ didn't, getty would a few seconds later). The getty is not a problem - it's configured correctly for my modem on com1. No. Wrong solution. Connect your console to the console port and your modem to the modem port. Hmm, last time I checked, they were just 'serial ports'. Sorry about the fascist attitude, but you really do just need to Do The Right Thing here. :-) I think the Right Thing is either way. Otherwise there wouldn't be documentation on how to change it to some other com port would there? A hardware swap would hardly by The Right Thing if the box was a few thousand kilometres away would it? I would expect a Microsoft product to force me to change my hardware to fit what the software wants - not FreeBSD. At any rate, the point is moot, it now works. I never had any real issue with the "problem" - I knew I would be able to resolve it in some way. I merely wanted to know if it was feasible to change the software to cope with this situation, and if not then a little note (which I have supplied) to add to the documentation for those less cluefull than me (Dog knows there must be one or two out there) is a nice touch, and equally useful. FreeBSD documentation is already very impressive, if I can help one other person avoid the (admittedly minor) problem I had, I'm happy. - Justin To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
"Swapping them internally" would probably involve about 30 seconds of work. It's not hard, really. 8) Yes I know I could have done that. Then reconfigured my getty's, my minicom etc. It's the principle of the thing - I prefer to bend the software to my will rather than have to open the case. I prefer to tell people to Do It Right the first time. Less work for me. 8) No. Wrong solution. Connect your console to the console port and your modem to the modem port. Hmm, last time I checked, they were just 'serial ports'. Nope. The significance is determined by the software, and you're stuck with the fact that the first serial port is the console port. End of story. (Note: if we don't make some assumption about which port will be the console, how do you expect the software to work out which one it "should" use?) Sorry about the fascist attitude, but you really do just need to Do The Right Thing here. :-) I think the Right Thing is either way. Otherwise there wouldn't be documentation on how to change it to some other com port would there? Not a good assumption. The documentation is on how to assign the console to a different 'sio' device, not to a different physical port. A hardware swap would hardly by The Right Thing if the box was a few thousand kilometres away would it? I would expect a Microsoft product to force me to change my hardware to fit what the software wants - not FreeBSD. You wouldn't have (correctly) assembled the system with things the wrong way around before shipping it, so I don't consider this a problem. At any rate, the point is moot, it now works. I never had any real issue with the "problem" - I knew I would be able to resolve it in some way. I merely wanted to know if it was feasible to change the software to cope with this situation, and if not then a little note (which I have supplied) to add to the documentation for those less cluefull than me (Dog knows there must be one or two out there) is a nice touch, and equally useful. The update is appreciated. There's no clean or even functional way to tweak the software, so we have to stick with what we've got. 8( -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ [EMAIL PROTECTED] \\ and he'll hate you for a lifetime. \\ [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Serial boot prompt messages and a modem
On Tue, Dec 21, 1999 at 05:38:35PM -0800, Mike Smith wrote: Hmm, last time I checked, they were just 'serial ports'. Nope. The significance is determined by the software, and you're stuck with the fact that the first serial port is the console port. End of story. (Note: if we don't make some assumption about which port will be the console, how do you expect the software to work out which one it "should" use?) Insist that consoles be cabled-in with "real" cables, and use the first port we find with DCD asserted as the console, falling back to COM1 if we can't find any ports with DCD (indicating that someone has failed to follow our cabling insistence) - mark -- Mark Newton Email: [EMAIL PROTECTED] (W) Network Engineer Email: [EMAIL PROTECTED] (H) Internode Systems Pty Ltd Desk: +61-8-82232999 "Network Man" - Anagram of "Mark Newton" Mobile: +61-416-202-223 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Serial boot prompt messages and a modem
Hi there, I've recently had .. ahem .. fun trying to get my headless FreeBSD box to spit messages at the console. I've got the kernel doing it right, but not the boot loaders. The boot loader will print to the serial device - but it won't load my kernel :-( I haven't exhausted all oppurtunities here yet - this isn't a cry for help on that. The reason I need to play around with the boot loaders is that I need the serial console on COM2. I have a modem on COM1. Before you ask, I can't swap them over easily, I'd need to swap the connectors internally or buy some 9-25 adaptors. But I digress. I think (I am not positive on this) that if the boot loader talks to a modem in command mode with echo on, it gets confused and won't boot any further. Is this a known problem? Is there enough room in there for some code, which checks for this? IE if the first line output to the serial device == the first input (some version string probably) then it just ignores it and does the default action? Sorry about the vagueness - I didn't have time to test this or gain any real empirical evidence - I needed to get the machine back in action ASAP. Please CC any replies - I'm not on this list. Thanks. - Justin To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message