2020-09-13

Running RigExpert AntScope2 on Debian Stable (buster)

RigExpert have instructions as to how to load their AntScope2 software on a Raspberry Pi.

As the Raspberry Pi runs a system based on debian, it shouldn't be too difficult to get the code running on a debian stable (buster) system.

[I apologise for some of the formatting in this post. blogger.com has foisted a predictably putrid new interface on me. It seems to have no consistent concept of what to do when one hits the ENTER key, nor how to paste text properly. Things that used to be a single click on a text button are now a process of figuring out which meaningless icon causes the menu I want to appear, and then selecting the correct text from the menu -- this is somehow supposed to be an improvement; Yet Another Reason to hate applications that don't run on the desktop, and are controlled by another entity -- they can resist the temptation to break things for users for only so long. To make matters even worse, they falsely claim that they provide a way to continue to use the old interface -- making that selection still forces one into the new atrocity. Yes, I'm ranting.]

1. Download and install the necessary packages.

sudo apt-get install qt5-default qt5-qmake libegl1-mesa libgles2-mesa libqt5serialport5-dev libusb-1.0.0-dev

The output I received (after wasting gobs of time trying to get it to format somewhat sensibly in the new interface, which scattered vast numbers of non-breaking spaces seemingly at random throughout the text):

[ZB:rbn] sudo apt-get install qt5-default qt5-qmake libegl1-mesa libgles2-mesa libqt5serialport5-dev libusb-1.0.0-dev
[sudo] password for n7dr:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libusb-1.0-0-dev' for regex 'libusb-1.0.0-dev'
libegl1-mesa is already the newest version (18.3.6-2+deb10u1).
libegl1-mesa set to manually installed.
The following packages were automatically installed and are no longer required:
  linux-headers-4.19.0-6-amd64 linux-headers-4.19.0-6-common linux-headers-4.19.0-8-amd64 linux-headers-4.19.0-8-common linux-image-4.19.0-6-amd64 linux-image-4.19.0-8-amd64
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libqt5opengl5-dev libqt5serialport5 libusb-1.0-doc libvulkan-dev qt5-qmake-bin qtbase5-dev qtbase5-dev-tools
Suggested packages:
  default-libmysqlclient-dev firebird-dev libegl1-mesa-dev libpq-dev libsqlite3-dev unixodbc-dev
The following NEW packages will be installed:
  libgles2-mesa libqt5opengl5-dev libqt5serialport5 libqt5serialport5-dev libusb-1.0-0-dev libusb-1.0-doc libvulkan-dev qt5-default qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,854 kB of archives.
After this operation, 29.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.us.debian.org/debian buster/main amd64 libgles2-mesa amd64 18.3.6-2+deb10u1 [47.4 kB]
Get:2 http://ftp.us.debian.org/debian buster/main amd64 libvulkan-dev amd64 1.1.97-2 [390 kB]
Get:3 http://ftp.us.debian.org/debian buster/main amd64 qt5-qmake-bin amd64 5.11.3+dfsg1-1+deb10u3 [1,004 kB]
Get:4 http://ftp.us.debian.org/debian buster/main amd64 qt5-qmake amd64 5.11.3+dfsg1-1+deb10u3 [213 kB]
Get:5 http://ftp.us.debian.org/debian buster/main amd64 qtbase5-dev-tools amd64 5.11.3+dfsg1-1+deb10u3 [770 kB]
Get:6 http://ftp.us.debian.org/debian buster/main amd64 qtbase5-dev amd64 5.11.3+dfsg1-1+deb10u3 [1,014 kB]
Get:7 http://ftp.us.debian.org/debian buster/main amd64 libqt5opengl5-dev amd64 5.11.3+dfsg1-1+deb10u3 [63.8 kB]
Get:8 http://ftp.us.debian.org/debian buster/main amd64 libqt5serialport5 amd64 5.11.3-2 [35.0 kB]
Get:9 http://ftp.us.debian.org/debian buster/main amd64 libqt5serialport5-dev amd64 5.11.3-2 [12.8 kB]
Get:10 http://ftp.us.debian.org/debian buster/main amd64 libusb-1.0-0-dev amd64 2:1.0.22-2 [74.5 kB]
Get:11 http://ftp.us.debian.org/debian buster/main amd64 libusb-1.0-doc all 2:1.0.22-2 [182 kB]
Get:12 http://ftp.us.debian.org/debian buster/main amd64 qt5-default amd64 5.11.3+dfsg1-1+deb10u3 [48.2 kB]
Fetched 3,854 kB in 4s (946 kB/s)
Selecting previously unselected package libgles2-mesa:amd64.
(Reading database ... 371509 files and directories currently installed.)
Preparing to unpack .../00-libgles2-mesa_18.3.6-2+deb10u1_amd64.deb ...
Unpacking libgles2-mesa:amd64 (18.3.6-2+deb10u1) ...
Selecting previously unselected package libvulkan-dev:amd64.
Preparing to unpack .../01-libvulkan-dev_1.1.97-2_amd64.deb ...
Unpacking libvulkan-dev:amd64 (1.1.97-2) ...
Selecting previously unselected package qt5-qmake-bin.
Preparing to unpack .../02-qt5-qmake-bin_5.11.3+dfsg1-1+deb10u3_amd64.deb ...
Unpacking qt5-qmake-bin (5.11.3+dfsg1-1+deb10u3) ...
Selecting previously unselected package qt5-qmake:amd64.
Preparing to unpack .../03-qt5-qmake_5.11.3+dfsg1-1+deb10u3_amd64.deb ...
Unpacking qt5-qmake:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Selecting previously unselected package qtbase5-dev-tools.
Preparing to unpack .../04-qtbase5-dev-tools_5.11.3+dfsg1-1+deb10u3_amd64.deb ...
Unpacking qtbase5-dev-tools (5.11.3+dfsg1-1+deb10u3) ...
Selecting previously unselected package qtbase5-dev:amd64.
Preparing to unpack .../05-qtbase5-dev_5.11.3+dfsg1-1+deb10u3_amd64.deb ...
Unpacking qtbase5-dev:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Selecting previously unselected package libqt5opengl5-dev:amd64.
Preparing to unpack .../06-libqt5opengl5-dev_5.11.3+dfsg1-1+deb10u3_amd64.deb ...
Unpacking libqt5opengl5-dev:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Selecting previously unselected package libqt5serialport5:amd64.
Preparing to unpack .../07-libqt5serialport5_5.11.3-2_amd64.deb ...
Unpacking libqt5serialport5:amd64 (5.11.3-2) ...
Selecting previously unselected package libqt5serialport5-dev:amd64.
Preparing to unpack .../08-libqt5serialport5-dev_5.11.3-2_amd64.deb ...
Unpacking libqt5serialport5-dev:amd64 (5.11.3-2) ...
Selecting previously unselected package libusb-1.0-0-dev:amd64.
Preparing to unpack .../09-libusb-1.0-0-dev_2%3a1.0.22-2_amd64.deb ...
Unpacking libusb-1.0-0-dev:amd64 (2:1.0.22-2) ...
Selecting previously unselected package libusb-1.0-doc.
Preparing to unpack .../10-libusb-1.0-doc_2%3a1.0.22-2_all.deb ...
Unpacking libusb-1.0-doc (2:1.0.22-2) ...
Selecting previously unselected package qt5-default:amd64.
Preparing to unpack .../11-qt5-default_5.11.3+dfsg1-1+deb10u3_amd64.deb ...
Unpacking qt5-default:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Setting up libvulkan-dev:amd64 (1.1.97-2) ...
Setting up libgles2-mesa:amd64 (18.3.6-2+deb10u1) ...
Setting up libusb-1.0-doc (2:1.0.22-2) ...
Setting up libusb-1.0-0-dev:amd64 (2:1.0.22-2) ...
Setting up libqt5serialport5:amd64 (5.11.3-2) ...
Setting up qtbase5-dev-tools (5.11.3+dfsg1-1+deb10u3) ...
Setting up qt5-qmake-bin (5.11.3+dfsg1-1+deb10u3) ...
Setting up qt5-qmake:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Setting up qtbase5-dev:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Setting up qt5-default:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Setting up libqt5opengl5-dev:amd64 (5.11.3+dfsg1-1+deb10u3) ...
Setting up libqt5serialport5-dev:amd64 (5.11.3-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
[ZB:rbn]

2. The official RigExpert repository for the software is here. After downloading the software, set the working directory to Antscope2-master in the downloaded hierarchy and then:

[ZB:AntScope2-master] qmake AntScope.pro
Info: creating stash file /tmp/antscope/AntScope2-master/.qmake.stash
Project MESSAGE: AntScope2:
Project MESSAGE:        [/tmp/antscope/AntScope2-master/build/release]
Project MESSAGE:        [/tmp/antscope/AntScope2-master/build/release/.obj]
Project MESSAGE:        [/tmp/antscope/AntScope2-master/build/release/.moc]
Project MESSAGE:        [/tmp/antscope/AntScope2-master/build/release/.ui]
Project MESSAGE:        [/tmp/antscope/AntScope2-master/build/release/.rcc]
[ZB:AntScope2-master]


3. Assuming that you receive similar results, then you can make the executable:

[ZB:AntScope2-master] make                                 

This should generate many pages of output, including not a few warnings, but no errors. RigExpert say about this step: "This process will take considerable time. Caution! Warning messages may appear during compilation. This is not scary."

4. Unusually, this is not the end of the process; RigExpert requires a few more steps. After the make command completes, you should have files in a .../build/release directory. Now you must:

5. Create (manually) the directory .../build/release/Resources.

6. Download this ZIP file.

7. Put the file cables.txt from the ZIP archive in the .../Resources directory.

8. Put the remaining files from the ZIP archive in the .../release directory.

9. Allow yourself as an ordinary user to use the USB ports:

  sudo adduser $USER dialout

10. In order for step 9 to take effect, you must log out and log back in.

11. Download this file and place it in the directory /etc/udev/rules.d:

  sudo cp rigexpert-usb.rules /etc/udev/rules.d

12. Finally, you can execute the software, which is in the .../build/release directory:

  ./AntScope2

13. On my systems, this causes the following to appear:


Note the large black rectangle, which flashes into and out of existence as one moves the cursor, and also the menu window at bottom left that extends beyond border of window. These appear to be bugs in the software.