It depends what you mean by readable format. If you just want to get an idea of the values and the file isn't to big then do:
from gnuradio import gr src = gr.file_source(1, "the_file_name") snk = gr.vector_sink_b() tb = gr.top_block() tb.connect(src, snk) tb.run() # The bytes will be presented as a list of integers in python. data = snk.data() print(data) On Tue, May 22, 2012 at 9:47 PM, ambily joseph <josephamb...@gmail.com> wrote: > Sir > My file sink input type in 'bytes'...Smthng being written to that > folder..nd size of that file is increasing,,but when i try to open it its > octet-stream file...How can i make into a readable format? > > > On Mon, May 21, 2012 at 7:44 PM, Ben Reynwar <b...@reynwar.net> wrote: >> >> On Mon, May 21, 2012 at 12:19 AM, ambily joseph <josephamb...@gmail.com> >> wrote: >> > Sir >> > >> > I am trying to build an SID SDR receiver,,where i require a file sink... >> > When i run my flow graph,,i get a file of format octet-stream being >> > written >> > into my computer. >> > But i am not able to access or open my dat octet-stream file. >> > Sir may i know how can i access the data being written into it? >> > >> > Thank you >> > >> > _______________________________________________ >> > Discuss-gnuradio mailing list >> > Discuss-gnuradio@gnu.org >> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> > >> The file sink is just a dump of the data stream. If the data stream >> content was simple bytes then the content of the file is >> straightforward. If the data stream contained complex numbers then the >> file will contain a list of complex numbers where each complex number >> is given by two floats and each float by (usually) 4 bytes. >> >> See the files gnuradio/gnuradio-core/src/lib/io/gr_file_sink.cc and >> gr_file_source.cc for the implementations of the gnuradio file reading >> and writing blocks. >> >> You could also use python and gnuradio to convert the files into some >> other format. >> >> from gnuradio import gr >> # Assuming the data stream was complex numbers. >> src = gr.file_source(gr.sizeof_gr_complex, "the_file_name") >> snk = gr.vector_sink_c() >> tb = gr.top_block() >> tb.connect(src, snk) >> tb.run() >> # The complex numbers are then accessible as a python list. >> data = snk.data() >> >> Ben > > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio