We work with old industrial software under linux or how to make wine and RS-485 friends

In the light of recent presidential decrees, there have been questions from customers, but is there a% device configurator that has not been supported for 10 years, whose developers have quit or fled Russia% under linux?

As a result, this instruction was made of a blue ribbon, the remnants of a tambourine and fragmentary knowledge of linux.

I hope it will be useful to colleagues involved in the commissioning and operation of automated process control systems

Do not forget that we must use domestic software, as a result of which it is valid for Astra Linux SE 1.7.1 OREL

It is assumed that the system is installed and connected to the Internet.

Used as a COM port MOXA Upport 1150, you need to connect MOXA Uport to PC USB port before setup. When using another device, it must be configured in accordance with the supplied manual.

Installing Wine

Basic instruction (current) here.

we are interested in “Installing Wine version 7.3 in Astra Linux Special Edition RUSB.10015-01 (next update 1.7)”

Step by step:

1. Download the Wine 7.3 package from here and package ia32-libs from here.

2. Open the Fly terminal and enter the commands in order:

sudo apt install ia32-libs

sudo apt install libc6-i386

sudo dpkg -i ~/Загрузки/ia32-libs_20220330+1.7se_amd64.deb

# Имя текущей версии пакета, со временем она может быть изменена.

sudo dpkg -i ~/Загрузки/wine_7.3-0-astra-se17_amd64.deb

# Имя текущей версии пакета, со временем она может быть изменена.

sudo apt install ca-certificates libmspack0 cabextract

wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

chmod +x winetricks

sudo mv winetricks /usr/bin

export WINE=/opt/wine-7.3/bin/wine

# для быстрого запуска из консоли

WINE working directory will be located at /opt/wine-7.3/bin/

Installing the MOXA Uport 1150 Driver

The driver is needed for a specific version of the kernel to download from of site or from here.

You can see the kernel version with the uname -r command in the terminal

At the moment it is 5.10, download driver v.5.1.

Next steps:

1. Open the fly terminal and enter the following commands in sequence:

sudo apt install make linux-headers setserial autotools-dev

sudo mkdir /moxa

cd /moxa

sudo cp /home/user/Загрузки/moxa-uport-1100-series-linux-kernel-5.x-driver-v5.1 moxa-uport-1100-series-linux-kernel-5.x-driver-v5.1

# user заменить на своего

sudo tar xvfz moxa-uport-1100-series-linux-kernel-5.x-driver-v5.1.tgz

cd mxu11x0/driver

sudo make clean

sudo make install

# Если во время выполнения команды "make install" возникает ошибка, то выполняем 

# "sudo apt install --reinstall linux-headers-$(uname -r)" и повторно выполняем "make install";

/sbin/modprobe mxu11x0

2. We put Uport into 485 2W mode using the command in the terminal: setserial /dev/ttyUSB0 port 1

port number can be seen with sudo ls /dev/ttyU*

setting options:

port 0 → RS-232

port 1 → RS-485 2W

port 2 → RS-422

port 3 → RS-485 4W

Configuring WINE to work with COM ports and software

Using the file manager (explorer) go to /opt/wine-7.3/bin/ and run regedit

In the registry key [HKEY_LOCAL_MACHINE\Software\Wine\Ports] create a STRING variable:


Close regedit.

Run winecfg and change the windows version to Windows XP or windows 2003:

Apply and close Winecfg.

Next, we create a symbolic link to the COM port we need:

sudo ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
If com1 already exists, you can delete it and recreate the link:

sudo rm ~/.wine/dosdevices/com1
sudo ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

In order not to change the rights to the COM port, you need to add the current user to dialout with the command:
sudo adduser dialout
then LOG OUT and LOG IN again.

Download the software to any folder in your home directory and launch it from the file manager (Explorer) by double clicking. in the application selection list, click on another… and select wine from /opt/wine-7.3/bin/:

So that the next time the exe format is opened through WINE, you can set it by default:

Then you can use the necessary software.

All this cactus gnawing was done to run certain types of industrial software, and each worked in its own way.

Device scanner by com port – when opened, it will ask about replacing sys files – answer no.

Can search for a long time or fall with errors – just restart. If it finds devices on other COM ports or hangs for a long time, then it is better to remove all symbolic links to COM ports except the one you need:

sudo rm ~/.wine/dosdevices/comN
where N is the number of the extra COM port.

Hardware configurator – may crash with errors – just restart.
In general, 3 out of 5 programs worked without comment.

The author of this article can be kicked, called a lamer who does not know how to use linux, but suggest how it should have been done easier and faster.

Similar Posts

Leave a Reply