Fix mDNS discovery ambiguity where multiple devices across
different network segments/subnets can advertise the same hostname (e.g.
"ip:pluto.local"), resulting in non-unique or misleading URIs.
Replace unresolved mDNS hostnames with the actual discovered endpoint
reported in the scan description.
- Detect ".local" URIs on IP backend and substitute hostname with
resolved endpoint from libiio scan results.
- Preserve URI semantics:
- Keep backend prefix ("ip:")
- Preserve optional port suffix
- Correctly format IPv6 literals with RFC2732 bracket notation when
required
- Add replaceHostnameWithIP() to perform URI normalization during scan:
- Only applies to IP backend URIs
- Only triggers for mDNS-based ".local" hostnames
- Uses scan-provided endpoint (from description string) as authoritative
address instead of advertised hostname
- Extend scan() to emit both original and resolved URIs for debugging
and verification during device discovery.
This resolves inconsistent device addressing when multiple PlutoSDRs
are accessible via mDNS across different subnets or network segments.
No change to backend enumeration or device identity logic; this only
normalizes .local IP URI resolution at scan time.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Improve PlutoSDR device identity handling to correctly distinguish
multiple libiio backends (IP, USB, etc.) and provide stable grouping
of physically identical hardware in the UI.
- Append backend prefix to scanned device serials to ensure uniqueness
across multiple discovery paths (e.g. "<serial>_ip", "<serial>_usb").
This prevents collisions when the same device is visible through
different transports.
- Add physical serial extraction and grouping logic so that devices
discovered via multiple backends are treated as a single physical
unit for display purposes. This stabilizes UI numbering and avoids
duplicate entries for the same hardware.
- Update enumOriginDevices() to:
- group devices by physical serial rather than scan index
- assign stable per-device indices independent of backend enumeration
- include backend label in the display name to distinguish connection
paths when multiple backends are active
- Introduce helper utilities:
- createBackendSuffix(): extract backend identifier from libiio URI
- getPhysicalSerial(): strip backend suffix for grouping logic
- getBackendLabel(): format backend suffix for user-facing display
These changes ensure:
- unique internal identifiers per backend connection
- consistent grouping per physical device across discovery mechanisms
- improved UI clarity when multiple access paths exist for the same SDR
No change to RF/data path behavior; this is purely a discovery and
presentation-layer refactor.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
The Monocypher vendored C files use -Wno-unused-function / -Wno-unused-parameter
compile flags that are GCC/Clang-only syntax. MSVC chokes on them with:
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-function'
Wrap the set_source_files_properties call in if (NOT MSVC) so the flags
are applied on macOS/Linux but skipped on Windows. The swagger CMakeLists.txt
uses the same pattern.
Both plugin readmes listed the SWGMeshtastic* placeholder as an
outstanding item needing dedicated SWGMeshcore* schemas. This PR
provides exactly that — strike the stale todo and note the resolution.
PR #2775 merged the MeshCore plugin source files but omitted the
parent CMakeLists.txt changes, the export.h API macro, and all
MeshCore-specific Swagger schema types. Without these the plugins
do not build and the REST API serves Meshtastic types for MeshCore
channels.
Adds:
- CMakeLists.txt parent directories + option definitions
- exports/export.h MODEMMESHCORE_API macro
- MeshcoreDemod/Mod swagger YAML specs + SWG client classes
- SWGChannelSettings/Report/Actions/ModelFactory MeshCore types
- Rename 164 Meshtastic donor references in plugin code
Convert tab-based indentation to spaces to match the project's
existing coding style. No functional changes.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Fix multiple issues preventing SoapySDR output from producing RF:
- handleInputMessages() never called in DSP engine thread (Qt signal
lost without event loop) - scheduled properly
- setGain() moved to start() post-activation (pre-activation gain
silently fails on SoapyUHD)
- fullScale threshold corrected for CS16 format detection
- Timed first write pattern matching gr4-lora SoapySink
MCR pinning for SoapyUHD: inject auto_tick_rate=0 in
DeviceSoapySDR device-open path to prevent UHD from re-deriving the
master clock rate on set_tx_rate(), which breaks the decimator chain
and produces no RF. Also reads SDRANGEL_USRP_MASTER_CLOCK_RATE_HZ env
var for optional MCR override.
TX diagnostic counters: SoapySDROutputThread tracks packets,
underflows, errors. Exposed via REST as streamSettingsArgs
key-value pairs.
Previously, devices claimed by another device set were omitted from the
device selection lists. Display these devices as disabled and marked
"[in use]" instead of hiding them.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
addMIMODevice() never assigned m_deviceSets.back()->m_deviceAPI before
dereferencing it via setSampleMIMO(), causing the very first
POST /sdrangel/deviceset?direction=2 against a fresh headless server
to SIGSEGV in DeviceAPI::setSampleMIMO()'s vtable lookup.
DeviceSet's constructor initializes m_deviceAPI to nullptr
(sdrbase/device/deviceset.cpp:38), and the sibling helpers
addSinkDevice() (line 283) and addSourceDevice() (line 323) both
assign the new DeviceAPI* into m_deviceSets.back()->m_deviceAPI
before any later dereference. addMIMODevice() omits this assignment,
so the line that today reads:
m_mainCore->m_deviceSets.back()->m_deviceAPI->setSampleMIMO(mimo);
dereferences nullptr.
Fix by performing the same assignment as the Sink/Source paths, just
before the createSampleMIMOPluginInstance() call.
Verified against v7.25.1 in a custom headless build
(cicada-sdrangelsrv:7.25.1-mimo) with a LimeSDR-USB:
- Pre-patch: POST /sdrangel/deviceset?direction=2 -> HTTP 202,
then immediate SIGSEGV (backtrace top frame
DeviceAPI::setSampleMIMO -> MainServer::addMIMODevice).
- Post-patch: POST -> HTTP 202, container healthy, follow-up
PUT /sdrangel/deviceset/0/device with hwType=LimeSDR
direction=2 -> HTTP 202, deviceset reports the LimeSDR
correctly bound as a MIMO device.