# SDK Troubleshooting
This doc lists common integration issues and the SDK helpers that surface
useful diagnostics.
## Discovery issues
- Use `run_discovery_with_report` or `run_discovery_with_options_report` to see
per-attempt failures (unicast, broadcast, multicast, cached, subnet scan).
- Use `discovery_dry_run` to confirm which interfaces and broadcast targets
would be used without sending any packets.
- If you see `discovery channel permission denied`, verify OS firewall rules
allow UDP on the device port and that the NIC is not blocked by policy.
## Trust issues
- Use `DiscoveryOutcome::trust_state()` to get a typed trust verdict.
- Use `enforce_trust_policy` with `TrustPolicy::WarnOnly` to log warnings while
allowing development testing.
- Confirm `ALPINE_ROOT_PUBKEY_B64` and bundle URL are configured correctly.
## Handshake issues
- Use `connect_with_policy_from_report_report` to return a `HandshakeReport`
with discovery attempts and probe results.
- Enable tracing via `init_pretty_logging()` for handshake timing and transport
messages.
## Control and status
- `status()` and `status_vendor()` use the vendor command payload.
- `status_standard()` uses `ControlOp::GetStatus` and requires device support.
- For UI, prefer `probe_status()` and `ProbeResult::to_device_state()`.
## Streaming issues
- Use `CapabilitiesSummary::validate_stream` before sending frames to catch
unsupported formats or channel counts.
- Ensure `StreamProfile` matches the device capabilities.
## Logging
- `init_pretty_logging()` is good for local CLI debugging.
- `init_json_logging()` is good for production log aggregation.