The invention provides a Bluetooth terminal device detecting method, a device and a system thereof. The detection method of Bluetooth terminal equipment comprises the following steps: detecting the Bluetooth terminal equipment through the serial port to send data; the response data received back Bluetooth terminal equipment, data terminal equipment for Bluetooth in response to determine their own serial detection mode, the detection data of the serial port to receive data sent by host computer; judging test data and response when the data is consistent, consistent, determine the Bluetooth terminal equipment is normal, otherwise, the abnormality of the Bluetooth serial terminal equipment. The present invention by detecting the transmitted data comparison and response data returned is consistent to determine the Bluetooth terminal serial port is normal, the invention can in the Bluetooth terminal device and printer continuously under the condition of power on the serial port of the operating state of the detection, the exception will not damage the hardware environment, can better detect abnormal.
【技术实现步骤摘要】
蓝牙终端设备接口故障检测方法、装置及系统
本专利技术涉及检测
,具体而言,涉及一种蓝牙终端设备接口故障检测方法、装置及系统。
技术介绍
蓝牙终端设备是手机、PAD等手持设备与打印机进行通信的中间设备,该蓝牙终端设备内部设置有处理器和蓝牙模块,对外设置有两个串口和一个并口,其结构如图1所示,两个串口分别为蓝牙串口和配置串口,其中蓝牙串口主要与蓝牙模块进行连接,接收来自蓝牙的数据,手机、PAD等手持设备通过蓝牙模块与该蓝牙终端设备进行通信;在初始的调试阶段,调试板通过配置串口与蓝牙终端设备进行连接,用于前期的调试过程中对蓝牙进行一些参数配置,如波特率等。打印机通过并口与该蓝牙终端模块进行连接,并通过并口向打印机输出待打印数据,该蓝牙终端设备由打印机直接供电。一般而言,蓝牙终端设备与安装在手持设备上的软件需要进行绑定,因此两者之间的数据通信需要设计一套加密协议,协议格式一般如图2所示,命令源表示数据的传输方向,如是从手持开票设备到蓝牙终端设备还是从蓝牙终端设备到手持开票端;命令类型表示消息处理结果是否异常;命令字包括校验数据报文命令、打印数据报文命令和打印数据结束报文。手持设备通过蓝牙终端设备操纵打印机的打印流程如图3所示,具体为:手持设备首先发送校验数据报文,该数据报文为手持设备和蓝牙终端设备间实现约定的加密数据,蓝牙终端设备接收到数据校验后进行验证,若验证通过,则返回手持设备校验通过的响应;手持设备接收到该校验响应后,发送封装后的打印数据报文,蓝牙终端设备接收到打印数据报文后,解析出实际的打印数据,通过并口转发到打印机进行打印。待所有打印作业打印结束后 ...
【技术保护点】
一种蓝牙终端设备接口故障检测方法,其特征在于,应用于上位机,包括如下步骤: 通过串口向蓝牙终端设备发送检测数据; 接收所述蓝牙终端设备返回的响应数据,其中,所述响应数据为所述蓝牙终端设备在确定自身采用串口检测模式时,采用接收检测数据的串口向所述上位机发送的数据; 判断所述检测数据及所述响应数据是否一致,当一致时,确定所述蓝牙终端设备的该串口正常,否则,确定该蓝牙终端设备的该串口异常。
【技术特征摘要】
1.一种蓝牙终端设备接口故障检测方法,其特征在于,应用于上位机,包括如下步骤:通过串口向蓝牙终端设备发送检测数据;接收所述蓝牙终端设备返回的响应数据,其中,所述响应数据为所述蓝牙终端设备在确定自身采用串口检测模式时,采用接收检测数据的串口向所述上位机发送的数据;判断所述检测数据及所述响应数据是否一致,当一致时,确定所述蓝牙终端设备的该串口正常,否则,确定该蓝牙终端设备的该串口异常。2.根据权利要求1所述的蓝牙终端设备接口故障检测方法,其特征在于,所述方法还包括:接收打印机的输出数据;其中,所述输出数据为所述串口正常时,所述蓝牙终端设备将所述检测数据通过并口发送给打印机后该打印机输出的数据;判断所述检测数据及所述输出数据是否一致,当一致时,确定所述蓝牙终端设备的并口正常,否则,确定该蓝牙终端设备的并口异常。3.根据权利要求1或2所述的蓝牙终端设备接口故障检测方法,其特征在于,所述串口包括蓝牙串口和配置串口。4.一种蓝牙终端设备接口故障检测装置,其特征在于,包括:发送模块,用于通过串口向蓝牙终端设备发送检测数据;接收模块,用于接收所述蓝牙终端设备返回的响应数据,其中,所述响应数据为所述蓝牙终...
【专利技术属性】
技术研发人员:胡金辉,高志刚,廖峰,李毅,赵轶民,贺正林,王俊杰,
申请(专利权)人:航天信息股份有限公司,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。