Enhancement Request

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

jdowjunkmail at earthlink.net jdowjunkmail at earthlink.net
Mon Jun 24 08:50:42 UTC 2013


Background:
Suppose you have four dongles. (That's easy for me. I do.) Suppose they
all identify as one of two types. (Three of one and one of the other.)
Suppose you want to load a specific dongle when you start the program.
And you don't want it to matter if you move the dongles around. How do I
do that?

Welllll, I hacked. Unfortunately rtlsdr.dll does not allow me to do this
even if I alter the serial numbers, at least not the way I want. There
is a fly in the rtlsdr ointment when fishing for the USB strings for
Manufacturer ID, product ID, and serial number. You must formally open
the device to read these values. The dongle can only be opened by one
opener at a time. Unfortunately SDRSharp is laid out inside such that
it searches for dongles whenever you open Config. And any time you open
Config you also have a dongle open. So far this is not too bad a problem.
If there's a dongle I cannot poll for strings, that's the one I have
open. Er, not so fast, Joanne. What if you have two or more copies open?
There will be more than one dongle you cannot poll.

I had to figure out how I could identify the dongle I have open even if
I move dongles. So I dug in and found some things libusb.dll can do. The
chief one is get the USB path for the dongle. And it can do that without
actually opening the dongle. Now when filling out the dialog if I cannot
read strings for a dongle I get the dongle's path from the device list
used and by cheating on the device handle rtlsdr.dll hands out for opened
dongles I extracted information I needed to get the path that way. If they
compare it's obviously my dongle. If they do not compare it's another
dongle that is already opened so I don't show it in the list.

Request:
Please implement two new entry points which expose the libusb_get_port_path
functionality, one by index (same as for strings) and one for rtlsdr
handle which I finessed to prove the technique above. The libusb_get_device
function will take the device handle and spit out the device list
entry that matches the handle.

Thanks for considering this.

{^_^}   Joanne/W6MKU




More information about the osmocom-sdr mailing list