Microtelecom / libperseus-sdr

Perseus Software Defined Radio Control Library for Linux
http://microtelecom.it/perseus/
GNU Lesser General Public License v3.0
16 stars 7 forks source link

Openwebrx refuses second Perseus receiver #12

Open ni5f-1 opened 2 years ago

ni5f-1 commented 2 years ago

pi@openwebrx:/tmp/libperseus_sdr-0.8.2 $ perseustest Revision: 0.8.2 SAMPLE RATE: 95000 NBUF: 6 BUF SIZE: 1024 TOTAL BUFFER LENGTH: 6144 perseus: perseus_init() perseus: Executable: perseustest perseus: path: [] name: [] perseus: Found device with VID/PID 1D6B:0003 on BUS2 ADDR1 perseus: Found device with VID/PID 04B4:325C on BUS1 ADDR5 perseus: Found device with VID/PID 04B4:325C on BUS1 ADDR3 perseus: Found device with VID/PID 2109:3431 on BUS1 ADDR2 perseus: Found device with VID/PID 1D6B:0002 on BUS1 ADDR1 2 Perseus receivers found perseus: perseus_open(0) perseus error: libusb_set_configuration error -6 error: libusb_set_configuration error -6

Direct test finds the two Perseus. But only one Perseus connects when using OpenWebRx Jakob Ketterl, the OpenWebRx coder, wrote this: Alright, this is about as much as I can tell from this:

Jan 16 12:49:26 openwebrx openwebrx[342]: firmware download error: perseus_open error 0, reopening.nmux: (main thread/for) end input stream, exiting. This line actually contains two messages, probably due to a missing newline somewhere. The first part "firmware download error: perseus_open error 0, reopening." does not originate from OpenWebRX, I am assuming it is printed by the "perseustest" utility that is used to get the raw IQ samples from the device. The message indicates that the tool failed to download the firmware to the device for whatever reason, and tells us that the tool intends to reopen the device for that reason.

The second part "nmux: (main thread/for) end input stream, exiting." is originating from the nmux tool that is used internally to distribute the IQ data within OpenWebRX. The message tells us that nmux has detected that it's input has been closed for some reason, and that it intends to exit now, too, since there's no more data coming in.

The messages after that indicate that the shutdown was unexpected, and that the device is therefor considered "failed" and is being disabled.

So, to me, it looks as if somewhere between those two events, the perseustest utility failed for unknown reasons, presumably in its attempt to reopen the device, and has terminated unexpectedly (some may call that a crash), which ultimately results in the device being removed from the receiver.

The perseustest utility is part of libperseus-sdr, I'd reommending getting in touch with the authors about how to proceed with this issue. Feel free to include my analysis if necessary.

Can you help resolve this? By the way, both radios work well individually when using Perseus supplied software.

Bill, NI5F

dj1an commented 7 months ago

Hi, i got a similar error today using perseustest. Works well with one device. After adding a second one to the machine it fails with libusb error:

perseustest -d 9
Revision: 0.8.2
SAMPLE RATE: 95000
NBUF: 6 BUF SIZE: 1024 TOTAL BUFFER LENGTH: 6144
perseus: perseus_init()
perseus: Executable: perseustest
perseus: path: [] name: []
perseus: Found device with VID/PID 04B4:325C on BUS1 ADDR3
perseus: Found device with VID/PID 04B4:325C on BUS1 ADDR2
perseus: Found device with VID/PID 1D6B:0002 on BUS1 ADDR1
perseus: Found device with VID/PID 0E0F:0002 on BUS2 ADDR3
perseus: Found device with VID/PID 0E0F:0003 on BUS2 ADDR2
perseus: Found device with VID/PID 1D6B:0001 on BUS2 ADDR1
2 Perseus receivers found
perseus: perseus_open(0)
perseus: poll libusb thread started...
perseus: setting thread priority to 99...
perseus: done
Downloading firmware...
perseus: perseus_firmware_download(0x56232bf13580,Null)
perseus: Firmware found !!!! Reading device eeprom...
perseus error: eeprom status read failed (-7-LIBUSB_ERROR_TIMEOUT-Operation timed out). Read 0 bytes
perseus error: failed to read device eeprom
firmware download error: failed to read device eeprom

It would be great to have an option to define the device to be used

73 DJ1AN, Jan