[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] file source with gr-ieee802.11 tx
From: |
Bastian Bloessl |
Subject: |
Re: [Discuss-gnuradio] file source with gr-ieee802.11 tx |
Date: |
Fri, 31 Jul 2015 15:11:27 +0200 |
Hi,
> On 31 Jul 2015, at 14:10, Jason Matusiak <address@hidden> wrote:
>
>> The wifi_tx example GRC comes with a Socket PDU source.
>
>> Just send UDP packets to the port specified containing a IEEE 802.11
>> packet's amount of data per UDP packet;
>> netcat/nc/ncat is sadly no good for this, because it doesn't allow
>> specification of packet sizes.
>
>> You can also use a file source, stream to tagged stream, tagged stream to
>> PDU flow graph.
>
>> To be honest, GNU Radio is kind of lacking a simple "take n items from the
>> input stream and generate a PMT pair
>> (n, items), send that over your message port" block, which would take
>> roughly 10 lines of python to write (and
>> not much more C++) -- so you might as well do that.
>
> This is something I have struggled with as well. A lot of examples I've
> seen are for streaming data (which is admittedly probably want most
> people are wanting).
>
> I have been more interested in sending a packet (or a series of packets)
> over the air (the end goal being letting someone connect to my UDP
> source block and handing me their data they want to send). I have
> played with the WiFi block a bit recently and unfortunately was always
> using netcat....
>
> 1 - Are you saying that the data's packet being handed to the socket PDU
> has to be exactly as long as the pdu_length? That is something I think
> I must have glossed over.
You can pass data of any size of up to 1500 bytes (minus a bit for headers).
>
> 2 - I don't believe there is a way to dump just the payload of the
> 802.11 packet, right? Basically, if I sent "Hello World" to the Socket
> PDU (which means my pdu_length would need to be set to 11, right?), is
> there a way to have those 11 characters be passed out a UDP sink on the
> receiver end? Right now the only thing I can see to do is to utilize
> the Wireshark Connector and dump the pcap output to file, then take info
> and extract the payload from there in post-processing. Is that right?
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.
There is currently no option to dump raw bytes, but its a trivial modification
of the Wireshark block (dump without a PCAP header).
If you want to printed bytes as hex-values on the console that should work with
the parse block.
Or you could use a Debug Message block and print the PDUs coming out of the PHY
/ MAC, depending on what you want to see.
Best,
Bastian