Avtech instruments with the "-B" suffix and a firmware revision code of "6.0.00_OL" or higher contain an embedded computer running an "Instrument Daemon" on a Fedora Linux operating system. The "OL" suffix is a reference to the Olimex AM3352-SOM embedded computer - this document does not apply if the "OL" suffix is not present. Older controllers used in the past (Z-World and BeagleBone controllers) are no longer supported.
Expert users may find it useful to examine / modify / debug the daemon source code, should problems arise. Since it is possible to "brick" or damage your instrument this way, it is only recommended for expert users.
The Instrument Daemon source code can be viewed here: https://www.avtechpulse.com/cgit/Instrument.git/.
The Avtech git repository also provides the kernel and U-Boot source code, lightly modified to support the Olimex AM3352-SOM embedded computer.
The Instrument Daemon source code can be download and compiled on the instrument itself, if it is connected to a LAN with external access.
Before proceeding, you will need to know the IP address of the instrument (usually reported in the "Setup menu > Network Info" front-panel submenu. You will also need the root password, which is recorded on the Calibration Checksheet at the rear of the operating manual provided with the instrument.
The operating system is stored on an SD card on the embedded controller board. It is possible, and recommended, to remove the SD card temporarily from its socket, and make a copy of it. (Linux users could use a command similar to "dd if=/dev/sdb of=flash.copy" to make a copy. Other card-copy tools exist for Windows users.)
In normal operation, the filesystem on the SD card is read-only. The SD card is also an industrial-grade "SLC" type, rather than a consumer-grade "MLC" type. Both of these measures greatly reduce the possibility of card corruption at power-up and power-down. When modifying the on-board files, it is necessary to switch to read/write mode.
The basic approach for loading and editing source code is shown below:
[YOUR DESKTOP ~]$ ssh -l root 192.168.0.47 [substitute the actual IP address of the instrument] root@192.168.0.47's password: [get the root password from the calibration checksheet at the back of the operating manual] [root@avtech ~]# mount -o remount,rw / [root@avtech ~]# systemctl stop instr-daemon.service [root@avtech ~]# mkdir ~/git [root@avtech ~]# cd ~/git [root@avtech git]# git clone ../../cgit/Instrument.git [root@avtech git]# cd Instrument [root@avtech Instrument]# mkdir build [root@avtech Instrument]# cd build [root@avtech build]# cmake .. [root@avtech build]# make clean
At this point, you can edit the source files as required. For example:
[root@avtech build]# vim ../parser.c
Then, compile and re-start the daemon:
[root@avtech build]# make [root@avtech build]# make install [root@avtech build]# systemctl start instr-daemon.service
OR, if you want the debugging output on the console, replace the preceding line with:
[root@avtech build]# /usr/bin/instr-daemon
Note that instr-daemon puts the filesystem back into read-only mode. For further editing, put it back into read-write mode:
[root@avtech build]# mount -o remount,rw /
Other Command-Line Tools
The full complement of normal Linux commands is available to assist you with debugging. For example, "route" and "ifconfig" may be useful for understanding networking issues:
[root@avtech ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gateway-grenfel 0.0.0.0 UG 1024 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 [root@avtech ~]# ifconfig eth0: flags=4163mtu 1500 inet 192.168.0.47 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::fa36:9bff:feb2:e9e6 prefixlen 64 scopeid 0x20 inet6 fdca:db61:d750:ac97:fa36:9bff:feb2:e9e6 prefixlen 64 scopeid 0x0 ether f8:36:9b:b2:e9:e6 txqueuelen 1000 (Ethernet) RX packets 185 bytes 16912 (16.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 129 bytes 16031 (15.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 175 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 12 bytes 840 (840.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12 bytes 840 (840.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Networking
The networking system is provided via the "Network Manager" service. An example of using the Network Manager command line interface (nmcli) to modify networking is described in TB19 - Configuring a Static IP Address on the Ethernet Interface.
Resetting the Root Password
The root password is recorded on the Calibration Checksheet at the rear of the operating manual provided with the instrument.
If you have lost this critical document, and no longer know the root password, then you can remove the SD card from its socket and mount the card on a different system with a card reader. You can then edit the /etc/passwd file directly, changing the line:
root:x:0:0:root:/root:/bin/bash
To:
root::0:0:root:/root:/bin/bash
Removing the "x" disables the regular encrypted password in /etc/shadow, and enables a blank password.
SD Card Corruption
SD card corruption can happen in rare circumstances. In some cases, it is possible to restore a base operating system image to the card, and then transfer the instrument-specific configuration file to the card.
To do this, the user needs to know the firmware version (of the form "v6.4.39OL" or similar) that was last used on the instrument. This information is recorded on the latest Calibration Checksheet provided with the instrument. The initial Calibration Checksheet is provided at the time of shipment. Newer Calibration Checksheets may have been provided if the instrument was re-calibrated by Avtech.
Copies of the 2GB base operating system images are available here. Download the one that matches your instrument.
Copies of the instrument-specific configuration files are available here. Again, download the most recent one that matches your instrument.
For example, S/N 14492 shipped with firmware 6.4.39OL, so this base image is required:
../../firmware/v5-images/v6.4.39_OL.
Similary, its instrument-specific configuration file is:
../../firmware/flash-copies/sn14492.flash.
If the SD card is removed from the instrument and inserted into a card reader/writer on another computer, then the base image can be transferred using a (Linux) command similar to:
dd if=v6.4.39_OL of=/dev/sdb
In this example, "v6.4.39_OL" is the base image that was previously downloaded, and "/dev/sdb" is the device name of your card-writer (the actual device name will probably be different). Windows computers will have similar image-writing tools.
At this point, the user needs to mount the SD card on their computer, and transfer the configuration file ("sn14492.flash" in this example) to the /root/ folder of the SD ext4 filesystem.
Once that step is complete, the SD card can be re-installed in the instrument.
If it is necessary to replace an SD card, it is recommended that the same model of SD card be used. The following cards have been used in the past:
- Swissbit SFSD2048N1BN1TO-I-QF-161-STD (in general use until mid-2021)
- Swissbit SFSD2048N1BM1MT-I-ME-2A1-STD (in general use after mid-2021)
- Delkin S302TLNJM-C1000-3 (rarely used, and only after mid-2021)
- ATP AF2GUDI-OEM (rarely used, and only after mid-2021)