Forum: GNU Radio Help on editing a usrp1_source_c.cc file

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.
Meenaktchi V. (Guest)
on 2007-06-21 20:16
(Received via mailing list)
Hi,

In the '../gr-usrp/src/usrp1_source_c.cc' file there is a function
'copy_from_usrp_buffer'. I would like to analyze the complex signal
converted from 16-bit interleaved I and Q signal.

I have changed the 'usrp1_source_c.cc' file to open a file using
fstream class and copy the complex signal onto this file. I have
implemented this in the function 'copy_from_buffer'. I built GNU
radio software again after the changes. I assumed this would work.
But it is not. I am sure to be missing something. Debug prints say
that this file is not being opened while this file can be opened by
any other C++ program that is not part of GNU software.

Or is there anything that I have to change in .i file as well?

Thanks for any and all help.

Meenaktchi V.
Tarun T. (Guest)
on 2007-06-21 20:31
(Received via mailing list)
On 6/21/07, Meenaktchi V. <removed_email_address@domain.invalid> wrote:
>
> Hi,
>
> In the '../gr-usrp/src/usrp1_source_c.cc' file there is a function
> 'copy_from_usrp_buffer'. I would like to analyze the complex signal
> converted from 16-bit interleaved I and Q signal.


You can try  ../gnuradio-examples/python/usrp/usrp_rx_cfile.py for this
purpose.

I have changed the 'usrp1_source_c.cc' file to open a file using
> fstream class and copy the complex signal onto this file. I have
> implemented this in the function 'copy_from_buffer'. I built GNU
> radio software again after the changes. I assumed this would work.
> But it is not. I am sure to be missing something. Debug prints say
> that this file is not being opened while this file can be opened by
> any other C++ program that is not part of GNU software.



Or is there anything that I have to change in .i file as well?


IT depends, how would you like to call your object from Python. As long
as
you dont need to call it from Python, change in .i-file is not required.
So
far, its not clear whether you are controlling your file from
outside/Python
or its part of general_work function.

PS: Next time you update your gnuradio from svn, possibly the changed
file
will be replaced.

Thanks for any and all help.
>
> Meenaktchi V.


~Tarun
Meenaktchi V. (Guest)
on 2007-06-22 00:40
(Received via mailing list)
Thanks Tarun, this helped.

Is there anyway to do the opposite? I have 16-bit I and Q data, I would
like
to send this data to USRP and transmit

Thanks
Meenaktchi
Dan H. (Guest)
on 2007-06-22 00:54
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Meenaktchi V. wrote:
> Thanks Tarun, this helped.
>
> Is there anyway to do the opposite? I have 16-bit I and Q data, I would
> like
> to send this data to USRP and transmit
>
> Thanks
> Meenaktchi

To log data from the USRP: usrp.source_c -> gr.file_sink(complex)
To replay data to the USRP: gr.file_source(complex) -> usrp.sink_c

- -Dan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGeuVSy9GYuuMoUJ4RAgi+AJ0SW+l/dlQYVpqHm/T3cbZuMym2hQCfTMDF
o9zq9y2gdBX/L5iE1NXm4Sg=
=V91g
-----END PGP SIGNATURE-----
Meenaktchi V. (Guest)
on 2007-06-22 01:12
(Received via mailing list)
usrp_rx_cfile.py logs data using gr.file_sink and the output file is a
binary file. Can I have a .dat output file?

I guess for replaying data using the gr.file_source -> usrp.sink_c, the
gr.file_source would be reading from a .dat file

Thanks for all help
Meenaktchi
This topic is locked and can not be replied to.