diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-01-02 23:57:15 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-01-07 10:22:24 +0100 |
commit | a9923753ea65b94cc46a9c774c8d385a44fb38db (patch) | |
tree | 9f9a559c6e829ee92f5c4c52947e934df3dc0dd7 /rrlp-ephemeris/get-test-data.sh | |
parent | ad0140572c1f5769cd589c807bedbde228e51615 (diff) |
rrlp-ephemeris: Add script to get test data from UBX receiver
Simple script illustrating how data.ubx (the test sample) is
generated.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'rrlp-ephemeris/get-test-data.sh')
-rwxr-xr-x | rrlp-ephemeris/get-test-data.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/rrlp-ephemeris/get-test-data.sh b/rrlp-ephemeris/get-test-data.sh new file mode 100755 index 000000000..169f43c8f --- /dev/null +++ b/rrlp-ephemeris/get-test-data.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DEV=$1 +OUTF=$2 + +# Change mode +echo -en "\$PUBX,41,1,0001,0001,9600,0*14\r\n" > ${DEV} + +# Wait a little +sleep 2 + +# Start dump +echo -en "\xb5\x62\x01\x02\x00\x00\x03\x0a" | \ + socat -t5 ${DEV},b9600,raw,clocal=1,echo=0 - > ${OUTF} +echo -en "\xb5\x62\x0b\x10\x00\x00\x1b\x5c" | \ + socat -t10 ${DEV},b9600,raw,clocal=1,echo=0 - >> ${OUTF} + |