DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th September 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Thanked 7 Times in 7 Posts
Default Setting up a multi-card serial server

Just about everything in my data center has COM port access to one degree or another and I want to build a serial server to allow me access through a universal portal. I've got a PC dedicated to this purpose running FreeBSD 7-STABLE, and I've got 4 PCI cards with 2 COM ports each that use the Moschip 9835 chipset.

I've been looking for examples of something like this online for a couple days with no real luck and was interested in knowing if anyone's already accomplished this and/or if anyone can point me in the right direction.

Edit: I'm interested in the area of serial console redirection

Last edited by dk_netsvil; 25th September 2008 at 06:35 PM.
Reply With Quote
  #2   (View Single Post)  
Old 25th September 2008
Darwimy Darwimy is offline
Port Guard
 
Join Date: Jun 2008
Location: Germany
Posts: 36
Thanked 2 Times in 2 Posts
Default

What exactly is your problem? If the ports are seen by BSD then I would just connect to the server using SSH and then use 'tip com1' or similar.
Reply With Quote
  #3   (View Single Post)  
Old 25th September 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Thanked 7 Times in 7 Posts
Default

My goal is to have users login to this serial gateway and be automatically redirected to the COM port on which their device is physically attached.
Reply With Quote
  #4   (View Single Post)  
Old 2nd October 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Thanked 35 Times in 31 Posts
Default

I have attempted something similiar in OpenBSD (I want a number of switches and routers accessible via console), with 4.2. I have had problems.

I've been able to get the four-port serial card (mos 9835 like yours if I'm not mistaken) recognized and I get a grand total of ONE of those four ports to work.
I don't know if the system is finding confusion because they all answer on the same IRQ, or what.

I am going to test out the same card on 4.3 and 4.4 (when it comes out), so I'll try to remember to post back here when I do my testing.

Here's the portion of my OBSD 4.2 dmesg- it sees them all, so why can I only hit the first one!?!?!

Code:
puc0 at pci0 dev 14 function 0 "NetMos 4S" rev 0x01: ports: 4 com
pccom3 at puc0 port 0 irq 5: ns16550a, 16 byte fifo
pccom4 at puc0 port 1 irq 5: ns16550a, 16 byte fifo
pccom5 at puc0 port 2 irq 5: ns16550a, 16 byte fifo
pccom6 at puc0 port 3 irq 5: ns16550a, 16 byte fifo
__________________
Network Firefighter
Reply With Quote
  #5   (View Single Post)  
Old 2nd October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

I don't know what you mean by "hit", but there have been lots of changes since 4.2, i.e: in 4.4 pccom(4) was discontinued and com(4) is now used.
Reply With Quote
  #6   (View Single Post)  
Old 2nd October 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Thanked 35 Times in 31 Posts
Default

You don't know what I mean by "hit", eh? I'll let you take a wild guess
__________________
Network Firefighter
Reply With Quote
  #7   (View Single Post)  
Old 2nd October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Quote:
Originally Posted by ai-danno View Post
You don't know what I mean by "hit", eh? I'll let you take a wild guess
Tech abuse should be a crime...
Reply With Quote
  #8   (View Single Post)  
Old 3rd October 2008
darkmark darkmark is offline
-current abuser
 
Join Date: Oct 2008
Posts: 5
Thanked 2 Times in 2 Posts
Default

On freebsd you can run a very reliable console server using :

conserver-com-8.1.16|/usr/ports/comms/conserver-com|/usr/local|Application that allows multiple users to watch serial consoles|/usr/ports/comms/conserver-com/pkg-descr|kuriyama@FreeBSD.org|comms|||http://www.conserver.com/|||

(ports INDEX line)

I ran two 8 port pci cards on one machine that were supported under the puc driver. In many ways it was way better than some of the commercial solutions.
__________________
darkmark
(!wired)?(coffee++):(wired);
Reply With Quote
  #9   (View Single Post)  
Old 3rd October 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Thanked 7 Times in 7 Posts
Default

I may give that a shot - for the time being I'm struggling to overcome the same issue ai-danno describes: only one port is functional and the others are inert. When I replace my quad-port cards with single-port cards I have no problems.
Reply With Quote
Old 3rd October 2008
darkmark darkmark is offline
-current abuser
 
Join Date: Oct 2008
Posts: 5
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by dk_netsvil View Post
I may give that a shot - for the time being I'm struggling to overcome the same issue ai-danno describes: only one port is functional and the others are inert. When I replace my quad-port cards with single-port cards I have no problems.
All the serial devices on the card probe at startup then, i.e. you see them during kernel boot?

FreeBSD would occasionally have the problem since many of the multi-port cards share an interrupt and the puc driver wasn't mapping the devices properly, and only one port would show up. Sometimes it would just require the correct modification to pucdata.c to get it to work.
__________________
darkmark
(!wired)?(coffee++):(wired);
Reply With Quote
Old 4th October 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Thanked 35 Times in 31 Posts
Default

That's the problem I'm having... all recognized on the same interrupt, but only one seems to map.

As I stated previously, I'd get back when I had tried it on 4.3 ... and the same thing happens on 4.3.

Thanks for the heads up on conserver- it got me to check OBSD packages for such a beast, and in fact, it exists- so I'll be installing that on the 4.3 box and will let you know how it goes.

The thing that gets me... and maybe it's due to ignorance on my part (probably) is that there isn't some easy-to-find device mapping that tells you what the filename handles the devices from the dmesg (save the NICs, they show that just fine) are actually mapped to. So if pccom1 through pccom4 (and yes, since it's 4.3 it's not been switched to comx yet) show up in the dmesg, how can I be sure which cuaxx each one is actually mapped to?
__________________
Network Firefighter
Reply With Quote
Old 4th October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

COM1 == {pccom,com}0 == /dev/{tty,cua}00
COM2 == {pccom,com}1 == /dev/{tty,cua}01
COM3 == {pccom,com}2 == /dev/{tty,cua}02

Pretty simple stuff.. it's documented in both pccom(4), and com(4).

I can't comment on your problems with puc(4) devices, but.. it might be worth sending a bug report.. complaining about a bug isn't as effective as reporting it. (And testing the LATEST version of the code base..).

They're preforming an audit of all old bug reports as we speak, so.. they're definitely paying close attention to bug reports.. send one, volunteer either time or a card.

http://www.openbsd.org/report.html
http://marc.info/?l=openbsd-bugs
Reply With Quote
Old 4th October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Quote:
Originally Posted by ai-danno View Post
I don't know if the system is finding confusion because they all answer on the same IRQ, or what.
PCI devices can share interrupts, not the problem.. but if you really think there are interrupt routing problems, try switching between apm+pcibios to ACPI. (or vice versa..)

http://en.wikipedia.org/wiki/Periphe...ect#Interrupts

Also, consider booting the GENERIC.MP kernel and doing the same thing.. it includes ioapic(4) support and will work fine (perhaps even better) even on UP systems.
Reply With Quote
Old 4th October 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Thanked 35 Times in 31 Posts
Default

Quote:
Originally Posted by BSDfan666 View Post
Pretty simple stuff.. it's documented in both pccom(4), and com(4).

That's not true... what you replied with was nice, but that's not what is on those two man pages, which actually don't have a mapping of each of the ports. Also,we're talking about the ports on the serial card itself, not the ones included with the mobo, which neither you nor OBSD seems to list. I'm not 'complaining' about OBSD, just stating a problem I'm running into with it.
__________________
Network Firefighter
Reply With Quote
Old 4th October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

I'm aware you were talking about PCI serial ports, my point is the driver and framework is the same.. the pccom/com(4) frameworks are used regardless of the attach point, so either com at isa? or com at puc? it doesn't matter.

If you look at pccom/com(4) you'll notice at the top that the first 4 numbers [0-3] are reserved for serial ports on the mainboard.. so counting starts at 4, the numbering is 1/1 with the device nodes.. so /dev/{tty,cua}04 would be pccom4/com4.

(An architecture can only use either the com(4) framework or the pccom(4) framework, not both.)

That's my rant for the day..
Reply With Quote
Reply

Tags
serial console

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up the serial console PeterSteele FreeBSD General 6 3rd November 2008 04:42 PM
Multi-boot system with Mac aleunix Other BSD and UNIX/UNIX-like 3 13th June 2008 12:16 AM
NIS in a multi-system universe? jimbus FreeBSD General 3 30th May 2008 03:57 AM
Looking to multi boot Fedora. CentOS and BSD FloridaBSD Off-Topic 4 19th May 2008 11:20 PM
setting up a proxy server in OpenBSD 4.3 jrake OpenBSD General 1 14th May 2008 06:43 PM


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick