diff --git a/usb/log-i2c-hangs.sh b/usb/log-i2c-hangs.sh new file mode 100755 index 00000000..b1ffa4e8 --- /dev/null +++ b/usb/log-i2c-hangs.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./print-i2c-hangs.sh > i2c-hangs-`date +%Y-%m-%d_%H:%M:%S`.log diff --git a/usb/print-i2c-hangs.sh b/usb/print-i2c-hangs.sh new file mode 100755 index 00000000..93863001 --- /dev/null +++ b/usb/print-i2c-hangs.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +while true; do + startSeconds=`date +%s` + ./wait-until-i2c-dies.js + endSeconds=`date +%s` + elapsedSeconds=$((startSeconds-endSeconds)) + echo $elapsedSeconds + ./jump-to-bootloader.js > /dev/null + sleep 6 +done