bastibl / gr-ieee802-11

IEEE 802.11 a/g/p Transceiver
https://wime-project.net/
GNU General Public License v3.0
744 stars 290 forks source link

Trying to get a full understanding of what's happening #360

Closed JeanPaulBadjo closed 1 year ago

JeanPaulBadjo commented 2 years ago

Hello again,

This questions is mainly to get a better understanding of what's happening. As part of my project, I'm trying to broadcast in 802.11 to see if a device can see it (like my phone). Normally I know the broadcast MAC is FFFFFFFFFFFF but no matter how I type it in, the system is telling me that the value cannot be evaluated.

Screenshot from 2022-09-08 09-30-42

Am I modifying it incorrectly or is there a way to modify it so I can see the broadcast from any device?

Also I don't fully understand what the message strobe is doing. Is it like the classic "hello world" example from coding? Sorry if these questions are too basic. I am new to this but will continue to look for guides.

Screenshot from 2022-09-08 09-34-07

bastibl commented 2 years ago

Not sure what you are expecting to see on your phone. I'd start with setting the sample rate to 20M, select a channel, and try to receive the packets with your laptop, listening in monitor mode. When your card is in monitor mode, you can just send any frames and they will show up in Wireshark, for example. You won't see the SDR as an access point on your phone, because you're not sending a WLAN beacons. To do this, you would have to couple the transmitter with scapy as described in this talk: https://archive.fosdem.org/2019/schedule/event/gr_scapy/

JeanPaulBadjo commented 2 years ago

Hello again,

I did some more digging and I think what you did here might be a way of doing what I am trying to do: https://www.bastibl.net/gnuradio-wlan-scapy/

I'm essentially just trying to make a beacon packet on my computer and broadcast it using an SDR and having a receiver that I already made "Sniff" it.

In the link, how did you manage to type python code directly into GNUradio. If I could Directly type in the MAC Address I believe that would solve my problem.

bastibl commented 2 years ago

This is a separate external script that pushes the frames via UDP into the flowgraph, where they are received by the Socket PDU block.

JeanPaulBadjo commented 2 years ago

Ok. In the link I provided you were able to broadcast to "ff:ff:ff:ff:ff:ff". Is there a way to do this directly in the gnuradio transmitter you made? Or is making an external script that pushes frames the only way?

bastibl commented 2 years ago

That's what the example you posted is doing. You can configure MAC addresses in the WiFi MAC block. You only need Scapy if you want to assemble more complex frames (like beacons).

JeanPaulBadjo commented 2 years ago

Ok, Sorry for such basic questions. I'm guessing I'm just not inputting it correctly. So what would the general MAC address destination be to make it be seen by any wifi device? I've tried putting in the ff:ff sequence, the 0xff, 0xff sequence, etc.

No matter what I put in I keep getting an error like this. How would you input it?

JeanPaulBadjo commented 2 years ago

The image from my last comment didn't go through. Here is the error I receive.

Screenshot from 2022-09-27 10-44-05

bastibl commented 2 years ago

[0xff, 0xff, ...], like in the other fields.