Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RTL-SDR] Support for more than one device #95

Closed
Paderman opened this issue Jun 29, 2017 · 40 comments
Closed

[RTL-SDR] Support for more than one device #95

Paderman opened this issue Jun 29, 2017 · 40 comments

Comments

@Paderman
Copy link

Is it possible to run welle.io with installed zadig driver instead original driver?

@Paderman Paderman changed the title No support for Zadig No support for Zadig driver? Jun 29, 2017
@AlbrechtL AlbrechtL changed the title No support for Zadig driver? [Windows] No support for Zadig driver? Jun 29, 2017
@AlbrechtL
Copy link
Owner

Can you explain your problem a little bit more in detail, please? welle.io runs with the zadig driver, see here: https://www.welle.io/devices/rtl_sdr

@Paderman
Copy link
Author

Paderman commented Jun 29, 2017

I have a RTL2838 (R820T2, 0BDA 2838 01) stick, not RTL2832 and Zadig is installed, but welle.io say it doesn't exist a device for welle.io.

welle.io

main: Detected system language "de_DE"
main: Set language "de_DE"
InputFactory: Input device: "auto"
Airspy: Open airspy
Airspy: airpsy_open () failed: AIRSPY_ERROR_NOT_FOUND ( -5 )
RTL_SDR: Open rtl-sdr
RTL_SDR: Found 2 devices. Uses the first one
usb_open error -12
RTL_SDR: Opening rtl-sdr failed
InputFactory: No valid device found use Null device instead.
Audio: ActiveState
RadioController: Number of gain steps: 0
RadioController: AGC on
qml: dpiScaleFactor: 1
qml: desktopAvailableWidth: 1440
qml: desktopAvailableHeight: 860
qml: orientation: 2
file:///C:/Program Files (x86)/welle.io/qml/QtQuick/Controls/SplitView.qml:624: TypeError: Cannot call method 'updateFillIndex' of null

Info from Device Manager:
"Bulk-In, Interface (Interface 0)"
"Bulk-In, Interface (Interface 1)"

In Qt-DAB I must select second entry in list.

qt-dab-dongle-select

@andimik
Copy link
Contributor

andimik commented Jun 29, 2017

This seems to be the problem:

RTL_SDR: Found 2 devices. Uses the first one

Could you reset the driver for Interface 0 or even install the old driver in Zadig? Not so for Interface 1, please leave it as it is.

@andimik
Copy link
Contributor

andimik commented Jun 29, 2017

BTW: There is no RTL2838 at all ...

https://osmocom.org/projects/sdr/wiki/rtl-sdr

@Paderman
Copy link
Author

Paderman commented Jun 29, 2017

I try to reset the driver.

Edit 1: after resetting and installation for Interface 0:

main: Detected system language "de_DE"
main: Set language "de_DE"
InputFactory: Input device: "auto"
Airspy: Open airspy
Airspy: airpsy_open () failed: AIRSPY_ERROR_NOT_FOUND ( -5 )
RTL_SDR: Open rtl-sdr
RTL_SDR: Found 2 devices. Uses the first one
usb_open error -12
RTL_SDR: Opening rtl-sdr failed
InputFactory: No valid device found use Null device instead.
Audio: ActiveState
RadioController: Number of gain steps: 0
RadioController: AGC on
qml: dpiScaleFactor: 1
qml: desktopAvailableWidth: 1440
qml: desktopAvailableHeight: 860
qml: orientation: 2
file:///C:/Program Files (x86)/welle.io/qml/QtQuick/Controls/SplitView.qml:624: TypeError: Cannot call method 'updateFillIndex' of null

Edit 2: after resetting and installation for Interface 1:

main: Detected system language "de_DE"
main: Set language "de_DE"
InputFactory: Input device: "auto"
Airspy: Open airspy
Airspy: airpsy_open () failed: AIRSPY_ERROR_NOT_FOUND ( -5 )
RTL_SDR: Open rtl-sdr
RTL_SDR: Found 1 devices. Uses the first one
usb_claim_interface error -12
RTL_SDR: Opening rtl-sdr failed
InputFactory: No valid device found use Null device instead.
Audio: ActiveState
RadioController: Number of gain steps: 0
RadioController: AGC on
qml: dpiScaleFactor: 1
qml: desktopAvailableWidth: 1440
qml: desktopAvailableHeight: 860
qml: orientation: 2
file:///C:/Program Files (x86)/welle.io/qml/QtQuick/Controls/SplitView.qml:624: TypeError: Cannot call method 'updateFillIndex' of null

It seems, that only Interface 1 is working ☹

Ah, okay, a product name 🙂

@AlbrechtL
Copy link
Owner

Is your set up working now or do you still have issues?

@andimik
Copy link
Contributor

andimik commented Jul 1, 2017

Alternative: use another stick, they are very cheap, 5 Euro should be enough for 2nd hand ones.

@Paderman
Copy link
Author

Paderman commented Jul 1, 2017

It works only with Interface 1 not 0.
In SDR#, Qt-DAB/SDR J DAB I can choose Interface 1 and it works.

I had a stick (RT820T) but I sell it ☹

Hmm, then I can't use this program then I can't choose Interface 1 😢😢😢

@AlbrechtL
Copy link
Owner

If you are able to recompile welle.io you can change this line in CRTL_SDR.spp from
ret = rtlsdr_open(&device, 0); to ret = rtlsdr_open(&device, 1); to use the second interface.

@Paderman
Copy link
Author

Paderman commented Jul 1, 2017

Thanks 🙂 😎 🤠 the stick is working now with Qt Creator 🙂 😎 😇

Is it possible to add a switch parameter to start with interface 1 or similar?

QML debugging is enabled. Only use this in a safe environment.
main: Detected system language "de_DE"
main: Set language "de_DE"
Audio: ActiveState
qml: dpiScaleFactor: 1
qml: os: windows
qml: desktopAvailableWidth: 1440
qml: desktopAvailableHeight: 860
qml: orientation: 2
qml: devicePixelRatio: 1
qml: pixelDensity: 3.780520082048567
InputFactory: Input device: "auto"
Airspy: Open airspy
Airspy: airpsy_open () failed: AIRSPY_ERROR_NOT_FOUND ( -5 )
RTL_SDR: Open rtl-sdr
RTL_SDR: Found 2 devices. Uses the first one
Found Rafael Micro R820T tuner
RTL_SDR: Supported gain values 29
RTL_SDR: gain 49.6
RTL_SDR: gain 48
RTL_SDR: gain 44.5
RTL_SDR: gain 43.9
RTL_SDR: gain 43.4
RTL_SDR: gain 42.1
RTL_SDR: gain 40.2
RTL_SDR: gain 38.6
RTL_SDR: gain 37.2
RTL_SDR: gain 36.4
RTL_SDR: gain 33.8
RTL_SDR: gain 32.8
RTL_SDR: gain 29.7
RTL_SDR: gain 28
RTL_SDR: gain 25.4
RTL_SDR: gain 22.9
RTL_SDR: gain 20.7
RTL_SDR: gain 19.7
RTL_SDR: gain 16.6
RTL_SDR: gain 15.7
RTL_SDR: gain 14.4
RTL_SDR: gain 12.5
RTL_SDR: gain 8.7
RTL_SDR: gain 7.7
RTL_SDR: gain 3.7
RTL_SDR: gain 2.7
RTL_SDR: gain 1.4
RTL_SDR: gain 0.9
RTL_SDR: gain 0
RadioController: AGC off
file:///C:/Qt/5.9.1/mingw53_32/qml/QtQuick/Controls/SplitView.qml:624: TypeError: Cannot call method 'updateFillIndex' of null

@AlbrechtL AlbrechtL changed the title [Windows] No support for Zadig driver? [RTL-SDR] Support for more than one device Jul 2, 2017
@AlbrechtL
Copy link
Owner

I still don't understand why you have two devices listed but I agree that an opportunity to select the device is useful. I added it to the task list.

I recommend to start with a command line option first. In a second step some GUI functionality can be added. If you are a developer please take the job and send me a pull request!

@Paderman
Copy link
Author

Paderman commented Jul 2, 2017

Thank you for your help 🙂
I use one connected stick and that have 2 interfaces and the last is working...
I can programming minimal only in C#, PHP, but that's all...

@AlbrechtL
Copy link
Owner

Great! I encourage you to learn C++ and than you can add a device index command line option for the rtl-sdr devices.

@andimik
Copy link
Contributor

andimik commented Jul 2, 2017

One of my Sticks (E4000 tuner) also has two interfaces.

@AlbrechtL
Copy link
Owner

AlbrechtL commented Jul 2, 2017

Does somebody know why one dongle has two interfaces?
I mean it is obvious that in this case only the second interface works.

Is this the case also under Linux?

@Paderman
Copy link
Author

Paderman commented Jul 2, 2017

I'm very sorry, but C++ is a little to hard for me 😟 C# is a little easier, VB code is nothing for me 😂 I wish I could C++ 😇

I use VS 2017 Community and it's ok for small Windows programs or UWP...

I have a "Windows Phone" and I created a simple and not finished app (UWP) and it works on PC and Phone 😂😂😂

Can you build a function to select the interface please? 😇😉
Thank you very much 🤠

It's a good question why some sticks has two interfaces...

@andimik
Copy link
Contributor

andimik commented Jul 3, 2017

I have no idea, but the E4000 PDF mentions PWM and i2C interface

@jaap59
Copy link

jaap59 commented Jul 8, 2017

Hi. With Windows 10, one (1) RTL-SDR v3 stick and Zadig 2.3 my laptop also shows interface 0 and 1. SDR# and HDSDR aren't bothered, but Welle-io is. Nevertheless on the same laptop using "rtl_tcp -d 1" (interface 1) and "welle-io -D rtl_tcp" (rtl_tcp interface) it works just fine. The laptop played both French and Swiss stations during my vacation close to Geneva. Good job!

@AlbrechtL
Copy link
Owner

Good news! The next top priority would be to implement the support of more than one interface.

I also think the automatic selection of the interface can simply uses the rtl-sdr interface with the highest interface number. From all reports it seems that the highest interface number is the right one.

What bothers me a lot is that I don't understand why the rtl-sdr driver reports two interface even there is only one connected.

@PD1LOI
Copy link

PD1LOI commented Aug 4, 2017

I can not recompile the file. how do you do that? Can not you equal the build of the file that set the same value to 1?

@andimik
Copy link
Contributor

andimik commented Aug 4, 2017

In the meanwhile use another stick. Nowadays people are selling them for around 5 EUR

@PD1LOI
Copy link

PD1LOI commented Aug 4, 2017

Why this stick just works on all other Win10 and Zadig 2.3 programs including SharpSdr and DDS 1.70 and so on. Only Welle.io does not work so I should look at this to solve this.

And this version I have.
rtl2832-2

@HansJA
Copy link

HansJA commented Aug 4, 2017

The rtl-sdr driver interfaces are two bulk-in usb interfaces. One is the actual device and the other one is an interface for accessing the IR remote control part of the stick.
I don't know for sure what can be done with the bulk in interface 0, the IR interface, but I think you can see the IR control stream an interpret that in order to implement what the stick itself won't.

It's probably a bit adventurous to assume something like "always use i/f 1 if it's rtl2832 based"...

@HansJA
Copy link

HansJA commented Aug 4, 2017

I think you should try and get in touch with other guys writing sdr utilities, and share knowledge and experience.
SDR# and SDR-J seems to work in many ways, although sonic quality when using a 2832 stick as a wbfm stereo receiver is abysmal in both.

@HansJA
Copy link

HansJA commented Aug 4, 2017

Adimik, I have two different sticks, the RTL-SDR v3 that the guy at rtl-sdr.com sells and an astrometa dvb t2 stick, and both have the same problem with "the wrong interface".

(One can't help but think of an Aardman animated film, "The Wrong Trousers"..)

@AlbrechtL
Copy link
Owner

It seems that SDR# uses a modified librtlsdr library with IR support.

Somebody can try to just copy the rtlsdr.dll from SDR# to welle.io.

@PD1LOI
Copy link

PD1LOI commented Aug 5, 2017 via email

@PD1LOI
Copy link

PD1LOI commented Aug 5, 2017 via email

@AlbrechtL
Copy link
Owner

I created a test version of welle.io with an improved auto selecting of rtl-sdr devices. It simply tries to open the first rtl-sdr device if it is not working then welle.io tries the next one and so on.

  1. Please download the test version exe here
    Warning: It is only the exe file of welle.io. You need to install welle.io first form here.
  2. Copy the exe to your welle.io install directory e.g. "C:\Program Files (x86)\welle.io"
  3. Run 20170805_rtl-sdr_welle-io.exe
  4. Report your results

I tested it with the welle.io version V20170701.

@PD1LOI
Copy link

PD1LOI commented Aug 7, 2017

Thank you very much, now it works well.

@AlbrechtL
Copy link
Owner

AlbrechtL commented Aug 7, 2017

I commited the code (e656145). It will be included in the next official release.

@Paderman
Copy link
Author

What is if user has more than one stick on PC? 😂 😉

@HansJA
Copy link

HansJA commented Aug 13, 2017 via email

@AlbrechtL
Copy link
Owner

@HansJA Can you explain in detail the use case to use more than one device, please?

@HansJA
Copy link

HansJA commented Aug 14, 2017 via email

@AlbrechtL
Copy link
Owner

welle.io sees only dab sticks with the zadig driver or the airspy driver. I suppose that your DVB-T2 stick and the sdrplay stick uses different drivers and thus it is not a big deal to use it in parallel.

@xenDE
Copy link

xenDE commented Jun 28, 2019

Hi,

is still no device_index parameter available?

like in the rtl_sdr tools:

$ rtl_test -h
rtl_test, a benchmark tool for RTL2832 based DVB-T receivers
Usage:
	[-d device_index (default: 0)]
$ rtl_test 
Found 2 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001
  1:  Realtek, RTL2838UHIDIR, SN: 00000001

best regards,
daniel

@AlbrechtL
Copy link
Owner

OK guys. I reopen this issue to implement this feature in the future. It is not a really difficult task and with the version 2.0 it is easy to implement. But somebody has to do it.
At the moment our main objective is to release version 2.0. This could be something for version 2.1.

@tenzap
Copy link
Contributor

tenzap commented Dec 8, 2019

As a workaround, maybe you can try by using SoapySDR which, if I remember well, allows you to choose which device you want to use thanks to the ability to define driver arguments in welle.io (soapySDR support got some improvements in welle.io 2.1)

BTW, I guess this can be done for now only on linux when using a distribution package (like on debian) with soapySdrRtl Driver installed, since I'm not sure that the windows package ships the soapyRtlSdr driver.

@AlbrechtL
Copy link
Owner

A workaround is described here: #615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants