PDA

View Full Version : Can't get WN722N to work on OPO



pLx
2016-02-20, 00:29
EDIT: Solved, I was using the wrong kernel, you need nethunter kernel in order to put your devices in monitor mode.



Hey guys, I've been digging around all over the web but I couldnt find anything useful.

I am connecting a TL-WN722N with Y cable plugged into the wall to my One Plus One running NetHunter 3.0.5 on CM12.1.
The system runs in multiRom as a secondary rom. The primary rom is a stock CM12.1

The problem:

1. lsusb shows the device (Bus 001 Device 002)


root@kali:~# lsusb
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


2. wifite or any other software won't show the device wlan1 (wlan0 is the integrated one)


root@kali:~# wifite

.;' `;,
.;' ,;' `;, `;, WiFite v2 (r87)
.;' ,;' ,;' `;, `;, `;,
:: :: : ( ) : :: :: automated wireless auditor
':. ':. ':. /_\ ,:' ,:' ,:'
':. ':. /___\ ,:' ,:' designed for Linux
':. /_____\ ,:'
/ \


[!] the program cowpatty is not required, but is recommended

[+] scanning for wireless devices...
[+] available wireless devices:
1. p2p0 ?????? Not pci, usb, or sdio
2. wlan0 ?????? Not pci, usb, or sdio
[+] select number of device to put into monitor mode (1-2):




Things I've tried:
1.

Open custom command - Add command -
label:
Monitor mode
command:
ifconfig wlan1 up && airmon-ng start wlan1
send to : Kali
Exec mode : Background
Leave
Run at boot -
Then tap on Update.
When start run custom command and Monitor mode - tap RUN


2.

root@kali:~# ifconfig wlan1 up
wlan1: ERROR while getting interface flags: No such device


both operations gave me negative results (no such device)

3. Plugged an USB stick to the otg y cable and it works

4. Tried the TL-WN722N Adapter on a Kali machine and works perfectly plug-n-play

5. Run apt-get update && apt-get install firmware-atheros - says firmware-atheros is already the newest version






I don't know what to do, I've been trying to make this working for a week now and it doesnt seem to be anything useful on google.

Any hints please?

Thank you very much.

pLx
2016-02-21, 16:40
SOLVED - It was a kernel issue.

Thanks a lot at the chaps on freenode who helped me out.

Phreya
2016-02-23, 09:20
Glad to see my kernel works for you. ;)

pLx
2016-02-23, 10:15
I've been a ***** for not mentioning you and jc here on the forums! I'd like to thank both you and JC for helping me out, the kernel works like a charm on CM13 as well as JC's chroot! Very stable indeed.

I'll see you on irc mate :)

robpom
2016-02-27, 17:42
Can you detail for us how to get it to work? I am using NetHunter 3.0 on a Nexus 7. A little bit of a Linux newbie so any help would be appreciated.

pLx
2016-02-28, 11:36
Well I own a OPO so I wouldnt know how to help with a Nexus, but the problem was that I flashed a stock kernel after installing Nethunter.
The OPO network interface won't work in monitor mode so I did need an external one. In order to use any external adapter you need the nethunter kernel which contains the mac80211 injection patch. Without this patch you cant get any external adapter to work.

I dont know if this is the case with your phone but you might need to check you are using the patched kernel. If you have ever flashed a different kernel after installing nethunter I suggest you to wipe and reflash rom+nethunter from scratch.

If you run the command "lsusb" in terminal, do you see the wifi device in the list?

root1234
2016-03-09, 01:23
Can you share the link of the kernel?

Phreya
2016-03-09, 19:19
Can you share the link of the kernel?

He's using my kernel. You can get it from:


https://www.androidfilehost.com/?w=files&flid=50945

Make sure to get the right kernel for your android version. It is structured by folders so it shouldn't be a problem for you to determine which is the right one.

rnk
2016-03-10, 13:50
Your kernel is good for atheros ar9271 and ralink rt2870/3070.
is a patch possible for ralink rt 3572?

Phreya
2016-03-10, 15:50
Does this adapter require additional power in order to work?

Edit: I just checked. It should work, unless this specific adapters requires addition power (otg-y host & charge). In that case, it couldn't be done, for now.

I will release a new version later today / tomorrow and you will have to test that out for me as I don't have that adapter. :)

rnk
2016-03-10, 17:04
1354

no,its an ordinary alfa adaptor...
http://www.alfa.com.tw/products_show.php?pc=67&ps=230.
ok i can test.

Phreya
2016-03-10, 17:30
It should work then... the device is checked via defconfig.

rnk
2016-03-10, 17:39
In normal kali linux (notebook) it works fine.
When i try "lsusb" it shows like
3572 Ralink technology corp. wireless adaptor
Also when i run wifite it shows adaptor as
3.wlan1 ...
when i select 3 to put in monitor mode,it doesnt work.

rnk
2016-03-12, 10:35
i tried kernel-nethunter-bacon-marshmallow-20160312.zip
but no success for rt3572

Phreya
2016-03-12, 14:58
This release wasn't related to that... just CyanogenMod sync...

Edit:

I have introduced a y-cable otg host + charging patch. You can try your adapter now. Make sure you connect it via y-cable and give it more power.

rnk
2016-03-13, 08:08
i plugged 52nh's short cablo to notebook and wifite worked.wlan1mon works.
But "besside-ng wlan1 " doesnt work.i use it alot.
is it possile to use it without notebook in future?

Phreya
2016-03-13, 09:52
Have you tried my new kernel? I've released it today.

Also note that besside-ng isn't kernel-related. If wifite/mon/injection works, of course.

BeNe
2016-03-13, 13:22
@Phreya
I saw your repository on androidfiles for the OPO.

There is a Kernel for CM13 and a update-nethunter-bacon-marshmallow file. Does it mean i can use the current CM13 Version on my OPO to run Nethunter with your Kernel and the Update ? I ask, because the offical Version of Nethunter is still for CM 12.1

If so, do i install nethunter on a clean CM13, flash the your Kernel and the flash your update file ?

Thanks!

Phreya
2016-03-13, 14:23
@BeNe you can use whatever you like. I have 3 version of my kernel for OnePlus One; CM12.1, CM13 and OxygenOS:


https://www.androidfilehost.com/?w=files&flid=50945

All you have to do is flash my "update" (or "kernel" if you already have nethunter installer) and chroot:


https://idlekernel.com/nethunter/nightly/3.0.5-20160309-2206/chroot-full/

Make sure you wipe cache after flashing chroot, as otherwise a bootloop may occur.

rnk
2016-03-13, 15:20
ok.i installed last kernel. 3.13
rt3572 works fine if short cable plugged in notebook.(monitor mode works fine with wifite)
if i dont plugin in short cable to notebook,when i run wifite it shows 3.ralink rt3572..
but when i select it to put in monitor mode,it disappers and doesnt work.

Phreya
2016-03-13, 15:58
That's because this specific adapter needs y-cable charging. I don't think it will be possible to do it otherwise.

root1234
2016-03-14, 00:01
The link for me didn't open and I have the version of me original kernel 3.10.49
On the nexus 6 .this. is the problem I get.
root@kali:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up postgresql-9.4 (9.4.6-0+deb8u1) ...
[....] Starting PostgreSQL 9.4 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 2016-03-13 23:32:24 UTC [16143-1] FATAL: could not create shared memory segment: Function not implemented 2016-03-13 23:32:24 UTC [16143-2] DETAI[FAILiled system call was shmget(key=5432001, size=40, 03600). ... failed!
failed!
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing package postgresql-9.4 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
postgresql-9.4
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@kali:~#

The wifite problem


root@kali:~# airmon-ng

Found phy0 with no interfaces assigned, would you like to assign one to it? [y/n] y


ERROR adding monitor mode interface: command failed: Operation not supported (-95)

PHY Interface Driver Chipset

phy0 wlan0 ?????? non-mac80211 device? (report this!)

root@kali:~#

Some help please.

Phreya
2016-03-14, 08:58
First problem, refer to this thread:


https://forums.kali.org/showthread.php?1950-postgresql-9-1-errors-after-installing-a-package

Second problem:
You have to select a Mac80211 device (an external adapter!), you're selecting the one adapter that comes with your phone and it doesn't have monitor mode. You need to buy an adapter.

Also, you just hijacked a thread. ;)

root1234
2016-03-14, 09:12
I have a tp-linkeTL-Wn722N

root1234
2016-03-14, 09:14
More details please so I can get it right because I flashed my phone more then 5 times.

Phreya
2016-03-14, 09:31
Yes, but for this adapter you need to use y-cable with a charging patch mode in your kernel. You said you have Nexus 6, I don't even think there's a y-cable charging mode patch in your kernel, but I might be wrong on this one. Anyway - on Wifite you SHOULD see it as wlan0/wlan1, not phy0. So I guess that's the case indeed. But even then, you still need to buy a cable like this to get it working:


http://www.amazon.com/Micro-Cable-Power-Samsung-AtomicMarket/dp/B009YPYORM/

root1234
2016-03-14, 09:46
And sorry for that

root1234
2016-03-14, 09:53
I have the y-cable

root@kali:~# lsusb
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05c6:90a4 Qualcomm, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@kali:~# iwconfig
r_rmnet_data7 no wireless extensions.

r_rmnet_data4 no wireless extensions.

wlan0 no wireless extensions.

r_rmnet_data1 no wireless extensions.

sit0 no wireless extensions.

dummy0 no wireless extensions.

r_rmnet_data6 no wireless extensions.

r_rmnet_data3 no wireless extensions.

lo no wireless extensions.

rmnet_usb0 no wireless extensions.

rmnet_data7 no wireless extensions.

rmnet_data6 no wireless extensions.

rmnet_data5 no wireless extensions.

rmnet_data4 no wireless extensions.

rmnet_data3 no wireless extensions.

rmnet_data2 no wireless extensions.

rmnet_data1 no wireless extensions.

rmnet_data0 no wireless extensions.

r_rmnet_data8 no wireless extensions.

r_rmnet_data0 no wireless extensions.

r_rmnet_data5 no wireless extensions.

usb0 no wireless extensions.

r_rmnet_data2 no wireless extensions.

root@kali:~#

root1234
2016-03-14, 09:54
But there is no wlan1 only wlan0

Phreya
2016-03-14, 09:58
Did you connect it to power? Anyway, you should get into the IRC and ask if Nexus 6 maintainer is there and see if he could help. There's a chance that Nexus 6 doesn't have y-cable charging + hosting mode ability, so it won't work for you anyway.

root1234
2016-03-14, 10:09
OK thanks for your help .

root1234
2016-03-14, 10:12
I think I have the one



http://m.aliexpress.com/item/732434885.html?tracelog=storedetail2mobilesitedeta il

root1234
2016-03-14, 10:14
Is not the right one for the adapter :(

Phreya
2016-03-14, 10:15
Of course it won't work for you. Your cable doesn't have power to connect to. Wow, just wow.. you're wasting your time, dude. Please see again the link I've sent you. You need one that has an ability to connect it to electricity.

root1234
2016-03-14, 10:32
Thanks dude I will .

Phreya
2016-03-14, 10:41
You can't. It's not an issue. phy0 is a internal adapter built-in your phone. It's not a Mac80211 chipset. This is exactly why you need an external adapter... if you didn't understand this.

root1234
2016-03-14, 12:42
OK now I understand thanks

nicesoni_ash
2016-05-15, 08:21
SOLVED - It was a kernel issue.

Thanks a lot at the chaps on freenode who helped me out.

Did you try to test it without y cable and otg only or it needs the external power?

root1234
2016-05-18, 22:38
Yeah it works with just a USB cabl for me.so I think it would work for u .and I get to flash the nethunter on the Samsung s3 every thing works on it .armitag.the wifite. The hid attacks .everything. I will post the details later.

nicesoni_ash
2016-08-06, 14:42
Yeah it works with just a USB cabl for me.so I think it would work for u .and I get to flash the nethunter on the Samsung s3 every thing works on it .armitag.the wifite. The hid attacks .everything. I will post the details later.
Can confirm the same for my op2 too. It was the kernel issue, now everything is fine. Thanks. What version of nethunter u flashed on ur s3? I'd like to try that too.

Shy
2016-10-05, 05:28
Hi Phreya, I wanted to use your kernel but i cant do it work in my nexus 6 i installed nethuner hammerhead marshmallow so i have the same problem, here an image https://gyazo.com/09b4861356095a8de7609725a1bc0b5c when i try to install your kernel, you should know im not the best and im learning yet, what can i do? and what kernel version can i install here? https://idlekernel.com/nethunter/nightly/

here the kernel version Linux kali 3.10.40-g27906c4 #1 SMP PREEMPT Tue Aug 9 18:53:52 UTC 2016 armv7l GNU/Linux

dessertshome
2016-10-07, 14:23
had the same issue before , glad you found the solution

jeret
2016-10-15, 18:18
Hi any nethunter kernel for Samsung tab S , SM-T705?

kapil_dheer
2017-09-25, 17:49
Hi Phreya.

I tried using your kernel 20170828.

uname -a
Linux kali 3.4.113-lineageos-g2c0e9edc #1 SMP PREEMPT Mon Aug 28 23:06:21 IDT 2017 armv7l GNU/Linux

Running kali nethunter 3 on tuga power.

I have Ralink Technology, Corp. MT7601U Wireless Adapter as external wifi adapter.

Lsusb command does show card being connected but ifconfig / iwconfig don't show wlan1.
Any suggestions for way out....

russ
2018-05-01, 23:45
Hi any nethunter kernel for Samsung tab S , SM-T705?

did you ever find a kernel for sm-705t?? i have been searching all over for one.