The MSHW0231 touch controller has an observed activation sequence for raw-mode
experiments. Its sufficiency for a reliable raw stream is not yet release
evidence; see docs/EVIDENCE.md before treating it as a protocol contract.
The Surface Laptop 3 AMD controller (MSHW0162) uses the same V0 transport
and the same sequence.
Before the SET_FEATURE command, the driver sends the vendor-initialization
write — command register 0x000003, 18 bytes:
02 00 00 03 C2 00 03 0A 00 56 BD 0C EE 5B 44 4C 00 00
C2 is the header byte (version | length), not a register; the payload is
report ID 0x56 followed by the six-byte device key. This matches the Windows
touch initialization trace (captures/wintrace/surface_init.csv); the frame is
built by spi_hid_wire_vendor_init() and pinned byte for byte by
tests/wire_frames_test.c.
With skip_getfeat=0, the legacy path waits for the Windows-like ~3.6 s gap
(measured; the original protocol doc cited ~5.9 s) between RPT_DESC and
GET_FEATURE before sending the activation command. The
experimental raw profile uses skip_getfeat=1 and takes the direct vendor-init
path instead. Neither mode skips the Report ID 6 configuration read, which
Windows performs between RPT_DESC and SET_FEATURE ID5 and which the driver now
logs without acting on its values.
Host → Device:
Report Type: Feature (0x03)
Report ID: 5
Value: 0x01 (observed raw-mode request)
The SET_FEATURE frame is a standard HID feature report with:
- Report type = 0x03 (SET_REPORT / Feature)
- Feature report ID = 5
- Data byte = 0x01 (observed request value)
SET_FEATURE ID5=01 is part of the observed activation sequence. The current
driver recognizes byte-indexed CapImg frames of roughly 4304 bytes, while older
documentation described a 16-bit 6912-byte raster. This discrepancy is tracked
in docs/EVIDENCE.md; do not use either layout as a new protocol contract
without a labelled replay fixture.
The driver uses a direct vendor-init path:
- Write vendor-init command (0xC2 opcode)
- After a short stabilization delay, write GET_FEATURE Report ID 6 and keep/log the reply (Windows order; diagnostic only, a failed read does not stop here)
- Write SET_FEATURE ID5=01
- Observe subsequent reports; reliable streaming remains unproven
The original GET_FEATURE-based path:
- Wait for device descriptor available
- Read report descriptor
- Wait ~3.6 s (Windows GET_FEATURE delay, measured; original doc cited ~5.9 s)
- Send GET_FEATURE → device returns current ID5 state
- Send SET_FEATURE ID5=01 → observe whether a stream follows
The skip_getfeat=1 path is selected only by sl4a-touch.sh install --raw. The standard
installer profile remains standard HID mode until the raw validation matrix is
complete.
There is no raw_enabled parameter. Inspect the SPI HID device's ready,
protocol_stats, baseline_status, and heatmap_debug sysfs attributes as
described in docs/TESTING.md.
tools/surface_tracker.py— Python oracle with raw mode validationdocs/HIDSPI_PROTOCOL.md— Full HID-over-SPI protocol reference- Windows
surface_init.csvtrace — Transaction #267 (vendor-init)