# Re: file source with gr-ieee802.11 tx

**URL:** <https://www.ruby-forum.com/t/re-file-source-with-gr-ieee802-11-tx/242832>\
**Category:** GNU Radio\
**Created:** [July 31, 2015, 6:25pm UTC](https://www.ruby-forum.com/t/re-file-source-with-gr-ieee802-11-tx/242832 "2015-07-31T18:25:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [July 31, 2015, 6:25pm UTC](https://www.ruby-forum.com/t/re-file-source-with-gr-ieee802-11-tx/242832/1 "2015-07-31T18:25:12Z")

</div>

> The transceiver wraps your payload in some headers that add stuff like MAC  
> address, frame type, and CRC.  
> These are the minimum fields that are required so that a WiFi card actually  
> accepts the frame.

Makes sense. I knew about the headers and CRC, but I wasn’t even  
thinking about it being used with an actual WiFi device (as opposed to  
two USRPs).

> There is currently no option to dump raw bytes, but its a trivial modification  
> of the Wireshark block (dump  
> without a PCAP header).

This sounds reasonable to me, but so far I have been unsuccesful. I am  
attempting to edit wireshark\_connector\_impl.cc, but none of my mods have  
worked so far. I am not looking for you to do the work, but I wanted to  
make sure I am looking at the right file. One of my concerns with it is  
that my C++ is really rusty and I haven’t played with the low-level GR  
stuff before, so I am muddling through what is going on in that file.

Near the end of the file is the following:  
int to\_copy = std::min((d\_msg\_len - d\_msg\_offset), noutput);  
memcpy(out, d\_msg + d\_msg\_offset, to\_copy);  
I believe that that second line is where the information is put on the  
output buffer. So for a test, I changed the memcpy to be:  
memcpy(out, d\_msg + d\_msg\_offset + 10, to\_copy - 10);  
to basically cut off the first 10B (just a quick and dirty test).

I then run:  
sudo make uninstall && make clean && make && sudo make install &&  
sudo ldconfig  
from the gr-foo/build directory.

It builds fine, but when I run my GRC script, the output to a file sink  
(for simplicity I am dumping to a file instead of UDP for now), doesn’t  
change its length. I did reload blocks in GRC too.
