Just a thought experiment, inspired by
yet another story about burglars using WiFi jamming to knock out security systems. These stories tend to pop up from time to time, this is just the latest one. Unfortunately the reports don't mention what type of jammer is being used or even whether it's just an older story that's been recycled yet again, whether the tech is just a dumb blanket-the-frequency-range-with-noise or a smarter WiFi-knowledgeable one that sends dummy traffic or deauth packets. The
Aliexpress ones just seem to be dumb interference-generators, e.g.
this sort (later photos show the spectrum plot) which presumably you plug into a USB power bank.
For deauth jammers, the operation is described
here.
So how would to detect this in a non-false-positive manner? For the simpler blanket-with-noise style I was thinking an ESP32 that periodically scans each channel and reports possible jamming if every channel is saturated with noise.
Identifying deauth attacks seems a lot more difficult since you'd have to be listening in when the deauth happens, I assume that'd need to be done on the AP since that'll always see the deauth packets as they're targeted at it.
And yes, I'm aware of 802.11w but that seems to be implemented in a hit-and-miss fashion, in particular there's a vast amount of IoT gunk around that doesn't support it so won't be able to connect if the AP forces its use and so most APs that do support it disable it by default, also this question is more of a thought experiment about how you'd reliably detect something like this.