SOLVED How to get FreeNAS to recognize/use a serial card.

Status
Not open for further replies.

NASbox

Guru
Joined
May 8, 2012
Messages
650
I have a serial card that is recognized by FreeBSD, but I am having difficulty getting FreeNAS to work with it.

The only option on the Serial Port Pulldown on the System/Advanced Tab of the web GUI is 0x2F8. If I recall correctly that corresponds to COM2: I/O port 0x2F8. From what I can see, my serial card uses irq17 and different addresses. Here is the information I have so far:

From dmesg
Code:
pci7: <ACPI PCI bus> on pcib7
uart2: <Lava Computer mfg DSerial-PCI Port A> port 0xb090-0xb097 irq 17 at device 0.0 on pci7
uart3: <Lava Computer mfg DSerial-PCI Port B> port 0xb080-0xb087 irq 17 at device 0.1 on pci7


From dmesg
Code:
pci7: <ACPI PCI bus> on pcib7
uart2: <Lava Computer mfg DSerial-PCI Port A> port 0xb090-0xb097 irq 17 at device 0.0 on pci7
uart3: <Lava Computer mfg DSerial-PCI Port B> port 0xb080-0xb087 irq 17 at device 0.1 on pci7


From lspci -vv
Code:
07:00.0 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port A (prog-if 02 [16550])
		Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
		Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
		Interrupt: pin A routed to IRQ 17
		Region 0: I/O ports at b090

07:00.1 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port B (prog-if 02 [16550])
		Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
		Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
		Interrupt: pin A routed to IRQ 17
		Region 0: I/O ports at b080



From pciconf -lbcevV pci0:7:0:0
Code:
uart2@pci0:7:0:0:	   class=0x070002 card=0x00000000 chip=0x01101407 rev=0x00 hdr=0x00
	vendor	 = 'Lava Computer mfg Inc'
	device	 = 'Lava DSerial-PCI Port A'
	class	  = simple comms
	subclass   = UART
	bar   [10] = type I/O Port, range 32, base 0xb090, size 8, enabled


From pciconf -lbcevV pci0:7:0:1
Code:
uart3@pci0:7:0:1:	   class=0x070002 card=0x00000000 chip=0x01111407 rev=0x00 hdr=0x00
	vendor	 = 'Lava Computer mfg Inc'
	device	 = 'Lava DSerial-PCI Port B'
	class	  = simple comms
	subclass   = UART
	bar   [10] = type I/O Port, range 32, base 0xb080, size 8, enabled


Any assistance/suggestions as to how I might get this card working as a console (ideally to mirror what is on the physical console) would be much appreciated.
 
Last edited by a moderator:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You just choose a port (and serial settings like baud rate). That's it. Use a null modem cable to connect it to the other end.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
You just choose a port (and serial settings like baud rate). That's it. Use a null modem cable to connect it to the other end.

Null modem cable - no problem, but how do I chose the serial port?

The serial port address drop down isn't getting populated with the new addresses. My serial ports are on a PCI card that uses 0xb090-0xb097 & 0xb080-0xb087with irq17 shared and the only selection I see on FreeNAS is 0x2F8 which I believe in standard configuration is Com2/irq3. (I think 0x2F8 is hard coded in the GUI, because the port doesn't seem to exist-no sign of it in dmesg.) Any commands I should use to probe?

This board has a ton of USB2/USB3 ports, but I don't see any legacy COM serial ports on the motherboard - Gigabyte GA-Z77X-UD5H (rev. 1.1), and the manual makes no mention of them, and I don't see any bios settings regarding either LPT/COM ports.

Is there a config file I need to change? If you need more info, let me know, and I'll post it. (FYI FreeNAS v11U4)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
That's weird. On my servers, the GUI shows all enabled serial ports.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
It could be that the detection software is not written to expect unusual addresses or IRQs. This might be worth a bug report.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
That's weird. On my servers, the GUI shows all enabled serial ports.
What serial ports do you have? Just the standard COM1/COM2?

It could be that the detection software is not written to expect unusual addresses or IRQs. This might be worth a bug report.
Pardon my noobishness, but how do we do that?

Are the interrupts hard wired? Is there any way of messing with a config file to work around this situation?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What serial ports do you have? Just the standard COM1/COM2?
Actually, you raise an interesting question. I know the physical ports are driven by a Nuvoton or similar jack-of-all-trades chip that integrates super I/O, fan control and some other stuff. But the BMC has access to the serial ports for Serial over LAN, so I'd design the system so that the BMC emulates the serial ports for the host and then just pipes that to the Nuvoton chip driving the port. But it's also possible that the BMC is just sniffing the line while the Nuvoton chip is attached directly to the host. I'll have to look at a block diagram.

Not that this really helps you. Your best bet might be to file a bug report. The link is at the top of the page.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Hmm, I might have been mixing up my motherboards.

I checked the X11SSM-F manual and the serial ports are indeed controlled by the BMC, but I think they're connected directly to a TI RS-232 driver. Which makes sense.

As for addresses and IRQs, I'd have to check, but they're Supermicro defaults.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Pardon my noobishness, but how do we do that?
Best way to file a bug report is from the web GUI of your FreeNAS installation, using the Support button. That will make it easy to attach a debug file, which can be useful to the devs in figuring out what's going on.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
I need a bit of coaching to file this bug report. I've got as far as registering an account, but I'm not sure which of the predefined categories that it fits into, and I need a bit of guidance as to how to describe the issue so that it fits the standards for the bug reporting system.

I'm thinking that the conversational style of the first post of this thread won't cut it there, but I'm not sure how to describe the issue.

I'm also not sure how to create the "debug file" referred to by danb35 and if it is appropriate for this issue.

Guidance please. Thanks in advance.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'm also not sure how to create the "debug file" referred to by danb35
When you submit the bug through the web GUI, there's a checkbox marked "attach debug info". It's checked by default. Leave it that way.
how to describe the issue so that it fits the standards for the bug reporting system.
I'm not aware that there are "standards for the bug reporting system" other than to explain as clearly as possible what you're seeing, and why it isn't consistent with what you're expecting to see. I'd think what you wrote in the first post would be fine.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
It could be that the detection software is not written to expect unusual addresses or IRQs. This might be worth a bug report.
Are the interrupts hard wired? Is there any way of messing with a config file to work around this situation?

I don't know. I'm thinking that the GUI software just might not see it. Does it create the standard /dev/cu* devices?

Wait... this is that same Lava dual-port serial card?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I understand it is the one you traded for the non-functional one.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
I don't know. I'm thinking that the GUI software just might not see it. Does it create the standard /dev/cu* devices?

Wait... this is that same Lava dual-port serial card?

I understand it is the one you traded for the non-functional one.

The card in question is the Lava DSerial card that wblock kindly offered to exchange for my older Lava card (that wasn't recognized by FreeBSD but was recognized/functioned in linux-can't remember which version, it was some liveCD/USB that I had lying around).

The newer version of the card does create devices:
Code:
freenas# ls -la /dev/cu*
crw-rw----  1 uucp  dialer  0x3a Oct 24 19:01 /dev/cuau2
crw-rw----  1 uucp  dialer  0x3b Oct 24 19:01 /dev/cuau2.init
crw-rw----  1 uucp  dialer  0x3c Oct 24 19:01 /dev/cuau2.lock
crw-rw----  1 uucp  dialer  0x40 Oct 24 19:01 /dev/cuau3
crw-rw----  1 uucp  dialer  0x41 Oct 24 19:01 /dev/cuau3.init
crw-rw----  1 uucp  dialer  0x42 Oct 24 19:01 /dev/cuau3.lock


FYI here are the Interrupt/ I/Omemory memory addresses
Code:
freenas# devinfo -u
Interrupt request lines:
	0x0 (attimer0)
	0x1 (atkbd0)
	0x3-0x7 (root0)
	0x8 (atrtc0)
	0x9 (acpi0)
	0xa-0xf (root0)
	0x10 (ehci0)
	0x11 (uart3)
	0x11 (uart2)
	0x12 (fwohci0)
	0x13-0x16 (root0)
	0x17 (ehci1)
	0x100 (hpet0)
	0x101 (hpet0)
	0x102 (hpet0)
	0x103 (hpet0)
	0x104 (hpet0)
	0x105 (hpet0)
	0x106 (hpet0)
	0x107 (hpet0)
	0x108 (mps0)
	0x109 (em0)
	0x10a (em1)
	0x10b (xhci0)
	0x10c (em2)
	0x10d (ahci0)
	0x10e (alc0)
	0x10f (ahci1)
	0x110 (ahci2)
DMA request lines:
	0-3 (root0)
	4 (atdma0)
	5-7 (root0)
I/O ports:
	0x0-0xf (root0)
	0x10-0x1f (acpi0)
	0x20-0x21 ----
	0x22-0x3f (acpi0)
	0x40-0x43 (attimer0)
	0x44-0x5f (acpi0)
	0x60 (atkbdc0)
	0x61 (acpi0)
	0x62-0x63 (acpi0)
	0x64 (atkbdc0)
	0x65-0x6f (acpi0)
	0x70 (acpi0)
	0x71 (root0)
	0x72-0x7f (acpi0)
	0x80 (acpi0)
	0x81-0x83 (root0)
	0x84-0x86 (acpi0)
	0x87 (root0)
	0x88 (acpi0)
	0x89-0x8b (root0)
	0x8c-0x8e (acpi0)
	0x8f (root0)
	0x90-0x9f (acpi0)
	0xa0-0xa1 ----
	0xa2-0xbf (acpi0)
	0xc0-0xdf (atdma0)
	0xe0-0xef (acpi0)
	0xf0-0xff (fpupnp0)
	0x100-0x1ff (root0)
	0x200-0x20f (acpi0)
	0x210-0x3ff (root0)
	0x400-0x453 (acpi0)
	0x454-0x457 (acpi0)
	0x458-0x47f (acpi0)
	0x480-0x4cf (root0)
	0x4d0-0x4d1 (acpi0)
	0x4d2-0x4ff (root0)
	0x500-0x57f (acpi0)
	0x580-0x67f (root0)
	0x680-0x69f (acpi0)
	0x6a0-0x9ff (root0)
	0xa00-0xa0f (acpi0)
	0xa10-0xa1f (root0)
	0xa20-0xa2f (acpi0)
	0xa30-0xa3f (acpi0)
	0xa40-0xcf7 (root0)
	0xcf8-0xcff (pcib0)
	0xd00-0x8fff (root0)
	0x9000-0x9fff (pcib9)
	0xa000-0xafff (pcib8)
	0xb000-0xbfff (pcib6)
	0xc000-0xcfff (pcib5)
	0xd000-0xdfff (pcib3)
	0xe000-0xefff (pcib2)
	0xf000-0xf03f (vgapci0)
	0xf040-0xf05f ----
	0xf060-0xf07f (ahci2)
	0xf080-0xf09f (em2)
	0xf0a0-0xf0a3 (ahci2)
	0xf0a4-0xf0af (root0)
	0xf0b0-0xf0b7 (ahci2)
	0xf0b8-0xf0bf (root0)
	0xf0c0-0xf0c3 (ahci2)
	0xf0c4-0xf0cf (root0)
	0xf0d0-0xf0d7 (ahci2)
	0xf0d8-0xfffe (root0)
	0xffff (acpi0)
I/O memory addresses:
	0x0-0x9c3ff (ram0)
	0x9c400-0x9ffff (root0)
	0xa0000-0xaffff (vtvga0)
	0xb0000-0xfffff (root0)
	0x100000-0x1fffffff (ram0)
	0x20000000-0x201fffff (acpi0)
	0x20200000-0x40003fff (ram0)
	0x40004000-0x40004fff (acpi0)
	0x40005000-0xd5436fff (ram0)
	0xd5437000-0xd6265fff (root0)
	0xd6266000-0xd6266fff (ram0)
	0xd6267000-0xd62a9fff (root0)
	0xd62aa000-0xd6c6bfff (ram0)
	0xd6c6c000-0xd6fd6fff (root0)
	0xd6fd7000-0xd6ffffff (ram0)
	0xd7000000-0xdf9fffff (root0)
	0xdfa00000-0xdfa00fff (acpi0)
	0xdfa01000-0xdfffffff (root0)
	0xe0000000-0xefffffff (vgapci0)
	0xf0000000-0xf73fffff (root0)
	0xf7400000-0xf77fffff (vgapci0)
	0xf7800000-0xf78fffff (pcib9)
	0xf7900000-0xf79fffff (pcib8)
	0xf7a00000-0xf7afffff (pcib6)
	0xf7b00000-0xf7bfffff (pcib5)
	0xf7c00000-0xf7cfffff (pcib3)
	0xf7d00000-0xf7dfffff (pcib2)
	0xf7e00000-0xf7e1ffff (em2)
	0xf7e20000-0xf7e2ffff (xhci0)
	0xf7e30000-0xf7e33fff ----
	0xf7e34000-0xf7e34fff (root0)
	0xf7e35000-0xf7e350ff ----
	0xf7e35100-0xf7e35fff (root0)
	0xf7e36000-0xf7e367ff (ahci2)
	0xf7e36800-0xf7e36fff (root0)
	0xf7e37000-0xf7e373ff (ehci1)
	0xf7e37400-0xf7e37fff (root0)
	0xf7e38000-0xf7e383ff (ehci0)
	0xf7e38400-0xf7e38fff (root0)
	0xf7e39000-0xf7e39fff (em2)
	0xf7e3a000-0xf7e3afff (root0)
	0xf7e3b000-0xf7e3b00f ----
	0xf7e3b010-0xf7ffffff (root0)
	0xf8000000-0xfbffffff (acpi0)
	0xfc000000-0xfebfffff (root0)
	0xfec00000-0xfec0001f (apic0)
	0xfec00020-0xfecfffff (root0)
	0xfed00000-0xfed003ff (hpet0)
	0xfed00400-0xfed0ffff (root0)
	0xfed10000-0xfed17fff (acpi0)
	0xfed18000-0xfed18fff (acpi0)
	0xfed19000-0xfed19fff (acpi0)
	0xfed1a000-0xfed1bfff (root0)
	0xfed1c000-0xfed1ffff (acpi0)
	0xfed20000-0xfed3ffff (acpi0)
	0xfed40000-0xfed44fff (acpi0)
	0xfed45000-0xfed8ffff (acpi0)
	0xfed90000-0xfed93fff (acpi0)
	0xfed94000-0xfedfffff (root0)
	0xfee00000-0xfeefffff (acpi0)
	0xfef00000-0xfeffffff (root0)
	0xff000000-0xffffffff (acpi0)
	0x100000000-0x81f5fffff (ram0)
	0x81f600000-0xffffffffffffffff (root0)
ACPI I/O ports:
	0x10-0x1f (root0)
	0x22-0x3f (root0)
	0x44-0x5f (root0)
	0x61-0x63 (root0)
	0x65-0x70 (root0)
	0x72-0x7f (root0)
	0x80 (root0)
	0x84-0x86 (root0)
	0x88 (root0)
	0x8c-0x8e (root0)
	0x90-0x9f (root0)
	0xa2-0xbf (root0)
	0xe0-0xef (root0)
	0x200-0x20f (root0)
	0x400-0x407 (root0)
	0x408-0x40b (acpi_timer0)
	0x40c-0x47f (root0)
	0x4d0-0x4d1 (root0)
	0x500-0x57f (root0)
	0x680-0x69f (root0)
	0xa00-0xa0f (root0)
	0xa20-0xa2f (root0)
	0xa30-0xa3f (root0)
	0xffff (root0)
ACPI I/O memory addresses:
	0x20000000-0x201fffff (root0)
	0x40004000-0x40004fff (root0)
	0xdfa00000-0xdfa00fff (root0)
	0xf8000000-0xfbffffff (root0)
	0xfed10000-0xfed19fff (root0)
	0xfed1c000-0xfed93fff (root0)
	0xfee00000-0xfeefffff (root0)
	0xff000000-0xffffffff (root0)
PCI domain 0 bus numbers:
	0 (pci0)
	1 (pcib1)
	2 (pcib2)
	3 (pcib3)
	4 (pcib4)
	5 (pcib5)
	6-7 (pcib6)
	8 (pcib8)
	9 (pcib9)
	10-255 (root0)
pcib1 bus numbers:
	1 (pci1)
pcib1 I/O port window:
pcib1 memory window:
pcib1 prefetch window:
pcib2 bus numbers:
	2 (pci2)
pcib2 I/O port window:
	0xe000-0xe0ff (mps0)
	0xe100-0xefff (root0)
pcib2 memory window:
	0xf7d00000-0xf7d7ffff (root0)
	0xf7d80000-0xf7dbffff (mps0)
	0xf7dc0000-0xf7dc3fff (mps0)
	0xf7dc4000-0xf7dfffff (root0)
pcib2 prefetch window:
pcib3 bus numbers:
	3 (pci3)
pcib3 I/O port window:
	0xd000-0xd01f (em1)
	0xd020-0xd03f (em0)
	0xd040-0xdfff (root0)
pcib3 memory window:
	0xf7c00000-0xf7c1ffff (em1)
	0xf7c20000-0xf7c3ffff (em1)
	0xf7c40000-0xf7c5ffff (em0)
	0xf7c60000-0xf7c7ffff (em0)
	0xf7c80000-0xf7cfffff (root0)
pcib3 prefetch window:
pcib4 bus numbers:
	4 (pci4)
pcib4 I/O port window:
pcib4 memory window:
pcib4 prefetch window:
pcib5 bus numbers:
	5 (pci5)
pcib5 I/O port window:
	0xc000-0xc00f (ahci0)
	0xc010-0xc013 (ahci0)
	0xc014-0xc01f (root0)
	0xc020-0xc027 (ahci0)
	0xc028-0xc02f (root0)
	0xc030-0xc033 (ahci0)
	0xc034-0xc03f (root0)
	0xc040-0xc047 (ahci0)
	0xc048-0xcfff (root0)
pcib5 memory window:
	0xf7b00000-0xf7b0ffff (root0)
	0xf7b10000-0xf7b101ff (ahci0)
	0xf7b10200-0xf7bfffff (root0)
pcib5 prefetch window:
I/O memory addresses:
	4155572224-4155572479 (root0)
	4155572480-4155572607 (ahcich0)
	4155572608-4155572735 (ahcich1)
pcib6 bus numbers:
	6 (pci6)
	7 (pcib7)
pcib6 I/O port window:
	0xb000-0xbfff (pcib7)
pcib6 memory window:
	0xf7a00000-0xf7afffff (pcib7)
pcib6 prefetch window:
pcib7 bus numbers:
	7 (pci7)
pcib7 I/O port window:
	0xb000-0xb07f (fwohci0)
	0xb080-0xb087 (uart3)
	0xb088-0xb08f (root0)
	0xb090-0xb097 (uart2)
	0xb098-0xbfff (root0)
pcib7 memory window:
	0xf7a00000-0xf7a007ff (fwohci0)
	0xf7a00800-0xf7afffff (root0)
pcib7 prefetch window:
pcib8 bus numbers:
	8 (pci8)
pcib8 I/O port window:
	0xa000-0xa07f (alc0)
	0xa080-0xafff (root0)
pcib8 memory window:
	0xf7900000-0xf793ffff (alc0)
	0xf7940000-0xf79fffff (root0)
pcib8 prefetch window:
pcib9 bus numbers:
	9 (pci9)
pcib9 I/O port window:
	0x9000-0x900f (ahci1)
	0x9010-0x9013 (ahci1)
	0x9014-0x901f (root0)
	0x9020-0x9027 (ahci1)
	0x9028-0x902f (root0)
	0x9030-0x9033 (ahci1)
	0x9034-0x903f (root0)
	0x9040-0x9047 (ahci1)
	0x9048-0x9fff (root0)
pcib9 memory window:
	0xf7800000-0xf780ffff (root0)
	0xf7810000-0xf78101ff (ahci1)
	0xf7810200-0xf78fffff (root0)
pcib9 prefetch window:
I/O memory addresses:
	4152426496-4152426751 (root0)
	4152426752-4152426879 (ahcich2)
	4152426880-4152427007 (ahcich3)
I/O memory addresses:
	0xf7e36000-0xf7e360ff (root0)
	0xf7e36100-0xf7e3617f (ahcich4)
	0xf7e36180-0xf7e361ff (ahcich5)
	0xf7e36200-0xf7e367ff (root0)
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Sorry for the very nooby question, but this is the first time I've had any exposure to anything less than stable releases.

How do I go about testing this? ( https://bugs.freenas.org/issues/26357 ) i.e. Where do I get the update from?

I have an SSD ZFS boot drive, would it be possible to update (and roll back if necessary)?

How great a risk would I be taking - how close is the test image to release?

If there is ever a time for me to get experience rolling back an update, I'm in the best place to do that now.

Comments? (FYI I'm provisionally running v11.0U4, but I haven't upgraded my pools from v8.3.1)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I have an SSD ZFS boot drive, would it be possible to update (and roll back if necessary)?
You could, but you probably want to disconnect your pool, since you don't need it to test this.

How great a risk would I be taking - how close is the test image to release?
It's Beta. It's not particularly likely to eat your data, especially if you don't really touch your data, but you never know. How close is it? A couple of weeks, depends on the flow of bug reports.

What I'd suggest is to disconnect all drives and try it out with a USB flash drive.
Where do I get the update from?
On an existing installation, switch trains to Prerelease. Otherwise, download it from https://download.freenas.org/ - specifically, https://download.freenas.org/11/BETA1/x64/
 
Status
Not open for further replies.
Top