Created
January 3, 2022 05:27
-
-
Save natenho/89ba24dbd5dac00df0612b1c09d923b6 to your computer and use it in GitHub Desktop.
A bash script useful to flash Anne Pro 2 keyboard using a docker environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
./build || exit 1 && clear | |
wait_device() { | |
while lsusb -d $1; [ $? -ne 0 ]; do | |
echo $2; | |
sleep 1; | |
done | |
} | |
kbd_device="04d9:a291" | |
iap_device="04d9:8009" | |
wait_device $iap_device "Press IAP mode combination (LSHIFT+RSHIFT+B)..." | |
docker run --privileged -h ap2 --rm -it --user $(id -u) -w /home/dev ap2 bash -c ./flash || exit 1 | |
wait_device $kbd_device "Waiting for keyboard boot..." | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment