Tag Archive : driver

/ driver

Installing USBasp Drivers on Windows 8.1

December 11, 2015 | Article | No Comments

When we are dealing with AVR programming, after create the codes in our development machine we should write the code into the device. For this purpose, we need a tool which we called Downloader or Programmer. This tool will “burn” the code into AVR CPU using spesific port.

One popular tool is USBasp (http://www.fischl.de/usbasp/). This tool is a USB in-circuit programmer which consists of an ATMega88 or an AtMega8 and a couple of passive components. In short, we need no special USB controller anymore.


Sometimes, we might face a problem installing usbasp drivers on Windows 8.1. But, this article will discuss about how to install those drivers.


The method described here will require machine to restart. Make sure you have write down the steps before proceeding.

Identify The Problem

The main problem is that Microsoft doesn’t allow us to install drivers which are not ‘digitally signed’ directly (or easily) on Windows Vista and later version (7, 8, and also 8.1). To get around this, we must temporarily disable the signature verification process.

Phase 1: Disable Driver Signature Enforcement

  1. Enter “start screen” and open “PC Settings”
  2. Choose “Update and recovery” option in the left panel.
  3. Choose “Recovery” option in the left panel
  4. Click on “Restart now” button, below the “Advanced startup” section then click “reset” button to begin resetting.
  5. Once machine is restarted, we will face several options which we can choose by pressing F1-F9. Choose F7 for “Disable driver signature enforcement”

Now, the machine will boot with no driver signature enforcement. We can then install the driver to our machine.

Phase 2: USBasp Driver Installation

Download the driver fro Windows from USBasp (http://www.fischl.de/usbasp/). The latest version is version 2011-05-28.zip which can be downloaded here. Read the readme first. Because I use WinAVR version 20100110, i will extract the libusb_0.1.12.1 folder as D:\libusb_0.1.12.1.

Plug the USBasp in to USB port. Windows will try to recognize the device. It should be recognized but it lacks of driver so the process is not finish.

Open “Device Manager” on “Control Panel”. Look for Other devices. We have USBasp device there.


Right click on it and click on “Update Driver Software…”


Click on “Browse my computer for driver software”.


Type the location of folder “D:\libusb_0.1.12.1” and then click “Next”.


Windows will give warning as it can’t verify the publisher of the driver. Just ignore it and select “Install this driver software anyway”


Let the installation proceed and wait until it finish.



Creating MySQL Driver for Qt5 on Windows

December 9, 2015 | Article | No Comments

This article will discuss on how to create MySQL driver for Qt4 on Windows using MinGW. This article is motivated by the fact that MySQL driver isn’t shipped by default on Qt5.

All the works are done using:

  1. Windows 8
  2. MinGW 4.8.1 (TDM)
  3. Qt 5.1.1
  4. MySQL

Actually my Windows 8 is 64-bit, but all program we test here is 32-bit version (MinGW32, MySQL 32-bit).

Obtain Materials

For this article we need Qt libraries, Qt source code, and MySQL server.

Qt version I use is 5.1.1. You need to download two separate files (libraries and source code).

We also need MySQL server and the library. The version I use is 5.6.14 which you can download here.

The reason why I didn’t use the 64-bit version simply because my current project should produce 32-bit app. If you want to follow this article, make sure all the materials are 32-bit.

Installation the Materials

Installing Qt

Install Qt libraries. Installing default components would do alright. Although you can use full installation, but in this article we will use the default one. I select drive C:\ like default path and leave it to Qt. At the end, the Qt is installed as C:\Qt\Qt5.1.1

Next, extract the Qt sources to a folder you choose. Let’s extract it to the same folder as Qt libraries does. Which means, the target path is C:\Qt\Qt5.1.1. Rename the long name “qt-everywhere-opensource-src-5.1.1” to “sources”. Thus, we have C:\Qt\Qt5.1.1\sources.

Installing MySQL

Install MySQL. Select custom installation. At minimal, you need to install Client C API Library, the other components are optional. Let’s installed it under C:\Program Files (x86)\MySQL\MySQL Server 5.6

Building & Deploying

Open Qt command prompt, You should have one. It is like normal command prompt, except it has default Qt environment variable we need. Once you open it, you will be brought to your Qt directory.

Now execute following:

set mysql=C:\\PROGRA~2\\MySQL\\MYSQLS~1.6
cd C:\Qt\Qt5.1.1\sources\qtbase\src\plugins\sqldrivers\mysql\
qmake "INCLUDEPATH+=%mysql%\\include" "LIBS+=%mysql%\\lib\\libmysql.lib" -o Makefile mysql.pro

Once it is built successfully without error, you will have some fileson C:\Qt\Qt5.1.1\sources\qtbase\plugins\sqldrivers. They are:

  1. libqsqlmysql.a
  2. libqsqlmysqld.a
  3. qsqlmysql.dll
  4. qsqlmysqld.dll

For .dll files, move them to C:\Qt\QT5.1.1\5.1.1\mingw48_32\plugins\sqldrivers.

For .a files, move them to C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib

Also, copy libmysql.dll from %mysql%\lib to C:\Windows


To use the driver, don’t forget to add QT += sql to project file, else it don’t work.

Check which drivers are available by this code:

#include <QtCore/QCoreApplication>
#include <QtSql>

int main() {
    QCoreApplication a(argc, argv);
    aDebug() << QSqlDatabase::drivers();
    return a.exec();

Social media & sharing icons powered by UltimatelySocial