1

I am trying to install a USB wifi dongle on my Ubuntu laptop and I am loosing the battle so I need some help guys. See details below.

Wifi dongle: AWUS036NEH by ALFA Network. I have the driver for this device but I can’t get it to complie.

According to what I see in the Makefile the driver code was written for a 2.6 linux kernal. I am running version 4.8.0 so that may be an issue. I have Ubuntu 16.04.4 running and all updates to the OS and the GCC compiler have been installed. Below I have the warnings and errors from the compiler. I don’t know if they can be fixed or not. I took two C programming classes in college and worked as a C programmer for about a year after graduation but that was 30 years ago or so. So, if they can be fixed I could probably pull it off with a little help.

/home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_aes.c:1459:32: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
      DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Wrap: allocate %d bytes memory failure.\n", sizeof(UINT8)*PlainTextLength));


    home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.c:3142:34: error: passing argument 2 of ‘hex_dump’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    hex_dump("null frame before", &longValue, 4);

/home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:787:29: warning: passing argument 2 of ‘RTUSBReadMACRegister’ makes integer from pointer without a cast [-Wint-conversion]
  RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
                             ^


cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.o' failed
make[2]: *** [/home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_data.o] Error 1
Makefile:1491: recipe for target '_module_/home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux' failed
make[1]: *** [_module_/home/bill/Share/AWUS036NEH/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-41-generic'
Makefile:388: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

I downloaded the driver you provided a link to but when I try to compile I get similar errors to the original code. Damn!

Here is output from the lsusb and lsmod | grep rt commands!

bill@hacker1:~/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_mod-master/DPO_RT5572_LinuxSTA_2.6.1.3_20121022$ lsusb

Bus 002 Device 003: ID 04f2:b1d6 Chicony Electronics Co., Ltd CNF9055 Toshiba Webcam Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 005: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 002: ID 3938:1032
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

bill@hacker1:~/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_mod-master/DPO_RT5572_LinuxSTA_2.6.1.3_20121022$ lsmod | grep rt

rt2800usb 28672 0 rt2x00usb 24576 1 rt2800usb rt2800lib 94208 1 rt2800usb rt2x00lib 57344 3 rt2800lib,rt2800usb,rt2x00usb rtl8192ce 57344 0 rtl_pci 28672 1 rtl8192ce rtl8192c_common 53248 1 rtl8192ce rtlwifi 77824 3 rtl_pci,rtl8192ce,rtl8192c_common mac80211 761856 6 rt2800lib,rtl_pci,rtl8192ce,rt2x00lib,rt2x00usb,rtlwifi cfg80211 581632 3 rt2x00lib,mac80211,rtlwifi parport_pc 32768 0 parport 49152 3 lp,parport_pc,ppdev bill@hacker1:~/Downloads/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_mod-master/DPO_RT5572_LinuxSTA_2.6.1.3_20121022$

  • I am quite certain that a circa-2012 driver file is too old to compile on a modern 2017 kernel. Please edit your question to add the result of: lsusb and we'll look for a better way. "... the driver code was written for a 2.6 linux kernal. I am running version 4.8.0 so that may be an issue. " Absolutely!!! – chili555 Mar 9 '17 at 21:20
  • Try this community modified driver: github.com/maroviher/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_mod – Hydranix Mar 9 '17 at 21:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.