Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On Mon, Nov 03, 2014 at 05:17:40PM +0100, Raimo Niskanen wrote: On Sat, Nov 01, 2014 at 10:32:52PM +0100, ropers wrote: o New uscom(4) driver for simple USB serial adapters. This reminds me of something I've been meaning to ask for some time: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? Yes. * Does uscom(4) make this any easier/is it more compatible than ucom(4)? * If I buy a random USB-to-serial dongle, is it likely that it'll work with either uscom(4) or ucom(4)? If not, does anyone have any hardware recommendations, i.e. what do you use? I have got a cable labled ST-Lab USB-SERIAL-4 purchased from Dustin in Sweden, and it works well. I do not remember what device driver attaches to it and have not tried any other cables so I can not say even if it happens that some cable does not work due to e.g Windows-only drivers... Now I just bought an Aten UC-232A-B and it seems to contain the same chip: uplcom0 at uhub1 port 2 Prolific Technology Inc. USB-Serial Controller D rev 1.10/3.00 addr 2 ucom0 at uplcom0 Thanks for any input regards, ropers -- / Raimo Niskanen, Erlang/OTP, Ericsson AB -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On Sat, Nov 01, 2014 at 10:32:52PM +0100, ropers wrote: o New uscom(4) driver for simple USB serial adapters. This reminds me of something I've been meaning to ask for some time: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? Yes. * Does uscom(4) make this any easier/is it more compatible than ucom(4)? * If I buy a random USB-to-serial dongle, is it likely that it'll work with either uscom(4) or ucom(4)? If not, does anyone have any hardware recommendations, i.e. what do you use? I have got a cable labled ST-Lab USB-SERIAL-4 purchased from Dustin in Sweden, and it works well. I do not remember what device driver attaches to it and have not tried any other cables so I can not say even if it happens that some cable does not work due to e.g Windows-only drivers... Thanks for any input regards, ropers -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2014-11-01, ropers rop...@gmail.com wrote: * Does uscom(4) make this any easier/is it more compatible than ucom(4)? Nope. uscom is afaik only tested so far with HP graphing calculators. It is *really* simple, just provides a way to transfer data, it does not allow setting port speed etc. Also it is not built into GENERIC at present so it requires a custom kernel. ucom(4) is a different layer. ucom attaches *to* the hardware device driver (uftdi, uark, ubsa, uscom, ...) to provide tty(4)-like access. * If I buy a random USB-to-serial dongle, is it likely that it'll work with either uscom(4) or ucom(4)? If not, does anyone have any hardware recommendations, i.e. what do you use? My suggestion: pick a random cheap single-port rs232/usb adapter, don't spend much money on it. If it doesn't work, try a different one, and send lsusb -v outpout and see if anyone would like to have the non-working device to play with and try and add support.. (multi-port ones may also work, but you have a higher chance of a single-port one just working). FTDI clones might be particularly cheap at the moment :)
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2 November 2014 06:51, Theo de Raadt dera...@cvs.openbsd.org Whatever you want, just try it. Unbelievable.. I don't actually have a USB-to-serial adapter yet. I was trying to ask before buying something that wouldn't work. I'm dimly aware that USB-to-serial can be problematic in some cases. I wasn't sure if this would be one of those. Sorry for the noise.
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 11/02/14 00:51, Theo de Raadt wrote: On 2 November 2014 06:15, Theo de Raadt dera...@cvs.openbsd.org wrote: A serial console is a serial port on a machine exposing it's boottime console. OpenBSD cannnot use select a USB serial connector as a console tty, no more than it can select some random serial pci card. The logic for finding the device happens too late. If this is the other way around, then the laptop is just doing serial. What's console about it. It is just talking serial, to something else which is console. You don't need the word console, nor do we need to know the colour of the cable you choose. Naddy is precise. You used the wrong words. Ah, okay. Thank you. But even if the laptop end of the setup wouldn't properly be called a serial console, do I understand correctly then that it would work to use it with a run-of-the-mill USB-to-serial adapter in the way I describe? Meaning, use it as a terminal (or terminal emulator, or technically, laptop, running OpenBSD, running a terminal emulat-- arrgh!). Anyway, do I understand correctly that it would work the way I expect, and that (my imprecise terminology notwithstanding) Patrick's reply is applicable? And further, just to make sure I'm really getting this, is it actually correct then to call the (bog standard) physical RS-232 port on the headless computer the serial console? Or am I still on the wrong track, and does a real, genuine, proper serial console involve custom hardware beyond a standard physical serial port? That is a lot of words. I do not understand your questions. Can a device which does serial console expose it's console over serial to another device which does serial? Yes. Because serial ports can talk to each other. Whatever you want, just try it. Unbelievable.. Sounds like the question, in a very around about way, is can you use a laptop or desktop with a USB to serial converter with a given terminal program to communicate with an OpenBSD machine that uses a serial console. The answer is yes and I fail to see why this is such a problem. Stan
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2 November 2014 06:51, Theo de Raadt dera...@cvs.openbsd.org Whatever you want, just try it. Unbelievable.. I don't actually have a USB-to-serial adapter yet. I was trying to ask before buying something that wouldn't work. I'm dimly aware that USB-to-serial can be problematic in some cases. I wasn't sure if this would be one of those. Sorry for the noise. So let's get this clear. Don't have it, but if you did you might try something you don't understand. So, let's go bother some people with non-understanding questions and see what pops out. Go a few cycles. Then when you realize you don't understand hardware you don't have, you apologize. Amazing.
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 11/02/14 00:51, Theo de Raadt wrote: On 2 November 2014 06:15, Theo de Raadt dera...@cvs.openbsd.org wrote: A serial console is a serial port on a machine exposing it's boottime console. OpenBSD cannnot use select a USB serial connector as a console tty, no more than it can select some random serial pci card. The logic for finding the device happens too late. If this is the other way around, then the laptop is just doing serial. What's console about it. It is just talking serial, to something else which is console. You don't need the word console, nor do we need to know the colour of the cable you choose. Naddy is precise. You used the wrong words. Ah, okay. Thank you. But even if the laptop end of the setup wouldn't properly be called a serial console, do I understand correctly then that it would work to use it with a run-of-the-mill USB-to-serial adapter in the way I describe? Meaning, use it as a terminal (or terminal emulator, or technically, laptop, running OpenBSD, running a terminal emulat-- arrgh!). Anyway, do I understand correctly that it would work the way I expect, and that (my imprecise terminology notwithstanding) Patrick's reply is applicable? And further, just to make sure I'm really getting this, is it actually correct then to call the (bog standard) physical RS-232 port on the headless computer the serial console? Or am I still on the wrong track, and does a real, genuine, proper serial console involve custom hardware beyond a standard physical serial port? That is a lot of words. I do not understand your questions. Can a device which does serial console expose it's console over serial to another device which does serial? Yes. Because serial ports can talk to each other. Whatever you want, just try it. Unbelievable.. Sounds like the question, in a very around about way, is can you use a laptop or desktop with a USB to serial converter with a given terminal program to communicate with an OpenBSD machine that uses a serial console. The answer is yes and I fail to see why this is such a problem. It is a problem because he doesn't have the hardware in the first place! So I have a question. I don't wood work, and I don't have any wood, and I don't have any wood working tools, but if I was to, er, what is the word -- is it lathe? That spinny thing? What happens if my power cable gets unplugged while I am doing that. Do I just plug it in? Thanks. I was curious. So excited to hear the answers.
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On Sun, Nov 02, 2014 at 06:08, ropers wrote: When I said I wanted to use a USB-only laptop *as* a serial console, what I meant was this: 1. There is a headless computer that has a physical RS-232. This is not the laptop. So what you want to know is if you can run cu -l /dev/cuaU0 on a laptop with (e.g.) a uplcom adapter? Yes.
uscom/ucom hardware question [was: OpenBSD 5.6 Released]
o New uscom(4) driver for simple USB serial adapters. This reminds me of something I've been meaning to ask for some time: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? * Does uscom(4) make this any easier/is it more compatible than ucom(4)? * If I buy a random USB-to-serial dongle, is it likely that it'll work with either uscom(4) or ucom(4)? If not, does anyone have any hardware recommendations, i.e. what do you use? Thanks for any input regards, ropers
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
Hi, On 11/1/14, ropers rop...@gmail.com wrote: o New uscom(4) driver for simple USB serial adapters. This reminds me of something I've been meaning to ask for some time: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? Yes. I use such a setup on one server. You need to add the appropriate /dev/ttyUx in your /etc/ttys and ensure ttyflags(8) runs after the device attaches. I haven't automated this on the one box; hotplugd(8) may be the tool for this task. * Does uscom(4) make this any easier/is it more compatible than ucom(4)? * If I buy a random USB-to-serial dongle, is it likely that it'll work with either uscom(4) or ucom(4)? If not, does anyone have any hardware recommendations, i.e. what do you use? I have about four such usb/serial devices. I purchased all of them blindly, at different times, and all of them happen to just work. One I have handy right now shows up as: uplcom0 at uhub0 port 1 Prolific Technology Inc. USB-Serial Controller D rev 1.10/4.00 addr 3 ucom0 at uplcom0 Another as: uftdi0 at uhub1 port 5 FTDI usb serial controler rev 1.10/4.00 addr 2 ucom0 at uftdi0 portno 1. I don't think I paid anything more than $12USD for each. --patrick Thanks for any input regards, ropers
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2014-11-01, ropers rop...@gmail.com wrote: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? This is impossible. The serial part is on the wrong end. The console code would have to drive a USB device with all the USB bus complexity. For laptops with Intel AMT, it should be possible to use the serial-over-LAN feature (cf. the comms/amtterm port). -- Christian naddy Weisgerber na...@mips.inka.de
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2014-11-01, patrick keshishian pkesh...@gmail.com wrote: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? Yes. I use such a setup on one server. You need to add the appropriate /dev/ttyUx in your /etc/ttys and ensure ttyflags(8) runs after the device attaches. Running a getty(8) on a serial port is not a console. You have no access to boot(8), boot_config(8), the bootup kernel messages, or single-user mode. -- Christian naddy Weisgerber na...@mips.inka.de
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 11/1/14, Christian Weisgerber na...@mips.inka.de wrote: On 2014-11-01, patrick keshishian pkesh...@gmail.com wrote: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? Yes. I use such a setup on one server. You need to add the appropriate /dev/ttyUx in your /etc/ttys and ensure ttyflags(8) runs after the device attaches. Running a getty(8) on a serial port is not a console. You have no access to boot(8), boot_config(8), the bootup kernel messages, or single-user mode. of course it isn't. I took some liberty in interpreting what functionally the OP was after. --patrick
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2014-11-01, ropers rop...@gmail.com wrote: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? On 1 November 2014 23:51, Christian Weisgerber na...@mips.inka.de wrote: This is impossible. The serial part is on the wrong end. The console code would have to drive a USB device with all the USB bus complexity. I'm having one heck of a hard time understanding why it's impossible, or maybe we're talking at cross-purposes. Maybe I've expressed myself imprecisely or incorrectly. Are we even talking about the same thing? When I said I wanted to use a USB-only laptop *as* a serial console, what I meant was this: 1. There is a headless computer that has a physical RS-232. This is not the laptop. 2. There is a laptop that has USB but lacks a built-in RS-232. 3. I want to buy a USB-to-serial adapter to plug into that laptop. Then I want to use a null-modem cable to connect that serial-port-on-a-dongle to the headless computer's physical serial port. 4. I do not expect to capture the laptop's bootup kernel messages. I do not expect to run the laptop in single user mode. The laptop would be fully booted up and running a (fancy or barebones tty) terminal emulator program. I would however hope to be able to capture the headless computer's output (from the point where it's redirected to serial) and give it keyboard input from the laptop. Is that what we're both talking about? And if so, is that actually impossible? And if so, could you elaborate on why that is? I'm not sure I've understood your explanation correctly. Corollary question: Is Patrick's advice applicable or yours? regards, ropers
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2014-11-01, ropers rop...@gmail.com wrote: * Has anyone here used a USB-only laptop with a USB-to-serial adapter as a serial console? (You know, instead of hardware that has a native RS-232 port? On 1 November 2014 23:51, Christian Weisgerber na...@mips.inka.de wrote: This is impossible. The serial part is on the wrong end. The console code would have to drive a USB device with all the USB bus complexity. I'm having one heck of a hard time understanding why it's impossible, or maybe we're talking at cross-purposes. Maybe I've expressed myself imprecisely or incorrectly. Are we even talking about the same thing? When I said I wanted to use a USB-only laptop *as* a serial console, what I meant was this: A serial console is a serial port on a machine exposing it's boottime console. OpenBSD cannnot use select a USB serial connector as a console tty, no more than it can select some random serial pci card. The logic for finding the device happens too late. If this is the other way around, then the laptop is just doing serial. What's console about it. It is just talking serial, to something else which is console. You don't need the word console, nor do we need to know the colour of the cable you choose. Naddy is precise. You used the wrong words.
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2 November 2014 06:15, Theo de Raadt dera...@cvs.openbsd.org wrote: A serial console is a serial port on a machine exposing it's boottime console. OpenBSD cannnot use select a USB serial connector as a console tty, no more than it can select some random serial pci card. The logic for finding the device happens too late. If this is the other way around, then the laptop is just doing serial. What's console about it. It is just talking serial, to something else which is console. You don't need the word console, nor do we need to know the colour of the cable you choose. Naddy is precise. You used the wrong words. Ah, okay. Thank you. But even if the laptop end of the setup wouldn't properly be called a serial console, do I understand correctly then that it would work to use it with a run-of-the-mill USB-to-serial adapter in the way I describe? Meaning, use it as a terminal (or terminal emulator, or technically, laptop, running OpenBSD, running a terminal emulat-- arrgh!). Anyway, do I understand correctly that it would work the way I expect, and that (my imprecise terminology notwithstanding) Patrick's reply is applicable? And further, just to make sure I'm really getting this, is it actually correct then to call the (bog standard) physical RS-232 port on the headless computer the serial console? Or am I still on the wrong track, and does a real, genuine, proper serial console involve custom hardware beyond a standard physical serial port?
Re: uscom/ucom hardware question [was: OpenBSD 5.6 Released]
On 2 November 2014 06:15, Theo de Raadt dera...@cvs.openbsd.org wrote: A serial console is a serial port on a machine exposing it's boottime console. OpenBSD cannnot use select a USB serial connector as a console tty, no more than it can select some random serial pci card. The logic for finding the device happens too late. If this is the other way around, then the laptop is just doing serial. What's console about it. It is just talking serial, to something else which is console. You don't need the word console, nor do we need to know the colour of the cable you choose. Naddy is precise. You used the wrong words. Ah, okay. Thank you. But even if the laptop end of the setup wouldn't properly be called a serial console, do I understand correctly then that it would work to use it with a run-of-the-mill USB-to-serial adapter in the way I describe? Meaning, use it as a terminal (or terminal emulator, or technically, laptop, running OpenBSD, running a terminal emulat-- arrgh!). Anyway, do I understand correctly that it would work the way I expect, and that (my imprecise terminology notwithstanding) Patrick's reply is applicable? And further, just to make sure I'm really getting this, is it actually correct then to call the (bog standard) physical RS-232 port on the headless computer the serial console? Or am I still on the wrong track, and does a real, genuine, proper serial console involve custom hardware beyond a standard physical serial port? That is a lot of words. I do not understand your questions. Can a device which does serial console expose it's console over serial to another device which does serial? Yes. Because serial ports can talk to each other. Whatever you want, just try it. Unbelievable..