#!/bin/sh
|
# Modbus 协议门锁控制器 高速ETC用的DO开门
|
echo -en "Content-type: text/html; charset=utf-8\n\n"
|
#*****************************************************
|
source ../bin/env.sh
|
db="../bin/db"
|
jsoner="../bin/jsoner"
|
|
|
read content
|
id=`$jsoner $content id`
|
port=`sqlite3 /work/iot_cfg.db "select port from device where type=3001"`
|
msg trans $port '01060001000259CB' >> /dev/null
|
|
if [ $? -eq 0 ]
|
then
|
echo "{\"code\":\"success\"}"
|
else
|
echo "{\"code\":\"error\"}"
|
fi
|
|
echo "query device list: $content"> log
|