diff --git a/lib/hidapi/hidconsole.py b/lib/hidapi/hidconsole.py index 2c4232af..38e58b0f 100644 --- a/lib/hidapi/hidconsole.py +++ b/lib/hidapi/hidconsole.py @@ -114,8 +114,8 @@ def _validate_input(line, hidpp=False): if data[:1] not in b'\x10\x11': _error('Invalid HID++ request: first byte must be 0x10 or 0x11') return None - if data[1:2] not in b'\xFF\x01\x02\x03\x04\x05\x06': - _error('Invalid HID++ request: second byte must be 0xFF or one of 0x01..0x06') + if data[1:2] not in b'\xFF\x00\x01\x02\x03\x04\x05\x06\x07': + _error('Invalid HID++ request: second byte must be 0xFF or one of 0x00..0x07') return None if data[:1] == b'\x10': if len(data) > 7: @@ -154,7 +154,6 @@ def _open(args): handle = _hid.open_path(device) if not handle: sys.exit('!! Failed to open %s, aborting.' % device) - print( '.. Opened handle %r, vendor %r product %r serial %r.' % (handle, _hid.get_manufacturer(handle), _hid.get_product(handle), _hid.get_serial(handle)) diff --git a/tools/scan-registers.sh b/tools/scan-registers.sh index 2cf5697a..d08df658 100755 --- a/tools/scan-registers.sh +++ b/tools/scan-registers.sh @@ -14,8 +14,8 @@ fi HIDRAW=$2 do_req() { - "$HC" --hidpp $HIDRAW | grep -v "\[1. .. 8F.. " | grep -B 1 "^>> " -# "$HC" --hidpp $HIDRAW | grep -v "\[1. ${DEVNUMBER} 8F..0[123]" | grep -B 1 "^>> " +## "$HC" $HIDRAW + "$HC" $HIDRAW | grep -v "^<< " | grep -v "\[1. .. 8F.. " } req00="$(mktemp --tmpdir req00-XXXXXX)"