Forum: GNU Radio Problem with OTA capture examples

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.
Peter O'Doherty (Guest)
on 2008-12-17 15:56
(Received via mailing list)
Hi,
I'm working through the examples on this site:

http://www.kd7lmo.net/ground_gnuradio_ota.html

and am trying to run this code:

http://www.kd7lmo.net/gnuradio/am_rcv.py

If I run this in the terminal:
./am_rcv.py hf_10000khz_256_complex.dat 0
I get this:
bash: ./am_rcv.py: Permission denied

Anyone have any idea what I'm doing wrong?

Thanks,
Peter
Peter O'Doherty (Guest)
on 2008-12-17 16:49
(Received via mailing list)
The same thing happens when I simply copy a file in the
~/gnuradio-examples/python/audio directory, give it a new name and try
to run it.
Eric B. (Guest)
on 2008-12-17 17:00
(Received via mailing list)
On Wed, Dec 17, 2008 at 03:47:57PM +0100, Peter O'Doherty wrote:
>>
>> Peter
You need to ensure that the script is executable.

 $ chmod +x am_rcv.py

Eric
Peter O'Doherty (Guest)
on 2008-12-17 17:29
(Received via mailing list)
Thanks a lot. That does the job.

But now I get this message:

len(channel_coeffs) =  795
 >>> gr_fir_ccc: using SSE
len(audio_coeffs) =  51
 >>> gr_fir_fff: using SSE
audio_alsa_sink[hw:0,0]: unable to support sampling rate 32000
  card requested 44100 instead.
audio_alsa_sink[hw:0,0]: set_period_time_near failed: Invalid argument
Traceback (most recent call last):
  File "./am_rcv.py", line 105, in <module>
    main (sys.argv[1:])
  File "./am_rcv.py", line 98, in main
    fg = build_graph (filename, freq_offset_khz)
  File "./am_rcv.py", line 78, in build_graph
    audio_sink = audio.sink (int (audio_rate))
  File "/usr/local/lib/python2.5/site-packages/gnuradio/audio_alsa.py",
line 236, in sink
    return _audio_alsa.sink(*args)
RuntimeError: audio_alsa_sink

So I guess correcting the adc_rate to 88.2e6 solves the sampling rate
error:

len(channel_coeffs) =  1095
 >>> gr_fir_ccc: using SSE
len(audio_coeffs) =  69
 >>> gr_fir_fff: using SSE
audio_alsa_sink[hw:0,0]: set_period_time_near failed: Invalid argument
Traceback (most recent call last):
  File "./am_rcv.py", line 105, in <module>
    main (sys.argv[1:])
  File "./am_rcv.py", line 98, in main
    fg = build_graph (filename, freq_offset_khz)
  File "./am_rcv.py", line 78, in build_graph
    audio_sink = audio.sink (int (audio_rate))
  File "/usr/local/lib/python2.5/site-packages/gnuradio/audio_alsa.py",
line 236, in sink
    return _audio_alsa.sink(*args)
RuntimeError: audio_alsa_sink

But what about the audio_alsa_sink error?

Thanks again,
Peter
Eric B. (Guest)
on 2008-12-17 18:19
(Received via mailing list)
On Wed, Dec 17, 2008 at 04:26:57PM +0100, Peter O'Doherty wrote:
> audio_alsa_sink[hw:0,0]: set_period_time_near failed: Invalid argument
> RuntimeError: audio_alsa_sink
>

Can you please try using google before asking your questions here:

google:

  audio_alsa_sink[hw:0,0]: unable to support sampling rate 32000

Thanks,
Eric
Peter O'Doherty (Guest)
on 2008-12-17 19:12
(Received via mailing list)
Okay sorry. I did try a search on Nabble but it didn't come up with any
results.

Please bear with me for one last question:

Changing the command to
./am_rcv.py hf_10000khz_256_complex.dat 0 -O plughw:0,0

Just returns:
usage: am_rcv_file {file_name,'usrp'} freq_offset_KHz

But this seems to be exactly the imput I'm giving it. What am I missing?
Many thanks,
Peter
Eric B. (Guest)
on 2008-12-17 22:17
(Received via mailing list)
On Wed, Dec 17, 2008 at 06:04:57PM +0100, Peter O'Doherty wrote:
>
> But this seems to be exactly the imput I'm giving it. What am I missing?
> Many thanks,
> Peter

You'll have to look at the code to figure it out.
We don't maintain that particular piece of code, and it doesn't appear
to implement our standard argument parsing conventions.

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