首页 可靠UART通讯协议2.0

可靠UART通讯协议2.0

举报
开通vip

可靠UART通讯协议2.0可靠UART通讯协议2.0 UART V2.0 2014-8-15 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form ...

可靠UART通讯协议2.0
可靠UART通讯 协议 离婚协议模板下载合伙人协议 下载渠道分销协议免费下载敬业协议下载授课协议下载 2.0 UART V2.0 2014-8-15 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 修订历史 版本 日期 提要 V0 2010-8-12 初始版本,7章+1节附录 V1.0 2010-10-10 1、网络静默5s后所有设备自动恢复到基准通讯速率 2、定义了《附录1 设备参数表》 V1.1 2010-10-21 1、修订《通讯命令集》(设置密码、设置亮度、读设备参数) 2、增补了《附录1 设备参数表》的5条注意事项 V1.2 2010-11-4 1、增加附录1《设备参数表》参数2项 V2.0 2014-8-15 1、 基准通讯速率从9600bps改变为可设定 2、 取消拆分帧结构,只保留独立帧,长度<=8200且>10 3、 直接引用信息帧的有效内容为信息包 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 目 录 1 目的 2 分层 3 物理层 4 网络层 5 传输层 6 应用层 7 范例 附录1 设备参数表 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 1 目的 本协议的目的是要建立一套可靠的异步串行通讯规范,应用范围可以涵盖有线 和无线通讯方式。 本协议主要应用于常规网络之外的局部联网通讯领域,常见情形包括单片机联 网工作以及计算机与单片机构成的关系较为复杂的上下位机模式网络。 本协议支持点对点通讯和点对多点的组播、广播,但不支持信息包转发等路由 服务。 本协议工作于总线结构和星形结构的局部网络环境。 本协议工作于半双工模式。 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 2 分层 本协议是一个四层协议系统,每一层负责不同的功能: 层次 功能 应用层 运行用户交互程序,编辑组织信息 设备列表管理 设备ID扫描 设备分组 网络运转可靠保障 传输层 传输控制、信息包交换 通讯模式协商 信息打包,信息包恢复 信息包可靠保障 网络层 帧通讯 帧结构定义 帧可靠保障 物理层 提供网络的物理连接 数据格式定义 设备驱动 通讯模式定义 物理接口定义 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 3 物理层 3.1 物理接口 本协议支持以下物理接口: , RS232 , RS485 , 基于RS232的无线数传模块 , 基于RS232的GPRS、CDMA数据通讯模块 3.2 通讯模式 本协议通讯模式为半双工异步串行通讯 3.3 数据格式 本协议的数据格式为: 1个起始位,8个数据位,1个停止位,无奇偶校验 3.4 通讯速率 本协议的基准通讯速率可设定,通常为9600bps/38400bps/115200bps,系统 启动后首先将通讯速率设置为基准速率,在系统运转中具体的通讯速率以传输层 的通讯模式协商结果为准。 网络静默5s后所有设备自动恢复到基准通讯速率。 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 4 网络层 4.1 网络层以帧(frame)为传输单元,最大传输单元MTU=8200B 4.2 网络层的帧结构:独立帧结构。 F0H F0H F3H CRC F0H 长度 目的ID 源ID 信息 2B/5B 2B 1B 4B 4B nB 1B 1B 引导字符 独立帧号 结束字符 4.3 帧结构中的“长度”(高字节在前)字节为从帧号开始到CRC的字节总数(含帧号和CRC码),长度<=8200且>10 如果在“引导字符”结束后(即连续的F0H序列)收到的2个字节组成的 数据<=8200且>10则将其作为帧长度使用,否则复位接收状态,并且反馈“帧长 度错误”; 如果在“长度”字节后收到的字节数量等于长度值后,接收的下一个字节不 是“结束字符”,则复位接收状态,并且反馈“未及时接收结束字符”; 如果在“长度”字节后,收到“结束字符”时,接收到的字节数量小于长度 值,则复位接收状态,并且反馈“提前收到结束字符”; 如果接收缓冲区耗尽而通讯帧未结束,则复位接收状态,并且反馈“接收缓 冲区溢出”; 相应的错误反馈编码见4.9节。 4.4 CRC是以0为初始值,从帧号开始到信息的最末字节为止,逐字节异或的结果 在发送端,以0为初始值,从帧号开始到信息的最末字节为止,逐字节异或 的结果存储在CRC位置; 在接收端,以0为初始值,从帧号开始到信息的最末字节为止,逐字节异或 的结果与CRC字节再进行异或,如果结果为0,则CRC校验正确,否则CRC校 验错误。 4.5 有线通讯时引导字符取2B,无线通讯时引导字符取5B 4.6 转义字符:FCH 在发送端,当帧号之后结束字符之前的字节中出现F0H或FCH时,将该字 节取反并且前边插入一个FCH; 当接收端收到转义字符FCH后,丢弃本字节并且将其后续的一个字节取反 后作为接收字节使用。 转义字符不纳入长度和CRC的计算范围。 4.7 帧通讯的可靠性保障 接收端接收到正确帧则将其提交给传输层,由传输层决定反馈内容; loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 接收端接收到错误帧则反馈错误码: 1——CRC校验错误 2——未及时接收结束字符 3——帧长度错误 4——提前收到结束字符 6——接收缓冲区溢出 延时复位:在接收端,非完整帧通讯中断超过20ms则复位接收状态,向传 输层提交报告,并且反馈“接收端通讯中断”: 7——接收端通讯中断 发送端接收到正确反馈则将其提交给传输层; 发送端接收到错误反馈或超时未接收到正确反馈则重复发送; 一个帧发送3次都失败则向传输层报告错误,错误报告包括错误码: 1-6——为接收端的帧错误反馈号码 ——超时未接收到正确反馈 8 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 5、传输层 5.1 传输层以信息包(package)为传输单元,最大传输单元MTU=8200,信息包是信息帧的有效数据部分,滤除了帧头帧尾以及转义字符。 5.2 信息包结构: CRC 信息包长度 独立帧号 目的ID 源ID 信息 2B 1B 4B 4B nB 1B 命令 数据 F3H 1B n-1B n=1时,数据长度为0,此时信息包为纯粹的命令包。 “信息包长度”即“帧长度”。 5.3 CRC即帧结构中的CRC码。 5.4 通讯模式协商 信息包长度较大且通讯速率有提升空间时,可以在传输层上进行通讯模式 协商,协商的内容是通讯速率;接收端还需要反馈接收准备就绪的情况。 由于通讯模式协商涉及到的信息包数据量大,因此在协商过程中在保证通 讯可靠的前提下尽量采用最高的通讯速率。但在组播时则需要采用组内所有设 备能够采用的最高通讯速率中的最小值。 信息包传输结束后,有两种方式恢复基准通讯速率:一种是发送端发起新 的通讯模式协商,另一种是网络静默5s后所有设备自动恢复到基准通讯速率。 5.8 通讯命令集 序号 命令 编码 参数 功能 1 mlrst 1H —— 设备工作状态初始化 2 mlsetup 2H 32B 设置设备参数 3 mlsetid 3H 下位机产品序列号4B 设置设备ID 秒,分,时,日,月,星期,主机发布系统当前时4 mltime 4H 年,BCD码 间,校时 —— 5 mlself 5H 设备自检 6 mlon 6H 设备开关机时间8B,BCD码 发送设备开关机时间 7 mlfls 7H 起始地址4B,长度2B,数据 发送常驻信息 8 mlram 8H 起始地址4B,长度2B,数据 发送暂驻信息 9 mlgroup 9H 编组设备ID列表 设置设备分组 10 mlegrp 0AH —— 取消设备分组 起始地址4B 擦除常驻信息扇区 mleflsec 0BH 11 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 信息内容 发送立即信息 mlliji 0CH 12 2B,BCD码 设置设备密码 mlsetpw 0DH 13 —— 查询设备参数 mlcxset 10H 14 —— 15 mlcxid 11H 查询设备ID —— 16 mlcxvr 12H 查询设备程序版本号 17 mlcxzt 13H —— 查询设备工作状态 18 mlcxfls 14H 起始地址4B 查询设备常驻信息 19 mlcxram 15H 起始地址4B 查询设备暂驻信息 20 mlcxcpu 16H 起始地址1B 查询设备CPU寄存器 通讯模式4B,1波特率,2子包通讯模式协商 数量,3、4备用 21 mlhand 17H Bps:1-9600,2-19200,3-38400 4-57600,5-115200 22 mlfkset 20H 32B 反馈设备参数 23 mlfkid 21H —— 反馈设备ID 24 mlfkvr 22H 下位机程序版本号8B 反馈设备程序版本号 25 mlfkzt 23H 设备工作状态4B 反馈设备工作状态 26 mfkfls 24H 数据(100B) 反馈设备常驻信息 27 mlfkram 25H 数据(100B) 反馈设备暂驻信息 28 mlfkcpu 26H 数据(100B) 反馈设备CPU寄存器 29 mlfkhd 27H 同17H,采用旧波特率 反馈通讯模式协商结果 30 mlfkgrp 28H —— 设备编组就绪应答 31 mljktx 29H 接收结果1B/2B 反馈通讯接收结果 32 mllight 40H 1B 设置屏体亮度 注:通讯命令集的有效编码范围为1~80H ,其中1~3FH为通用命令集, 40H~80H为自定义命令区,用户可以根据产品功能需要自行定义所需要的命令子集。 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 6 应用层 6.1 设备管理 在应用层上用设备名称列表来管理网络上的设备,上位机应用启动后按照列表扫描连接的设备,将其区分为在线设备和不在线设备,在应用存续期间可以手动扫描设备连接情况。 设备名称列表存储在数据库中,另外还有对应的设备ID字段。 应用程序可以对设备进行编组以便高效传输数据,每个组的设备数量不超过20个。 上位机可以存储若干组,每次组播之前先消除下位机的旧编组,然后在下位机网络上建立临时的通讯组,之后开始组播通讯。 组播时提示组内不在线的设备。 6.2 设备ID管理 每个出厂设备均有唯一ID号(由工厂规定),方便进行产品和客户管理。设备通讯就建立在ID寻址的基础上。 设备ID号为四字节码,共8个16进制数值,如“010F82DA”。 设备ID分配表: FFFFFFEF 广播ID 该号码不公开,仅限于工厂修改设备ID及返 回原有设备ID等操作。此时主机只能连接要 设置的一个设备,不可多设备组网 FFFFFFF8 组播ID 用于组播通讯 FFFFFFFD 主机ID 上位机预留 普通ID 其他号码 设备ID号打印为条码,一式两份,一份贴在控制卡上,一份贴在质保卡上。用户安装设备时,在应用程序中将设备ID录入数据库中并未改设备在数据库中命名易于识别管理的设备名称。 6.3 上位机串口管理 上位机的可选COM口共有8个:COM1一COM8;采用基准通讯速率,以轮询方式自动查找COM口:按设备列表顺序查询设备状态,直到用其中一个COM口接收到正常反馈后,即确定使用该COM口作为工作口。 上位机应用程序的用户交互界面上开辟窗口显示COM口的工作状态和本次系统启动后通讯内容历史记录。 6.4 设备开关机管理 设备开关机参数共8B:HH1,MM1,HH2,MM2, HH3,MM3,HH4,MM4,最多允许设置2个工作时段。 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: HHn,MMn均为24小时制的BCD码;如果HH1为99H则常开,如果HH1为88H则常关。如果8个值都有效(HHn在0~23H之间,MMn在0~59H之间),则从HH1:MM1时开机,到达HH2:MM2时关机;从HH3:MM3时开机,到达HH4:MM4时关机。 如果HH1,MM1,HH2,MM2中有1个以上无效则转为常亮状态。如果 MM3,HH4,MM4中有1个以上无效则第2阶段为常亮状态。如果HH3HH3, 为77H则只有第一个设置的时间段有效,即第一阶段结束后处于常关状态。 注意: HH1:MMn1在时间上一定比HH2:MM2靠前。HH3:MMn3在时间上一定比HH4:MM4靠前。HH2:MMn2在时间上一定比HH3:MM3靠前。 6.5 信息编辑与组织 上位机应用程序通过用户交互界面进行信息的编辑与组织,需要发送的信息首先存储在二进制文件中,然后调用传输层的功能发往设备端;用户交互界面上开辟能够预览二进制文件内容的窗口。 建议用户交互界面上开辟能够模拟预览设备工作效果的窗口。 6.6 系统通讯的可靠性保障 接收端接收到正确的完整信息包后,根据命令字对信息包进行分析处理,如果命令非法反馈22H以及命令字节;如果命令合法且是需要反馈的查询命令则执行反馈任务;如果命令合法但命令本身不需要反馈,则执行命令并反馈21H以及命令字节: 21H——接收到正确信息包 22H——接收信息包命令非法 23H——信息包长度异常 24H——接收缓冲区溢出 发送端接收到反馈的22H错误码之后,通知传输层重复发送该信息包; 一个信息包发送2次都失败则启动错误处理机制或在界面上提示用户人工干预该错误的处理。 发送端接收到正确反馈则结束本任务。 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 7 范例 7.1范例约定 本节所有数据和数字都是16进制 主机地址:FFFFFFFD 设备地址:12345678 广播地址:FFFFFFEF 设备程序版本号:“DCTPV1.1” 未单独注明的场合,通讯波特率均为9600bps 7.2设置设备ID 7.2.1主机发送设置设备ID(03)命令帧 F0,F0,00,0F,F3,FF,FF,FF,EF,FF,FF,FF,FD,03,12,34,56,78,EA,F0 注:从F3异或到78得CRC码EA,从F3到EA共15B(0F) 7.2.2设备接收成功,设置新的ID后,反馈通讯接收结果(29)命令帧 F0,F0,00,0D,F3,FF,FF,FF,FD,12,34,56,78,29,21,03,F2,F0 注:从F3异或到03得CRC码F2,从F3到F2共13B(0D),21是指接收到正确 信息包,03是接收帧的命令字 7.2.3设备接收到非法命令,也要反馈通讯接收结果(29)命令帧 F0,F0,00,0D,F3,FF,FF,FF,FD,12,34,56,78,29,22,mm,nn,F0 注:从F3异或到mm得CRC码nn,从F3到nn共13B(0D),22是指接收信息 包命令非法,mm是接收到的非法命令字 7.3查询设备程序版本号 7.3.1主机发送查询设备程序版本号(12)命令帧 F0,F0, 00,0B,F3,12,34,56,78,FF,FF,FF,FD,12,EB,F0 注:从F3异或到12得CRC码EB,从F3到EB共11B(0B) 7.3.2设备接收成功,反馈设备程序版本号(22)命令帧 F0,F0, 00,13,F3,FF,FF,FF,FD,12,34,56,78,22,44,43,54,50,56,31,2E,31,A0,F0 注:从F3异或到31得CRC码A0,从F3到A0共19B(13),[44,43,54,50,56,31,2E,31] 是“DCTPV1.1”的ASCII码值 7.3.3设备接收到非法命令,也要反馈通讯接收结果(29)命令帧 F0,F0, 00,0D,F3,FF,FF,FF,FD,12,34,56,78,29,22,mm,nn,F0 注:从F3异或到mm得CRC码nn,从F3到nn共13B(0D),22是指接收信息 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 包命令非法,mm是接收到的非法命令字 7.4发送常驻信息 7.4.1发送信息 说明 关于失联党员情况说明岗位说明总经理岗位说明书会计岗位说明书行政主管岗位说明书 信息长度:4KB 信息内容:00,01,00,02,00,03…….07,FD,07,FE,07,FF 目标存储空间:034000-034FFF 正常过程: 主机发送擦除常驻信息扇区命令0B 设备反馈通讯接收结果29 主机封装信息包 主机发送通讯模式协商命令17 设备反馈通讯模式协商结果27,调整波特率 主机以新波特率逐个发送信息子包(按信息包拆分格式发送) 设备每成功收到一个信息子包后(末子包除外),以新波特率反馈通讯接收 结果29,状态为接收到正确顺序信息子包11 设备成功收到最后一个信息子包后,校验整个信息包,如果正确则以新波特 率反馈通讯接收结果29,状态为接收到正确信息包21 通讯异常的处理方式参考第4节和第5节的内容 7.4.2主机发送擦除常驻信息扇区(0B)命令帧 F0,F0,0F,F3,12,34,56,78,FF,FF,FF,FD,0B,00,03,40,00,B1,F0 注:从F3异或到00得CRC码B1,从F3到B1共15B(0F),00034000是目标存 储空间的起始地址 7.4.3设备接收成功,擦除该扇区,反馈通讯接收结果(29)命令帧 F0,F0,0D,F3,FF,FF,FF,FD,12,34,56,78,29,21,0B,FA,F0 注:从F3异或到0B得CRC码FA,从F3到FA共13B(0D),21是指接收到正 确信息包,0B是接收帧的命令字 7.4.4主机封装信息包 10,10, 12,34,56,78,FF,FF,FF,FD,07,00,03,40,00,10,00,[4KB信息内容],5E 注:从12异或到信息内容的末字节得CRC码5E,从12到5E共4112B(1010), 07是发送常驻信息命令,00034000是目标存储空间的起始地址,1000是信息 内容的长度4KB 计算得信息子包数量:(4112+117)/118取整后=35(23) loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 7.4.5主机发送通讯模式协商(17)命令帧 F0,F0,0F,F3,12,34,56,78,FF,FF,FF,FD,17,05,23,00,00,C8,F0 注:从F3异或到00得CRC码C8,从F3到C8共15B(0F),05是子包通讯速率 115200bps,23是子包数量 7.4.6设备接收成功,先反馈通讯模式协商结果(27)命令帧,然后设置新的波特率 F0,F0,0F,F3,12,34,56,78,FF,FF,FF,FD,27,05,23,00,00,F8,F0 注:从F3异或到00得CRC码F8,从F3到F8共15B(0F),05230000源自主机 发送的通讯模式协商命令帧 7.4.7主机以115200bps逐个发送信息子包(子包号=00~22) F0,F0,帧长度,子包号,帧内容,CRC码,F0 注:从子包号异或到帧内容的末字节得CRC码,从子包号到CRC码的字节数量 为帧长度,05是子包通讯速率115200bps,23是子包数量,帧内容是从主机封 装信息包的头部开始,每次截取118B,最后的子包以剩余的实际字节数为准 7.4.8设备每成功收到一个信息子包后(末子包除外),以115200bps反馈通讯接收结 果(29)命令帧 F0,F0,0D,F3,FF,FF,FF,FD,12,34,56,78,29,11, 子包号,mm,F0 注:从F3异或到子包号得CRC码mm,从F3到mm共13B(0D),11是指接收 到正确顺序信息子包 7.4.9设备成功收到最后一个信息子包后,校验整个信息包,如果正确则以115200bps 反馈通讯接收结果(29)命令帧 F0,F0,0D,F3,FF,FF,FF,FD,12,34,56,78,29,21, 07,FF,F0 注:从F3异或到07得CRC码FF,从F3到FF共13B(0D),21是指接收到正确 信息包,07是发送常驻信息命令 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: 附录1 设备参数表 设备参数共32B空间,已经定义的设备参数如下表所示: 地址 定义 备注 [00-01] 系统设置密码 密码是4位数字,如果密码是1234,则[00]位置 存储0x12,[01]位置存储0x34 [02] 亮度 0-9:0为最亮,界面提示MAX;9为最暗,界 面提示MIN [03] 屏体长度 设置数据为8-128(代表64-1024点) [04] 屏体高度 8/16/24/32点 [05] 屏体颜色 0:单色Single-color,1:双色Double-color [06] OE电平 0为低电平亮 [07] DO电平 0为595驱动 注意: 1、发送设备参数后,发送一次软件复位命令(01H) 2、设置密码用命令0DH单独发送 3、屏体亮度用命令40H单独发送 4、【屏体长度、屏体高度、屏体颜色、OE、DO】用命令02H打包发送 5、用命令10H查询设备参数时一次性返回32B,根据需要分析对应的数据内容 loan management (post) review: 1, approval criteria have been implemented; 2, the contract is correct; 3, in line with the contract, payment; 4, no other major cases against loan security;、Reviewed by: date of record form 9: qilu bank borrowing by single years of maximum amount a maximum no-loan borrowers: borrowers: ... Borrower name number, line of credit expiry date year month day to year month day maximum number of years in the loan contract are the top line opened, the borrowed and requested your bank opened credit lines above, is hereby requested. Borrower signature: date agreed to open credit lines. Customer Manager signature: date agreed to open credit lines. Loan review signature: date line cancellation-I did not use the loan amount, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature: date case, agree to write off loans. Loan review signature: date of record form 16: qilu self credit for credit card cancellation application form name of borrower ID number and credit limit expiration date year month day to year month day year contract number self-service card-I do not use credit, your bank credit lines to be cancelled. -Credit loan principal repayment, your bank credit lines to be cancelled. Borrower signature: date-unused credit lines, agree to write off loans. -Credit loan principal repayment, agree to write off loans. Customer Manager signature:
本文档为【可靠UART通讯协议2&#46;0】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_954223
暂无简介~
格式:doc
大小:87KB
软件:Word
页数:31
分类:生活休闲
上传时间:2017-09-28
浏览量:17