Real cheap Software Defined Radios, part 3

It works! At least, I can pick up FM Radio on it.

gnuradio

I think that GNU Radio + these cheap repurposed Realtek RTL2832U chipsets could be the most interesting thing to happen for a long time.

A brain dump of the gotchas while I remember them …

Source IO size X does not match sink IO size Y

This must be the most infuriating error message in the history of error messages. It is precisely useless. I applied the following patch to GNU Radio to make the error meaningful and somewhat actionable:

--- Connection.py.orig	2012-12-05 19:32:59.450942474 +0000
+++ Connection.py	2012-12-05 19:34:11.647520511 +0000
@@ -40,4 +40,4 @@
 		source_size = Constants.TYPE_TO_SIZEOF[self.get_source().get_type()] * self.get_source().get_vlen()
 		sink_size = Constants.TYPE_TO_SIZEOF[self.get_sink().get_type()] * self.get_sink().get_vlen()
 		if source_size != sink_size:
-			self.add_error_message('Source IO size "%s" does not match sink IO size "%s".'%(source_size, sink_size))
+			self.add_error_message('Source IO size "%s" (%s*%s) does not match sink IO size "%s" (%s*%s).'%(source_size, self.get_source().get_type(), self.get_source().get_vlen(), sink_size, self.get_sink().get_type(), self.get_sink().get_vlen()))

What the error means is that the types at each end of a connection don’t match, eg. you’ve got a float output feeding into a complex number input. The trick (explained to me on IRC) is to change the types of each end until the colours match — eg. blue to blue, or brown to brown. To change the types, select a block and either hit the Up and Down arrow keys, or use the combo box that appears when you open the properties.

Sampling rates, decimation, etc.

This is very poorly explained anywhere. I ended up watching this video and very carefully noting each calculation that the speaker makes, then adjusting them for the RTL-SDR.

Use variables, expressions

Define variables liberally. Use expressions. eg. The Quadrature Rate in the diagram above is samp_rate/20, and the Decimation is int(samp_rate/20)/1000.

About these ads

2 Comments

Filed under Uncategorized

2 responses to “Real cheap Software Defined Radios, part 3

  1. tralala

    Thanks for this post. Helped me with the size error. =)

  2. silverk

    Helped me lot with size error.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s