mdlayher / raw

Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed.
MIT License
425 stars 71 forks source link

Sending 802.11 WLAN Beacon frames #6

Closed jpillora closed 4 years ago

jpillora commented 7 years ago

Is it possible to send and receive beacon frames with this package? I'm hoping to implement very simple network-less wifi connectivity. Aiming to send and receive a custom frame containing a small amount of numerical information.

On macOS, I can monitor beacon frames with:

tcpdump "type mgt subtype beacon" -I -e -i en0
mdlayher commented 7 years ago

Just did a bit of Googling: https://mrncciew.com/2014/10/08/802-11-mgmt-beacon-frame/.

If the diagrams in this blog are correct, it would appear that beacon frames are encapsulated in a "MAC header" which looks similar to an Ethernet frame.

If I understand this all correctly, on Linux at least, you should be able to manually generate and receive these frames using this package. No idea about *BSD honestly.

mdlayher commented 7 years ago

I'd be quite interested to see what you come up with for this. You may be able to use https://github.com/mdlayher/ethernet as some inspiration for a physical layer format to use with this package.

Please do keep me posted! :)

jpillora commented 7 years ago

Okay cool, will give it a shot when I get a chance and report back :+1:

mdlayher commented 4 years ago

Closing due to nothing actionable for this package here.