Skip to content

Install TL866 II programmer’s software XGPRO on a Linux machine

In this tutorial, we will explain how to install TL866 II programmer’s software on a Linux machine. Instead of giving a clear-cut list of steps, we will explain the errors you will get and how to eliminate them so that you get an idea of how various application software interacts with the hardware via the operating system.

Introduction

A programmer is a device using which we can program IC’s like ROMs, microcontrollers, etc., and check their operations. An example of a programmer would be USBasp which is used to program AVR microcontrollers using serial programming algorithm. Another example of a programmer would be PICkit which is used to program PIC family of microcontrollers. Different ICs require different programming algorithms to get programmed. Some microcontrollers, like some PIC microcontrollers, can only be programmed by high voltage parallel programming algorithm, while others, like most of the microcontrollers in AVR family, support both high voltage parallel programming and in-circuit serial programming (ICSP) algorithms.

To deal with such a variety of devices in the market, there exists the so-called “Universal Programmer”, which can program most, if not all, of the microcontrollers you will ever use during your projects. One such universal programmer is TL866 II Plus which is manufactured by XGecu. Its software, Xgpro, is designed for the Windows platform (Windows XP/7/8/10). However with a little tinkering, one can make this programmer using a Linux machine.

 

What is Wine?

Wine stands for “Wine Is Not an Emulator”. It is software that provides a compatibility layer between applications developed for Windows and Unix-like operating systems, in this case, a Linux machine. We should further explain what we meant in the last line. As we know, our hardware can only understand and execute sequences of ones and zeros, which we call machine code. When you click on the “Print” option in a PDF viewer, a sequence of ones and zeros is generated which the hardware understands as a command for printing the document you are viewing. A sequence of ones and zeros in the form of 5 volts and zero volts, respectively, is generated from the port of your machine and is read by the printer which prints the document. Now, if you were to take a computer without any software involved and program it in this binary code, you are going to scratch your head for eternity but won’t be able to solve the problem in any substantial amount. Debugging such sequences would be a disaster!

Concept of an Operating System

To make the computer more usable, we have a software called Operating System. It creates a virtual machine that interacts with your hardware. Your applications are run on this virtual machine. This serves the following purposes:

  1. The level of abstraction that is provided makes it easier to use the computer.
  2. Software designed for an operating system can be run on various other machines running the same operating system. This contributes to the portability of software.

The three most popular operating systems in the present day are Windows 10, macOS, and Linux distros, most of which are available for free.

Now, people prefer to use Linux for a variety of reasons. Some say that it doesn’t lag much on their old systems, and some say that it gives them more freedom to tinker. Whatever the reasons are, Linux kernel-based OS are very popular and are run on servers, rockets, etc. It is run even on Ingenuity helicopter on Mars.

Running Windows applications on Linux

As the popularity of Linux grew, people started trying to run their Windows applications on their Linux machines. However, they were mostly unsuccessful, because the way that Linux is designed and the way Windows is designed is different. Eventually, some crazy group of programmers came up with a software called “Wine”, which stood for “Wine Is Not an Emulator”. It provided a layer of compatibility for Windows applications so that they can be run on a Linux machine. You can imagine Linux kernel to be like a lock. Only keys that are designed for this lock will run on it. Similarly, Windows OS is also a kind of a different lock. To run a Windows-based application on Linux-based OS, say Linux Mint, you will need to have a key that locks into Linux and is a lock for some basic Windows applications. This way you can run Windows applications on Linux.

Lock and Key analogy for OS and applications
Lock and Key analogy for operating system and applications. We use wine to run Windows applications in a Linux environment

Yes, your intuition is right, we are going to use Wine to run the software for TL866 II programmer.

 

Steps for installation of TL866 II programmer’s software

Step 1: Installing the TL866 II programmer’s software from XGecu’s website

Go to www.xgecu.com and click on “Programmer software download (for T56/TL866 II Plus)”.

TL866 II programmer's - XGecu home page
XGecu home page

A webpage with several links for the installation of the software will open up. You can download the software from various servers, however, we would advise that one should download it from the local server.

Downloading TL866 II programmer's software, Xgpro
Installation links for Xgpro software

Once the download finishes, you will see a .rar file by the name “xgproV1110_setup.rar” in your downloads folder.

Step 2: Extracting the file using unrar

Now we need to extract xgproV1110_setup.rar which will give us the installation software for the programmer. For this, we will use a utility named “unrar”. To install it, in terminal type:

sudo apt-get install unrar

As you are using sudo, you will be asked to provide your password for your system. Enter it carefully. If the password is correct, the installation will proceed flawlessly.
Once unrar is installed, we can now extract our .rar file using the following command:

unrar x xgproV1110_setup.rar

If the extraction was successful, upon typing dir, you will observe XgproV1110_setup.exe file in the list of files in the Downloads folder.

Extraction of TL866 II programmer's software
After successful extraction, XgproV1110_setup.exe will appear in the list of files in the given directory

Observe the .exe file type. It means that the installer is a Windows application. The installer will install Xgpro software. On a Windows machine, this task will be executed by just running the installer. However, on a Linus machine, with some 3-4 commands, you will be ready to go.

Step 3: Install wine

Wine is installed using the following command:

sudo apt-get install wine

Once wine has been installed, you can find its version by typing

wine --version

in the terminal.

Installation of wine and version check
Installing wine and checking its version

Step 4: Installing the software using wine

To install Xgpro using wine, in the terminal type:

wine XgproV1110_setup.exe

Xgpro installation window will come up as shown in the figure. Don’t change the destination folder; let it be C:\Xgecu. Click on Install. This won’t take much time. Once the installation is finished, you will get an error dialogue box like the one shown below:

DPInst.exe error

It says that DPInst.exe doesn’t execute on your current system. What does this mean? DPInst stands for Driver Package installer, a windows software used for installing driver packages. This prompt has come up because by default wine doesn’t have access to the USB ports. To bypass this problem we will install udev (which is a device manager), install a library file, and execute two commands as the root user.

Step 5: Installing udev

udev is a device manager for the Linux kernel. It is installed using the following command:

sudo apt-get install udev

Step 6: Installing setupapi.dll

setupapi.dll is the library that, roughly speaking, provides us with a method to communicate with our programmer. Before downloading this file, go to your user folder and check View>Show Hidden Items as shown in the image below.

Show Hidden files option in Thunar
Check “Show Hidden Files” option to view .wine folder

A folder by the name .wine will be visible now. Click on it and inside it click on drive_c.

Location of Xgecu folder
Xgecu folder at location .wine/drive_c

There you will see a folder by the name Xgecu. This is where we have to install the library file.

Go to the following link:

TL866/setupapi.dll at master · bhageria/TL866 (github.com) (Thanks to @Torm for providing the new link in the comments below. I created a fork of the repo to avoid 404 errors in the future)

It is a fork from (radiomanV/TL866: Open source software for TL866 (github.com))

and click on the download option. Download this file in the Xgecue folder we have just talked about.

Step 7: Final touches

Now go to the Xgecu folder. If there is any file with the extension .dll, delete it. Now right-click in the folder and open it as the root user.

Step 1 of opening a root user terminal
Opening the folder as root

A prompt for the superuser password will come. Enter it carefully. Once the folder opens up again as root, right-click and click on the “Open in terminal option”.

Step 2 of opening a root user terminal
Opening terminal in folder opened as root

In this root terminal, execute the following two commands:

echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="a466", ATTRS{idProduct}=="0a53", GROUP="plugdev", MODE="0666"' > /etc/udev/rules.d/51-minipro.rules

udevadm trigger

Running commands in terminal opened in a folder opened as root
Running the commands in a terminal opened in root folder

You can now close both the root terminal and the Xgecu folder opened as root.

Step 8: Testing our device with TL866 II programmer’s software Xgpro

Connect TL866 II programmer to your laptop and run TL866 II programmer’s software Xgpro by double-clicking on its icon. Upon being prompted for the type of programmer, click on TL866 II Plus. To check whether the programmer is detectable by the system or not, go to Tools>System Self-check.

System self check in xgpro - TL866 II programmer's software
System Self-check option

The programmer self-check window will appear. Click on Test. If the test is successful, the self-test check result will show some data as shown in the image below.

Result of a successful system self-check
Result of a successful system self-check

In case of failure, it will tell you that the programmer has not been detected. In this case, try to purge wine and udev and try reinstalling the software.

Conclusion

With this setup done, you can now use TL866 II plus universal programmer to program almost all the microcontrollers in the AVR and PIC family. You can also use it to check whether a particular logic IC is in working condition or not. We hope that with this setup, you will enjoy making various projects in embedded systems.

13 thoughts on “Install TL866 II programmer’s software XGPRO on a Linux machine”

  1. I know it’s a significantly different thing but is there a way to do this using Wineskin or WINE on a Mac? The same “DPInst.exe doesn’t execute on your current system” comes up but not sure how to adapt the final UDEV instructions here for Mac use.

  2. After installing software version 12.65, a graphics error appeared on the taskbar, marked with a yellow marker. The graphics are inaccurate and difficult to read. My operating system is Ubuntu 22.02, GForce 730 graphics card (the image is correct in Windows). The programmer works properly. Unfortunately, I cannot attach a photo with blurry graphics.

  3. Clicking on the icon does nothing on my Debian 11 system.

    If I use information from the icon’s properties and open a terminal in
    ~/wine/drive_c/Xgpro and then execute

    env WINEPREFIX=”/home/adrian/.wine” wine-stable C:\\Xgpro\\Xgpro.exe

    I get the following error :

    0070:err:module:import_dll Loading library SETUPAPI.dll (which is needed by L”C:\\Xgpro\\Xgpro.exe”) failed (error c000012f).
    0070:err:module:LdrInitializeThunk Importing dlls for L”C:\\Xgpro\\Xgpro.exe” failed, status c0000135

    setupapi.dll is present in that directory. I have also tried creating SETUPAPI.dll and SETUPAPI.DLL with no change, and I have tried making them executable.

    What should I do to allow it to load setupapi ?

Leave a Reply

Your email address will not be published. Required fields are marked *