10-09-2025 11:47 AM
Hello all,
Where does the Target Configuration for Raspberry Pi get the files it is transferring to the Pi on the initial install?
I have some modified Libraries ( built by Bommarito) while he was at NI. these library mods allowed me to use USB Serial adapters, the shipping code does not allow for this (if it does please show me) I believe I had this done due to the change form a Pi3 to a Pi4. So now I have a working debug solution, but when I build and deploy I get a warning that one Library doesn't match, this is the library that has the changes, when deployed it is not working. So what are the steps to get the Toolkit updated.. I have not done a pull request to submit changes that are not technically mine but they do work..
So what are my next steps?
10-10-2025 12:18 PM - edited 10-10-2025 12:18 PM
Hi Jeff,
So the Target Configuration dialog installs debian packages from the feed here: https://feeds.labviewmakerhub.com/
Those packages mostly just contain the LabVIEW runtime and related libraries (*.so files). I don't believe it installs any VIs.
All VIs that are run on the Pi are downloaded through LabVIEW, when you hit the run button, or deploy a startup app.
Could you tell us more about which Libraries we're talking about and what files were modified?
-Ken
10-10-2025 01:58 PM
Absolutely..
in the LMH-linx.lvlib the following files were added so I could access an USB Serial dongle connected to the PI. I was just testing it with the shipping libraries and my FTDI and CP2101 are not detected.
Navigating in the project >>LMH-LINX.lvlib>>Peripherals>>UART. the following file is added "UART Open Device" this allows me to connect to the device with the naming as found on the pi, in this Case "/dev/ttyUSB0"
LMH-LINX.lvlib>>Local IO.lvlib>>LinxUartOpenDevice.vi
Along with the library changes this file sis replaced on the PI itself "liblinxdevice_rpi2.so"
if I press the run button on my VI, code compiles and runs as I expect on the PI (Pi4, Bookworm). if I build a deployment , The COM port is not working, when I deploy after running code, I see that one of the lvlib is different..
here is the added VI
the conflicts:
Not sure device.lvlib is where the issue is, but I know is works when running in debug, but doesn't work in Deployment. I know this because I create a file and stream data to it, in deployment the file is created but no data is sent.
10-10-2025 02:09 PM
I will add I have emails with info between you (at first) and then Bommarito, when he was there, as I had this issue back then (2021ish), Bommarito made the fix, I tested it in Dev but can't recall if I tested it in Deployed code. The link he gave me is still active with the library with mods, I recall a bug with the channel number int he code he gave me, but would need to dig up the email conversations from back then
10-15-2025 02:18 PM
When you say you're building a deployment, is that a Real-Time Application (what we sometimes call a Startup Application)?
Did you already have a Real-Time Application running on the RPi?
I'm not entirely sure where the old copies of those files would be coming from.
As far as the changes you're talking about, I think we never added that capability to the LINX library because VISA already supported that use case (or at least it should).
And as far as the changes you're talking about, if there were corresponding changes made to liblinxdevice_rpi2.so, and your copy hasn't been re-built against the latest source code at https://github.com/LVMakerHub/LINX/tree/main/LabVIEW/vi.lib/MakerHub/LINX/Firmware/Source, the library could get out of sync and cause difficult-to-debug issues. That being said, I don't think that's what is causing this particular deployment issue, just giving you a warning that it could cause issues.
10-15-2025 02:33 PM
Thanks Ken..
Yes Deployment as running app (startup)
Yes already have RealTime installed on RPi
The modded changes to the the VISA were because the RPi4 would not work with a USB Dongle. I will try it again but it did not seem to be back when Derrick helped create this solution, if it does now, great, but I will need to test it again.. I would assume then in the 'non-modded' Library, Channel 0 is the onboard Serial and Channel 1 would be the USB Serial Dongle. if it hasn't been touched then it probably isn't working for the RPi4, I know it was working for the Rpi2 and maybe Rpi3 back in 2021, so if nothing changed then it still doesn't work 🙂
I did get it working, there was a limitation mentioned by Derrick in my old info, stating I needed to set the com port prior to splitting the Local IO wire. I also noticed I had some code that was not running in Development mode, but would in a runtime and it was for windows, that was probably the biggest one I missed
10-16-2025 11:31 AM
I did some testing this AM. here is what I found:
with the toolkit on PC and RPi installed (no changes)
The USB UART is NOT detected, but all my DIO works and the native port on the Pi works
If I make the changes to give me access to the USB port, I find that the Digital IO now causes my debugging environment (pressing run on the VI on my PC and watching it run on the PI) to disconnect and I need to reboot the Pi to connect to it..
Ultimately, I would like to have all the functionality, USB UART on the Pi as well as DIO. right n\ow I need to choose, but I am looking to build a simple IO/ UART Datalogger and Both would be nice to have working. all I know is there is a difference in file size for the 'liblinxdevice_rpi2.so, OEM is 58kb and Modded is 4,184kb
10-17-2025 10:47 AM - edited 10-17-2025 10:54 AM
The according LinxDevice.so library needs to be modified to support random serial ports (ttySx and ttyUSBx device entries). To make matters even more interesting the Linux kernel (which is the core of the Raspi too) likes to enumerate some vritual serial port adapters rather as ttyACMx, https://rfc1149.net/blog/2013/03/05/what-is-the-difference-between-devttyusbx-and-devttyacmx/.
Currently it only tries to open the standard UARTS that are built in. Dynamic UART support has however some potential problems:
- What to do if the port is unplugged while in use? Crashing is not an option AFAIK.
- What to do about newly plugged in adapters after the Linx library has loaded? Only enumerating on startup? Or continuously probing? Or installing a callback event? First is simple but not user friendly. Second causes a continuous CPU load for something that happens once every leap year. Third is serious Linux tinkering.
The very considerable size difference you observe in the so libraries is not caused by the difference in operation but in how it was compiled/linked. I have done modifications on linxdevice.so in the past (not specifically for RPI) and the size difference was just a few kB. But compiling it as debug with zero optimization and all the debug symbols still present certainly can make a huge difference. It may also link with some static libraries instead of relying on shared library support to reduce version compatibility problems.
10-19-2025 07:25 PM - edited 10-19-2025 08:01 PM
Hi Jeff,
The LabVIEW VISA library can be used to access serial devices on the Raspberry Pi. It works with the standard LINX installation on the Raspberry Pi. The library works on the Bookworm and new Trixie versions of PI OS.
The VISA resource name used by the VISA VI's is in the format ASRL1::INSTR. I have attached a VI that I wrote to lookup the VISA resource for a specified Linux serial device. Hope it is of use for your application!
The Lookup VISA Resource VI can be run standalone on the Raspberry Pi and displays a list of the online serial devices.
The example below shows the output from a Raspberry PI 4 with the onboard serial interface, USB RS232 serial adapter and a Raspberry Pi Pico connected.
The outputs from the VI are the VISA resource name and a boolean that is true if the device is online.
There are also array outputs of the VISA resource and device lists.
Here are examples using the VI with VISA and the LINX serial open VI's
VISA
LINX (For LINX I/O device e.g. Arduino Uno or Raspberry PI Pico)
The following example shows a simple serial loop back test that also uses the LINX digital output VI's. The VI can be deployed as a start-up application. The first digital output toggles every 32 loops. The second digital output is high if the serial loopback was successful. Connect TXD to RXD on the D type connector of the USB to serial adapter.
Here is the block diagram for the Lookup VISA Resource VI
Cheers,
AndyLB.
10-20-2025 01:30 PM
Andy,
Thanks for that, I was wondering if that would work and was going to be the next thing to try. To me that is a gamechanger and gives me so much more..
How are you using the Pico? I was l was going to use CTI for the Pico, but I assume if I had my team write the Pico code with Serial commands that would work the same
So Trixie works with RPi4 on 2025Q3 LabVIEW? I will need to try that out as well