Detect More Than Four Serial Ports in Linux Desktop

Updated Jan 18, 2022

Reported In

Driver

  • NI-Serial

Other

  • RHEL 6
  • RHEL 7
  • CentOS 7

Issue Details

After installing NI-Serial driver for Linux Desktop, I am only able to detect four serial ports.

Solution

NI-Serial driver leverages the 8250 driver for serial ports in Linux System. The CONFIG_SERIAL_8250_NR_UARTS parameter in the configuration kernel file defines the maximum number of serial ports handled by the kernel.

To detect more than four serial ports, do the following:

  1. Edit /etc/default/grub and add 8250.nr_uarts=<number of ports> to the line starting GRUB_CMDLINE_LINUX=... You can use VI Text Editor if you are not familiar with text editing in Linux.
  2. Rebuild the grub.cfg file by running the grub2-mkconfig -o command as root for different machine:
MachinesCommands
BIOS-basedgrub2-mkconfig -o /boot/grub2/grub.cfg
UEFI-basedgrub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
CentOSgrub2-mkconfig -o /boot/grub2/grub.cfg
RHELgrub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

      3. Reboot

Additional Information

NI Linux Real Time are pre-configured with correct setting for serial ports and do not require this workaround.