I have a problem capturing wifi data using
tcpdumpwhile running in the background.
OK, lets get some facts:
- my wifi-device is named
wlan0is in monitor mode (that’s what I want)
- I’m using
tcpdumpto capture packets
If I run my script manually in the shell, it works well. Now I want to capture all packets over a long period. I decided to put my script into
/etc/rc.localwhich is executed at the system-start.
It looks like this:
tcpdump -l -i wlan0 | do_some_action.sh >/dev/null 2>&1
After a reboot I can see that all the data captured is being forwarded to my script. So far – so good.
30-60 minutes later no data is captured anymore.
tcpdumpis still running, but
wlan0seems to be gone sleeping.
I have to
wlan0to get some traffic again.
Could anybody explain whats going on here and how to fix this problem?
Source : Link , Question Author : Mitch , Answer Author : Community