LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Determine if Linux will recognize serial ports. (https://www.linuxquestions.org/questions/linux-newbie-8/determine-if-linux-will-recognize-serial-ports-4175513778/)

jpollard 08-29-2014 06:21 PM

Quote:

Originally Posted by ferite (Post 5229311)
This is not good for me. I was needing both ports.

You can always ask the manufacturer how to get the second port. It is possible it is actually there, but disabled. As to whether it has a plug is a different matter.

ferite 08-29-2014 07:44 PM

@jpollard: I chated with an Intel support person, but it was not very helpful. I had hard time trying to explain him that a Serial Port is different to a USB port, and that there is not point in testing the device I want to connect to the port with other PC, if the ports on the Intel board themselves are not being recognized by the OS. However I tested Linux Lite NUC Edition that supposes to be aimed for the board, and I got on the list, 2 additional ports:

Code:

$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    1.263408] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[  56.517355] 80860F0A:00: ttyS4 at MMIO 0xd0757000 (irq = 39, base_baud = 2764800) is a 16550A
[  56.576911] 80860F0A:01: ttyS5 at MMIO 0xd075d000 (irq = 40, base_baud = 2764800) is a 16550A


frieza 08-29-2014 08:38 PM

glad to hear that
i have a Desktop unit with a serial port (Gigabyte GA-MA78GM motherboard) where the serial port is just a pin header not unlike this one to use the port you had to buy a ribbon with a db plug (the one gigabyte sold was a DB-9)
being the geek I was, i simply scrapped one from an old 486 PC ;)
either way, serial is one of the oldest components, so i would be rather surprised if it DIDN'T work

ferite 08-29-2014 08:44 PM

Quote:

Originally Posted by frieza (Post 5229565)
glad to hear that
i have a Desktop unit with a serial port (Gigabyte GA-MA78GM motherboard) where the serial port is just a pin header not unlike this one to use the port you had to buy a ribbon with a db plug (the one gigabyte sold was a DB-9)
being the geek I was, i simply scrapped one from an old 486 PC ;)
either way, serial is one of the oldest components, so i would be rather surprised if it DIDN'T work

Thanks @frieza. Now, I just have to figure out why Linux Lite recognize the ports, and other distros doesn't. :(

frieza 08-29-2014 08:57 PM

hmm, well i guess the answer really is the distro, but more importantly the kernel build used as the base of the distro, you may have to see what module is being used and try 'modprobing' it on the other distros or building your own kernel for the device.

jpollard 08-29-2014 09:44 PM

You can try doing a "diff" between the configuration files between the two kernels.

It sounds like a specific driver may be needed... or at a minimum, specifying the mmio option (and addresses) to the kernel boot.

ferrari 08-29-2014 11:10 PM

Using Linux Lite, observe the output from
Code:

/sbin/lspci -nnk
Look for the output corresponding with the serial hardware. That should reveal the kernel driver supporting the serial chipset.

ferrari 08-29-2014 11:59 PM

Looking at the output you provided...

Code:

$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    1.263408] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[  56.517355] 80860F0A:00: ttyS4 at MMIO 0xd0757000 (irq = 39, base_baud = 2764800) is a 16550A
[  56.576911] 80860F0A:01: ttyS5 at MMIO 0xd075d000 (irq = 40, base_baud = 2764800) is a 16550A

I'm not so sure that the ttys4 and ttyS5 devices pertain to serial ports that you have physical access to. My guess is that they may be used for (internal) i2C bus communication or similar (eg for temperature sensors, fan controllers, or some other purpose). Genuine serial (RS-232C) ports more typically get reported as ttyS0 was in the output.

FWIW, when I actually have to connect to devices (usually network equipment) via a serial console, I use a USB-serial adapter (and various serial cables,adapters to suit the equipment concerned). Mine is a Prolific Technology device (supported by the pl2303 driver). If you really do need serial interface connectivity, I recommend using these devices instead.

jefro 08-30-2014 04:45 PM

I'd still think the nuc has two serial ports available. In actual use a single com port really does have two serial ports in it. I've never seen the second one used, ever.


I'd think tty (x) as long as it's on a 16550a chip is a serial (or in some sense could be parallel.) Actually parallel can be turned into serial and used that way.

ferite 09-04-2014 07:47 PM

Hi.

It seems that only newer kernels support the serial ports. Finally I tested the ports on Lubuntu 14.04:

Code:

$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[  10.314539] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[  10.317713] 0000:00:1e.3: ttyS4 at MMIO 0xd0720000 (irq = 19, base_baud = 2764800) is a 16550A
[  10.318140] 0000:00:1e.4: ttyS5 at MMIO 0xd071e000 (irq = 19, base_baud = 2764800) is a 16550A
[  41.035429] ttyS4 - failed to request DMA
[  41.035912] ttyS5 - failed to request DMA

I downloaded Cutecom and made loop tests. Finally the "real" ports were ttyS4 and ttyS5. And they seem to work well. However what let me with some doubt is the message "failed to request DMA" when "dmesg" is executed. Don't know exactly what does that mean.

jefro 09-04-2014 08:24 PM

Wonder if it ever had dma access to dma controller?


All times are GMT -5. The time now is 07:41 PM.