0
$\begingroup$

Just getting up to speed on the ettus B210 - basically the same as the B200 but with two Rf boards.

I am testing using gnuradio-companion. I have setup a very simple transmitter consisting of:

Random Src --> PSK Mod --> UHD USRP Sink (port A:A)

This worked fine (I had some frequency / gain sliders). Then I wanted to try to transmit out of both Tx ports, so I tried the following:

Random Src --> PSK Mod --> UHD USRP Sink (port A:A, freq - 1MHz)
                   |
                   +-----> UHD USRP Sink (port A:B, freq + 1MHz)

It runs, but only port A:A is transmitting and I see loads of "SSSSSSSS"'s in the debug. If I disable either UHD USRP Sink then the other port transmits fine (i.e. I can transmit out of each one individually perfectly.

So how can I send two signals (or the same signal) over both tx port?

Secondly - I want to run two different applications one controlling each port (lets say I run two different gnuradio-companion generated python files each set to different ports)... is this possible? All I got was an error saying that no device was available when I tried to run the second instance, so I guess this may not be possible...

EDIT New simpler setup:

sig-src1(samp: 1M) --> USRP Sink (port A:A, freq 1.85G)
sig-src2(samp: 1M) --> USRP Sink (port A:A, freq 1.9G)

This is connected directly to a spectrum analyser.

Here is the output I see:

Generating: '/home/user/src/gnu-radio/SimpleDualTx.py'

Executing: /usr/bin/python -u /home/user/src/gnu-radio/SimpleDualTx.py

linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown

-- Detected Device: B210
-- Operating over USB 3.
-- Initialize CODEC control...
-- Initialize Radio control...
-- Performing register loopback test... pass
-- Performing register loopback test... pass
-- Performing CODEC loopback test... pass
-- Performing CODEC loopback test... pass
-- Asking for clock rate 16.000000 MHz... 
-- Actually got clock rate 16.000000 MHz.
-- Performing timer loopback test... pass
-- Performing timer loopback test... pass
-- Setting master clock rate selection to 'automatic'.
-- Asking for clock rate 32.000000 MHz... 
-- Actually got clock rate 32.000000 MHz.
-- Performing timer loopback test... pass
-- Performing timer loopback test... pass
Press Enter to quit: SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
>>> Done (return code -9)

This runs, but only port A:B goes into transmit. If I disable either pair of sig-src and USRP Sink the it works fine.

$\endgroup$
  • $\begingroup$ Never use a Throttle block in conjunction with hardware. GRC explicitly has a warning against that. $\endgroup$ – Marcus Müller Nov 29 '17 at 16:10
  • $\begingroup$ You can't tune the TX to two frequencies that are this far apart - there's only one TX mixer for both channels $\endgroup$ – Marcus Müller Nov 30 '17 at 8:50
  • $\begingroup$ Also, try with a different USB port. This looks like your USB 3 controller is dropping packets; for 2x 1MS/s you don't need usb3, a USB 2 would do. Also, just simply set the USRP sink to 2 channels and don't explicitly set the subdevice specification (what you call "port") $\endgroup$ – Marcus Müller Nov 30 '17 at 8:53
  • $\begingroup$ @MarcusMüller ah, ok I can setup a 2-channel USRP sink which takes the two signals. Both transmitter lights now come on. I still struggle to get two distinct signals with any useful seperation - but I am starting to think that (since you mentioned there is only one mixer) the two RF paths are not meant to be separate and distinct. I think what I am trying to do really probably needs 2 x B210 (or B200) boards... would you agree with that? (Note: the USB2 port gave same result - but I think this setup was probably invalid) $\endgroup$ – code_fodder Nov 30 '17 at 9:19
  • $\begingroup$ Since you're not telling us what you're trying to do in the bigger picture, I have no clue. $\endgroup$ – Marcus Müller Nov 30 '17 at 9:20
4
$\begingroup$

UHD requires a USRP to be owned by one process only, so no, you can't share the same USRP across two flow graphs, but you could use for example the ZeroMQ PUB/SUB sink/source pair to stream data in from a second application to your first flow graph. But then again, there's nothing wrong with putting a whole flow graph into a hier block¹ and using that in another flow graph.

Also: Throttle is never right in a flow graph with hardware. You've got a device with a physical sampling rate to limit how much your computer produces. If you now add a software throttle, either that throttle is useless, or it does harm. That's why we (as in: I personally) added a very prominent warning to GRC that you shouldn't be having a hardware sink and a Throttle block in the same flow graph. Read the console output in the lower half of your GRC window!

¹ hier block: hierarchical block. See the tutorials (in order!) on http://tutorials.gnuradio.org

$\endgroup$
  • $\begingroup$ The throttle was not having an effect - but I have removed it. I do read the output window, but because I was getting other issues I had missed that, so thanks for picking up on that. So I am still struggling to get two signals out of the USRP (one from each port). So I understand that I can't run two apps - but how do I get two signal out (one from each port)? - example 2 (modified to remove throttle) still does not work - I see loads of "SSSS"'s.... can't figure out how to move on, thanks $\endgroup$ – code_fodder Nov 30 '17 at 8:37
  • $\begingroup$ I added an edit with a perhaps more correct / simple example... still no joy though : ( $\endgroup$ – code_fodder Nov 30 '17 at 8:45
  • $\begingroup$ Marked up as answer, because I think what I am trying to do requires two B200's, but this has provided the information I needed to move on. Thanks : ) $\endgroup$ – code_fodder Nov 30 '17 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.