[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Tricky pipes
From: |
Chuck Swiger |
Subject: |
Re: [Discuss-gnuradio] Tricky pipes |
Date: |
Thu, 07 Apr 2005 21:41:06 -0400 |
At 11:53 AM 4/6/2005 -0700, you wrote:
Jamie has it right. Most likely the pipf_fd was going out of scope,
and then was being closed. That's why in my orignal message I used
something like self.pipe_fd = open("/pipe", "r"). You need to hold a
reference to the return value of open for the duration of the run.
Ok, I understand that - and have verified what your saying. But here's
something /really/ bizarre ;) Using the file_descriptor_source, and making
sure the file desc. remains valid, works great for my audio script. Then I
change
some parameters and put in some blocks to work with the usrp and suddenly
I'm back to square one: there is no valid output until the pipe is closed.
This is the working
script: http://webpages.charter.net/cswiger/psk_all-one-scope.py
and this the broken script: http://webpages.charter.net/cswiger/psk_usrp.py
and the script feeding the pipe is the same in both cases (keyboard.py)
The good news is after hitting ctrl-c in the keyboard.py source I get rf in the
radio using psk_usrp.py.
BTW using low level I/O was another way around the 'out of scope' issue.
Appearently you can open a file in a function using os.open(file,O_RDONLY) and
it still works upon exit.
AFAICT bytes_to_syms should be demanding data from the pipe at the same rate.
In the audio one it's being interpolated by 256 to 8k sps, in the usrp one
its 2048 to 64k sps.
(then X25 then X80 in the usrp). The 2048 interp. seems to be working
correctly when directed
to a file and examined. No unusual reports of underruns - just doesn't flow
untill the pipe
is closed.
--Chuck