Has anybody had any experience using the capture_to_file.py code from KD7LMO? (http://kd7lmo.net/ground_gnuradio_software.html) I am interested in the functionality to set up an IF frequency and bandwidth and dump the data to a file. When I have attempted to run the program I have encountered the following error.... [jjw27370@localhost ~]$ ./capture_to_file.py narrowband_256k_complex.dat 10.7 250 30 Capturing 7680000 samples Traceback (most recent call last): File "./capture_to_file.py", line 67, in ? main (sys.argv[1:]) File "./capture_to_file.py", line 63, in main fg = build_graph (filename, IF_freq_hz, decim_rate, samples) File "./capture_to_file.py", line 38, in build_graph src = usrp.source_c (0, decim, 1, mux) File "/home/jjw27370/gr/lib/python2.4/site-packages/gnuradio/usrp.py", line 242, in __init__ fpga_filename, firmware_filename) File "/home/jjw27370/gr/lib/python2.4/site-packages/gnuradio/usrp1.py", line 1208, in source_c return _usrp1.source_c(*args) TypeError: in method 'source_c', argument 4 of type 'int' It seems there is something wrong with the way that mux is declared in the capture_to_file.py code (0xf0f0f0f0). According to Dawai Shen's tutorial on USRP (http://www.nd.edu/~dshen/GNU/Tutorial/4.html) 0xf0f0f0f0 should be a valid combination to use. Maybe I am missing some trivial detail or maybe this code was designed for an older version of GNU Radio, but if anybody could shed some light on this issue or maybe knows of a better program for capturing data to a file, it would be helpful. Thanks, John -- View this message in context: http://www.nabble.com/Capturing-data-to-file-t1325... Sent from the GnuRadio forum at Nabble.com.
on 2006-03-22 20:52
on 2006-03-22 22:10
> It seems there is something wrong with the way that mux is declared in the > capture_to_file.py code (0xf0f0f0f0). The problem is that Python promotes that value to a bignum because it doesn't fit into an int (as a positive number). This was a recent change to Python, which is great for numeric users but has caused small problems for people making bitmasks. John
on 2006-03-22 22:42
On Wed, Mar 22, 2006 at 10:51:19AM -0800, jjw wrote: > Traceback (most recent call last): > line 1208, in source_c > capturing data to a file, it would be helpful. > > Thanks, > John May I suggest you try gnuradio-examples/python/usrp/usrp_rx_cfile.py? It handles all daughterboards, and basically just "does the right thing". Eric
on 2006-03-28 01:10
John, Try this: ... from gnuradio import gru ... mux = gru.hexint(0xf0f0f0f0) ... It works for me... Angilberto. --- jjw <firstname.lastname@example.org> wrote: > > File "./capture_to_file.py", line 38, in > build_graph > src = usrp.source_c (0, decim, 1, mux) > File > "/home/jjw27370/gr/lib/python2.4/site-packages/gnuradio/usrp.py", > line 242, in __init__ > fpga_filename, firmware_filename) > File > "/home/jjw27370/gr/lib/python2.4/site-packages/gnuradio/usrp1.py", > USRP (http://www.nd.edu/~dshen/GNU/Tutorial/4.html) > John > -- > View this message in context: > http://www.nabble.com/Capturing-data-to-file-t1325... > Sent from the GnuRadio forum at Nabble.com. > > > > _______________________________________________ > Discuss-gnuradio mailing list > email@example.com > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com