Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Installation of Linux Driver for NI PCIe 8431/16 Serial Interface

Hi all

 

I am quite confused over the instruction given in NI website. Hope someone could give me a verification and guidance for the instruction given. I have an offline PC which houses this card and I do not have internet access at the site where this machine resides. 

 

So I followed the instruction given by https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000001DbuaSAC&l=en-SG.

 

I have set up a virtual machine running Ubuntu 20.04 on an internet-accessible machine to facilitate the download. I have faced the following problems on setting up the host machine

  • Following the instruction "sudo apt-get install python36 apt-mirror dkpg-dev" 
    • The installation has python36 failing which I believed to be not of any issues as Ubuntu 20.04 has python38 but dkpg-dev also failed for installation. Will this create any potential issue downstream?
  • Continuing on to next step of the instruction. I have download the registration package  "NI Linux Device Drivers 2023 Q3" from the below links given.  Links: NI Linux Device Drivers Download . 
    • Following which I have then installed the registration package with the following command
      • with the pre-instruction steps:  sudo apt-get update, followed by sudo apt-get dist-upgrade, followed with a reboot
      • sudo apt install ./ni-ubuntu2004-drivers-2023Q3.deb. The command line instruction seem running fine.
      • Then I should begin to download the script that matches my system
0 Kudos
Message 1 of 3
(1,120 Views)

Some updates to my problem development

 

1) As said I have done the preparation step of installing python36, apt-mirror and dkpg-dev. Only the apt-mirror installation succeed and while dpkg-dev and python36 fail

2) I have also done up to the steps of downloading  NILinux2023Q2DeviceDrivers.zip and installing ni-ubuntu2004-drivers-2023Q2.deb which provide the link to Ubuntu package manager

3) When I tried to download entire repo, using 

                sudo ./offline_deb_repo.py repo --collapse ni-software-2023-focal

It failed for me as it prompt me that i do not have right to the directory /tmp/xxxxxxxxxxx/xxx/postmirror.sh then the process breakdown

 

 

4) I tried to downkoad the specific packages with 

               sudo ./offline_deb_repo.py packages ni-serial hw_config_utiltity

    a) It failed. Somehow the python script cannot recognise the version of my gnupg that is installed in my VM

    b) I then tried  sudo ./offline_deb_repo.py --no-sign ni-serial hw_config_utiltity

        This works but it give me a warning 

 

        (W)    Download is performed unsandboxed as root as file /tmp/xxxxxxxxxxxxxxx' couldn't be   accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)Failed to obtain

 

      I ignored the warning and eventually 7.6 GB of files were downloaded. I have an offine repo folder with sub folder being pool and dist

 

     Did I download the entire repository? The files were huge for a driver. And did I download the complete set of driver. Kinda of observe NI repository in the same directory as my pool and dist, is still missing config

0 Kudos
Message 2 of 3
(1,079 Views)

Anyway I proceed ahead with the driver repository and setup the target repository and is able to successfully install the following

  • sudo apt-get install ni-serial
  • sudo apt-get install ni-hwcfg-utility

Afterwhich I did what was told by the document, >> sudo dkms autoinstall and I reboot the PC after that

 

When I boot up, and I run sudo lspci and found the memory region of the NI card to be enabled. However when I run the setserial, the serial port was still not enabled. There is no name to the serial interface port, no irq address to the port or address assigned to port.

 

I have tried lsprobe ni-serial but I could not locate anything remotely sound like ni-serial. when i tried modprobe ni-serial, the system give a fatal warning saying there is no such module in my kernel. when i tried dkms status, it also do not show ni-serial but instead I have found ni-843x instead (which I suspect is my card driver) 

 

Also interestingly I have found that there is another file being added after the driver is installed in the /proc/tty/driver. NI843x. On opening up the file, I find it is similar to serial driver with the difference being instead of ttyS, it is being replaced by ttyNI843xPort. The port down in NI843x file is not assigned with irq being set to 0 and port set to 0x00.

 

Now I wonder

1) Whether I should use /dev/ttyNI843xPort0 instead of /dev/ttyS0

2) How I could get /dev/ttyNI843xPort0 to be working instead

3) Should I meddle with my /etc/default/grub file, or particular

GRUB_CMDLINE_LINUX="8250.nr_uarts=<number of ports>"

that in some online site that shared that NI will change te number of ports?

 

Regards

0 Kudos
Message 3 of 3
(1,040 Views)