# GRC USRP source/sink block - IP address

**URL:** <https://www.ruby-forum.com/t/grc-usrp-source-sink-block-ip-address/246449>\
**Category:** GNU Radio\
**Created:** [October 18, 2013, 3:07pm UTC](https://www.ruby-forum.com/t/grc-usrp-source-sink-block-ip-address/246449 "2013-10-18T15:07:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [October 18, 2013, 3:07pm UTC](https://www.ruby-forum.com/t/grc-usrp-source-sink-block-ip-address/246449/1 "2013-10-18T15:07:44Z")

</div>

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   
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

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/GRC-USRP-source-sink-block-IP-address-tp44233.html](http://gnuradio.4.n7.nabble.com/GRC-USRP-source-sink-block-IP-address-tp44233.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 18, 2013, 3:55pm UTC](https://www.ruby-forum.com/t/grc-usrp-source-sink-block-ip-address/246449/2 "2013-10-18T15:55:04Z")

</div>

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 B.  
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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 18, 2013, 4:12pm UTC](https://www.ruby-forum.com/t/grc-usrp-source-sink-block-ip-address/246449/3 "2013-10-18T16:12:01Z")

</div>

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

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/GRC-USRP-source-sink-block-IP-address-tp44233p44236.html](http://gnuradio.4.n7.nabble.com/GRC-USRP-source-sink-block-IP-address-tp44233p44236.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).
