replaced ", usrp2 blocks, hide for usrp params, mux defaults to 0x0
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 19 Jan 2009 22:58:08 +0000 (22:58 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 19 Jan 2009 22:58:08 +0000 (22:58 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10263 221aa14e-8319-0410-a670-987f0aec2ac5

16 files changed:
grc/data/platforms/python/block_tree.xml
grc/data/platforms/python/blocks/Makefile.am
grc/data/platforms/python/blocks/blks2_error_rate.xml
grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml
grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml [new file with mode: 0644]
grc/data/platforms/python/blocks/usrp2_source_xxxx.xml [new file with mode: 0644]
grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
grc/data/platforms/python/blocks/usrp_dual_source_x.xml
grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
grc/data/platforms/python/blocks/usrp_simple_source_x.xml
grc/data/platforms/python/blocks/variable_chooser.xml
grc/data/platforms/python/blocks/variable_slider.xml
grc/data/platforms/python/blocks/variable_text_box.xml
grc/data/platforms/python/blocks/xmlrpc_client.xml
grc/data/platforms/python/blocks/xmlrpc_server.xml
grc/src/grc_gnuradio/usrp/simple_usrp.py

index 1c8d7b7e11c5236d9b850e889c500e0ae1c06bea..cdeef8ba1c199d321a7ec3beca1128f4ca8b991d 100644 (file)
                <block>usrp_simple_sink_x</block>
                <block>usrp_dual_source_x</block>
                <block>usrp_dual_sink_x</block>
+               <block>usrp2_source_xxxx</block>
+               <block>usrp2_sink_xxxx</block>
        </cat>
        <cat>
                <name>Variables</name>
index 7f5d0c13980bf934dc54ca8dd56c99761bb886ab..7938e768478bc16fd74ff5187e302db3f1c3a3bf 100644 (file)
@@ -197,6 +197,8 @@ dist_ourdata_DATA = \
        usrp_dual_source_x.xml \
        usrp_simple_sink_x.xml \
        usrp_simple_source_x.xml \
+       usrp2_sink_xxxx.xml \
+       usrp2_source_xxxx.xml \
        variable.xml \
        variable_chooser.xml \
        variable_sink.xml \
index 852e7db0128bff92f3508889648957e7eda1c268..91a303206d27cfa7c3858d64ff4be6e33183197d 100644 (file)
                <type>enum</type>
                <option>
                        <name>Bit Error Rate</name>
-                       <key>&quot;BER&quot;</key>
+                       <key>'BER'</key>
                        <opt>hide_bps:</opt>
                </option>
                <option>
                        <name>Symbol Error Rate</name>
-                       <key>&quot;SER&quot;</key>
+                       <key>'SER'</key>
                        <opt>hide_bps:all</opt>
                </option>
        </param>
index 8b427076ad70ad8a3b84c55faccfa8e97c3052c6..7f562d2f3b5c0056389c1d1ec4ed45bddb6f823c 100644 (file)
@@ -9,7 +9,7 @@
        <key>gr_probe_mpsk_snr_c</key>
        <import>from grc_gnuradio import blks2 as grc_blks2</import>
        <make>grc_blks2.probe_mpsk_snr_c(
-       type=&quot;$type&quot;,
+       type='$type',
        alpha=$alpha,
        probe_rate=$probe_rate,
 )</make>
diff --git a/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml b/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
new file mode 100644 (file)
index 0000000..9340587
--- /dev/null
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##USRP2 Sink
+###################################################
+ -->
+<block>
+       <name>USRP2 Sink</name>
+       <key>usrp2_sink_xxxx</key>
+       <import>from gnuradio import usrp2</import>
+       <make>usrp2.sink_$(type.fcn)($interface, $mac_addr)
+self.$(id).set_interp_rate($interpolation)
+self.$(id).set_frequency($frequency)
+self.$(id).set_gain($gain)
+#if $auto_tr.eval
+self.$(id).set_auto_tr($auto_tr)
+#end if
+#if $tx_enb.eval
+self.$(id).set_enable($tx_enb)
+#end if
+</make>
+       <callback>set_interp_rate($interpolation)</callback>
+       <callback>set_frequency($frequency)</callback>
+       <callback>set_gain($gain)</callback>
+       <param>
+               <name>Output Type</name>
+               <key>type</key>
+               <type>enum</type>
+               <option>
+                       <name>Complex</name>
+                       <key>complex</key>
+                       <opt>fcn:32fc</opt>
+               </option>
+               <option>
+                       <name>Short</name>
+                       <key>short</key>
+                       <opt>fcn:16sc</opt>
+               </option>
+       </param>
+       <param>
+               <name>Interface</name>
+               <key>interface</key>
+               <value>eth0</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>MAC Addr</name>
+               <key>mac_addr</key>
+               <value>00:50:C2:85:3x:xx</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Frequency</name>
+               <key>frequency</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Interpolation</name>
+               <key>interpolation</key>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Gain</name>
+               <key>gain</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Auto T/R</name>
+               <key>auto_tr</key>
+               <value></value>
+               <type>enum</type>
+               <hide>$auto_tr.hide</hide>
+               <option>
+                       <name>Ignore</name>
+                       <key></key>
+                       <opt>hide:part</opt>
+               </option>
+               <option>
+                       <name>Enable</name>
+                       <key>True</key>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>Disable</name>
+                       <key>False</key>
+                       <opt>hide:none</opt>
+               </option>
+       </param>
+       <param>
+               <name>TX Enable</name>
+               <key>tx_enb</key>
+               <value></value>
+               <type>enum</type>
+               <hide>$tx_enb.hide</hide>
+               <option>
+                       <name>Ignore</name>
+                       <key></key>
+                       <opt>hide:part</opt>
+               </option>
+               <option>
+                       <name>Enable</name>
+                       <key>True</key>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>Disable</name>
+                       <key>False</key>
+                       <opt>hide:none</opt>
+               </option>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>$type</type>
+       </sink>
+       <doc>
+The USRP2 sink inputs 100 Megasamples per second / interpolation.
+
+--- Flex RF specific ---
+The "Auto TR" and "TX Enable" settings are flex rf specific and should be left at "Ignore" unless this is a flex rf board.
+
+If enabled, "Auto Transmit/Receive Switching" handles the preference for transmit packets vs receive packets. \
+By default, "Auto TR" is disabled.
+
+The "Transmit Enable" configures the transmitter to be on or off. \
+Do not leave this unconfigured.
+       </doc>
+</block>
diff --git a/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml b/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
new file mode 100644 (file)
index 0000000..285ed17
--- /dev/null
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##USRP2 Source
+###################################################
+ -->
+<block>
+       <name>USRP2 Source</name>
+       <key>usrp2_source_xxxx</key>
+       <import>from gnuradio import usrp2</import>
+       <make>usrp2.source_$(type.fcn)($interface, $mac_addr)
+self.$(id).set_decim_rate($decimation)
+self.$(id).set_frequency($frequency)
+self.$(id).set_gain($gain)
+#if $auto_tr.eval
+self.$(id).set_auto_tr($auto_tr)
+#end if
+#if $rx_ant.eval
+self.$(id).select_rx_antenna($rx_ant)
+#end if
+</make>
+       <callback>set_decim_rate($decimation)</callback>
+       <callback>set_frequency($frequency)</callback>
+       <callback>set_gain($gain)</callback>
+       <param>
+               <name>Output Type</name>
+               <key>type</key>
+               <type>enum</type>
+               <option>
+                       <name>Complex</name>
+                       <key>complex</key>
+                       <opt>fcn:32fc</opt>
+               </option>
+               <option>
+                       <name>Short</name>
+                       <key>short</key>
+                       <opt>fcn:16sc</opt>
+               </option>
+       </param>
+       <param>
+               <name>Interface</name>
+               <key>interface</key>
+               <value>eth0</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>MAC Addr</name>
+               <key>mac_addr</key>
+               <value>00:50:C2:85:3x:xx</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Frequency</name>
+               <key>frequency</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Decimation</name>
+               <key>decimation</key>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Gain</name>
+               <key>gain</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Auto T/R</name>
+               <key>auto_tr</key>
+               <value></value>
+               <type>enum</type>
+               <hide>$auto_tr.hide</hide>
+               <option>
+                       <name>Ignore</name>
+                       <key></key>
+                       <opt>hide:part</opt>
+               </option>
+               <option>
+                       <name>Enable</name>
+                       <key>True</key>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>Disable</name>
+                       <key>False</key>
+                       <opt>hide:none</opt>
+               </option>
+       </param>
+       <param>
+               <name>RX Antenna</name>
+               <key>rx_ant</key>
+               <value></value>
+               <type>enum</type>
+               <hide>$rx_ant.hide</hide>
+               <option>
+                       <name>Ignore</name>
+                       <key></key>
+                       <opt>hide:part</opt>
+               </option>
+               <option>
+                       <name>TX/RX</name>
+                       <key>'TX/RX'</key>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>RX2</name>
+                       <key>'RX2'</key>
+                       <opt>hide:none</opt>
+               </option>
+       </param>
+       <source>
+               <name>out</name>
+               <type>$type</type>
+       </source>
+       <doc>
+The USRP2 source outputs 100 Megasamples per second / decimation.
+
+--- Flex RF specific ---
+The "Auto TR" and "RX Antenna" settings are flex rf specific and should be left at "Ignore" unless this is a flex rf board.
+
+If enabled, "Auto Transmit/Receive Switching" handles the preference for transmit packets vs receive packets. \
+By default, "Auto TR" is disabled.
+
+The "Receive Antenna Setting" selects one of the SMA connectors as the data source. \
+By default, 'TX/RX' is selected.
+       </doc>
+</block>
index acc14b1f67476af2dc476998c3a2e3940b8079b9..68213080c790928ea99b4bedab2c4c78bfea17e0 100644 (file)
        <param>
                <name>Mux</name>
                <key>mux</key>
-               <value>0xba98</value>
+               <value>0x0</value>
                <type>hex</type>
+               <hide>part</hide>
        </param>
        <param>
                <name>Auto T/R</name>
                <key>auto_tr</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$auto_tr.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <param>
                <key>tx_enb_a</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$tx_enb_a.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <param>
                <key>tx_enb_b</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$tx_enb_b.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <sink>
index bd84c73c995c7c1ea42fa9a21ec77dd6e7a17fee..33ff12cb76acdd5846a8c15f1a0d039ea51335ad 100644 (file)
        <param>
                <name>Mux</name>
                <key>mux</key>
-               <value>0x3210</value>
+               <value>0x0</value>
                <type>hex</type>
+               <hide>part</hide>
        </param>
        <param>
                <name>Auto T/R</name>
                <key>auto_tr</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$auto_tr.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <param>
                <key>rx_ant_a</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$rx_ant_a.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>TX/RX</name>
-                       <key>&quot;TX/RX&quot;</key>
+                       <key>'TX/RX'</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>RX2</name>
-                       <key>&quot;RX2&quot;</key>
+                       <key>'RX2'</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <param>
                <key>rx_ant_b</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$rx_ant_b.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>TX/RX</name>
-                       <key>&quot;TX/RX&quot;</key>
+                       <key>'TX/RX'</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>RX2</name>
-                       <key>&quot;RX2&quot;</key>
+                       <key>'RX2'</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <source>
index b525d031f39bb9ab417483113e8008932ee01f00..31d01c9bfc28408e32ed717cf6fe1980e0014704 100644 (file)
        frequency=$frequency,
        interpolation=$interpolation,
        gain=$gain,
-#if $mux.eval == hex(0)
-       mux=None,
-#else
        mux=$mux,
-#end if
        auto_tr=$auto_tr,
        tx_enb=$tx_enb,
 )</make>
                <key>mux</key>
                <value>0x0</value>
                <type>hex</type>
+               <hide>part</hide>
        </param>
        <param>
                <name>Auto T/R</name>
                <key>auto_tr</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$auto_tr.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <param>
                <key>tx_enb</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$tx_enb.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <sink>
index a1598583fa71bb909e45edab073f969e1a1dc353..e537f700f75d6891507014f2c75631ae54afda8f 100644 (file)
        frequency=$frequency,
        decimation=$decimation,
        gain=$gain,
-#if $mux.eval == hex(0)
-       mux=None,
-#else
        mux=$mux,
-#end if
        auto_tr=$auto_tr,
        rx_ant=$rx_ant,
 )</make>
                <key>mux</key>
                <value>0x0</value>
                <type>hex</type>
+               <hide>part</hide>
        </param>
        <param>
                <name>Auto T/R</name>
                <key>auto_tr</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$auto_tr.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <param>
                <key>rx_ant</key>
                <value>None</value>
                <type>enum</type>
+               <hide>$rx_ant.hide</hide>
                <option>
                        <name>Ignore</name>
                        <key>None</key>
+                       <opt>hide:part</opt>
                </option>
                <option>
                        <name>TX/RX</name>
-                       <key>&quot;TX/RX&quot;</key>
+                       <key>'TX/RX'</key>
+                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>RX2</name>
-                       <key>&quot;RX2&quot;</key>
+                       <key>'RX2'</key>
+                       <opt>hide:none</opt>
                </option>
        </param>
        <source>
index 4eba84d4caf8ebaa62357da90c3a046699c24252..2a00a1cf2e1a1ecd6a4cbdb5d4991bb50e0cbcbd 100644 (file)
@@ -14,7 +14,7 @@ _$(id)_control = grc_wxgui.$(chooser_type)_control(
                #if $label.eval
        label=$label,
                #else
-       label=&quot;$id&quot;,
+       label='$id',
                #end if
        index=$value_index,
        choices=$choices,
index 27ac7ea5e0ef621fd8ca90e8180b1ed6e1b8320b..635f3ed4cb26bac336ed62556375bdbcf3564581 100644 (file)
@@ -14,7 +14,7 @@ _$(id)_control = grc_wxgui.slider_$(slider_type)_control(
                #if $label.eval
        label=$label,
                #else
-       label=&quot;$id&quot;,
+       label='$id',
                #end if
        value=$id,
        min=$min,
index 0dad3d826ba13d2efd395b540aeab494dc1742f6..97c6aa0d98c908f843b83db85c1212f499ed3a29 100644 (file)
@@ -14,7 +14,7 @@ _$(id)_control = grc_wxgui.text_box_control(
                #if $label.eval
        label=$label,
                #else
-       label=&quot;$id&quot;,
+       label='$id',
                #end if
        value=$id,
 )
index 82ae8ceed4329dfda39306c3da2c67eaf751cd73..f132a7865308661272e54a9258051c7d7e39d8dc 100644 (file)
@@ -8,7 +8,7 @@
        <name>XMLRPC Client</name>
        <key>xmlrpc_client</key>
        <import>import xmlrpclib</import>
-       <make>xmlrpclib.Server(&quot;http://$(addr.eval):$(port)&quot;)</make>
+       <make>xmlrpclib.Server('http://$(addr.eval):$(port)')</make>
        <callback>$(callback.eval)($variable)</callback>
        <param>
                <name>Address</name>
index 40e547efc43968aac0441e732df1e5243544a477..6c31bd1a9a78a47afc423acde0518bde1bed031c 100644 (file)
@@ -33,7 +33,7 @@ Ex: If the variable is called freq, the function provided by the server will be
 Example client in python:
 
 import xmlrpclib
-s = xmlrpclib.Server(&quot;http://localhost:8080&quot;)
+s = xmlrpclib.Server('http://localhost:8080')
 s.set_freq(5000)
        </doc>
 </block>
index c1019d334a5a40a61b99d74ea0734f868870af4a..d829cf9e610d362238490ebac07698d4f2bc44b0 100644 (file)
@@ -146,7 +146,7 @@ class _simple_usrp(object):
 class _simple_source(gr.hier_block2, _simple_usrp):
        """A single usrp source of IO type short or complex."""
 
-       def __init__(self, number, subdev_spec, frequency, decimation, gain, mux=None, auto_tr=None, rx_ant=None):
+       def __init__(self, number, subdev_spec, frequency, decimation, gain, mux=0x0, auto_tr=None, rx_ant=None):
                """
                USRP simple source contructor.
                @param number the unit number
@@ -168,7 +168,7 @@ class _simple_source(gr.hier_block2, _simple_usrp):
                u = self.constructor[0](number, nchan=1)
                if subdev_spec is None: subdev_spec = usrp.pick_rx_subdevice(u)
                u.set_decim_rate(decimation)
-               if mux is None: mux = usrp.determine_rx_mux_value(u, subdev_spec)
+               if not mux: mux = usrp.determine_rx_mux_value(u, subdev_spec)
                u.set_mux(mux)
                subdev = _setup_rx_subdev(u, subdev_spec, 0, gain, frequency, auto_tr, rx_ant)
                _simple_usrp.__init__(self, u, subdev, 0)
@@ -186,7 +186,7 @@ class simple_source_s(_simple_source): constructor = (usrp.source_s, )
 class _simple_sink(gr.hier_block2, _simple_usrp):
        """A single usrp sink of IO type short or complex."""
 
-       def __init__(self, number, subdev_spec, frequency, interpolation, gain, mux=None, auto_tr=None, tx_enb=None):
+       def __init__(self, number, subdev_spec, frequency, interpolation, gain, mux=0x0, auto_tr=None, tx_enb=None):
                """
                USRP simple sink contructor.
                @param number the unit number
@@ -208,7 +208,7 @@ class _simple_sink(gr.hier_block2, _simple_usrp):
                u = self.constructor[0](number, nchan=1)
                if subdev_spec is None: subdev_spec = usrp.pick_tx_subdevice(u)
                u.set_interp_rate(interpolation)
-               if mux is None: mux = usrp.determine_tx_mux_value(u, subdev_spec)
+               if not mux: mux = usrp.determine_tx_mux_value(u, subdev_spec)
                u.set_mux(mux)
                subdev = _setup_tx_subdev(u, subdev_spec, gain, frequency, auto_tr, tx_enb)
                _simple_usrp.__init__(self, u, subdev, subdev.which())
@@ -299,7 +299,7 @@ class _dual_usrp(object):
 class _dual_source(gr.hier_block2, _dual_usrp):
        """A dual usrp source of IO type short or complex."""
 
-       def __init__(self, number, frequency_a, frequency_b, decimation, gain_a, gain_b, mux=0x3210, auto_tr=None, rx_ant_a=None, rx_ant_b=None):
+       def __init__(self, number, frequency_a, frequency_b, decimation, gain_a, gain_b, mux=0x0, auto_tr=None, rx_ant_a=None, rx_ant_b=None):
                """
                USRP dual source contructor.
                @param number the unit number
@@ -322,6 +322,7 @@ class _dual_source(gr.hier_block2, _dual_usrp):
                #create usrp object
                u = self.constructor[0](number, nchan=2)
                u.set_decim_rate(decimation)
+               if not mux: mux = 0x3210
                u.set_mux(mux)
                subdev_a = _setup_rx_subdev(u, (0, 0), 0, gain_a, frequency_a, auto_tr, rx_ant_a)
                subdev_b = _setup_rx_subdev(u, (1, 0), 1, gain_b, frequency_b, auto_tr, rx_ant_b)
@@ -342,7 +343,7 @@ class dual_source_s(_dual_source): constructor = usrp.source_s
 class _dual_sink(gr.hier_block2, _dual_usrp):
        """A dual usrp sink of IO type short or complex."""
 
-       def __init__(self, number, frequency_a, frequency_b, interpolation, gain_a, gain_b, mux=0xba98, auto_tr=None, tx_enb_a=None, tx_enb_b=None):
+       def __init__(self, number, frequency_a, frequency_b, interpolation, gain_a, gain_b, mux=0x0, auto_tr=None, tx_enb_a=None, tx_enb_b=None):
                """
                USRP dual sink contructor.
                @param number the unit number
@@ -363,6 +364,7 @@ class _dual_sink(gr.hier_block2, _dual_usrp):
                #create usrp object
                u = self.constructor[0](number, nchan=2)
                u.set_interp_rate(interpolation)
+               if not mux: mux = 0xba98
                u.set_mux(mux)
                subdev_a = _setup_tx_subdev(u, (0, 0), gain_a, frequency_a, auto_tr, tx_enb_a)
                subdev_b = _setup_tx_subdev(u, (1, 0), gain_b, frequency_b, auto_tr, tx_enb_b)