diff --git a/lib/hidapi/hidconsole.py b/lib/hidapi/hidconsole.py index aaa96e8a..2c4232af 100644 --- a/lib/hidapi/hidconsole.py +++ b/lib/hidapi/hidconsole.py @@ -135,7 +135,7 @@ def _validate_input(line, hidpp=False): def _open(args): - def matchfn(bid, vid, pid): + def matchfn(bid, vid, pid, _a, _b): if vid == 0x046d: return {'vid': 0x046d} diff --git a/tools/scan-registers.sh b/tools/scan-registers.sh index 6c7b8b5a..2cf5697a 100755 --- a/tools/scan-registers.sh +++ b/tools/scan-registers.sh @@ -14,7 +14,8 @@ fi HIDRAW=$2 do_req() { - "$HC" --hidpp $HIDRAW | grep -v "\[1. ${DEVNUMBER} 8F.. ..0[12]" | grep -B 1 "^>> " + "$HC" --hidpp $HIDRAW | grep -v "\[1. .. 8F.. " | grep -B 1 "^>> " +# "$HC" --hidpp $HIDRAW | grep -v "\[1. ${DEVNUMBER} 8F..0[123]" | grep -B 1 "^>> " } req00="$(mktemp --tmpdir req00-XXXXXX)" @@ -36,12 +37,19 @@ else fi rm --force "$req00" "$req00-flags" & +echo SHORT REGISTERS # read all short registers, skipping 00 for n in $(seq 1 255); do printf "10 ${DEVNUMBER} 81%02x 000000\n" $n done | do_req +echo LONG REGISTERS # read all long registers for n in $(seq 0 255); do printf "10 ${DEVNUMBER} 83%02x 000000\n" $n done | do_req + +echo PAIRING INFORMAITON # read all pairing information +for n in $(seq 0 255); do + printf "10 ${DEVNUMBER} 83B5 %02x0000\n" $n +done | do_req