hubble-ready-test
Testing framework for Hubble Ready devices over Bluetooth Low Energy (BLE). Use when testing Hubble Ready device functionality, validating BLE connectivity, verifying device characteristics, testing encryption key writes, validating configuration updates, or debugging provisioning workflows. Provides structured test commands with JSON output for automated validation.
What this skill does
# Hubble Ready Testing Framework
## Overview
This testing framework provides comprehensive validation capabilities for Hubble Ready devices over Bluetooth Low Energy (BLE). It wraps the `hubblenetwork ready` CLI commands to enable systematic testing of device discovery, characteristic reads/writes, and the complete provisioning workflow.
The framework is designed for:
- **Device validation** - Verify BLE connectivity and device characteristics
- **Encryption testing** - Validate key writes and encryption mode detection
- **Configuration testing** - Test EID configuration updates
- **Time synchronization testing** - Verify device time reads/writes
- **Integration testing** - Execute and validate the complete provisioning flow
- **Debugging** - Diagnose BLE connection issues and ATT protocol errors
## Test Prerequisites
### BLE Adapter Requirements
- **macOS**: CoreBluetooth (must run in GUI session, not SSH)
- **Linux**: BlueZ stack (user must be in `bluetooth` group)
- **Windows**: Compatible BLE stack with Windows Runtime support
### Permissions
- **macOS**: Bluetooth permission granted to Terminal/iTerm
- **Linux**: User in `bluetooth` group: `sudo usermod -a -G bluetooth $USER`
- **Windows**: Administrator privileges may be required
### Environment Variables (for provisioning tests)
```bash
export HUBBLE_ORG_ID="your-org-id"
export HUBBLE_API_TOKEN="your-api-token"
```
These are only required for the `provision` command which registers devices with the Hubble backend.
## Available Test Commands
All test commands support `--format json` for structured output suitable for automated validation. Always use JSON format for testing to enable programmatic result verification.
### Discovery Tests
#### Test: Device Discovery (`scan`)
Scan for Hubble Ready devices advertising the 0xFCA7 service UUID.
**Command:**
```bash
hubblenetwork ready scan --format json [--timeout SECONDS]
```
**Parameters:**
- `--timeout` (optional): Scan duration in seconds (default: 10)
- `--format json`: Required for structured output
**Expected Output:**
```json
{
"devices": [
{
"address": "AA:BB:CC:DD:EE:FF",
"name": "Hubble Ready Device",
"rssi": -65
}
],
"scan_duration": 10.2
}
```
**Validation:**
- Verify `devices` array is not empty
- Verify MAC addresses are valid format (XX:XX:XX:XX:XX:XX)
- Verify RSSI values are negative integers
- Verify scan_duration matches timeout parameter
**Common Test Failures:**
- Empty devices array: Device not in range or not advertising
- "Bluetooth adapter not found": BLE adapter not available
- Permission denied: Insufficient BLE permissions
---
#### Test: Device Information (`info`)
Read all characteristics from a connected Hubble Ready device.
**Command:**
```bash
hubblenetwork ready info --format json --address <MAC> [--timeout SECONDS]
```
**Parameters:**
- `--address` (required): Device MAC address from scan
- `--timeout` (optional): Connection timeout in seconds (default: 10)
- `--format json`: Required for structured output
**Expected Output:**
```json
{
"address": "AA:BB:CC:DD:EE:FF",
"status": {
"firmware_version": "1.2.3",
"key_written": false,
"config_written": false,
"time_written": false
},
"key_info": {
"encryption_mode": "AES-256-CTR"
},
"config": {
"eid_type": "utc",
"rotation_period_seconds": 900,
"pool_size": 5
},
"time": {
"unix_timestamp": 1709424000,
"datetime": "2024-03-03T00:00:00Z"
}
}
```
**Validation:**
- Verify all four characteristic groups present
- Verify firmware_version format (semantic version)
- Verify encryption_mode is "AES-128-CTR" or "AES-256-CTR"
- Verify eid_type is "utc" or "counter"
- Verify unix_timestamp is reasonable (not 0, not far future)
**Common Test Failures:**
- Connection timeout: Device out of range or BLE interference
- "Device not found": Invalid MAC address
- Incomplete characteristics: Device may not be fully provisioned
---
### Read Validation Tests
All read tests require the `--address` flag and support `--timeout`.
#### Test: Status Read (`read-status`)
Read firmware version and provisioning status flags.
**Command:**
```bash
hubblenetwork ready read-status --format json --address <MAC> [--timeout SECONDS]
```
**Expected Output:**
```json
{
"address": "AA:BB:CC:DD:EE:FF",
"firmware_version": "1.2.3",
"key_written": false,
"config_written": false,
"time_written": false
}
```
**Validation:**
- Verify firmware_version is non-empty string
- Verify all boolean flags are present
- Use flags to determine provisioning state
**Test Scenarios:**
- Fresh device: All flags false
- Partially provisioned: Some flags true
- Fully provisioned: All flags true
---
#### Test: Key Info Read (`read-key-info`)
Read encryption mode to determine required key size.
**Command:**
```bash
hubblenetwork ready read-key-info --format json --address <MAC> [--timeout SECONDS]
```
**Expected Output:**
```json
{
"address": "AA:BB:CC:DD:EE:FF",
"encryption_mode": "AES-256-CTR"
}
```
**Validation:**
- Verify encryption_mode is either "AES-128-CTR" or "AES-256-CTR"
- Use this to determine key size for write-key tests (16 or 32 bytes)
**Test Note:**
Always read key info before testing key writes to ensure correct key size.
---
#### Test: Config Read (`read-config`)
Read EID configuration parameters.
**Command:**
```bash
hubblenetwork ready read-config --format json --address <MAC> [--timeout SECONDS]
```
**Expected Output:**
```json
{
"address": "AA:BB:CC:DD:EE:FF",
"eid_type": "utc",
"rotation_period_seconds": 900,
"pool_size": 5
}
```
**Validation:**
- Verify eid_type is "utc" or "counter"
- Verify rotation_period_seconds > 0
- Verify pool_size >= 1
- Default values: eid_type="utc", rotation_period=900, pool_size=5
---
#### Test: Time Read (`read-time`)
Read device's current Unix timestamp.
**Command:**
```bash
hubblenetwork ready read-time --format json --address <MAC> [--timeout SECONDS]
```
**Expected Output:**
```json
{
"address": "AA:BB:CC:DD:EE:FF",
"unix_timestamp": 1709424000,
"datetime": "2024-03-03T00:00:00Z"
}
```
**Validation:**
- Verify unix_timestamp is positive integer
- Verify unix_timestamp is reasonable (after 2020, before far future)
- Calculate drift: `abs(device_time - system_time)`
- If drift > 60 seconds, consider time sync test
---
### Write Validation Tests
All write tests require the `--address` flag and return success confirmation.
#### Test: Key Write (`write-key`)
Write base64-encoded encryption key to device.
**Command:**
```bash
hubblenetwork ready write-key --format json --address <MAC> --key <BASE64_KEY> [--timeout SECONDS]
```
**Parameters:**
- `--address` (required): Device MAC address
- `--key` (required): Base64-encoded key (16 bytes for AES-128, 32 bytes for AES-256)
- `--timeout` (optional): Connection timeout in seconds (default: 10)
**Expected Output:**
```json
{
"address": "AA:BB:CC:DD:EE:FF",
"success": true,
"message": "Encryption key written successfully"
}
```
**Test Workflow:**
1. Read encryption mode: `read-key-info`
2. Generate key with correct size (16 or 32 bytes)
3. Base64 encode key
4. Write key
5. Verify: Read status and check `key_written` flag
**Key Generation Example:**
```bash
# For AES-128-CTR (16 bytes)
KEY=$(openssl rand -base64 16)
# For AES-256-CTR (32 bytes)
KEY=$(openssl rand -base64 32)
hubblenetwork ready write-key --format json --address <MAC> --key "$KEY"
```
**Common Test Failures:**
- ATT error 0x0D (Invalid Attribute Value Length): Wrong key size
- ATT error 0x0E (Unlikely Error): Device rejected write
- "Invalid base64": Key not properly encoded
---
#### Test: Config Write (`write-config`)
Write EID configuration to device.
**Command:**
```bash
hubblenetwork ready write-config --format json --address <MAC> --eid-type <TYPE> --pool-size <SIZE> [--timeout SECONDS]
```
**Parameters:**
- `--address` (required): Device MAC address
- `--eid-type` (requireRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.