This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| device_controll [2024/07/25 17:06] – created simon | device_controll [2026/05/09 12:46] (current) – [Using local web interace (Firefox) to display instrument information] ari | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Device controll ====== | ====== Device controll ====== | ||
| + | To controll most of our devices we use a LabVIEW script, written by V. Gkougkousis, | ||
| + | |||
| + | ==== Network configuration ==== | ||
| + | |||
| + | The computer is configured to act as a router and a gateway between the internal network connecting all devices of the experimental setup and the rest of the UZH infrastructure. Effectively, | ||
| + | |||
| + | SELinux is not installed while AppArmor, a security policy software does not interfere with normal operations and thus must be left active. | ||
| + | To allow remote connection ssh has to be installed: | ||
| + | sudo apt install openssh-server | ||
| + | sudo nano / | ||
| + | uncomment the follogwing lines: | ||
| + | Port 22 | ||
| + | PermitRootLogin yes | ||
| + | PasswordAuthentication yes | ||
| + | To allow for replies to ping requests, the system fierwall has to bedisabled: | ||
| + | sudo systemctl stop firewalld | ||
| + | sudo systemctl disable firewalld | ||
| + | sudo systemctl status firewalld | ||
| + | The following rules have to also be configured in the iptables service: | ||
| + | sudo iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT | ||
| + | sudo iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT | ||
| + | sudo iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT | ||
| + | sudo iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT | ||
| + | After these modifications, | ||
| + | sudo iptables-save | ||
| + | sudo systemctl restart NetworkManager | ||
| + | To ensure that ICMP is allowed and replies to pings are issued, the following must also be set: | ||
| + | sudo sysctl -w net.ipv4.icmp_echo_ignore_all=0 | ||
| + | sudo sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=0 | ||
| + | If additional debugging is needed, tcpdump is a great utility to monitor traffic on the tcp protocol of all network ports. If not pre-installed, | ||
| + | sudo apt update | ||
| + | sudo apt install tcpdump | ||
| + | Once tcpdump is present, once can continuously monitor traffic by issuing: | ||
| + | sudo tcpdump -i any icmp | ||
| + | |||
| + | ==== Using local web interace (Firefox) to display instrument information ==== | ||
| + | |||
| + | - Make sure server and VPN are on. Then start XLaunch and check “Disable access control” to ensure a remote | ||
| + | - Type in Shell: $env: | ||
| + | - Type in Shell ssh -Y damic2@10.65.117.44 => This connects us with the server. Important: Don’t forget the -Y => This is necessary since ssh can only handle text but we want image / video formats (Firefox), the -Y creates a “video tunnel” inside the connection | ||
| + | - Finally type firefox& | ||
| + | |||
| + | Instead of Windows Shell, we can also use PuTTY for faster responses. In this case: | ||
| + | - Input 10.65.117.44 into IP address | ||
| + | - Under SSH register select " | ||
| + | - In SSH => X11 => Select " | ||