[go: up one dir, main page]

CN106850003A - A kind of system and method for detecting low-power consumption bluetooth proper communication - Google Patents

A kind of system and method for detecting low-power consumption bluetooth proper communication Download PDF

Info

Publication number
CN106850003A
CN106850003A CN201710049058.9A CN201710049058A CN106850003A CN 106850003 A CN106850003 A CN 106850003A CN 201710049058 A CN201710049058 A CN 201710049058A CN 106850003 A CN106850003 A CN 106850003A
Authority
CN
China
Prior art keywords
bluetooth
master
data
write
low energy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710049058.9A
Other languages
Chinese (zh)
Other versions
CN106850003B (en
Inventor
吴炜
陈海旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN201710049058.9A priority Critical patent/CN106850003B/en
Publication of CN106850003A publication Critical patent/CN106850003A/en
Application granted granted Critical
Publication of CN106850003B publication Critical patent/CN106850003B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/73Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for taking measurements, e.g. using sensing coils
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种检测低功耗蓝牙正常通信的系统及其方法。本发明的系统包括扫描低功耗蓝牙模块,显示低功耗蓝牙模块,低功耗蓝牙连接模块,通信模块。本发明方法的具体步骤为:(1)确定低功耗蓝牙通信的主端与从端;(2)建立蓝牙广播信息列表,连接蓝牙;(3)在主端输入写特征值和通知特征值;(4)主端和从端相互发送数据;(5)验证主端与从端数据是否一致;(6)判断低功耗蓝牙能否正常传输数据。本发明通过动态改变写特征值和通知特征值,可以发现本发明具有检测不同厂家生产的低功耗蓝牙是否具有正常通信功能的优点。

The invention discloses a system and a method for detecting normal communication of low-power bluetooth. The system of the invention includes a scanning low-power bluetooth module, a low-power bluetooth display module, a low-power bluetooth connection module and a communication module. The specific steps of the method of the present invention are: (1) determine the master end and the slave end of the low-power bluetooth communication; (2) establish the bluetooth broadcast information list, connect the bluetooth; (3) input the write feature value and the notification feature value at the master end ; (4) The master end and the slave end send data to each other; (5) Verify whether the master end and the slave end data are consistent; (6) Determine whether the low-power Bluetooth can transmit data normally. In the present invention, by dynamically changing the write characteristic value and the notification characteristic value, it can be found that the present invention has the advantage of detecting whether the low-power bluetooth produced by different manufacturers has a normal communication function.

Description

一种检测低功耗蓝牙正常通信的系统及其方法A system and method for detecting normal communication of low-power bluetooth

技术领域technical field

本发明属于通信技术领域,更进一步涉及电子通信技术领域中的一种检测低功耗蓝牙正常通信的系统及其方法。本发明可用于对不同厂家生产的低功耗蓝牙是否具有正常通信功能的检测。The invention belongs to the field of communication technology, and further relates to a system and method for detecting normal communication of low-power bluetooth in the field of electronic communication technology. The invention can be used to detect whether the low-power bluetooth produced by different manufacturers has a normal communication function.

背景技术Background technique

蓝牙作为一种短距离通信的方式,应用越来越广泛。特别是低功耗蓝牙在各种智能可穿戴设备上的使用。终端蓝牙作为主端,低功耗蓝牙设备作为从端,实现移动终端与低功耗蓝牙设备的通信。但是低功耗蓝牙设备在使用过程中容易损坏,现在对于蓝牙完好性的检测方法,只是单一的针对每个厂家的低功耗蓝牙设备提供对应的方法。这样就会导致操作复杂,用户使用成本提高,带来很大的不便。Bluetooth, as a short-distance communication method, is more and more widely used. Especially the use of Bluetooth Low Energy on various smart wearable devices. The terminal bluetooth is used as the master end, and the low-power bluetooth device is used as the slave end to realize the communication between the mobile terminal and the low-power bluetooth device. However, Bluetooth low-power devices are easily damaged during use. Currently, the detection method for Bluetooth integrity only provides a single method for each manufacturer's Bluetooth low-power devices. This will lead to complex operation, increased user cost, and great inconvenience.

北京清川科技有限公司在其申请的专利“一种蓝牙连接方法、蓝牙设备及系统”(申请号:201610007214.0,公开号:CN105490713A)公开了一种蓝牙连接系统,该系统包括:蓝牙设备,请求蓝牙设备。该系统存在的不足之处是:实现了主端与从端之间的数据传输,但不能适应不同的写特征值和通知特征值;Beijing Qingchuan Technology Co., Ltd. discloses a Bluetooth connection system in the patent "A Bluetooth connection method, Bluetooth device and system" (application number: 201610007214.0, publication number: CN105490713A), which includes: Bluetooth devices, Bluetooth equipment. The shortcomings of this system are: the data transmission between the master and the slave is realized, but it cannot adapt to different write characteristic values and notification characteristic values;

中科创达软件股份有限公司在其申请的专利“一种蓝牙连接的方法及装置”(申请号:201610757801.1,公开(公告)号:CN106162535A)公开了一种蓝牙连接的方法和装置。包括,启动蓝牙功能后,开始扫描周围存在的蓝牙设备,同时,判断电子设备是否存有之前连接过的蓝牙设备的标识,若判断结果为是,则说明电子设备之前连接过蓝牙设备,停止扫描。并获取电子设备之前连接过的蓝牙设备的标识,与所述之前连接过得蓝牙设备建立连接。该方法存在的不足之处是:不能动态的改变读特征值和通知特征值,由于每个厂家生产的蓝牙具有不同的读特征值和写特征值,因此只能适应单一厂家生产的蓝牙。Chuangda Software Co., Ltd. discloses a method and device for Bluetooth connection in its patent application "A Bluetooth connection method and device" (application number: 201610757801.1, publication (announcement) number: CN106162535A). Including, after starting the Bluetooth function, start to scan the Bluetooth devices that exist around, and at the same time, judge whether the electronic device has the logo of the Bluetooth device that has been connected before. If the judgment result is yes, it means that the electronic device has been connected to the Bluetooth device before, and stop scanning . And obtain the identification of the bluetooth device that the electronic device has connected before, and establish a connection with the bluetooth device that has been connected before. The disadvantage of this method is that the read characteristic value and the notification characteristic value cannot be changed dynamically, because the bluetooth produced by each manufacturer has different read characteristic values and write characteristic values, so it can only adapt to the bluetooth produced by a single manufacturer.

发明内容Contents of the invention

本发明的目的是针对上述现有技术存在的不足,提出一种检测低功耗蓝牙正常通信的系统及其方法。The object of the present invention is to propose a system and method for detecting normal communication of Bluetooth low power consumption in view of the above-mentioned deficiencies in the prior art.

本发明实现的具体思路是:通过测试终端蓝牙和被检测低功耗蓝牙设备的通信能力,判断低功耗蓝牙是否能够正常工作。由于通信功能是通过蓝牙服务的写特征值和通知特征值携带传输数据实现的,因此为了实现终端的通用性,方便用户测试,本发明实现了动态的修改写特征值和通知特征值。The specific idea of the present invention is to judge whether the low-power Bluetooth can work normally by testing the communication capabilities of the terminal Bluetooth and the detected low-power Bluetooth device. Since the communication function is realized by carrying the transmission data through the write feature value and the notification feature value of the Bluetooth service, in order to realize the versatility of the terminal and facilitate user testing, the present invention realizes the dynamic modification of the write feature value and the notification feature value.

实现本发明目的的系统包括扫描低功耗蓝牙模块、显示低功耗蓝牙模块、低功耗蓝牙连接模块、通信模块;其中:The system for realizing the object of the present invention includes a scanning low-power Bluetooth module, a low-power Bluetooth display module, a low-power Bluetooth connection module, and a communication module; wherein:

所述的扫描低功耗蓝牙模块,用于获得低功耗蓝牙的广播信息;The scanning bluetooth low power module is used to obtain the broadcast information of low power bluetooth;

所述的显示低功耗蓝牙模块,用于根据获取的低功耗蓝牙广播信息,建立低功耗蓝牙列表;The display bluetooth low power module is used to establish a low power bluetooth list according to the obtained low power bluetooth broadcast information;

所述的低功耗蓝牙连接模块,用于获得包括写特征值,通知特征值的服务信息;The low-power bluetooth connection module is used to obtain service information including writing characteristic values and notifying characteristic values;

所述的通信模块,用于主端与从端之间相互数据传输;The communication module is used for mutual data transmission between the master end and the slave end;

实现本发明目的的方法,包括如下步骤:The method for realizing the object of the present invention comprises the steps:

(1)确定通信的主、从端:(1) Determine the master and slave of the communication:

(1a)打开用于检测低功耗蓝牙的终端蓝牙,将终端蓝牙作为通信的主端;(1a) Turn on the terminal bluetooth for detecting low-power bluetooth, and use the terminal bluetooth as the master end of communication;

(1b)打开待检测的低功耗蓝牙,将低功耗蓝牙作为通信的从端;(1b) Turn on the Bluetooth low energy consumption to be detected, and use the Bluetooth low energy consumption as the slave end of the communication;

(2)获取低功耗蓝牙的广播信息:(2) Obtain the broadcast information of Bluetooth Low Energy:

主端通过调用扫描低功耗蓝牙模块,获得低功耗蓝牙的广播信息;The host obtains the broadcast information of Bluetooth Low Energy by calling and scanning the Bluetooth Low Energy module;

(3)建立低功耗蓝牙列表:(3) Create a Bluetooth Low Energy list:

主端通过调用显示低功耗蓝牙模块,根据获取的低功耗蓝牙广播信息,建立低功耗蓝牙列表;The master end calls and displays the low-power Bluetooth module, and establishes a low-power Bluetooth list according to the obtained low-power Bluetooth broadcast information;

(4)判断低功耗蓝牙列表中是否存在待检测从端的广播信息,若是,则执行步骤(5),否则执行步骤(17);(4) Judging whether there is broadcast information to be detected from the end in the low-power bluetooth list, if so, then perform step (5), otherwise perform step (17);

(5)建立低功耗蓝牙服务信息列表:(5) Establish a list of low-power Bluetooth service information:

主端通过调用低功耗蓝牙连接模块,获得包括写特征值,通知特征值的服务信息,建立包括服务信息的低功耗蓝牙服务信息列表;The master terminal obtains service information including writing characteristic values and notification characteristic values by calling the Bluetooth low energy connection module, and establishes a Bluetooth low energy service information list including service information;

(6)在主端输入写特征值;(6) Input and write characteristic values at the master end;

(7)判断低功耗蓝牙服务信息列表中是否存在主端输入的写特征值,若是,则执行步骤(9),否则,执行步骤(8);(7) Judging whether there is a write characteristic value input by the master terminal in the Bluetooth low energy service information list, if so, then perform step (9), otherwise, perform step (8);

(8)判断主端输入的写特征值是否与从端的写特征值相同,若是,则执行步骤(17),否则执行步骤(6);(8) Judging whether the write eigenvalue input by the master end is identical to the write eigenvalue of the slave end, if so, then perform step (17), otherwise perform step (6);

(9)发送携带数据的写特征值:(9) Send the write feature value carrying data:

在主端写特征值中写入需要向从端发送的数据,得到携带数据的写特征值,主端调用通信模块向从端发送携带数据的写特征值,从端从携带数据的写特征值中解析出数据;Write the data that needs to be sent to the slave in the write characteristic value of the master end, and obtain the write characteristic value carrying the data, the master end calls the communication module to send the write characteristic value carrying data to the slave end, and the slave end slaves the write characteristic value carrying data parse out the data;

(10)判断从端解析出的数据与主端发送的数据是否相同,若是,则执行步骤(11),否则执行步骤(17);(10) Judging whether the data parsed from the end is the same as the data sent by the master end, if so, step (11) is executed, otherwise step (17) is executed;

(11)在主端输入通知特征值;(11) Input the notification feature value at the master end;

(12)判断低功耗蓝牙服务信息列表中是否存在主端输入的通知特征值,若是,则执行步骤(14),否则执行步骤(13);(12) Judging whether there is a notification characteristic value input by the main terminal in the Bluetooth low energy service information list, if so, then perform step (14), otherwise perform step (13);

(13)判断主端输入的通知特征值是否与从端的通知特征值相同,若是,则执行步骤(17),否则执行步骤(11);(13) judge whether the notification characteristic value that master terminal inputs is identical with the notification characteristic value of slave end, if so, then execute step (17), otherwise execute step (11);

(14)从端往主端发送消息:(14) Send a message from the end to the master end:

主端调用通信模块向从端发送通知特征值,在从端写特征值中写入需要向主端发送的数据,得到携带数据的写特征值,从端调用通信模块向主端发送携带数据的写特征值,主端从携带数据的写特征值中解析出数据;The master end calls the communication module to send the notification feature value to the slave end, writes the data to be sent to the master end in the write feature value of the slave end, and obtains the write feature value carrying the data, and the slave end calls the communication module to send the data carrying data to the master end. Write eigenvalues, the master parses the data from the write eigenvalues carrying the data;

(15)判断主端解析出的数据与从端发送的数据是否相同,若是,则执行步骤(16),否则执行步骤(17);(15) judge whether the data analyzed by the master end is the same as the data sent from the end, if so, then perform step (16), otherwise perform step (17);

(16)从端完成了与主端之间的通信,低功耗蓝牙具有正常的通信功能;(16) The slave end has completed the communication with the master end, and the low-power bluetooth has a normal communication function;

(17)从端没有完成与主端之间的通信,低功耗蓝牙不具有正常的通信功能。(17) The slave end has not completed the communication with the master end, and the Bluetooth low energy consumption does not have a normal communication function.

与现有技术相比,本发明具有以下优点:Compared with the prior art, the present invention has the following advantages:

第一,本发明的系统通过扫描低功耗蓝牙模块,显示低功耗蓝牙模块,低功耗蓝牙连接模块,通信模块,实现了从端写特征值和通知特征值改变时,主端与从端之间的数据传输,克服了现有技术在主端与从端之间,无法适应不同的写特征值和通知特征值的数据传输的不足,使得本发明能够适应主端与不同从端之间的通信。First, the system of the present invention scans the Bluetooth low-power module to display the Bluetooth low-power module, the Bluetooth low-power connection module, and the communication module. The data transmission between the terminals overcomes the shortcomings of the existing technology between the master terminal and the slave terminal that cannot adapt to the data transmission of different write characteristic values and notification characteristic values, so that the present invention can adapt to the data transmission between the master terminal and different slave terminals. communication between.

第二,本发明的方法通过在主端输入写特征值和输入通知特征值,实现了特征值的动态改变,克服了现有技术只能适应单一厂家生产的蓝牙的不足,使得本发明能够很好的适配不同的厂家生产的从端,具有很好的通用性。Second, the method of the present invention realizes the dynamic change of the characteristic value by inputting the writing characteristic value and the input notification characteristic value at the main end, overcomes the deficiency that the prior art can only adapt to the bluetooth produced by a single manufacturer, and makes the present invention can be easily It is well adapted to slaves produced by different manufacturers and has good versatility.

附图说明Description of drawings

图1是本发明系统模块的示意图;Fig. 1 is the schematic diagram of system module of the present invention;

图2是本发明方法的流程图。Figure 2 is a flow chart of the method of the present invention.

具体实施方式detailed description

下面结合附图对本发明做进一步的详细描述。The present invention will be described in further detail below in conjunction with the accompanying drawings.

参照附图1,对本发明的系统做进一步的详细描述。Referring to accompanying drawing 1, the system of the present invention is further described in detail.

实现本发明目的的系统包括扫描低功耗蓝牙模块、显示低功耗蓝牙模块、低功耗蓝牙连接模块、通信模块。其中:The system for realizing the purpose of the present invention includes a scanning low-power bluetooth module, a low-power bluetooth display module, a low-power bluetooth connection module, and a communication module. in:

所述的扫描低功耗蓝牙模块,低功耗蓝牙在启动状态下会向周围广播信息,通过过此模块,用于获得低功耗蓝牙的广播信息,。The scanning Bluetooth low-power module, the low-power Bluetooth will broadcast information to the surroundings in the startup state, and through this module, it is used to obtain the broadcast information of the low-power Bluetooth.

所述的显示低功耗蓝牙模块,用于根据获取的低功耗蓝牙广播信息,建立低功耗蓝牙列表。低功耗蓝牙列表中包括用来进行蓝牙连接的从端硬件地址。The display bluetooth low power module is used to create a low power bluetooth list according to the obtained bluetooth low power broadcast information. The Bluetooth Low Energy list includes slave hardware addresses for Bluetooth connections.

所述的低功耗蓝牙连接模块,用于获得包括写特征值,通知特征值的服务信息,写特征值,和通知特征值是用来进行主端和从端进行数据传输的。The Bluetooth low-power connection module is used to obtain service information including the write characteristic value and the notification characteristic value. The write characteristic value and the notification characteristic value are used for data transmission between the master end and the slave end.

所述的通信模块,用于主端与从端之间相互数据传输,验证主从端传输数据的结果,可以判断数据是否能够正常传输。The communication module is used for mutual data transmission between the master end and the slave end, and verifies the data transmission result of the master end and the slave end, and can judge whether the data can be transmitted normally.

参照附图2,对本发明的方法做进一步的详细描述。With reference to accompanying drawing 2, the method of the present invention is described in further detail.

步骤1,确定通信的主、从端。Step 1, determine the master and slave of the communication.

打开用于检测低功耗蓝牙的终端蓝牙,将终端蓝牙作为通信的主端,打开待检测的低功耗蓝牙,根据低功耗蓝牙协议栈的要求,低功耗蓝牙只能作为通信的从端。Turn on the terminal Bluetooth used to detect low-power Bluetooth, use the terminal Bluetooth as the master end of communication, and turn on the low-power Bluetooth to be detected. According to the requirements of the low-power Bluetooth protocol stack, low-power Bluetooth can only be used as a communication slave end.

步骤2,获取低功耗蓝牙的广播信息。Step 2, obtain the broadcast information of Bluetooth Low Energy.

主端通过调用扫描低功耗蓝牙模块,获得从端的广播信息,广播信息中包括从端的硬件地址和从端名字,根据从端的硬件地址可以建立主端和从端的连接,为了方便我们可以借助串口助手软件作为从端数据的发送、显示界面。The master end obtains the broadcast information of the slave end by calling and scanning the low-power Bluetooth module. The broadcast information includes the hardware address and name of the slave end. According to the hardware address of the slave end, the connection between the master end and the slave end can be established. For convenience, we can use the serial port The assistant software is used as the sending and display interface of the slave data.

步骤3,建立低功耗蓝牙列表。Step 3, create a Bluetooth Low Energy list.

主端通过调用显示低功耗蓝牙模块,根据获取的低功耗蓝牙广播信息,低功耗蓝牙广播信息包含低功耗蓝牙的硬件地址,低功耗蓝牙的名字建立低功耗蓝牙列表。The master end displays the Bluetooth low energy module by calling, and establishes a Bluetooth low energy list according to the obtained Bluetooth low energy broadcast information, which includes the hardware address of Bluetooth low energy, and the name of Bluetooth low energy.

步骤4,判断低功耗蓝牙列表中是否存在待检测从端的广播信息,若是,则执行步骤5,否则执行步骤17;Step 4, determine whether there is broadcast information from the slave end to be detected in the Bluetooth low energy list, if so, perform step 5, otherwise perform step 17;

步骤5,建立低功耗蓝牙服务信息列表。Step 5, establishing a list of Bluetooth low energy service information.

主端通过调用低功耗蓝牙连接模块,当建立蓝牙之间的连接后,主端会根据从端的蓝牙自带属性,自动接收到所有的写特征值和通知特征值,此时根据得到的写特征值和通知特征值建立低功耗蓝牙服务信息列表。The master end calls the low-power Bluetooth connection module. When the connection between Bluetooth is established, the master end will automatically receive all the write characteristic values and notification characteristic values according to the slave end's own Bluetooth attributes. At this time, according to the obtained write The characteristic value and the notification characteristic value establish the Bluetooth low energy service information list.

步骤6,在主端输入写特征值,由于从端的生产厂家不同,导致不同从端拥有不同的写特征值,而主端往从端设备发送消息,是依附在写特征值上的,本发明通过动态输入写特征值使主端能够适配所有的从端。Step 6, input the write feature value at the master end, because the manufacturers of the slave end are different, different slave ends have different write feature values, and the message sent from the master end to the slave end device is attached to the write feature value, the present invention Writing characteristic values via dynamic input enables the master to adapt to all slaves.

步骤7,判断低功耗蓝牙服务信息列表中是否存在主端输入的写特征值,若是,则执行步骤9,否则,执行步骤8。Step 7. Determine whether there is a write characteristic value input by the master in the Bluetooth low energy service information list. If yes, perform step 9; otherwise, perform step 8.

步骤8,判断主端输入的写特征值是否与从端的写特征值相同,若是,则执行步骤17,否则执行步骤6。Step 8, judging whether the write characteristic value input by the master end is the same as that of the slave end, if yes, execute step 17, otherwise execute step 6.

步骤9,发送携带数据的写特征值。Step 9, sending the write characteristic value carrying the data.

因为主端与从端设备的通信是通过写特征值携带传输数据实现的,因此为了验证从端设备的是否能够与主端完成数据传输,在主端写特征值中写入需要向从端设备发送的数据,向从端设备发送写特征值,通过蓝牙的无线传输数据,在从端设备中解析写特征值中携带的数据,此时就会在串口助手软件上显示出从端设备接收的数据。Because the communication between the master end and the slave end device is realized by writing the characteristic value to carry the transmission data, so in order to verify whether the slave end device can complete the data transmission with the master end, writing in the master end write characteristic value needs to write to the slave end device Send the data, send the write feature value to the slave device, transmit the data wirelessly through Bluetooth, analyze the data carried in the write feature value in the slave device, and then display the data received by the slave device on the serial port assistant software. data.

步骤10,判断从端解析出的数据与主端发送的数据是否相同,若是,则执行步骤11,否则执行步骤17。Step 10, judge whether the data parsed from the slave end is the same as the data sent by the master end, if yes, execute step 11, otherwise execute step 17.

步骤11,在主端输入通知特征值,由于从端的生产厂家不同,导致不同从端拥有不同的通知特征值,而从端往主端发送消息,是依附在写特征值上的,本发明通过动态输入通知特征值使主端能够适配所有的从端。Step 11, input the notification feature value at the master end, because the manufacturers of the slave end are different, different slave ends have different notification feature values, and the message sent from the end to the master end is attached to the write feature value, the present invention passes The dynamic input notification feature enables the master to adapt to all slaves.

步骤12,判断低功耗蓝牙服务信息列表中是否存在主端输入的通知特征值,若是,则执行步骤14,否则执行步骤13。Step 12, judge whether there is a notification characteristic value input by the master in the Bluetooth low energy service information list, if yes, execute step 14, otherwise execute step 13.

步骤13,判断主端输入的通知特征值是否与从端的通知特征值相同,若是,则执行步骤17,否则执行步骤11。Step 13, judging whether the notification feature value input by the master terminal is the same as the notification feature value of the slave terminal, if yes, go to step 17, otherwise go to step 11.

步骤14,从端往主端发送消息。Step 14, the slave end sends a message to the master end.

在主端向从端设备发送通知特征值,使主端能够接收从端的通知。在串口助手软件上写入需要向主端发送的数据,通过蓝牙的无线传输,在主端解析写特征值中携带的从端设备的传输数据。The master end sends the notification characteristic value to the slave end device, so that the master end can receive the notification from the slave end. Write the data that needs to be sent to the master on the serial port assistant software, and through Bluetooth wireless transmission, analyze and write the transmission data of the slave device carried in the characteristic value on the master.

步骤15,判断主端解析出的数据与从端发送的数据是否相同,若是,则执行步骤16,否则执行步骤17。Step 15, judge whether the data parsed by the master end is the same as the data sent by the slave end, if yes, execute step 16, otherwise execute step 17.

步骤16,从端完成了与主端之间的通信,低功耗蓝牙具有正常的通信功能;Step 16, the slave end has completed the communication with the master end, and the Bluetooth low energy consumption has normal communication functions;

步骤17,从端没有完成与主端之间的通信,低功耗蓝牙不具有正常的通信功能。Step 17, the slave end has not completed the communication with the master end, and the Bluetooth low energy consumption does not have a normal communication function.

Claims (3)

1.一种检测低功耗蓝牙正常通信的系统,包括扫描低功耗蓝牙模块、显示低功耗蓝牙模块、低功耗蓝牙连接模块、通信模块;其中:1. A system for detecting normal communication of Bluetooth Low Energy, including scanning Bluetooth Low Energy modules, displaying Bluetooth Low Energy modules, Bluetooth Low Energy connection modules, and communication modules; wherein: 所述的扫描低功耗蓝牙模块,用于主端扫描从端,获得低功耗蓝牙的广播信息;The scanning bluetooth low power module is used for the main end to scan the slave end to obtain the broadcast information of low power bluetooth; 所述的显示低功耗蓝牙模块,用于根据获取的低功耗蓝牙广播信息,建立低功耗蓝牙列表;The display bluetooth low power module is used to establish a low power bluetooth list according to the obtained low power bluetooth broadcast information; 所述的低功耗蓝牙连接模块,用于获得包括写特征值,通知特征值的服务信息;The low-power bluetooth connection module is used to obtain service information including writing characteristic values and notifying characteristic values; 所述的通信模块,用于主端与从端之间相互数据传输。The communication module is used for mutual data transmission between the master end and the slave end. 2.一种检测低功耗蓝牙正常通信的方法,包括如下步骤:2. A method for detecting normal communication of bluetooth low power consumption, comprising the steps of: (1)确定通信的主、从端:(1) Determine the master and slave of the communication: (1a)打开用于检测低功耗蓝牙的终端蓝牙,将终端蓝牙作为通信的主端;(1a) Turn on the terminal bluetooth for detecting low-power bluetooth, and use the terminal bluetooth as the master end of communication; (1b)打开待检测的低功耗蓝牙,将低功耗蓝牙作为通信的从端;(1b) Turn on the Bluetooth low energy consumption to be detected, and use the Bluetooth low energy consumption as the slave end of the communication; (2)获取低功耗蓝牙的广播信息:(2) Obtain the broadcast information of Bluetooth Low Energy: 主端通过调用扫描低功耗蓝牙模块,获得低功耗蓝牙的广播信息;The host obtains the broadcast information of Bluetooth Low Energy by calling and scanning the Bluetooth Low Energy module; (3)建立低功耗蓝牙列表:(3) Create a Bluetooth Low Energy list: 主端通过调用显示低功耗蓝牙模块,根据获取的低功耗蓝牙广播信息,建立低功耗蓝牙列表;The master end calls and displays the low-power Bluetooth module, and establishes a low-power Bluetooth list according to the obtained low-power Bluetooth broadcast information; (4)判断低功耗蓝牙列表中是否存在待检测从端的广播信息,若是,则执行步骤(5),否则执行步骤(17);(4) Judging whether there is broadcast information to be detected from the end in the Bluetooth low energy list, if so, then perform step (5), otherwise perform step (17); (5)建立低功耗蓝牙服务信息列表:(5) Establish a list of low-power Bluetooth service information: 主端通过调用低功耗蓝牙连接模块,获得包括写特征值,通知特征值的服务信息,建立包括服务信息的低功耗蓝牙服务信息列表;The master end obtains service information including writing characteristic values and notification characteristic values by calling the Bluetooth low energy connection module, and establishes a Bluetooth low energy service information list including service information; (6)在主端输入写特征值;(6) Input and write characteristic values at the master end; (7)判断低功耗蓝牙服务信息列表中是否存在主端输入的写特征值,若是,则执行步骤(9),否则,执行步骤(8);(7) Judging whether there is a write characteristic value input by the master terminal in the Bluetooth low energy service information list, if so, then perform step (9), otherwise, perform step (8); (8)判断主端输入的写特征值是否与从端的写特征值相同,若是,则执行步骤(17),否则执行步骤(6);(8) Judging whether the write eigenvalue input by the master end is identical to the write eigenvalue of the slave end, if so, then perform step (17), otherwise perform step (6); (9)发送携带数据的写特征值:(9) Send the write feature value carrying data: 在主端写特征值中写入需要向从端发送的数据,得到携带数据的写特征值,主端调用通信模块向从端发送携带数据的写特征值,从端从携带数据的写特征值中解析出数据;Write the data that needs to be sent to the slave in the write characteristic value of the master end, and obtain the write characteristic value carrying the data. parse out the data; (10)判断从端解析出的数据与主端发送的数据是否相同,若是,则执行步骤(11),否则执行步骤(17);(10) Judging whether the data parsed from the end is the same as the data sent by the master end, if so, then perform step (11), otherwise perform step (17); (11)在主端输入通知特征值;(11) Input the notification feature value at the master end; (12)判断低功耗蓝牙服务信息列表中是否存在主端输入的通知特征值,若是,则执行步骤(14),否则执行步骤(13);(12) Judging whether there is a notification characteristic value input by the main terminal in the Bluetooth low energy service information list, if so, then perform step (14), otherwise perform step (13); (13)判断主端输入的通知特征值是否与从端的通知特征值相同,若是,则执行步骤(17),否则执行步骤(11);(13) judge whether the notification characteristic value that master terminal inputs is identical with the notification characteristic value of slave end, if so, then execute step (17), otherwise execute step (11); (14)从端往主端发送消息:(14) Send a message from the end to the master end: 主端调用通信模块向从端发送通知特征值,在从端写特征值中写入需要向主端发送的数据,得到携带数据的写特征值,从端调用通信模块向主端发送携带数据的写特征值,主端从携带数据的写特征值中解析出数据;The master end calls the communication module to send the notification feature value to the slave end, writes the data to be sent to the master end in the write feature value of the slave end, and obtains the write feature value carrying the data, and the slave end calls the communication module to send the data carrying data to the master end. Write eigenvalues, the master parses the data from the write eigenvalues carrying the data; (15)判断主端解析出的数据与从端发送的数据是否相同,若是,则执行步骤(16),否则执行步骤(17);(15) judge whether the data analyzed by the master end is the same as the data sent from the end, if so, then perform step (16), otherwise perform step (17); (16)从端完成了与主端之间的通信,低功耗蓝牙具有正常的通信功能;(16) The slave end has completed the communication with the master end, and the low-power bluetooth has a normal communication function; (17)从端没有完成与主端之间的通信,低功耗蓝牙不具有正常的通信功能。(17) The slave end has not completed the communication with the master end, and the Bluetooth low energy consumption does not have a normal communication function. 3.根据权利要求2所述的一种检测低功耗蓝牙正常通信功能的方法,其特征在于,步骤(2)、步骤(3)中所述的低功耗蓝牙广播信息包含低功耗蓝牙的硬件地址,低功耗蓝牙的名字。3. a kind of method for detecting bluetooth low power consumption normal communication function according to claim 2, is characterized in that, the bluetooth low power consumption broadcast information described in step (2), step (3) comprises bluetooth low power consumption The hardware address of the Bluetooth Low Energy name.
CN201710049058.9A 2017-01-23 2017-01-23 A system and method for detecting normal communication of low-power bluetooth Expired - Fee Related CN106850003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710049058.9A CN106850003B (en) 2017-01-23 2017-01-23 A system and method for detecting normal communication of low-power bluetooth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710049058.9A CN106850003B (en) 2017-01-23 2017-01-23 A system and method for detecting normal communication of low-power bluetooth

Publications (2)

Publication Number Publication Date
CN106850003A true CN106850003A (en) 2017-06-13
CN106850003B CN106850003B (en) 2019-06-21

Family

ID=59119702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710049058.9A Expired - Fee Related CN106850003B (en) 2017-01-23 2017-01-23 A system and method for detecting normal communication of low-power bluetooth

Country Status (1)

Country Link
CN (1) CN106850003B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181649A (en) * 2017-06-13 2017-09-19 西安电子科技大学 The intelligent domestic system and communication means of multiuser to remotely control
CN108769972A (en) * 2018-07-12 2018-11-06 南昌黑鲨科技有限公司 The connection control method and bluetooth connection control system of intelligent terminal and bluetooth equipment
CN110753312A (en) * 2019-10-25 2020-02-04 深圳传音控股股份有限公司 Data sharing method, device and system and computer readable storage medium
CN115065930A (en) * 2022-06-16 2022-09-16 上海乐橘碳蚁科技有限公司 Tray stack detection system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110159813A1 (en) * 2009-12-24 2011-06-30 Sony Computer Entertainment Inc. Wireless Device Pairing and Grouping Methods
CN104540190A (en) * 2014-12-30 2015-04-22 广州视源电子科技股份有限公司 Method and system for pairing with Bluetooth device
CN105490713A (en) * 2015-09-30 2016-04-13 北京清川科技有限公司 Bluetooth connection method, Bluetooth device and system
CN106162535A (en) * 2016-08-29 2016-11-23 中科创达软件股份有限公司 The method and device that a kind of bluetooth connects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110159813A1 (en) * 2009-12-24 2011-06-30 Sony Computer Entertainment Inc. Wireless Device Pairing and Grouping Methods
CN104540190A (en) * 2014-12-30 2015-04-22 广州视源电子科技股份有限公司 Method and system for pairing with Bluetooth device
CN105490713A (en) * 2015-09-30 2016-04-13 北京清川科技有限公司 Bluetooth connection method, Bluetooth device and system
CN106162535A (en) * 2016-08-29 2016-11-23 中科创达软件股份有限公司 The method and device that a kind of bluetooth connects

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181649A (en) * 2017-06-13 2017-09-19 西安电子科技大学 The intelligent domestic system and communication means of multiuser to remotely control
CN108769972A (en) * 2018-07-12 2018-11-06 南昌黑鲨科技有限公司 The connection control method and bluetooth connection control system of intelligent terminal and bluetooth equipment
CN108769972B (en) * 2018-07-12 2020-10-13 南昌黑鲨科技有限公司 A connection control method and a Bluetooth connection control system between an intelligent terminal and a Bluetooth device
CN110753312A (en) * 2019-10-25 2020-02-04 深圳传音控股股份有限公司 Data sharing method, device and system and computer readable storage medium
CN115065930A (en) * 2022-06-16 2022-09-16 上海乐橘碳蚁科技有限公司 Tray stack detection system and method
CN115065930B (en) * 2022-06-16 2024-03-19 上海乐橘碳蚁科技有限公司 Tray stacking detection system and method

Also Published As

Publication number Publication date
CN106850003B (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN112911556B (en) Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
US10666785B2 (en) Bluetooth communication method and device
CN105848196A (en) NFC bluetooth adapter and bluetooth product test system and test method
CN103684500B (en) Pairing method of wireless transmitting terminal and wireless receiving terminal and related device
WO2020010676A1 (en) Bluetooth pairing method and system
CN110519741B (en) Bluetooth connection method and system
CN106850003A (en) A kind of system and method for detecting low-power consumption bluetooth proper communication
WO2015103886A1 (en) Numerical value transferring method, terminal, server, and system
CN101340459A (en) A remote control method based on bluetooth
TW201608923A (en) Method for processing network connection with an electronic device and the electronic device
WO2019128179A1 (en) Method and apparatus for data transmission between mobile terminals, and mobile terminal
CN106453906A (en) External device, data transmission method, device and system
US20130023231A1 (en) Sim card expander, communication system, and method for using sim cards
CN108650335A (en) Method, device and testing equipment for communication connection with mobile terminal to be tested
US20210133135A1 (en) Nfc pressure test method and system based on mobile terminal and storage device
TW201019625A (en) Slave device fitting bluetooth communication protocol and communication connecting method
WO2020151559A1 (en) Capability information reporting method, precoding matrix indicator feedback method and communication device
CN209982732U (en) Earphone test system
CN104702678B (en) Document transmission method and device
CN110022551A (en) A kind of information interacting method and terminal device
CN106714279A (en) A hotspot network switching method and terminal equipment
CN106851537A (en) The system and method that one terminal Bluetooth is connected with multiple low-power consumption bluetooths
CN105635873A (en) NFC bluetooth earphone and system, and control method thereof
CN108811037A (en) A kind of data transmission method and communication equipment
CN110849407B (en) Sensor testing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190621