Skip to content

[BUG] Cannot find device when connecting P1 with firmware version 1.2.26 #24

@s-martin-b

Description

@s-martin-b

Summary
The desktop app appears to implement the USB protocol for the HiDock H1E (firmware 6.2.5) but the connected device is a P1 running firmware 1.2.26, which appears to use a different protocol. As a result, the app correctly opens the USB interface but cannot successfully issue or receive commands, and therefore reports “no compatible device found”.

Investigation strongly indicates that the USB protocol implemented in P1 firmware v1.2.26 does not match the command structure expected by the Python desktop app (which appears to target older firmware or the H1E device, not the P1).

There is no evidence that our debugging process has altered the code or caused this issue. It appears inherent to the firmware/device mismatch.

Environment
• Device: HiDock P1
• Firmware: 1.2.26
• Host OS: macOS Sequoia 15.6.1 (24G90)
• Python: 3.11.14 (venv)
• Project: hidock-next (current main branch, unmodified)
• Connection: Direct USB-C to Mac (no hub)
• USB descriptor:
• Vendor: 10d6 (Actions Semiconductor)
• Product: b00e
• Interface class: 0xff (Vendor Specific)
• Endpoints: bulk IN 0x82, bulk OUT 0x01

Steps to Reproduce
1. Clone repository
2. Create Python 3.11 venv
3. Install project dependencies (and required hid + pygame libs)
4. Apply macOS-specific TCL/TK fix (needed for pygame window)
5. Launch desktop app:

python apps/desktop/main.py

6.	Connect HiDock P1 directly to Mac’s USB port
7.	App initializes successfully but displays no device detected
8.	USB verification via macOS System Report and lsusb confirms the device is present

Expected Behaviour
• App should detect the HiDock P1
• USB bulk endpoints should open
• Device should respond to command IDs (10,14,15 etc.)
• App UI should populate battery / status info

Actual Behaviour

USB detection

macOS enumerates the device correctly:

HiDock_P1:
Product ID: 0xb00e
Vendor ID: 0x10d6
Version: 2.00
Manufacturer: HiDock
Speed: Up to 480 Mb/s
Serial Number: ACTIONS-BOS-002
Endpoints:
- 0x82 Bulk IN (512 bytes)
- 0x01 Bulk OUT (512 bytes)

App output (from Python logs)

HiDock Desktop - Checking runtime dependencies...
pygame 2.6.1 (SDL 2.32.10, Python 3.11.14)
Hello from the pygame community.
HiDock Desktop - Initializing...
HiDock Desktop - No compatible device found.

USB scanner output (lsusb-like dump)

Interface 0: Vendor Specific
bInterfaceSubClass: 0xf0
Endpoints:
0x82 Bulk IN
0x01 Bulk OUT

The interface is present, openable, and active — but the app cannot handshake with it.

Investigation Summary (Concise + Exhaustive)

  1. Verified this is not a macOS USB permission issue
    • The device enumerates correctly
    • Bulk endpoints visible
    • No permission errors
    • Confirmed with System Report, PyUSB dumps, and console logs

Conclusion: macOS is not blocking the interface.

  1. Verified this is not a Python environment issue

Installed only relevant packages:

✔ Used (important)
• Python 3.11
• pyusb
• hidapi
• pygame
• cython (for building USB deps)

✘ Installed but NOT used (safe to ignore)
• Python 3.12 (not used)
• Unused dev tools from initial troubleshooting

Conclusion: Python env is clean and correct.

  1. Verified the USB transport layer works
    • Bulk endpoints open
    • Reads/writes succeed
    • No kernel-level errors
    • Device firmware exposes a single vendor-specific interface (as expected)

Conclusion: Transport OK → issue is at protocol layer, not USB.

  1. Checked firmware compatibility

The repo contains firmware for:

hidock-h1e → version 6.2.5

But the connected device reports:

P1 firmware: 1.2.26

Attempts to request P1 firmware from hinotes:

curl tests to firmware endpoint

All return 400 BAD REQUEST:

POST /v2/device/firmware/latest
AccessToken: M4XoUF...
version=1.2.26&model=p1
→ HTTP 400 Bad Request

Tested model variants:
• p1
• hidock-p1
• hidock_p1
• HiDock-P1

All → 400.

Conclusion:
The P1 firmware is not available on the public hinotes API, so the repo has no matching protocol definition for firmware v1.2.26.

  1. Deep firmware reverse engineering

We disassembled zephyr.bin from the H1E firmware and mapped commands 10, 14, 15.

But:
• P1 firmware uses completely different command handlers
• App expects H1E-style command table
• USB command signatures do not match

Conclusion: The app is speaking H1E protocol, but device runs P1 1.2.26 protocol.

Why We Believe This Is a Firmware/Protocol Incompatibility
1. USB enumeration is normal.
2. Bulk IN/OUT endpoints are correct.
3. No errors opening the device.
4. Device simply never responds to the app’s protocol commands.
5. H1E firmware protocol ≠ P1 firmware protocol.
6. P1 firmware v1.2.26 cannot be downloaded from the official API, so the codebase likely predates the P1 firmware we have.
7. The only P1 metadata found (1.2.25) in the repo does not match the firmware actually on the device (1.2.26).
8. Every firmware-check URL returns 400, confirming P1 firmware endpoints differ from H1E.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions