LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LINX 3.0 on the Raspberry Pi 2, 3 and 4 running Raspbian Buster

Hi everyone,
LINX can be installed on the Raspberry Pi 4.  The LINX 3.0 Target Manual Install Process (https://www.labviewmakerhub.com/doku.php?id=learn:libraries:linx:misc:target-manual-install) did not work due to changes in the latest version of Raspbian. 

Here is the procedure that I used to install LINX. The procedure also works on the Raspberry Pi 2B, Pi 3A+, Pi 3B and Pi 3B+ running Raspbian Buster.

1. Setup the Raspberry Pi using a new installation of Raspbian Buster. 
2. Change the default password for the Pi account on the Raspberry Pi.
3. Setup a WiFi or Ethernet connection from the Raspberry Pi to your router.
4. Enable SSH on the Raspberry Pi.
5. SSH into the Raspberry Pi or open a terminal window on the Raspberry Pi desktop.
6. Check that the Raspberry Pi can access the Internet by entering the command

ping -c 4 raspberrypi.org

7. Enter the commands shown in the code block below.
Note: The text may wrap due to the web browser window size. I recommend copying the text into a text editor to see the original formatting. 

# Enable i2c and spi
sudo raspi-config nonint do_i2c 0
sudo raspi-config nonint do_spi 0
# Update Raspbian
sudo apt-get update
sudo apt-get dist-upgrade -y
# Add the LINX repository
sudo sh -c 'echo "deb [trusted=yes] http://feeds.labviewmakerhub.com/debian/ binary/" >> /etc/apt/sources.list'
sudo apt-get update
# Install the LINX package. Error messages will be displayed for the
# nisysserver.service and labview.service sudo apt-get install -y lvrt-schroot # Move the nisysserver.service and labview.service files to the systemctl folder sudo mv /etc/systemd/system/multi-user.target.wants/nisysserver.service /lib/systemd/system sudo mv /etc/systemd/system/multi-user.target.wants/labview.service /lib/systemd/system # link liblinxdevice.so to the Raspberry PI device driver file liblinxdevice_rpi2.so sudo schroot -c labview -d /usr/lib -- ln -s liblinxdevice_rpi2.so liblinxdevice.so # Enable the nisysserver.service and labview.service to start on boot sudo systemctl enable nisysserver.service sudo systemctl enable labview.service # Start the nisysserver.service and labview.service sudo systemctl start nisysserver.service sudo systemctl start labview.service

 

You should now be able to connect to the Raspberry Pi from the LabVIEW Project Explorer.

Cheers,
Andy.

Message 1 of 31
(16,720 Views)

Thanks for posting this - but I've followed it exactly and can't get past the line:

sudo sh -c 'echo "deb http://feeds.labviewmakerhub.com/debian/ binary/" >> /etc/apt/sources.list'

When I run the next line to search the list it keeps coming up with the error:

"Malformed entry 4 in list file /etc/apt/sources.list ([option] unparseable)"

"The list of sources could not be read"

 

Is there a workaround for this? I'm using a Raspberry Pi 3B with the latest Buster OS.

Thanks

Ross 

0 Kudos
Message 2 of 31
(16,593 Views)

This is great information could you post it on the LabVIEW Makershub LINX forum too.

 

Target Configuration wizard NEVER worked for me and always returns the error "The unknown is not a supported device" on a R-pi 2,3,and 4 

 

I have only ever been able to use LINX on an Arduino

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 31
(16,554 Views)

Hi Ross,

Thank you for running the installation procedure.
The command you mentioned was from the Makerhub LINX 3.0 Target Manual Install Process.

Have you already tried it on this installation of the OS? 

I had to change the command slightly for Raspbian Buster. It is 

sudo sh -c 'echo "deb [trusted=yes] http://feeds.labviewmakerhub.com/debian/ binary/" >> /etc/apt/sources.list'

I recommend that you start from a new installation of Raspbian Buster on the Raspberry Pi.

Here is a log of the LINX install on the Raspberry Pi 3B and the contents of the /etc/apt/sources.list file.

pi@PI-3B:~ $ # Enable i2c and spi
pi@PI-3B:~ $ sudo raspi-config nonint do_i2c 0
pi@PI-3B:~ $ sudo raspi-config nonint do_spi 0
pi@PI-3B:~ $ # Update Raspbian
pi@PI-3B:~ $ sudo apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
...
Reading package lists... Done
pi@PI-3B:~ $ sudo apt-get dist-upgrade -y
... Processing triggers for initramfs-tools (0.133+deb10u1) ... pi@PI-3B:~ $ # Add the LINX repository pi@PI-3B:~ $ sudo sh -c 'echo "deb [trusted=yes] http://feeds.labviewmakerhub.com/debian/ binary/" >> /etc/apt/sources.list' pi@PI-3B:~ $ # Display the contents of /etc/apt/sources.list pi@PI-3B:~ $ cat /etc/apt/sources.list deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi deb [trusted=yes] http://feeds.labviewmakerhub.com/debian/ binary/ pi@PI-3B:~ $ pi@PI-3B:~ $ sudo apt-get update Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:2 http://archive.raspberrypi.org/debian buster InRelease Ign:3 http://feeds.labviewmakerhub.com/debian binary/ InRelease Ign:4 http://feeds.labviewmakerhub.com/debian binary/ Release Ign:5 http://feeds.labviewmakerhub.com/debian binary/ Packages Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Ign:5 http://feeds.labviewmakerhub.com/debian binary/ Packages Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Ign:5 http://feeds.labviewmakerhub.com/debian binary/ Packages Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Get:5 http://feeds.labviewmakerhub.com/debian binary/ Packages [410 B] Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Ign:6 http://feeds.labviewmakerhub.com/debian binary/ Translation-en_GB Ign:7 http://feeds.labviewmakerhub.com/debian binary/ Translation-en Fetched 410 B in 2s (164 B/s) Reading package lists... Done pi@PI-3B:~ $ # Install the LINX package. Error messages will be displayed for the pi@PI-3B:~ $ # nisysserver.service and labview.service pi@PI-3B:~ $ sudo apt-get install -y lvrt-schroot Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: python3-pyperclip rpi.gpio-common Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-program-options1.62.0 libboost-system1.62.0 schroot schroot-common Suggested packages: debootstrap lvm2 btrfs-tools aufs-tools | unionfs-fuse qemu-user-static The following NEW packages will be installed: libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-program-options1.62.0 libboost-system1.62.0 lvrt-schroot schroot schroot-common 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 10.5 MB of archives. After this operation, 3,630 kB of additional disk space will be used. Get:2 http://feeds.labviewmakerhub.com/debian binary/ lvrt-schroot 14.1-11 [9,276 kB] Get:1 http://archive-bm.raspbian.org/raspbian buster/main armhf libboost-system1.62.0 armhf 1.62.0+dfsg-10+b3 [33.0 kB] Get:3 http://archive-bm.raspbian.org/raspbian buster/main armhf libboost-filesystem1.62.0 armhf 1.62.0+dfsg-10+b3 [58.3 kB] Get:4 http://archive-bm.raspbian.org/raspbian buster/main armhf libboost-iostreams1.62.0 armhf 1.62.0+dfsg-10+b3 [50.2 kB] Get:5 http://archive-bm.raspbian.org/raspbian buster/main armhf libboost-program-options1.62.0 armhf 1.62.0+dfsg-10+b3 [137 kB] Get:6 http://archive-bm.raspbian.org/raspbian buster/main armhf schroot-common all 1.6.10-6 [244 kB] Get:7 http://archive-bm.raspbian.org/raspbian buster/main armhf schroot armhf 1.6.10-6 [676 kB] Fetched 10.5 MB in 10s (999 kB/s) Selecting previously unselected package libboost-system1.62.0:armhf. (Reading database ... 152531 files and directories currently installed.) ... Created symlink /etc/systemd/system/multi-user.target.wants/schroot.service → /lib/systemd/system/schroot.service. Setting up lvrt-schroot (14.1-11) ... Failed to start nisysserver.service: Unit nisysserver.service not found. Failed to start labview.service: Unit labview.service not found. Processing triggers for systemd (241-7~deb10u1+rpi1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10+rpi1) ... pi@PI-3B:~ $ # Move the nisysserver.service and labview.service files to the systemctl folder pi@PI-3B:~ $ sudo mv /etc/systemd/system/multi-user.target.wants/nisysserver.service /lib/systemd/system pi@PI-3B:~ $ sudo mv /etc/systemd/system/multi-user.target.wants/labview.service /lib/systemd/system pi@PI-3B:~ $ # link liblinxdevice.so to the Raspberry PI device driver file liblinxdevice_rpi2.so pi@PI-3B:~ $ sudo schroot -c labview -d /usr/lib -- ln -s liblinxdevice_rpi2.so liblinxdevice.so pi@PI-3B:~ $ # Enable the nisysserver.service and labview.service to start on boot pi@PI-3B:~ $ sudo systemctl enable nisysserver.service Created symlink /etc/systemd/system/multi-user.target.wants/nisysserver.service → /lib/systemd/system/nisysserver.service. pi@PI-3B:~ $ sudo systemctl enable labview.service Created symlink /etc/systemd/system/multi-user.target.wants/labview.service → /lib/systemd/system/labview.service. pi@PI-3B:~ $ # Start the nisysserver.service and labview.service
pi@PI-3B:~ $ sudo systemctl start nisysserver.service pi@PI-3B:~ $ sudo systemctl start labview.service

Hope this helps to get LINX running on your Raspberry Pi.
Thanks,
Andy.

Message 4 of 31
(16,517 Views)

Hi RTSLVU,
Thank you for your comments and the Kudos.

I posted the information on the LabVIEW Makerhub LINX forum a few weeks ago. Hopefully it will get approved soon!

Cheers,

Andy.

0 Kudos
Message 5 of 31
(16,501 Views)

Thank you very much. This worked. I bought a Raspberry Pi 4 with pre installed Raspbian buster. Initially LINX didn't worked. So i formatted my SD card, re-installed Raspbian buster and follow exactly your steps. It worked. I can now connect Labview 2014 to Raspberry Pi. 

0 Kudos
Message 6 of 31
(16,412 Views)
Hey guys
I have a problem with my raspberry pi 3B.
Whenever I try to load the resbian buster, an error is displayed.

pi @ pi: ~ $ sudo apt-get update
E: malformed entry 4 in list file /etc/apt/sources.list ([option] not assignment)
E: The list of sources could not be read.
pi @ pi: ~ $


i am new in this
and its my first experiance with raspberry, so maybe somone can help me with some easy instrucktions

 

0 Kudos
Message 7 of 31
(16,240 Views)

Hi,

 

I appreciate the effort that has been put into this.

Can somebody help me out?

When following the steps on the Raspberry I can't get past a certain point.

 

When the command: "sudo mv /etc/systemd/system/multi-user.target.wants/nisysserver.service /lib/systemd/system"  is entered

I get back the following: "mv: cannot stat '....' : No such file or directory. I checked and the directory exist, but there is no nisyssever.service file.

Altough the previous step of "sudo apt-get install -y lvrt-schroot" was succesfull. 

 

Hope somebody can help me out.

Best regards,

 

Twan

0 Kudos
Message 8 of 31
(16,166 Views)

Hi AndyLB

Thanks for you shareing  ,but I follow the document step by step,always unsuccessful.,please help me ,

SSH shows the following information:


login as: pi
pi@192.168.0.109's password:
Server refused to set all environment variables
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Dec 28 12:11:26 2019
pi@raspberrypi:~ $ sudo raspi-config nonint do_i2c 0
pi@raspberrypi:~ $ sudo raspi-config nonint do_spi 0
pi@raspberrypi:~ $ sudo raspi-config nonint do_spi 0
pi@raspberrypi:~ $ sudo apt-get updatesudo apt-get update
E: Invalid operation updatesudo
pi@raspberrypi:~ $ sudo apt-get dist-upgrade -y
E: Conflicting values set for option Trusted regarding source http://feeds.labvi ewmakerhub.com/debian/ binary/
E: The list of sources could not be read.
E: Conflicting values set for option Trusted regarding source http://feeds.labvi ewmakerhub.com/debian/ binary/
E: The list of sources could not be read.
pi@raspberrypi:~ $ sudo sh -c 'echo "deb [trusted=yes] http://feeds.labviewmaker hub.com/debian/ binary/" >> /etc/apt/sources.list'
pi@raspberrypi:~ $ sudo apt-get update
E: Conflicting values set for option Trusted regarding source http://feeds.labvi ewmakerhub.com/debian/ binary/
E: The list of sources could not be read.
pi@raspberrypi:~ $ sudo apt-get install -y lvrt-schroot
E: Conflicting values set for option Trusted regarding source http://feeds.labvi ewmakerhub.com/debian/ binary/
E: The list of sources could not be read.
E: Conflicting values set for option Trusted regarding source http://feeds.labvi ewmakerhub.com/debian/ binary/
E: The list of sources could not be read.
pi@raspberrypi:~ $ sudo mv /etc/systemd/system/multi-user.target.wants/nisysserv er.service /lib/systemd/system
mv: cannot stat '/etc/systemd/system/multi-user.target.wants/nisysserver.service ': No such file or directory
pi@raspberrypi:~ $ sudo mv /etc/systemd/system/multi-user.target.wants/labview.s ervice /lib/systemd/system
mv: cannot stat '/etc/systemd/system/multi-user.target.wants/labview.service': N o such file or directory
pi@raspberrypi:~ $ sudo schroot -c labview -d /usr/lib -- ln -s liblinxdevice_rp i2.so liblinxdevice.so
sudo: schroot: command not found
pi@raspberrypi:~ $ sudo systemctl enable nisysserver.service
Failed to enable unit: Unit file nisysserver.service does not exist.
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo systemctl enable labview.service
Failed to enable unit: Unit file labview.service does not exist.
pi@raspberrypi:~ $ sudo systemctl start nisysserver.service
Failed to start nisysserver.service: Unit nisysserver.service not found.
pi@raspberrypi:~ $ sudo systemctl start labview.service
Failed to start labview.service: Unit labview.service not found.

0 Kudos
Message 9 of 31
(15,154 Views)

Hi RTSLVU,

 

I may be a little late, but I have a workaround for the unknown device problem. For me, it's caused by later versions of the RPi 2 using a different processor, so instead of a BCM2709 it's a BCM2835. You can confirm this by typing cat /proc/cpuinfo into the command line and searching for the processor type. LINX doesn't search for the newer type but you can make it:

 

In your project, search for Get Device Type.vi. This needs to be modded to look like the picture below: 

RWPhil_0-1578417058054.png

The array needs to be updated with the new processor, as does the case structure.

 

I've spent a lot of time troubleshooting lately and put together a small library of solutions. Here they are:

 

LINX Install

Always run target configuration wizard on new RPi's

If this fails, here's the manual install instructions:

https://www.labviewmakerhub.com/doku.php?id=learn:libraries:linx:misc:target-manual-install

 

Deployment

You sometimes get a channel problem during deployment:

https://www.labviewmakerhub.com/forums/viewtopic.php?f=12&t=3018#p11411

 

Losing connection

If not connecting and finding errors when deploying or if losing connection on second attempt, Right click on device in LabVIEW project and Utilities >> Restart

This effectively runs the command sudo systemctl restart labview.service

There's more info on systemd (systemctl) here:

https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and...

https://fedoramagazine.org/what-is-an-init-system/

 
I'm currently fighting with the LabVIEW service not starting on RPi boot. This is stopping me from deploying startup executables. Fun!
 
Hope this helps
Message 10 of 31
(14,995 Views)