gqrx-sdr / gqrx

Software defined radio receiver powered by GNU Radio and Qt.
http://gqrx.dk
GNU General Public License v3.0
3.12k stars 546 forks source link

Unable to use USRP B210 with default device settings #168

Closed courtarro closed 10 years ago

courtarro commented 10 years ago

If I select my B210 from the list of available devices and do not modify any of the default settings, gqrx fails to initialize the USRP with the following message:

FATAL: port number 1 exceeds max of 0

When I enable DSP, gqrx crashes with this message:

terminate called after throwing an instance of 'std::runtime_error'
  what():  throttle(54): insufficient connected output ports (1 needed, 0 connected)

To work around this bug, I must add a "subdev" specification to my device arguments, as so:

Original value that crashes:

type=b200,uhd

Working version with subdev:

type=b200,uhd,subdev=A:A

After that workaround, gqrx is able to start and perform DSP properly.

csete commented 10 years ago

Thanks for this info. We will update the default settings.

m0mik commented 10 years ago

Note that without specifying that the B210 uses "subdev=A:A" in the device string, the line "Using subdev spec 'A:A A:B'." in the output log below shows that the two subdev paths are being initialised at the same time which I assume is the cause of this bug:

$ gqrx linux; GNU C++ version 4.6.3; Boost_105300; UHD_003.007.000-1-ga8caec5f

gr-osmosdr a5244b53 (0.1.1git) gnuradio v3.7.4git-0-g69dcaa75 built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf rfspace Using Volk machine: avx_64_mmx_orc gr-osmosdr a5244b53 (0.1.1git) gnuradio v3.7.4git-0-g69dcaa75 built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf rfspace -- Operating over USB 2. -- 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 32 MHz -- Actually got clock rate 32 MHz -- Performing timer loopback test... pass -- Performing timer loopback test... pass -- Using subdev spec 'A:A A:B'.

FATAL: port number 1 exceeds max of 0

Trying to fill up 0 missing channel(s) with null source(s). This is being done to prevent the application from crashing due to gnuradio bug #528.

terminate called after throwing an instance of 'std::runtime_error' what(): throttle(53): insufficient connected output ports (1 needed, 0 connected) Aborted (core dumped)

courtarro commented 10 years ago

That makes sense. This is a MIMO device, but gqrx doesn't check for that and leaves one output of the source disconnected ... correct? It almost seems like more of an osmocom bug since defaulting to enabling both outputs is likely to confuse many apps.

csete commented 10 years ago

By default gr-osmosdr presents the device arguments returned by uhd::device::find() and I guess it is just unfortunate that the default setup for the B210 is a MIMO setup. Do you know if the same applies for the B200? Or at least if subdev=A:A will be valid for the B200 too?

m0mik commented 10 years ago

I assume that "subdev=A:A" is the one and only subdev that the B200 has so it shouldn't have the same issue as the B210.

Mike

On Fri, Apr 11, 2014 at 8:41 PM, Alexandru Csete notifications@github.comwrote:

By default gr-osmosdr presents the device arguments returned by uhd::device::find() and I guess it is just unfortunate that the default setup for the B210 is a MIMO setup. Do you know if the same applies for the B200? Or at least if subdev=A:A will be valid for the B200 too?

Reply to this email directly or view it on GitHubhttps://github.com/csete/gqrx/issues/168#issuecomment-40245575 .

csete commented 10 years ago

There has been an update to gr-osmosdr to properly select one channel (subdev=A:A) with gqrx. Thus it should now work with default device string and subdev should only be necessary if user wants the other channel subdev=A:B.

Feedback is welcome.