hostapd in a VM for device testing

While working with my Chamberlain MyQ Garage Door Opener the other day, I ran into issues getting hostapd to work on Kali with the chap ass Netis WP2120 nano USB adapter I had (based on the RTL8192cu chipset/driver).  I need to clear off a few browser tabs and eventually see if I can get hostapd working with this adapter on a different box (VM) for testing.  A few of the links I worked with unsuccessfully, but provide some useful information.

 

More notes

Installed usbutils for lsusb
Installed hostapd
Installed iw
Installed lshw
Ran through steps at https://adamscheller.com/systems-administration/rtl8192cu-fix-wifi/, minor issue with “linux-headers-generic”, skipped it for now.

Did receive a modprobe error, “could not insert ‘8192cu’: Device or resource busy”. lsmod shows the old rtl8192cu drivers active. Did a reboot. Correct driver modules now listed, though no device listing in ‘iw list’. Does appear in ‘lshw -c network’, and appears as wlan0 in ‘ip link list’.

Started in with hostapd steps from http://sarumait.blogspot.com/2013/11/ubuntu-wireless-hotspot-using-edimax-ew.html and from my previous testing on the Chamberlain page.

Attempted to start hostapd service which seemed to work, but didn’t see my SSID. Ran it interactive debug and got an “invalid/unknown driver ‘8192cu'”.

Instructions at https://github.com/pritambaral/hostapd-rtl871xdrv
Git cloned the above repository and the w1.fi repository listed. Got hostapd to build after installing dependencies (below).

apt-get install apt-file libnl-3-dev libnl-genl-3-dev pkg-config libssl-dev
apt-file not needed, but handy for looking up files that resulted in failures during make.

Ran the patch process noted at https://github.com/pritambaral/hostapd-rtl871xdrv

Ended up having some success after doing a ‘make dkms’ in the rt8192cu directory cloned from https://github.com/dz0ny/rt8192cu and setting the driver in my hostapd.conf to the rtl871xdrv

Pages helpful in getting it to work

2 Comments

  1. Comment by lkohari:

    Hi,

    If you need some help about my blogpost, feel free to leavea comment, or send a me mail.
    It really took ages to solve all of my issues with hostapd, so I’m happy to help.

  2. Comment by Landis V:

    Thanks! I appreciate the offer and your post!

Leave a Reply

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