RPI5 + kali + alfa AWUS036NHA

Hello everyone.

I have a problem installing an Alfa AWUS036NHA USB card on a raspberry pi 5 8GB.

Here is what I do:

  • creation of the SD card via the Raspberry Pi Imager utility
  • update of Kali (update and upgrade)
  • modification as indicated on the Kali site:
    kali@kali:~$ cd /usr/src/kernel
    kali@kali:/usr/src/kernel/$ sudo git clean -fdx && sudo make bcm2711_defconfig && sudo make modules_prepare
  • driver installation as mentioned on the site:
    kali@kali:~$ sudo apt install --no-install-recommends realtek-rtl88xxau-dkms

→ I end up with this error :

Building initial module for 6.6.45-v8+
Error! Bad return status for module build on kernel: 6.6.45-v8+ (aarch64)
Consult /var/lib/dkms/realtek-rtl8814au/5.8.5.1~git20240527.d8208c8/build/make.l og for more information.
dpkg: error processing package realtek-rtl8814au-dkms (–configure):
installed realtek-rtl8814au-dkms package post-installation script subprocess re turned error exit status 10
dpkg: dependency problems prevent configuration of realtek-rtl88xxau-dkms:
realtek-rtl88xxau-dkms depends on realtek-rtl8814au-dkms; however:
Package realtek-rtl8814au-dkms is not configured yet.

dpkg: error processing package realtek-rtl88xxau-dkms (–configure):
dependency problems - leaving unconfigured
Processing triggers for kali-menu (2024.3.1) …
Processing triggers for man-db (2.13.0-1) …
Errors were encountered while processing:
realtek-rtl8814au-dkms
realtek-rtl88xxau-dkms
Error: Sub-process /usr/bin/dpkg returned an error code (1)

  • if I try to install via the procedure given on the github/aircrack site, I also get errors.

Could you help me get my wifi network card working?

Thank you in advance

2 Likes

Hello you can try this method:

Check the installed kernel version:

uname -r

If it’s not the expected version or there are known issues with it, you might try downgrading to a supported kernel version.

Alternatively, try upgrading dkms and other kernel-related packages.
First, remove the broken DKMS packages:

sudo apt remove --purge realtek-rtl8814au-dkms realtek-rtl88xxau-dkms

Clean up any residual files:

sudo dkms remove -m realtek-rtl8814au -v 5.8.5.1 --all
sudo dkms add -m realtek-rtl8814au -v 5.8.5.1
sudo dkms build -m realtek-rtl8814au -v 5.8.5.1
sudo dkms install -m realtek-rtl8814au -v 5.8.5.1
1 Like

Install Correct Driver for AWUS036NHA

The Alfa AWUS036NHA uses the Atheros AR9271 chipset, which is a different chipset than what’s being installed with the realtek-rtl88xxau-dkms package. The realtek-rtl88xxau-dkms package is for Realtek chipsets, not for Atheros.

Uninstall the conflicting Realtek drivers:

sudo apt remove --purge realtek-rtl88xxau-dkms

Install Atheros drivers for AWUS036NHA:

sudo apt install firmware-atheros

I hope this fixes the error man! :saluting_face:

1 Like

I can show you the aircrack-ng GitHub Method if those didn’t fix the error!

Hello and thank you for all these answers.

After installing the Artheros firmware, it cannot find the wifi card either via ifconfig (it only finds wlan0 ->RPI) or via lsusb.

On the other hand, it cannot uninstall Realtek firmware but that is not very important. I will do a clean install once I find the solution.

THANKS

Do you think this could work for the anothe Alfa adapter the , 036 ach

Ok, thank you for your answer but I’m completely stupid, the problem was in front of me.

The USB cable did not take into account data transfer, just charging. Changed cable and everything is OK.

Thank you so much.

1 Like

Nope, not stupid, using the wrong cable type has caught out many users, and the fact you bring it up is helpful for the next user who didn’t actually try a different cable yet :wink:

1 Like