I'd like to use a Yun as a WiFi monitor, but I can't quite get it working.
The idea is to associate to an access point as a client, and then capture the communications between the access point and another client. This is a private network consisting of just the access point, the Yun, and the target client. I'm trying to debug a connectivity issue between the access point and the client, both of which are embedded systems with very limited debug facilities. (This is part of a development project of mine: neither of those nodes are Arduino nor Yun based.)
This thread showed promise: Arduino Yun Forum: how to listen the packets coming out from the yun but it covers capturing the data to/from the host Yun. That works well, but I want to capture the other traffic on the network, and there I'm having trouble. I can capture broadcasts from the other nodes, presumably because the Yun is receiving them in case it needs to do something with the broadcast. But it doesn't receive any of the traffic specifically addressed between the other two nodes. When I start tcpdump, the messages indicate that the net interface is entering promiscuous mode, which I thought would enable me to see all traffic on the network, including that which is not specifically addressed to the Yun that is collecting the data. But that doesn't appear to be the case.
My basic steps:
opkg update opkg install tcpdump tcpdump -i wlan0 -s 65535 -w /mnt/sda1/data.cap
I then move the uSD card to my laptop and examine the data using wireshark.
The tmanpage for cpdump shows a potentially interesting option (-I or --monitor-mode) but if I add that option, it responds with "tcpdump: wlan0: That device doesn't support monitor mode"
I tried doing this with WireShark on my regular computer, and got similar results, presumably because from what I'm told Windows does not allow the WiFi adapter to enter promiscuous mode. I'm told that Mac and Linux don't have this restriction, but I don't have access to either of those systems types. The closest I have is my Yun, and while I think I'm getting close with it, I'm not there yet.
What am I doing wrong? Am I missing something obvious? Is this even possible with a Yun?
Any pointers would be greatly appreciated!