Forum: GNU Radio Broken pipe when I write the payload to a pipe.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4f23ce70930197295cbf054e998c79b9?d=identicon&s=25 Brook Lin (Guest)
on 2009-01-23 20:45
(Received via mailing list)
Hi All,

I am trying to write the payload to a pipe rather than to a file in
benchmark_ofdm_rx.py. The script is attached below. However, I got the
error
'Broeken pipe' when I run the script. Can anyone tell me why is that and
how
to correct it?

rxdata.append(payload[2:])
#os.mkfifo('pipe')
myfile = os.popen('pipe','w')
for data in rxdata:
    myfile.write(data)
myfile.close()

Thanks,
Brook
--
View this message in context:
http://www.nabble.com/Broken-pipe-when-I-write-the...
Sent from the GnuRadio mailing list archive at Nabble.com.
4f23ce70930197295cbf054e998c79b9?d=identicon&s=25 Brook Lin (Guest)
on 2009-01-23 20:59
(Received via mailing list)
All right, I use 'import signal' and 'signal.signal(signal.SIGPIPE,
signal.SIG_DFL)' to solve the [Errno 32] Broken pipe. Then I met another
problem. The error says 'sh: pipe: not found'. However, pipe dose be
created. How should I do next? Thanks.

OFDM Demodulator:
Modulation Type: bpsk
FFT length:      128
Occupied Tones:  100
CP length:        32
TIMEOUT
ok: True    pktno: 1    n_rcvd: 1    n_right: 1
sh: pipe: not found



Brook Lin wrote:
> myfile = os.popen('pipe','w')
> for data in rxdata:
>     myfile.write(data)
> myfile.close()
>
> Thanks,
> Brook
>

--
View this message in context:
http://www.nabble.com/Broken-pipe-when-I-write-the...
Sent from the GnuRadio mailing list archive at Nabble.com.
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-01-23 23:14
(Received via mailing list)
On Fri, Jan 23, 2009 at 11:44:20AM -0800, Brook Lin wrote:
>
> Hi All,
>
> I am trying to write the payload to a pipe rather than to a file in
> benchmark_ofdm_rx.py. The script is attached below. However, I got the error
> 'Broeken pipe' when I run the script. Can anyone tell me why is that and how
> to correct it?

It's because you're writing to a pipe with no reader.

Try

  $ man 7 pipe

for more info, or try reading a Unix / Linux programming book.

Eric
C153c581b7bf93de497347ba0daed290?d=identicon&s=25 shesh (Guest)
on 2009-06-29 13:04
(Received via mailing list)
hi Brook,
me too facing the same error. Could you/anyone please help?

Shesh


Brook Lin wrote:
> CP length:        32
>> I am trying to write the payload to a pipe rather than to a file in
>>
>> Thanks,
>> Brook
>>
>
>

--
View this message in context:
http://www.nabble.com/Broken-pipe-when-I-write-the...
Sent from the GnuRadio mailing list archive at Nabble.com.
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-06-29 18:17
(Received via mailing list)
On Mon, Jun 29, 2009 at 04:03:26AM -0700, shesh wrote:
>
> hi Brook,
> me too facing the same error. Could you/anyone please help?
> Shesh

Please take a look at the man pages.
Your example below is attempting to run a command called "pipe" and
write to it.  There is no such command, hence the message:

  sh: pipe: not found

Eric
This topic is locked and can not be replied to.