{"action":"opened","issue":{"url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/442","repository_url":"https://api.github.com/repos/offensive-security/kali-nethunter","labels_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/442/labels{/name}","comments_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/442/comments","events_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/442/events","html_url":"https://github.com/offensive-security/kali-nethunter/issues/442","id":150622746,"number":442,"title":"Can not install TL-WN822N wifi card driver on Nethunter","user":{"login":"wengyingjian","id":16009406,"avatar_url":"https://avatars.githubusercontent.com/u/16009406?v=3","gravatar_id":"","url":"https://api.github.com/users/wengyingjian","html_url":"https://github.com/wengyingjian","followers_url":"https://api.github.com/users/wengyingjian/followers","following_url":"https://api.github.com/users/wengyingjian/following{/other_user}","gists_url":"https://api.github.com/users/wengyingjian/gists{/gist_id}","starred_url":"https://api.github.com/users/wengyingjian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wengyingjian/subscriptions","organizations_url":"https://api.github.com/users/wengyingjian/orgs","repos_url":"https://api.github.com/users/wengyingjian/repos","events_url":"https://api.github.com/users/wengyingjian/events{/privacy}","received_events_url":"https://api.github.com/users/wengyingjian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-24T04:01:41Z","updated_at":"2016-04-24T04:01:41Z","closed_at":null,"body":"I flushed nethunter to cm12 on my Opo device, and bought an external wifi card TL-WN822N with an OTG.\r\nAfter connected the wifi card to my device, I could see `Bus 001 Device 002: ID 0bda:818b Realtek Semiconductor Corp` with `lsusb` command.  \r\n  \r\n**So next step is to install the right driver.**   \r\n### 1.  \r\nI followed this tutorial: [https://sites.google.com/site/easylinuxtipsproject/reserve-7#TOC-Realtek-RTL8192EU-chipset-0bda:818b-](https://sites.google.com/site/easylinuxtipsproject/reserve-7#TOC-Realtek-RTL8192EU-chipset-0bda:818b-)  \r\n\r\nBut an error occurred:\r\n\r\n```\r\nmake[1]: *** /lib/modules/3.4.67-cyanogenmod-g399b32b/build: No such file or directory.  Stop.\r\nMakefile:1043: recipe for target 'modules' failed\r\nmake: *** [modules] Error 2\r\n```\r\n\r\n###  2.  \r\nSo I tried to install linux-headers, with \"apt-cache search linux-headers-\" command, no linux-headers-3.4.67-cyanogenmod-g399b32b found. I installed linux-headers-4.0.0-kali1-all and executed 'cd /lib/modules/ && cp -r 4.0.0-kali1-armmp $(uname -r)'.   \r\n  \r\nThen go back to execute `./install.sh`.  \r\nAnother error occurred:   \r\n\r\n```\r\n/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/os_dep/linux/usb_intf.c:1977:1: error: macro \"__TIME__\" might prevent reproducible builds [-Werror=date-time]\r\n  DBG_871X(\"build time: %s %s\\n\", __DATE__, __TIME__);\r\n^\r\ncc1: some warnings being treated as errors\r\n/usr/src/linux-headers-4.0.0-kali1-common/scripts/Makefile.build:263: recipe for target '/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/os_dep/linux/usb_intf.o' failed\r\nmake[4]: *** [/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/os_dep/linux/usb_intf.o] Error 1\r\n/usr/src/linux-headers-4.0.0-kali1-common/Makefile:1407: recipe for target '_module_/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524' failed\r\nmake[3]: *** [_module_/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524] Error 2\r\nMakefile:145: recipe for target 'sub-make' failed\r\nmake[2]: *** [sub-make] Error 2\r\nMakefile:8: recipe for target 'all' failed\r\nmake[1]: *** [all] Error 2\r\nmake[1]: Leaving directory '/usr/src/linux-headers-4.0.0-kali1-armmp'\r\nMakefile:1043: recipe for target 'modules' failed\r\nmake: *** [modules] Error 2\r\n``` \r\n### 3.\r\nI found the line that caused this error, and deleted that line.  \r\n  \r\nNew error:  \r\n \r\n```\r\n/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/os_dep/linux/rtw_android.c:227:3: error: implicit declaration of function 'strnicmp' [-Werror=implicit-function-declaration]\r\n   if(0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num])) )\r\n   ^\r\ncc1: some warnings being treated as errors\r\n/usr/src/linux-headers-4.0.0-kali1-common/scripts/Makefile.build:263: recipe for target '/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/os_dep/linux/rtw_android.o' failed\r\nmake[4]: *** [/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/os_dep/linux/rtw_android.o] Error 1\r\n/usr/src/linux-headers-4.0.0-kali1-common/Makefile:1407: recipe for target '_module_/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524' failed\r\nmake[3]: *** [_module_/root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524] Error 2\r\nMakefile:145: recipe for target 'sub-make' failed\r\nmake[2]: *** [sub-make] Error 2\r\nMakefile:8: recipe for target 'all' failed\r\nmake[1]: *** [all] Error 2\r\nmake[1]: Leaving directory '/usr/src/linux-headers-4.0.0-kali1-armmp'\r\nMakefile:1043: recipe for target 'modules' failed\r\nmake: *** [modules] Error 2\r\n```\r\n  \r\nBy google, I replaced `strnicmp` function with `strncasecmp ` .\r\n\r\n### 4.\r\nFinally, the script was done, but the driver looks not installed  rightly.  \r\n\r\n```\r\n  Building modules, stage 2.\r\n  MODPOST 1 modules\r\n  CC      /root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/8192eu.mod.o\r\n  LD [M]  /root/download/driver/site.google/install_folder/driver/rtl8192EU_linux_v4.2.2_7585.20130524/8192eu.ko\r\nmake[1]: Leaving directory '/usr/src/linux-headers-4.0.0-kali1-armmp'\r\n##################################################\r\nCompile make driver ok!!\r\n##################################################\r\nAuthentication requested [root] for remove driver:\r\nrmmod: ERROR: Module 8192eu is not currently loaded\r\nAuthentication requested [root] for insert driver:\r\ninsmod: ERROR: could not insert module 8192eu.ko: Function not implemented\r\nAuthentication requested [root] for install driver:\r\ninstall -p -m 644 8192eu.ko  /lib/modules/3.4.67-cyanogenmod-g399b32b/kernel/drivers/net/wireless/\r\n/sbin/depmod -a 3.4.67-cyanogenmod-g399b32b\r\n##################################################\r\nThe Setup Script is completed !\r\n##################################################\r\n```\r\n\r\n"}}