aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-11 22:29:35 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-11 22:29:35 +1300
commitf10f359d0531417b11a2a0fa1862efd6eae742b9 (patch)
treec0d71c1d5fe3b6c1ac9598a99b8cd4f979d52dab /tools
parent3c93192e8a2a392fe9ddf7bdcd512a7d6cceb3a9 (diff)
downloadtrackermap-server-f10f359d0531417b11a2a0fa1862efd6eae742b9.tar.gz
trackermap-server-f10f359d0531417b11a2a0fa1862efd6eae742b9.tar.bz2
trackermap-server-f10f359d0531417b11a2a0fa1862efd6eae742b9.zip
Move scripts to tools directory
Diffstat (limited to 'tools')
-rwxr-xr-xtools/demo.sh25
-rwxr-xr-xtools/hex.sh1
-rwxr-xr-xtools/test.sh82
3 files changed, 108 insertions, 0 deletions
diff --git a/tools/demo.sh b/tools/demo.sh
new file mode 100755
index 000000000..50e48e496
--- /dev/null
+++ b/tools/demo.sh
@@ -0,0 +1,25 @@
+(echo -n -e "\
+\$PGID,123456789012345*06\r\n\
+\$GPRMC,184332.07,A,1929.459,S,02410.381,E,74.00,16.78,210410,0.0,E,A*2B\r\n\
+\$GPRMC,184336.07,A,1929.380,S,02410.405,E,74.00,16.78,210410,0.0,E,A*27\r\n\
+\$GPRMC,184340.07,A,1929.301,S,02410.429,E,74.00,16.78,210410,0.0,E,A*21\r\n\
+\$GPRMC,184344.07,A,1929.223,S,02410.452,E,74.00,16.78,210410,0.0,E,A*28\r\n\
+\$GPRMC,184348.07,A,1929.144,S,02410.476,E,74.00,16.78,210410,0.0,E,A*20\r\n\
+\$GPRMC,184352.07,A,1929.065,S,02410.500,E,74.00,16.78,210410,0.0,E,A*29\r\n\
+\$GPRMC,184356.07,A,1928.986,S,02410.524,E,74.00,16.78,210410,0.0,E,A*2E\r\n\
+\$GPRMC,184400.08,A,1928.907,S,02410.547,E,74.00,16.78,210410,0.0,E,A*29\r\n\
+\$GPRMC,184404.08,A,1928.829,S,02410.571,E,74.00,16.78,210410,0.0,E,A*25\r\n\
+\$GPRMC,184408.08,A,1928.750,S,02410.595,E,74.00,16.78,210410,0.0,E,A*22\r\n\
+\$GPRMC,184412.08,A,1928.671,S,02410.619,E,74.00,16.78,210410,0.0,E,A*2C\r\n\
+\$GPRMC,184416.08,A,1928.592,S,02410.642,E,74.00,16.78,210410,0.0,E,A*28\r\n\
+\$GPRMC,184420.08,A,1928.513,S,02410.666,E,74.00,16.78,210410,0.0,E,A*22\r\n\
+\$GPRMC,184424.08,A,1928.435,S,02410.690,E,74.00,16.78,210410,0.0,E,A*2A\r\n\
+\$GPRMC,184428.08,A,1928.356,S,02410.714,E,74.00,16.78,210410,0.0,E,A*29\r\n\
+\$GPRMC,184432.08,A,1928.277,S,02410.737,E,74.00,16.78,210410,0.0,E,A*21\r\n\
+\$GPRMC,184436.08,A,1928.198,S,02410.761,E,74.00,16.78,210410,0.0,E,A*24\r\n\
+\$GPRMC,184440.08,A,1928.119,S,02410.785,E,74.00,16.78,210410,0.0,E,A*26\r\n\
+\$GPRMC,184444.08,A,1928.041,S,02410.809,E,74.00,16.78,210410,0.0,E,A*25\r\n\
+\$GPRMC,184448.08,A,1927.962,S,02410.832,E,74.00,16.78,210410,0.0,E,A*26\r\n\
+";) | nc -v localhost 5005
+
+
diff --git a/tools/hex.sh b/tools/hex.sh
new file mode 100755
index 000000000..45f6b11bc
--- /dev/null
+++ b/tools/hex.sh
@@ -0,0 +1 @@
+echo 78780d0103534190360660610001e0cd0d0a | perl -ne 's/([0-9a-f]{2})/print chr hex $1/gie' | nc -v -w 10 localhost 5023
diff --git a/tools/test.sh b/tools/test.sh
new file mode 100755
index 000000000..9201da618
--- /dev/null
+++ b/tools/test.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# testing data:
+# imei - 123456789012345
+# id - 123456 (trackers that dont send imei)
+# time - 12:0X (where X is different for each tracker)
+# server - localhost
+# ports - default
+
+# to verify test check database entries
+
+echo "0. xexun"
+(echo -n -e "111111120009,+436763737552,GPRMC,120000.000,A,6000.0000,N,13000.0000,E,0.0,0.0,010112,,,A*76,F,imei:123456789012345,04,481.2,F:4.15V,0,139,2689,232,03,2725,0576";) | nc -v localhost 5000
+
+echo "1. gps103"
+(echo -n -e "imei:123456789012345,help me,1201011201,,F,120100.000,A,6000.0000,N,13000.0000,E,0.00,;";) | nc -v localhost 5001
+
+echo "2. tk103"
+(echo -n -e "(000000000000BP05123456789012345120101A6000.0000N13000.0000E000.0120200000.0000000000L000946BB)";) | nc -v localhost 5002
+
+echo "3. gl100"
+(echo -n -e "+RESP:GTSOS,123456789012345,0,0,0,1,0.0,0,0.0,1,130.000000,60.000000,20120101120300,0460,0000,18d8,6141,00,11F0,0102120204\0";) | nc -v localhost 5003
+
+echo "4. gl200"
+(echo -n -e "+RESP:GTFRI,020102,123456789012345,,0,0,1,1,0.0,0,0.0,130.000000,60.000000,20120101120400,0460,0000,18d8,6141,00,,20120101120400,11F0\$";) | nc -v localhost 5004
+
+echo "5. t55"
+(echo -n -e "\$PGID,123456789012345*0F\r\n\$GPRMC,120500.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,*33\r\n";) | nc -v localhost 5005
+
+echo "6. xexun2"
+(echo -n -e "111111120009,+436763737552,GPRMC,120600.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,,A*68,F,, imei:123456789012345,04,481.2,F:4.15V,0,139,2689,232,03,2725,0576\n";) | nc -v localhost 5006
+
+echo "7. avl08"
+(echo -n -e "\$\$B3123456789012345|AA\$GPRMC,120700.000,A,6000.0000,N,13000.0000,E,0.00,,010112,,,A*74|01.8|01.0|01.5|000000000000|20120403234603|14251914|00000000|0012D888|0000|0.0000|3674|940B\r\n";) | nc -v localhost 5007
+
+echo "8. enfora"
+(echo -n -e "\x00\x71\x00\x04\x02\x00 123456789012345 13 \$GPRMC,120800.00,A,6000.000000,N,13000.000000,E,0.0,0.0,010112,,,A*52\r\n";) | nc -v localhost 5008
+
+echo "9. meiligao"
+(echo -n -e "\$\$\x00\x60\x12\x34\x56\xFF\xFF\xFF\xFF\x99\x55120900.000,A,6000.0000,N,13000.0000,E,0.00,,010112,,*1C|11.5|194|0000|0000,0000\x69\x62\x0D\x0A";) | nc -v localhost 5009
+
+echo "10. maxon"
+
+
+echo "11. st210"
+(echo -n -e "SA200STT;123456;042;20120101;12:11:00;16d41;-15.618767;-056.083214;000.011;000.00;11;1;41557;12.21;000000;1;3205\r";) | nc -v localhost 5011
+
+echo "12. progress"
+
+
+echo "13. h02"
+(echo -n -e "*HQ,123456789012345,V1,121300,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,ffffffff,000000,000000,000000,000000#";) | nc -v localhost 5013
+
+echo "14. jt600"
+(echo -n -e "\$\x00\x00\x12\x34\x56\x11\x00\x1B\x01\x01\x12\x12\x14\x00\x60\x00\x00\x00\x13\x00\x00\x00\x0F\x00\x00\x07\x50\x00\x00\x00\x2B\x91\x04\x4D\x1F\xA1";) | nc -v localhost 5014
+
+echo "15. ev603"
+(echo -n -e "!1,123456789012345;!A,01/01/12,12:15:00,60.000000,130.000000,0.0,25101,0;";) | nc -v localhost 5015
+
+echo "16. v680"
+(echo -n -e "#123456789012345#1000#0#1000#AUT#1#66830FFB#13000.0000,E,6000.0000,N,001.41,259#010112#121600##";) | nc -v localhost 5016
+
+echo "17. pt502"
+(echo -n -e "\$POS,123456,121700.000,A,6000.0000,N,13000.0000,E,0.0,0.0,010112,,,A/00000,00000/0/23895000//\r\n";) | nc -v localhost 5017
+
+echo "18. tr20"
+(echo -n -e "%%123456789012345,A,120101121800,N6000.0000E13000.0000,0,000,0,01034802,150,[Message]\r\n";) | nc -v localhost 5018
+
+echo "19. navis"
+
+
+echo "20. meitrack"
+(echo -n -e "\$\$d138,123456789012345,AAA,35,60.000000,130.000000,120101122000,A,7,18,0,0,0,49,3800,24965,510|10|0081|4F4F,0000,000D|0010|0012|0963|0000,,*BF\r\n";) | nc -v localhost 5020
+
+echo "21. skypatrol"
+
+
+echo "22. gt02"
+
+
+echo "23. gt06"
+