I had a similar thing.... I was using sockets, but then got it to work.

Are you sure the fd is staying in scope for the duration of the run?

-jamie




cswiger wrote:

Trying

 pipe_fd = open("/pipe","r")
 gr.file_descriptor_source(gr.sizeof_char,pipe_fd.fileno())

starts out but as soon as I start the source to fill the pipe
I get:

 file_descriptor_source[read]: Bad file descriptor

and the pipe filling script reports IOError: [Errno 32] Broken pipe

BTW, opening and reading the pipe manually in python works ok:


fd=open("/pipe","r")
a=fd.read(5)
a


'\xaa\xaa\xaa\xaa\xaa'


where \xaa is the expected idle character read w/o having to close the pipe at the source. Again, using gr.file_source(pipe) works fine but only after the source closes the pipe. Oh, and yes there is fd.flush() after ever fd.write(chr(c)) in the source script.

--Chuck


_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio




_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to