Install PCIe RS232 Card

Joined
Jul 20, 2014
Messages
22
I am trying to install a QNINE PCIe RS232(serial) card into my FreeNAS server, but it doesn't seem to be recognizing it. The manufacturer stated that it is supported. Anyone out there have experience getting a card like this installed in FreeNAS? I am not sure where to begin with providing troubleshooting details. If there are certain logs that would be helpful, please let me know and I will post them. Thanks in advance for your help!
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
It's likely the driver hasn't been included in the FreeNAS kernel. FreeNAS is an appliance and certain things (sound cards and other peripherals) have been stripped from the kernel.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'd be surprised if a serial port driver were missing, but I also can't imagine what you'd do with such a card. In any event, I'd expect the output of lspci to shed some light on the situation.
 
Joined
Jul 20, 2014
Messages
22
@danb35, here's the output from lspci..thanks for your help!

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 7 (rev c4)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation H77 Express Chipset LPC Controller (rev 04)
00:1f.0 ISA bridge: Intel Corporation 7 Series/C210 Series Chipset Family 4-port SATA Controller [IDE mode] (rev 04)
00:1f.0 ISA bridge: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
00:1f.0 ISA bridge: Intel Corporation 7 Series/C210 Series Chipset Family 2-port SATA Controller [IDE mode] (rev 04)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
04:00.0 IDE interface: Marvell Technology Group Ltd. 88SE9172 SATA III 6Gb/s RAID Controller (rev 11)
05:00.0 Serial controller: Device 1c00:3253 (rev 10)
 

rvassar

Guru
Joined
May 2, 2018
Messages
972
I'd be surprised if a serial port driver were missing, but I also can't imagine what you'd do with such a card. In any event, I'd expect the output of lspci to shed some light on the situation.

Oddly enough, serial consoles used to be the norm in Unix. Think of it as a precursor to IPMI. At Sun the machines defaulted to a serial console if they powered up without a keyboard attached. Without flow control, RS232 only needs three wires. Even into the late 90's, we'd buy terminal servers for the labs, and tie as many as 64 machines to one terminal server. You could then sit in your office and telnet to the TS and select the port for the host you wanted to work on, and could do pretty much everything, up to and including a Jumpstart OS install, and debug kernel crashes.

I can't imagine they'd strip this out of FreeNAS. But it's probably not configured in any useful way either.

There is a FreeBSD guide. But I can't say I've tried any of it. It would probably be a trivial weekend project to turn a Raspberry Pi into a terminal server.
 
Joined
Jul 20, 2014
Messages
22
If I log into the web administration site for FreeNAS, on the System>Advanced tab there is an option to 'Enable Serial Console' and it has a dropdown for ports, however there is only one listed (0x3f8). I would think if the serial card is detected correctly it would list the other com ports as well, but it doesn't. Is there something that I need to do to have this display?
 

rvassar

Guru
Joined
May 2, 2018
Messages
972
If I log into the web administration site for FreeNAS, on the System>Advanced tab there is an option to 'Enable Serial Console' and it has a dropdown for ports, however there is only one listed (0x3f8). I would think if the serial card is detected correctly it would list the other com ports as well, but it doesn't. Is there something that I need to do to have this display?

I had not seen that. Interesting! So you are after a serial console? I do see a serial controller listed in your lspci output.

So the "0x3f8" is the address of the NS8250 UART chip used by the original IBM PC, way back in 1981. 0x3f8 & Int 4 for COM1, and 0x2f8 & Int 3 for COM2. I seem to vaguely remember that this reverse assignment of interrupts led to the convention of the modem getting attached to COM2, as it had a better interrupt priority. Anyhow... The 8250 was later succeeded by the pin compatible 16450 which could run above 9600 baud, and the 16550 which included additional buffers & features that got us up to the v.92 56k baud era that many people first used to connect to the Internet. (I'm going to date myself, but trust me, the Internet was kind of a pain at 1200 baud...)

So by stating 0x3f8, the FreeNAS software is looking for a very specific set of chip registers, at a fixed address. I did a quick search for the QNINE PCIe RS232 expansion card, and it's difficult to find any technical information. It appears to use something called a WCH382 chipset, and it appears to require a software driver for virtually all Operating Systems. So I then ran over to the FreeBSD hardware support guide, here:

FreeBSD-11 Supported Hardware

I can find no support for the WCH382 chipset in section 3.7 Serial Interfaces. So unless it emulates the old 8250 hardware somehow, you are likely out of luck.
 

microserf

Dabbler
Joined
Dec 7, 2018
Messages
46
Joined
Jul 20, 2014
Messages
22
Is there a way to make this card work? Or is there a different PCIe card that would be compatible?

Also, thanks to everyone that had contributed to this thread, I really appreciate your assistance!
 

rvassar

Guru
Joined
May 2, 2018
Messages
972
It's a 16850 clone with 128 byte buffers, eight times the size of a 16550. I wish I didn't know that.

https://lore.kernel.org/patchwork/patch/657027/

No idea if it ever made it into FreeBSD.

I can't find it in the FreeNAS OS repo on Github.

Dang rich people. Fidonet for the win!

Rich nothing... I was a paperboy... I took the biggest route I could handle, to pay for my computer habit. I grew up in the East SF Bay, and North Star Computers ran a PDP-11 with BSD on a public dial up that was a local call to my parents house. When they went bankrupt, a bunch of their liquidated hardware ended up at Mike Quinn's Electronics at the Oakland Airport. Newegg, Amazon, Fry's, and even Adafruit make it easy... I had to learn to solder so I could learn to code! :cool:
 

rvassar

Guru
Joined
May 2, 2018
Messages
972
Is there a way to make this card work? Or is there a different PCIe card that would be compatible?

Also, thanks to everyone that had contributed to this thread, I really appreciate your assistance!

There is almost certainly a card that could be made to work. But the card you have does not appear to be supported. You might be able to port the driver in from Linux, but... You're kind of at the end of the pavement here, the path forward will be difficult. But you have enough information to make an attempt with one of the cards listed in the FreeBSD hardware link I posted.
 

rvassar

Guru
Joined
May 2, 2018
Messages
972
Would this card work? It seems comparable to the other SIIG cards listed. https://www.siig.com/it-products/serial-parallel/serial/pcie/dual-serial-port-rs-232-pcie-card.html


I am just looking for something that is PCIe 1x and either 1 or preferably 2 ports, both db9.

It says it works with Linux 2.6 and later, and uses a 16C550 UART, which is promising. The "C" likely means it's a CMOS / low power rework of the old 16550. Try and cross reference that with the FreeBSD hardware guide I linked earlier. But understand, I don't want to jump on it and say "Yea that will work", having never tried it myself. That wouldn't be fair to you.
 
Top