Forum: GNU Radio Using RFX2400 from C++

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.
Dan H. (Guest)
on 2007-01-03 11:05
(Received via mailing list)
Hi,

I'm trying to get the code together to enable the RFX2400 board from a
C++ program. I'm mostly looking in usrp.py, usrp1.py, db_base.py, and
db_flexrf.py and copying commands like write_io and write_oe into their
C++ versions. Is there good documentation on all of these various
commands, and/or is there an easier way to use the Python code to
instantiate the usrp data structure for me?

Thanks,

Dan
Eric B. (Guest)
on 2007-01-03 11:09
(Received via mailing list)
On Wed, Jan 03, 2007 at 01:01:36AM -0800, Dan H. wrote:
>
> Dan

Hi Dan,

Converting this stuff all to C++ is "on the list".  In the meanwhile,
documentation of the primitives is contained in usrp_basic.h and
usrp_standard.h.

Eric
Chris S. (Guest)
on 2007-01-03 22:18
(Received via mailing list)
Dan, Eric, all:

I am interested in the same and am willing to help out.  For now I'd be
happy with just getting the bits from the USRP (i.e. no graph theory).

Chris
Chris Frey (Guest)
on 2007-01-07 23:37
(Received via mailing list)
On Wed, Jan 03, 2007 at 01:01:36AM -0800, Dan H. wrote:
> Hi,
>
> I'm trying to get the code together to enable the RFX2400 board from a
> C++ program. I'm mostly looking in usrp.py, usrp1.py, db_base.py, and
> db_flexrf.py and copying commands like write_io and write_oe into their
> C++ versions. Is there good documentation on all of these various
> commands, and/or is there an easier way to use the Python code to
> instantiate the usrp data structure for me?

If you don't want to maintain your own C++ interface, you can call the
python code from C++ using Boost:

  http://www.boost.org/libs/python/doc/

- Chris
Dan H. (Guest)
on 2007-01-19 17:30
(Received via mailing list)
I decided to take the path of least resistance and instrumented usrp1.py
to print whenever a set_* or write_* function was called. I then ran a
modified version of tunnel.py to get the following output (full output
attached as log):

<snip>
_write_oe (<gr_block usrp1_sink_c (0)>, 0, 0, 65535)
_write_fpga_reg (<gr_block usrp1_sink_c (0)>, 40, 0)
set_pga (<gr_block usrp1_sink_c (0)>, 0, 0.0)
set_pga (<gr_block usrp1_sink_c (0)>, 1, 0.0)
_write_fpga_reg (<gr_block usrp1_sink_c (0)>, 20, 0)
_write_fpga_reg (<gr_block usrp1_sink_c (0)>, 21, 0)
_write_fpga_reg (<gr_block usrp1_sink_c (0)>, 22, 0)
</snip>

I then took this output, grepped for source, and turned it into C code
(attached), but have been unable to get signal out. Interestingly, when
I screwed up and used the sink instead (that should be the transmit
path, right?), I did get signal out, albeit not pretty sine waves like I
expected (the signal was sent using usrp_siggen at the same freq with -w
0). I'm confused.

Also, I may be doing that thing with the write_spi wrong, I don't know
how to properly handle the \x00s.
//
-Dan
This topic is locked and can not be replied to.