0

I am completely new to networks, and need to find a way to read wireless networks beacon frames data. I did so for windows, using Win32 wlanapi, now need to do the same for linux.

I have been trying to port iwlist scanning functionality (which seems to parse bssds beacon frames good enough for me) into a c# app, but without success.

As a last shot, I would like to inquire about which other tools in linux do read beacon frames. I prefer reading the frames following the type-length-value structure myself, rather than have it parsed to string.

What are the options out there for this ? could you please share an example call for such a tool ?

I have been playing (or trying) with:

  1. iwlist scanning
  2. iw dev [interface name] scan dump -v (does not seem to read beacon frames, at least not as iwlist scanning)
  3. wpa_supplicant - not managed to do so, if possible at all
  4. libpcap (not tried yet)

Remark: UI tools are not suitable. My goal is to have a C# app running at regular intervals reading beacon frames and extracting info from them.

Do ultimately all options rely on communicating with linux 80211 driver? Meaning writing a C program that interfaces the driver a good option, so not to rely in anything else?

3
  • 1
    See e.g. this answer, option 3: Use monitor mode on the wireless interface with libpcap. As I wrote in the other answer: You can try it out with wireshark, which does exactly that. Handy to create some capture files with known content for testing your program.
    – dirkt
    Aug 26, 2021 at 5:18
  • This helps, after I ended up understanding that the starting point is linux 80211 driver.
    – Veverke
    Aug 26, 2021 at 13:36
  • No, you don't have to bother with the driver. In particular you don't have to touch anything kernel-related. You just put the interface into monitor mode, use the userland-library pcap, and you get the beacon frames (and all other frames, too). You just need to parse them. And if you try it in Wireshark first, you'll see how to parse them.
    – dirkt
    Aug 26, 2021 at 15:06

0

You must log in to answer this question.

Browse other questions tagged .