Detect More Than Four Serial Ports in Linux Desktop

Updated May 25, 2023

Reported In


  • NI-Serial

Operating System

  • Linux
  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

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


This limit is coming from the implementation of the NI-Serial driver being on top of the native Linux driver.

NI-Serial driver until version 21.3 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:
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

NI-Serial driver version 21.5 and newer do not rely on the 8250 driver for 843x-series hardware, and therefore can address more ports than configured in the kernel parameters.

Additional Information

The kernel for NI Linux Real Time is pre-configured to allow up to 32 serial ports, when being used with NI-Serial 20.0 or earlier. The switch away from the 8250 driver as base for NI-Serial was already with NI-Serial 21.3 on NI LInux RT. So, if you need more than 32 serial ports based on 843x in Linux RT, update your NI Linux RT System Image to version  21.3 or newer.