Using hostapd with a wifi dongle with an rt2800pci chipset

04 Feb 2015 » {[{categoryPostCurrent}]}

In this tutorial I'll show you how to configure a wifi access point (AP) using hostapd and a USB wifi stick with a bundled Ralink rt2800pci chipset.


The here-under requirements are mandatories in order to follow all the instructions of this tutorial:

  • debian wheezy (and subsequents distros)
  • a USB wifi dongle rt2800pci


first step: patch the hostapd source code

if you have read and follow my previous tutorials that explain how to setup a wifi AP, you probably notice that with a USB wifi dongle that embed an rt2800pci chipsed you faced the error did not acknowledge authentication response each time a client is trying an association with the AP.

In order to go over this issue, you have to patch the source code of hostapd and compile it another time:

a) download and extract the source code

Retrieve the hostapd source with the traditionnals packages managing tools of the debian distributions:

apt-get install devscripts
apt-get source hostapd    
apt-get build-dep hostapd    

b) modify the source code

If the previous step goes well, a directory wpa_1.0 has appeared in which you have to move in:

cd wpa_1.0

After that, modify the file ./src/ap/ieee802_11.c in order to comment the following return instructions. finally, your source must look like this :

if (!ok) {
   hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
                  "did not acknowledge authentication response");
if (!ok) {
   hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
                  "did not acknowledge association response");

c) compile and craft the new .deb files

Before to dive into the compilation process you have to sign the new version of the modified codes.

dch --local perso
dpkg-source --commit

now it's time to compile and craft you new package:

debuild -us -uc

2nd step: installation of the .deb files

At this stage, you have all the stuff you need in order to install the new .deb:

dpkg -i ../wpa*.deb

3st step: test

now rewind to my previous tutorial that explain how to configure an AP with hostapd and check that now all goes well and specifically that the error did not acknowledge authentication response has gone away.


In this tutorial, I'll show you how to patch the source code of hostapd in order to make compatible the USB wifi dongles based on the chipset rt2800pci with hostapd.

Voir aussi...

comments powered by Disqus