PH-DOC / 03.4
Two Type-C sockets, one protocol.
The High-Speed OTG port is what a suspect PC or an investigator's PC sees. The other Type-C is only for logs and flashing. PH1 is a text protocol on the virtual serial port.
Sockets
| High-Speed OTG (schematic U8) | Programming (schematic U5) | |
|---|---|---|
| Chip pins | USB0_P/N, package pins 49 and 50, dedicated HS PHY | GPIO25 / GPIO24, USB-Serial/JTAG |
| Used for | CDC-ACM control port and the SD-card disk | idf.py flash, monitor, espefuse. PORT in the provisioning guide. |
| VBUS | Straight to VCC_5V | Through a 1.5 A PTC. That is the fuse on this port, not a measured device current. |
Either port powers the board. Which connector is silk-screened “HIGH-SPEED USB OTG” is unverified: the schematic only names U5 and U8. TinyUSB runs on rhport 1, which on the ESP32-P4 is the USB 2.0 HS controller. The stack is plain espressif/tinyusb 0.21.0~6, not esp_tinyusb, so this firmware can own the MSC callbacks and the per-sector write guard. VID/PID default to 0x1209/0x0001, the pid.codes test ID. Get a real PID before shipping. Hosts find the device by the product string.
USB identity
| Field | Value |
|---|---|
| Manufacturer | PocketHunter |
| Product | PocketHunter Collector |
| Serial | The device ID |
| SCSI vendor / product / revision | PocketHn / PH Collector / firmware major.minor, for example 1.0 |
| Linux serial node | /dev/serial/by-id/usb-PocketHunter_PocketHunter_Collector_<ID>-if00 |
| Linux disk node | /dev/disk/by-id/usb-PocketHn_PH_Collector_<ID>-0:0 |
Windows uses a USBSER COM port. macOS uses /dev/cu.usbmodem*. The names above are what the firmware expects; enumeration on real operating systems is still on the unverified list. No driver install is required on Windows 10+, Linux or macOS.
PH1, on the bench
The host sends one ASCII line, at most 300 bytes, ending in newline. The device answers exactly one line, OK or ERR <reason>. Commands are case-sensitive. Empty lines are ignored. Replies end with a single newline.
Shapes from docs/DEVICE-PROTOCOL.md. Firmware version 1.0.0 is PH_FW_VERSION in the tree. 3F9A0C11D2E4B758 is the document's example ID, not a real unit. Signatures are not fabricated here.
Error reasons implemented in the firmware: unknown, toolong, syntax, nonce, seal, time, label, pct, token, sign, counter, internal. nonce and seal must be 64 lower-case hex characters. label is 1–64 characters from [A-Za-z0-9._-]. The UNLOCK token is 128 hex characters, either case, an Ed25519 signature over PH1|unlock|<ID>|<counter> checked with the vendor public key compiled in from license/public.key. Monocypher 4.0.3 does that check. A token works once, because the counter moves first.
