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

Need help in generating wifi Becons using HackRF (wifi_tx.grc) #400

Closed ShivaAlethea closed 7 months ago

ShivaAlethea commented 8 months ago

Hi, Im new to this GNU Radio. Can anyone please help me to create .grc for Beacon geneartion (using HackRF One). I tried to ran wifi_tx.grc, It is working. But it is not generating any Beacons.

Also tried to follow https://user-images.githubusercontent.com/77594215/106764041-59bd3400-662f-11eb-8a87-994884fa0361.png

But im not able to get the values that i need to pass on header_formatter, Packet_Header, OFDM_carrier_Allocator and FFT. Screenshot from 2024-01-22 17-11-40

Can anyone help me to create this/new .grc for beacon generation.

Thank you

bastibl commented 8 months ago

From the screenshot I only see that something is red, so something goes wrong. the error is not on the screenshot, so I can only guess:

See this blog post and this talk and slides for how to inject frames.

ShivaAlethea commented 8 months ago

Hi @bastibl Thank you very much for the reply. With the help of above blog post created beaconFrameGeneration.py and wifi_beacon_tx.grc wifi_tx.zip

Running wifi_beacon_tx.grc is not giving any error, But still I'm not able to see the Beacons. Im i missing anything here, please help. Screenshot from 2024-01-23 15-42-24

Beacon frame generation using scapy: Screenshot from 2024-01-23 15-38-59 Screenshot from 2024-01-23 15-39-11

GNU radio .grc (please find the attached zip for .grc file) Screenshot from 2024-01-23 15-41-30

ShivaAlethea commented 8 months ago

@bastibl Also tried the first scenario, No errors now. Need a info >> on FFT >> Window (formula something like>> tuple(1/52**0.1.....)) wifi_tx_1.zip Screenshot from 2024-01-24 13-32-51 Screenshot from 2024-01-24 13-32-34

ShivaAlethea commented 8 months ago

Hi @bastibl, Tried to follow https://github.com/bastibl/gr-ieee802-11/issues/236 and observed below.

PCAP With >> Socket PDU - Working Screenshot from 2024-01-25 13-21-58 Screenshot from 2024-01-25 13-43-48

PCAP With >> WiFi PHY Hier - Not working Screenshot from 2024-01-25 13-21-27 Screenshot from 2024-01-25 13-45-31

bastibl commented 8 months ago

I already replied to the last post in the other issue.

The frequency that you are using (5.89GHz is not a WiFi channel but for vehicular networking, i.e., a normal device will not search there). Please try changing to a 11g or 11a channel.

Not sure about your issue with the FFT window. You shouldn't have to change it, if you use the correct version of the module, i.e., make sure that you use the branch of this module that fits your GNU Radio version.

ShivaAlethea commented 7 months ago

@bastibl Thanks for the support. It started working fine after HackRF Firmware update. Now im able to see my SSID's in laptop. Screenshot from 2024-02-01 11-51-44

ShivaAlethea commented 7 months ago

@bastibl Need one more clarification, Is it possible to send multiple beacons from different ports and frequencies ? Something Like: Screenshot from 2024-02-07 12-31-58

Trying to run this test is giving : RuntimeError: resolve_port: hierarchical block 'sink_impl': input 1 is not connected internally

File "/home/alethea/shiva/HackRF/gr-ieee802-11/examples/playback_test.py", line 200, in <module>
    main()
  File "/home/alethea/shiva/HackRF/gr-ieee802-11/examples/playback_test.py", line 180, in main
    tb.start()
  File "/usr/lib/python3/dist-packages/gnuradio/gr/top_block.py", line 116, in start
    top_block_start_unlocked(self._impl, max_noutput_items)
RuntimeError: resolve_port: hierarchical block 'sink_impl': input 1 is not connected internally

Anything else needs to be taken care here?

bastibl commented 7 months ago

This not possible with the HackRF.

ShivaAlethea commented 7 months ago

@bastibl Thank you very much for your support. Closing this issue as it started working for me after firmware update.