tshark and wlan on Windows
Wireshark and wireless goes without problems. My problem is tshark and wlan:
C:\Program Files (x86)\Wireshark>tshark -i wlan -w capture.pcap tcp port 12345 Capturing on 'wlan' tshark: The capture session could not be initiated on interface 'wlan' (Error op ening adapter: Das System kann das angegebene Gerät nicht finden. (20)). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified. C:\Program Files (x86)\Wireshark>tshark -i wlan0 -w capture.pcap tcp port 12345 Capturing on 'wlan0' tshark: The capture session could not be initiated on interface 'wlan0' (Error o pening adapter: Das System kann das angegebene Gerät nicht finden. (20)). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified. C:\Program Files (x86)\Wireshark>tshark -i wlan1 -w capture.pcap tcp port 12345 Capturing on 'wlan1' tshark: The capture session could not be initiated on interface 'wlan1' (Error o pening adapter: Das System kann das angegebene Gerät nicht finden. (20)). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified. C:\Program Files (x86)\Wireshark>
So does your Windows system actually have interfaces named "wlan" or "wlan0" or "wlan1"? If not, obviously trying to capture on "wlan" or "wlan1" or "wlan2" isn't going to work, because, as the error message tells you, the system can't find that interface.
What does Wireshark call your Wi-Fi interfaces? That's what
tshark -D
will show you.