41 lines
963 B
Bash
41 lines
963 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
echo "Testing TR360 Radar Command Interface"
|
||
|
|
echo "===================================="
|
||
|
|
|
||
|
|
# TR360-3-60 命令端口: 10195 + 1000 = 11195
|
||
|
|
# TR360-4-60 命令端口: 20295 + 1000 = 21295
|
||
|
|
|
||
|
|
HOST="192.168.1.193"
|
||
|
|
PORT_3_60=11195
|
||
|
|
PORT_4_60=21295
|
||
|
|
|
||
|
|
echo ""
|
||
|
|
echo "1. Testing TR360-3-60 commands (port $PORT_3_60):"
|
||
|
|
echo "-----------------------------------------------"
|
||
|
|
|
||
|
|
# 测试基本命令
|
||
|
|
echo "Testing status command:"
|
||
|
|
echo "status" | nc -w 3 $HOST $PORT_3_60
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
echo "Testing history command:"
|
||
|
|
echo "history" | nc -w 3 $HOST $PORT_3_60
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
echo "Testing set_port command:"
|
||
|
|
echo "set_port 10195" | nc -w 3 $HOST $PORT_3_60
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
echo "2. Testing TR360-4-60 commands (port $PORT_4_60):"
|
||
|
|
echo "-----------------------------------------------"
|
||
|
|
|
||
|
|
echo "Testing status command:"
|
||
|
|
echo "status" | nc -w 3 $HOST $PORT_4_60
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
echo "Testing custom command:"
|
||
|
|
echo "get_config" | nc -w 3 $HOST $PORT_4_60
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
echo "Command testing completed!"
|