Skip to content

Conversation

@X9X0
Copy link
Owner

@X9X0 X9X0 commented Dec 15, 2025

…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

…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>
@X9X0
Copy link
Owner Author

X9X0 commented Dec 15, 2025

Issue running from Client:

{BB389ED8-7369-4F62-A810-ADCD9FF87F08}

@X9X0
Copy link
Owner Author

X9X0 commented Dec 15, 2025

also Pi Diagnostic is broken:

{037A9E9B-D707-4E59-AF6A-12E25AB9E259}

Output from pi diagnostic.

X9X0 and others added 5 commits December 15, 2025 16:53
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants