Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for selecting individual RTL-SDR receivers by USB enumeration index, including multi-receiver devices such as the KerberosSDR and KrakenSDR.
This also adds the browser-side WebUSB authorization and reliability handling needed to use these receivers from the CyberEther WebAssembly application. The same index-based selection works in the native desktop application.
Motivation
Multi-receiver SDRs contain several RTL2832U devices that may expose duplicate, empty, or otherwise unreliable serial descriptors. CyberEther previously depended on SoapyRTLSDR's serial-based identity, which could cause multiple entries to resolve to the same physical receiver or prevent serial-less receivers from being selected at all.
The browser application had additional constraints:
Changes
Multi-receiver selection
indexargument to identify and open individual receivers.feature/by_indexbranch pending its upstream PR.The enumeration index identifies a receiver within the current librtlsdr device list. It is not intended to remain a persistent physical identifier after reconnecting devices or rebooting the system.
WebUSB authorization
navigator.usb.requestDevice()on the browser main thread.Browser USB reliability
NetworkErrorfailures.These workarounds are scoped to the Emscripten/WebUSB paths and do not alter native libusb behavior.
Why this is a draft
This PR depends on index-based device selection that is not yet available in an upstream SoapyRTLSDR release. The required changes are currently maintained on: https://github.com/ooeygui/SoapyRTLSDR/tree/feature/by_index
A separate upstream SoapyRTLSDR PR will add cross-platform discovery and opening by USB enumeration index while preserving serial-based selection for compatibility.
CyberEther temporarily tracks that development branch so the complete desktop and WebAssembly integration can be reviewed and tested together. This PR should remain a draft until the SoapyRTLSDR change is accepted and CyberEther can reference an upstream commit or release instead of a contributor fork.
Depends on: pothosware/SoapyRTLSDR#83
Testing
Tested on Windows with RTL2832U/R820T receivers in a KerberosSDR:
Known limitations
USBDevice.reset()on Windows. A receiver left in a faulted state may require disconnecting it or resetting/conditioning it through native libusb before another browser session.