discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] writing packet payloads to file


From: Colleen Josephson
Subject: Re: [Discuss-gnuradio] writing packet payloads to file
Date: Wed, 21 Nov 2012 14:21:46 -0500

Thanks for the response. I'm not sure I understand how struct.unpack will help, since the only data I can get seems to already be a python string. If I transmit a packet with "hello world" as my payload, the only thing I ever see in the receive script is the python string "hello world". I don't know how to access the intermediate binary representation.


On Tue, Nov 20, 2012 at 1:07 PM, Tom Rondeau <address@hidden> wrote:
On Fri, Nov 16, 2012 at 6:28 PM, Colleen Josephson <address@hidden> wrote:
> Hello all,
>
> I am researching a new coding algorithm. I am transmitting and coding a text
> file using payload_tx.py and then write the binary of the packet payload to
> a file to do offline analysis.
>
> I am having trouble writing packet payloads to file, however, because the I
> can't seem to find a way to get data out of a gr_message except for the
> to_string() method. If I try and convert the string back to binary (my
> attempt involved python's binascii module), I get an "Error: illegal char"
> message.
>
> This makes sense, since the data is still coded, and should not be a valid
> ascii string. But how can I get around this problem and write binary to
> file?
>
> --
> Colleen Josephson
> http://www.cjosephson.net
> Dept. of Electrical Engineering and Computer Science
> Massachusetts Institute of Technology
> Class of 2013


Colleen,

Have you tried to use struck.unpack?

Tom



--
Colleen Josephson
http://www.cjosephson.net
Dept. of Electrical Engineering and Computer Science
Massachusetts Institute of Technology
Class of 2013

reply via email to

[Prev in Thread] Current Thread [Next in Thread]