projects
/
cmccabe-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
af49f78
)
Add "ser" script for accessing the serial port
author
Colin McCabe
<colinmcc@lab126.com>
Tue, 15 Dec 2009 23:43:48 +0000 (15:43 -0800)
committer
Colin McCabe
<colinmcc@lab126.com>
Tue, 15 Dec 2009 23:43:48 +0000 (15:43 -0800)
ser
[new file with mode: 0755]
patch
|
blob
diff --git a/ser
b/ser
new file mode 100755
(executable)
index 0000000..
d5991e8
--- /dev/null
+++ b/
ser
@@ -0,0
+1,17
@@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ echo "usage: ${0} <serial-port>"
+ echo "example: ${0} USB0"
+ exit 1
+fi
+PORT="/dev/tty${1}"
+if test -c ${PORT}; then
+ :
+else
+ echo "no such device as ${PORT}"
+ exit 1
+fi
+
+/usr/bin/picocom --baud 115200 --flow n --parity n --databits 8 \
+--send-cmd sb --receive-cmd rb ${PORT}