Quantcast

GRC USRP source/sink block - IP address

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GRC USRP source/sink block - IP address

Alexander B
Hello all

just looking for some help regarding the USRP N210 in GRC.

I'm having a problem with the IP address in GRC.

I have looked around but the only material I have found regarding IP address relates to setting up the N210 on the network.

That part I have correct.
-> I can ping the device
-> uhd_find_devices returns as it should
-> utilitiy programs (txrx_loopback) work

My problem I think is in integration with GRC.

I have an existing flow that implements my OFDM system (loopback to same device) that I was using with my USRP1.

All I have done after swapping in the N210 into the loop is populate the fields in the USRP sink/source block with the N210's address.

I get the following error complaining about the IP address:

/////////////////////////////////////////////////////////////////////////

Traceback (most recent call last):
  File "transmitter_gain_freq_test.py", line 226, in <module>
    tb = transmitter_gain_freq_test()
  File "transmitter_gain_freq_test.py", line 111, in __init__
    channels=range(1),
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/uhd/__init__.py", line 116, in constructor_interceptor
    return old_constructor(*args)
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/uhd/uhd_swig.py", line 2479, in usrp_source
    return _uhd_swig.usrp_source(*args)
RuntimeError: unknown key format: 192.168.10.2

/////////////////////////////////////////////////////////////////////////

 
The generated code is as follows:

                self.uhd_usrp_source_0 = uhd.usrp_source(
                        device_addr="192.168.10.2",
                        stream_args=uhd.stream_args(
                                cpu_format="fc32",
                                channels=range(1),
                        ),
                )
                self.uhd_usrp_source_0.set_time_now(uhd.time_spec(time.time()), uhd.ALL_MBOARDS)
                self.uhd_usrp_source_0.set_samp_rate(samp_rate)
                self.uhd_usrp_source_0.set_center_freq(carrier, 0)
                self.uhd_usrp_source_0.set_gain(RX_gain, 0)
                self.uhd_usrp_source_0.set_antenna("RX", 0)

With the remaining fields blank or default (works with USRP1)


System:
ubuntu 12.10
GNU radio 3.6.5.1

I'm rather stumped here, any suggestions of change would be much appreciated.
port number perhaps?

Alex B
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GRC USRP source/sink block - IP address

Martin Braun (CEL)
On Fri, Oct 18, 2013 at 06:06:16AM -0700, Alexander B wrote:
> That part I have correct.
> -> I can ping the device
> -> uhd_find_devices returns as it should
> -> utilitiy programs (txrx_loopback) work
>
> My problem I think is in integration with GRC.

You need to specify addr="IP", not just the IP (otherwise, UHD doesn't
know you want to use ethernet).

> The generated code is as follows:
>
>                 self.uhd_usrp_source_0 = uhd.usrp_source(
> device_addr="192.168.10.2",

           That's wrong             ^^^^^^^^^^^^^

MB

--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstra├če 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-W├╝rttemberg and
National Laboratory of the Helmholtz Association

_______________________________________________
Discuss-gnuradio mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

attachment0 (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GRC USRP source/sink block - IP address

Alexander B
Thanks for the reply Martin

yeah I got it now. I had actually tried that but I put:

addr="192.168.10.2"

in the address field where it should be:

addr=192.168.10.2

Thanks again

Alex B
Loading...