-
Notifications
You must be signed in to change notification settings - Fork 1
fix: Add USB diagnostics utility to troubleshoot unreadable serial nu… #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
X9X0
wants to merge
6
commits into
main
Choose a base branch
from
fix/166-bk-connection-failure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…mbers Addresses Issue #166 where BK 9205B connection fails due to unreadable USB serial numbers after extended server uptime. Changes: - Created comprehensive USB diagnostics utility (server/utils/usb_diagnostics.py) - Added /equipment/diagnostics/usb API endpoint for device analysis - Integrated diagnostics button into client Diagnostics panel - Added automatic diagnostic logging to BK power supply connection errors - Provides detailed root cause analysis and troubleshooting recommendations The diagnostics tool helps identify why USB serial numbers become unreadable (showing as ???) and provides actionable steps to resolve the issue, such as unplugging/replugging the device or restarting the server. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Owner
Author
Owner
Author
Fixes two issues reported in PR #168: 1. USB Diagnostics API Issue: - Server endpoint now uses proper Pydantic request model (USBDiagnosticsRequest) - Client now sends resource_string in request body (json=...) instead of query params - Follows FastAPI best practices for POST request body handling 2. Pi Diagnostics Error Handling: - Fixed stderr decoding in ContainerError exception handler - Now properly handles both bytes and string stderr formats - Prevents errors when Docker container exits with non-zero code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enhances the /system/version endpoint to include git commit information: - commit_hash: Short commit hash (e.g., "3760ca4") - commit_hash_full: Full commit hash - branch: Current git branch - commit_date: Commit date - commit_message: First line of commit message This makes it easy to verify what commit the server is running, which is helpful for debugging and ensuring the latest changes are deployed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds a command-line utility to easily check the running server version and git commit information after SSH-ing to the server. Changes: - Created lablink-version.sh script that displays: - Version from VERSION file - Git branch, commit hash, and date - Latest commit message - Working directory status (clean or uncommitted changes) - Server running status (Docker or systemd) - Live API version query (if server is running) - Updated install-server.sh to: - Make lablink-version.sh executable during installation - Create /usr/local/bin/lablink-version symlink for easy access - Display the command in installation success message Usage after installation: ssh pi@your-server lablink-version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The lablink-version script now automatically detects the installation location by checking multiple common paths: 1. /opt/lablink (Pi image deployment via build-pi-image.sh) 2. $HOME/lablink (SSH deployment via install-server.sh) 3. Script directory (via symlink resolution) 4. Current directory (fallback) This ensures the command works correctly regardless of deployment method. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates all help command listings to include the new lablink-version utility: Changes: - SSH deployment (ssh_deploy_wizard.py): - Added lablink-version to lablink-help() function output - Listed in "Status & Monitoring" section - Pi image deployment (build-pi-image.sh): - Added installation of lablink-version command during first boot setup - Updated lablink-status command listing - Updated setup completion message - Updated MOTD (message of the day) command listing Now when users run lablink-help or lablink-status, they will see: "lablink-version - Show version and git commit info" This ensures discoverability of the new version check command across both SSH and Pi image deployment methods. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.


…mbers
Addresses Issue #166 where BK 9205B connection fails due to unreadable USB serial numbers after extended server uptime.
Changes:
The diagnostics tool helps identify why USB serial numbers become unreadable (showing as ???) and provides actionable steps to resolve the issue, such as unplugging/replugging the device or restarting the server.
🤖 Generated with Claude Code