# iotserver **Repository Path**: duttty/iotserver ## Basic Information - **Project Name**: iotserver - **Description**: No description available - **Primary Language**: NodeJS - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2019-07-05 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # iotserver #### 介绍 这是一个物联网云平台服务端demo,包含硬件和web两个服务端,webserver提供API供查询设备历史数据、设定定时任务、用户管理;tcpserver与硬件设备连接,实现数据透传。 #### 使用说明 1. npm install 2. npm run start #### 串口接入 1. 初始化串口服务器 ###### const serialServer = new SerialToTcp 2. 运行 /*接受参数 {port:服务器端口号 com:'' 电脑端口 deviceId:'' 注册设备号(不能重复)}*/ ###### serialServer.newConnect({port:15000,com:'com5',deviceId:'1234381162797123400002'}) #### TCP协议接入 地址:localhost 端口:15000 数据:长度为22位的16进制数据 格式”9901“ + 18位设备Id API接口见api.js模块 https://gitee.com/duttt/iotserver/blob/master/koaserver/routers/api.js