Hi all! I'm wondering if anyone knows how many RS232 devices a "vanilla" Linux kernel can manage simultaneously. I'd like to be able to have up to 32 going at once, with data taken from each device written to its own file via the standard I/O subsystem. As far as I know, wouldn't Linux simply fork the appropriate number of driver threads to read as many RS232 ports as are attached with each device's stream written to a "/dev" file? Why do I want to do this? Glad you asked... I'm investigating an issue at work that involves our instrumentation lab having to upload/download/calibrate multiple sondes and have them ready for field deployment the next day. Currently, we can do three at a time and this takes about 8-9 hours providing everything goes well. The manufacturer's software application claims to supports the simultaneous upload/config of up to 32 sondes. The application will scan "installed" COM ports looking for recognizable sondes, and present those found to the user. Yes - this is a windows solution, so I first began looking for products that would play with Windows... I began looking for hardware solutions (PCI boards, break-out boxes, etc.) on the net and I found a few that will provide 16 DB-9 RS232 ports with full pin-out support as well as so-called "true" interrupt and FIFO support on the host (via their own custom Windows driver, no doubt). And then I started wondering about how to get all of this to work in a Windows environment where "IT" is the only group allowed to install software and otherwise configure a PC for most users whose biggest concern is email... All this got me thinking about avoiding the whole Windows issue and instead thinking about using Linux to take care of the RS232 part, with the newly created files moved to a Windows box (sneakernet to start with), with the normal post-processing of the data taking place as usual in the Windows environment the staff is used to... I'm hoping an "out of the box" distro will be able to handle say 16 RS232 ports and that Linux-based terminal emulation software is available to simultaneously handle those ports as well so I can capture the data using the appropriate protocols... Anyone know of a similar application using RS232 and Linux, or have some thoughts on this? Thanks! Steve
On 5/20/07, Stephen C. Daukas <scd@daukas.com> wrote:
I'm wondering if anyone knows how many RS232 devices a "vanilla" Linux kernel can manage simultaneously.
there shouldnt be any real limit ... at work, we have ~24 USB<->RS232 devices hooked up and we use them all simultaneously to interact with some hardware
I'd like to be able to have up to 32 going at once, with data taken from each device written to its own file via the standard I/O subsystem. As far as I know, wouldn't Linux simply fork the appropriate number of driver threads to read as many RS232 ports as are attached with each device's stream written to a "/dev" file?
i'd be more worried about *what* the devices are and *how* you connect your 32 devices to the machine ... making sure linux has proper device driver support for it -mike
Mike Frysinger wrote:
On 5/20/07, Stephen C. Daukas <scd@daukas.com> wrote:
I'm wondering if anyone knows how many RS232 devices a "vanilla" Linux kernel can manage simultaneously.
there shouldnt be any real limit ... at work, we have ~24 USB<->RS232 devices hooked up and we use them all simultaneously to interact with some hardware
I'd like to be able to have up to 32 going at once, with data taken from each device written to its own file via the standard I/O subsystem. As far as I know, wouldn't Linux simply fork the appropriate number of driver threads to read as many RS232 ports as are attached with each device's stream written to a "/dev" file?
i'd be more worried about *what* the devices are and *how* you connect your 32 devices to the machine ... making sure linux has proper device driver support for it -mike
Yes, there should be no real limit.. At work i have use multile Edgeport/8 http://www.digi.com/products/usb/edgeport.jsp devices to have may rs-232 ports -- Karl Hiramoto http://karl.hiramoto.org/ US VOIP: (1) 603.966.4448 Spain Casa (34) 951.273.347 Spain Mobil (34) 617.463.826 Yahoo_IM = karl_hiramoto GTalk= karl.hiramoto [at] gmail [d0t] com -- I have that old biological urge, I have that old irresistible surge, I'm hungry.
On 5/21/07, Karl Hiramoto <karl@hiramoto.org> wrote:
Mike Frysinger wrote:
On 5/20/07, Stephen C. Daukas <scd@daukas.com> wrote:
I'm wondering if anyone knows how many RS232 devices a "vanilla" Linux kernel can manage simultaneously.
there shouldnt be any real limit ... at work, we have ~24 USB<->RS232 devices hooked up and we use them all simultaneously to interact with some hardware
I'd like to be able to have up to 32 going at once, with data taken from each device written to its own file via the standard I/O subsystem. As far as I know, wouldn't Linux simply fork the appropriate number of driver threads to read as many RS232 ports as are attached with each device's stream written to a "/dev" file?
i'd be more worried about *what* the devices are and *how* you connect your 32 devices to the machine ... making sure linux has proper device driver support for it -mike
The *how* is the heart of my question... If you mean how physically, that's a matter of cable and such. The driver question is, again, what I was looking into. If Linux has support for multiple RS232s built in to one or more generic drivers in a given distro, then we are talking about terminal emulation - a.k.a. VT100 or ANSI or whatever. Currently, the lab uses hyperterminal to talk with the sondes - the sondes are intelligent and provide a tty-based menu for command and control. The devices are known, so the *what* isn't really an open question.
Yes, there should be no real limit.. At work i have use multile Edgeport/8 http://www.digi.com/products/usb/edgeport.jsp devices to have may rs-232 ports
How do the RS232 FIFO/Interrupts get managed via USB? In other words, each of the RS232s will need to have its "pin-outs" (DB-9) active so the sondes believe they are connected in order to avoid their "turning off". Also, is it safe to assume the edgeport has its own drivers? Regards, Steve
Stephen Daukas wrote:
On 5/21/07, *Karl Hiramoto* <karl@hiramoto.org <mailto:karl@hiramoto.org>> wrote:
Mike Frysinger wrote: > On 5/20/07, Stephen C. Daukas <scd@daukas.com <mailto:scd@daukas.com>> wrote: > >> I'm wondering if anyone knows how many RS232 devices a "vanilla" Linux >> kernel can manage simultaneously. >> > > there shouldnt be any real limit ... at work, we have ~24 USB<->RS232 > devices hooked up and we use them all simultaneously to interact with > some hardware > > >> I'd like to be able to have up to 32 >> going at once, with data taken from each device written to its own file via >> the standard I/O subsystem. As far as I know, wouldn't Linux simply fork >> the appropriate number of driver threads to read as many RS232 ports as are >> attached with each device's stream written to a "/dev" file? >> > > i'd be more worried about *what* the devices are and *how* you connect > your 32 devices to the machine ... making sure linux has proper device > driver support for it > -mike
The *how* is the heart of my question... If you mean how physically, that's a matter of cable and such. The driver question is, again, what I was looking into. If Linux has support for multiple RS232s built in to one or more generic drivers in a given distro, then we are talking about terminal emulation - a.k.a. VT100 or ANSI or whatever. Currently, the lab uses hyperterminal to talk with the sondes - the sondes are intelligent and provide a tty-based menu for command and control. The devices are known, so the *what* isn't really an open question.
> Yes, there should be no real limit.. At work i have use multile Edgeport/8 http://www.digi.com/products/usb/edgeport.jsp devices to have may rs-232 ports
How do the RS232 FIFO/Interrupts get managed via USB? In other words, each of the RS232s will need to have its "pin-outs" (DB-9) active so the sondes believe they are connected in order to avoid their "turning off". Also, is it safe to assume the edgeport has its own drivers?
Regards, Steve
Take a look at: /usr/src/linux/drivers/usb/serial/io_edgeport.c What do you mean by turning off Sondes? your sensors? Your sensors, may read the rs-232 flow control pins, If the port is open() then they probably won't turn off. What ever program you write will be a lot of string parsing to send and receive data. I believe it is the case with all the USB/Serial adapter drivers that the driver polls over USB the usb/serial converter device. -- karl.
On 5/21/07, Stephen Daukas <scd@daukas.com> wrote:
The *how* is the heart of my question... If you mean how physically, that's a matter of cable and such.
what sort of magic cable ... ive seen implementations where it's a pci card that hooks up in the back to some octopus monstrosity which is where the rs232 comes in ...
The driver question is, again, what I was looking into. If Linux has support for multiple RS232s built in to one or more generic drivers in a given distro, then we are talking about terminal emulation - a.k.a. VT100 or ANSI or whatever.
you're confusing things i think ... the kernel has drivers for different devices and that driver exports the multiple device nodes in /dev/ for userspace to utilize the important part is making sure a driver exists for your hardware in terms of other serial devices, there are no real limits in the tty layer
How do the RS232 FIFO/Interrupts get managed via USB? In other words, each of the RS232s will need to have its "pin-outs" (DB-9) active so the sondes believe they are connected in order to avoid their "turning off".
the driver worries about it ? userspace just sees a serial device in /dev/ for it to open/configure/write ... if you're interested in looking at the actual implementation, you should just read the device driver in the kernel source -mike
Stephen> I'm wondering if anyone knows how many RS232 devices a Stephen> "vanilla" Linux kernel can manage simultaneously. I'd like Stephen> to be able to have up to 32 going at once, with data taken Stephen> from each device written to its own file via the standard I/O Stephen> subsystem. Not a problem, Linux can handle bunches of serial devices. But, the question to me becomes which way is more efficient: 1) buying multiport serial cards such as Cyclades Z series, or 2) buying a Cyclades or Digi terminal server instead, which has the number of ports you need. Stephen> As far as I know, wouldn't Linux simply fork the appropriate Stephen> number of driver threads to read as many RS232 ports as are Stephen> attached with each device's stream written to a "/dev" file? There's two questions here to answer. First, Linux is good at supporting lots of devices on a system. Second, reading each device is really a per-process thing, or you could have a single process reading each port in turn. It's a totally seperate issue really. Stephen> Why do I want to do this? Glad you asked... Actually, I was asking until you wrote this. Thanks for the interesting details! Stephen> I'm investigating an issue at work that involves our Stephen> instrumentation lab having to upload/download/calibrate Stephen> multiple sondes and have them ready for field deployment the Stephen> next day. Currently, we can do three at a time and this Stephen> takes about 8-9 hours providing everything goes well. Ouch. That must be some involved work you need to do here. Stephen> The manufacturer's software application claims to supports Stephen> the simultaneous upload/config of up to 32 sondes. The Stephen> application will scan "installed" COM ports looking for Stephen> recognizable sondes, and present those found to the user. Yes Stephen> - this is a windows solution, so I first began looking for Stephen> products that would play with Windows... Ugh... run screamming! Stephen> I began looking for hardware solutions (PCI boards, break-out Stephen> boxes, etc.) on the net and I found a few that will provide Stephen> 16 DB-9 RS232 ports with full pin-out support as well as Stephen> so-called "true" interrupt and FIFO support on the host (via Stephen> their own custom Windows driver, no doubt). Why are you looking for this in particular? Do the sondes require XON/XOFF or full RTS/CTS flow control? If they have/require full hardware flow control, most high-end multiport boards should be just fine. As well as any of the multiport terminal servers. I'm particularly partial to the Digi CM32 model right now. I've heard darn good things about the Cyclades stuff as well. Stay away from the Legacy Avocent (who bought Cyclades...) serial port stuff, it's crap. Stephen> And then I started wondering about how to get all of this to Stephen> work in a Windows environment where "IT" is the only group Stephen> allowed to install software and otherwise configure a PC for Stephen> most users whose biggest concern is email... The horrors of windows application support. Stephen> All this got me thinking about avoiding the whole Windows Stephen> issue and instead thinking about using Linux to take care of Stephen> the RS232 part, with the newly created files moved to a Stephen> Windows box (sneakernet to start with), with the normal Stephen> post-processing of the data taking place as usual in the Stephen> Windows environment the staff is used to... Stephen> I'm hoping an "out of the box" distro will be able to handle Stephen> say 16 RS232 ports and that Linux-based terminal emulation Stephen> software is available to simultaneously handle those ports as Stephen> well so I can capture the data using the appropriate Stephen> protocols... Anyone know of a similar application using Stephen> RS232 and Linux, or have some thoughts on this? None of this is a problem. And in terms of handling the ports, I'd probably just write a perl or expect script to do the actually driving of the ports and the handling of the on-sonode menus to grab the data you want. Basically, you'd just have a script which takes a serial port as the input parameter and just drives the port as needed. For example, make sure the Perl Expect::Bundle is installed:
sudo perl -MCPAN -e 'install Bundle::Expect'
And then you should be able to open up a serial port connected to a Sonde and talk to it. It's really pretty easy, once you get over the humps. :] Good luck! John
On Mon, May 21, 2007 at 01:15:07PM -0400, John Stoffel wrote:
darn good things about the Cyclades stuff as well. Stay away from the Legacy Avocent (who bought Cyclades...) serial port stuff, it's crap.
Hmm I have to disagree here. We have the Avocent/Cyclades ACS line and are very happy with them. They run Linux inside and support many connection protocols, like Telnet, SSH, Reverse Telnet, Bidirectional, etc. Full RTS/CTS control lines including DTR are available. They support console logging to RAM, PCMCIA flash card, or remote syslog. Perhaps you are referring to their older Cyclades TS line.
Chuck> On Mon, May 21, 2007 at 01:15:07PM -0400, John Stoffel wrote:
darn good things about the Cyclades stuff as well. Stay away from the Legacy Avocent (who bought Cyclades...) serial port stuff, it's crap.
Chuck> Hmm I have to disagree here. We have the Avocent/Cyclades ACS line Chuck> and are very happy with them. They run Linux inside and support many Chuck> connection protocols, like Telnet, SSH, Reverse Telnet, Bidirectional, Chuck> etc. Full RTS/CTS control lines including DTR are available. They Chuck> support console logging to RAM, PCMCIA flash card, or remote syslog. Chuck> Perhaps you are referring to their older Cyclades TS line. I'm talking about the old Avocent designed CPS line of crap. You're talking about the Cyclades designed stuff, including the TS and the ACS. I've got an ancient Cyclom-Y ISA 8-port serial card in my main home computer and it's been working great for for years. Wish I could afford the newer stuff. John
participants (6)
-
Chuck Anderson
-
John Stoffel
-
Karl Hiramoto
-
Mike Frysinger
-
Stephen C. Daukas
-
Stephen Daukas