Add a tool
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 13 Oct 2016 23:07:16 +0000 (08:07 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 13 Oct 2016 23:07:16 +0000 (08:07 +0900)
tool/collect-neug-output.sh [new file with mode: 0755]

diff --git a/tool/collect-neug-output.sh b/tool/collect-neug-output.sh
new file mode 100755 (executable)
index 0000000..cb70d2a
--- /dev/null
@@ -0,0 +1,11 @@
+# /bin/bash
+
+# The size of 125000-byte was chosen for the classic NIST STS test
+# It's historical.
+
+for i in $(seq -f "%03.0f" $1 $2); do
+  if [ ! -f rand-$i.bin ]; then
+    echo $i
+    dd if=/dev/ttyACM0 count=1000 ibs=125000 iflag=fullblock of=rand-$i.bin
+  fi
+done