title: WiFi Beacon Packets
body: <p>I'm trying to write a simple C code with WinPcap to broadcast a beacon packet and capture it in all nearby WiFi units. The code I'm using is very similar to the ones available at WinPcap[1].</p>
  
  <p>The code runs fine if I create an ad-hoc network connection and join all the computers into it. However, this process of creating and joining to an ad-hoc network is cumbersome. It would be much better if, regardless of what network each computer is in, the beacon packets would be broadcasted and captured once the code is running.</p>
  
  <p>As simple as this problem might sound, after some searching it seems that this is not possible to be done on windows (unless re-writing drivers or maybe the kernel):  </p>
  
  <ul>
  <li>Raw WiFi Packets with WinPcap[2]</li>
  <li>Sending packets without network connection[3]</li>
  <li>Does winpcap/libpcap allow me to send raw wireless packets?[4]</li>
  </ul>
  
  <p>Basically, it would be necessary to use the WiFi in monitor mode, which is not supported in Windows[5]. Therefore, if the computers are not in the same network connection, the packets will be discarded.</p>
  
  <p><strong>1st Issue</strong><br>
  I'm still intriguing, beacon and probe request packets are a normal traffic across the network. How they could be being sent and received constantly but the user is not allowed to write a program to do so? How to reconcile that?</p>
  
  <p><strong>2nd Issue</strong><br>
  Does anyone has experience with Managed Wifi API[6]? I've heard that it might help.</p>
  
  <p><strong>3rd Issue</strong><br>
  Acrylic WiFi[7] claims to have developed a NDIS driver which support monitor mode under Windows. Does anyone has experience with this software? Is it possible to integrate with C codes?</p>
  
  <p><strong>4th Issue</strong><br>
  Is it possible to code such Wifi beacon on Linux? and on Android?</p>
  
  <hr>
  
  <ol>
  <li>www.winpcap.org/docs/docs_412/html/main.html</li>
  <li>stackoverflow.com/questions/34454592/raw-wifi-packets-with-winpcap/34461313?noredirect=1#comment56674673_34461313</li>
  <li>stackoverflow.com/questions/25631060/sending-packets-without-network-connection-wireless-adapter</li>
  <li>stackoverflow.com/questions/7946497/does-winpcap-libpcap-allow-me-to-send-raw-wireless-packets</li>
  <li>en.wikipedia.org/wiki/Monitor_mode#Operating_system_support</li>
  <li>managedwifi.codeplex.com/</li>
  <li>www.acrylicwifi.com/</li>
  </ol>