AlexxIT/go2rtc · error
expected cmdID 10001, got
Error message
expected cmdID 10001, got %d
What it means
parseK10001 validated the HL magic but the command ID field is not KCmdChallenge (10001), meaning the packet is a different command than the expected auth challenge. The received cmdID is printed; raised during doKAuth.
Solutions
- Reconnect to restart the K auth handshake from the challenge step
- Update the parser if the firmware sends a revised challenge command
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/wyze/client.go:479 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/0040c10c4b7355b4.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/wyze/client.go:479
return b
}
func (c *Client) parseK10001(data []byte) (challenge []byte, status byte, err error) {
if c.verbose {
fmt.Printf("[Wyze] parseK10001: received %d bytes\n", len(data))
}
if len(data) < 33 {
return nil, 0, fmt.Errorf("data too short: %d bytes", len(data))
}
if data[0] != 'H' || data[1] != 'L' {
return nil, 0, fmt.Errorf("invalid HL magic: %x %x", data[0], data[1])
}
cmdID := binary.LittleEndian.Uint16(data[4:])
if cmdID != KCmdChallenge {
return nil, 0, fmt.Errorf("expected cmdID 10001, got %d", cmdID)
}
status = data[16]
challenge = make([]byte, 16)
copy(challenge, data[17:33])
return challenge, status, nil
}
func (c *Client) parseK10003(data []byte) (*AuthResponse, error) {
if c.verbose {
fmt.Printf("[Wyze] parseK10003: received %d bytes\n", len(data))
}
if len(data) < 16 {
return &AuthResponse{}, nil
}
View on GitHub (pinned to c245815e75)