-
Notifications
You must be signed in to change notification settings - Fork 0
Running Analyst On Wine
Cochran Undersea Technology releases and supports their Analyst software for Windows only. The software is used in conjunction with Cochran dive computers and Cochran communication cables to configure settings, download logs, plan dives, aid in mixing gases and other things. This document describes how to run Analyst on Linux using the Wine Windows environment.
The person using this document should have a working knowledge of Linux, familiarity with common Linux command-line tools, and a familiarity with the Linux graphical user interface. A familiarity with Linux text editors and building software may also prove handy.
A Cochran dive computer supported by Analyst 4.x, A Cochran USB data cable (for 4.01) or a serial cable (for 3.08Pro), A Cochran Analyst 4.01 CD-ROM or Cochran Analyst 3.08Pro CD-ROM, A PC with suitable communication ports and Fedora Linux 22 installed. (Other versions may work as well and other distributions of Linux may work with a slight modification to instructions.)
The steps to install and run Analyst on Linux involve:
- Installing Wine,
- Installing software development tools,
- Downloading, compiling and installing wineftdixx software,
- Installing Analyst,
- Running Analyst
Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop. With Wine you can run a long list of Windows programs directly on Linux without the need of a resource hungry virtual machine or emulator. On Fedoraa 22 Wine can be installed using the “dnf” command, this requires a Internet connection. There are several Wine packages that need to be installed but on Fedora 22 these can all be installed using this command:
sudo dnf install wine wine-devel
We will be using these development tools in the next step when we compile the FTDI USB-to-Serial library for Wine. These tools include compilers and libraries as well as build tools.
sudo dnf group install “C Development Tools and Libraries”
The Cochran USB download cable is based on an FTDI USB to Serial chipset. We need to install a Wine driver DLL that will allow Wine to use the Linux FTDI driver. Without this in place Analyst won't be able to find the dive computer. First let's create a directory to store the source code:
cd ~ # Switch to our home directory
mkdir src
cd src
Now let's download the source:
git clone https://github.com/brentr/wineftd2xx.git
And now compile it:
cd wineftd2xx
make
And install it:
sudo make install
We need to configure some special rules so that when we connect the Cochran USB cable it will assign the proper permissions for us to use it. We'll grant permissions to the group called users.
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0664", GROUP="users"' > /etc/udev/rules.d/81-cochran.rules
Finally we have to add our user to the users group:
sudo usermod -a -G users "$USERNAME"
NOTE: This change to group membership requires you to log out and log back in again for it to take effect.
Insert your Analyst CD-ROM and browse to it using the File Explorer and click the install icon as you would in Windows.
Once installed you can run Analyst by by pressing the system-key (a.k.a Windows key) and 'a' simultaneously. Then type analyst in the displayed search box. Several Analyst icons will appear, choose Analyst 4.01 Pro. Before we can access the dive computer we must first unload the Linux FTDI driver so the Wine FTDI driver has full access. This step has to be done every time the Cochran USB cable is plugged in and it can be done before or after Analyst is run, however must be done before attempting to access the dive computer.
sudo rmmod ftdi_sio
Analyst 3.08Pro uses serial ports to communicate with dive computers. This is unlike Analyst 4.01 which uses USB ports. We have to configure Wine with the serial port associated with the dive computer before Analyst can access it. To do so we first must identify the serial port in question. If you have an actual serial port on Linux it will likely be named /dev/ttyS0, or /dev/ttyS1 so if you're using a Cochran serial cable use one of these ports. If you're using the Cochran USB cable your port will likely be /dev/ttyUSB0 if you have other USB serial devices or unplug and re-plug the cable quickly the device may appear as /dev/ttyUSB1, /dev/ttyUSB2, or higher. We need to create a soft link to the correct device name before Analyst can access it. Use a command like this one (substitute the correct device name.)
ln -sf /dev/ttyUSB0 ~/.wine/dosdevices/com1
Now that the device is properly configured you can run Analyst by pressing the system-key (a.k.a Windows key) and 'a' simultaneously. Then type anapro in the displayed search box. The AnaPro icon will appear, double-click it to start Analyst. Analyst will ask for the serial port and communication parameters needed to access the dive computer. Select com1 and 9600 and choose the “com test” button to verify that it is configured correctly. Analyst should respond that it found the device. Save the configuration by pressing the STO button.
- Wine web site http://wine-hq.org
- Wineftd2xx web sites https://sourceforge.net/projects/wineftd2xx/ and https://github.com/brentr/wineftd2xx
- Cochran Undersea Technology web site http://divecochran.com