A kind of blue-teeth communication equipment

文档序号:1774967 发布日期:2019-12-03 浏览:9次 中文

阅读说明:本技术 一种蓝牙通讯装置 (A kind of blue-teeth communication equipment ) 是由 牟起航 于 2019-09-02 设计创作,主要内容包括:本发明实施例公开了一种蓝牙通讯装置,包括:蓝牙模块,蓝牙模块用于根据第一蓝牙信息进行蓝牙配置,并发送第二蓝牙信息;主控模块以及与主控模块电连接的第一通讯单元,主控模块用于根据外部命令生成第一蓝牙信息并传输至蓝牙模块,还用于接收第二蓝牙信息并在检测到第二蓝牙信息中包含上报信息时通过第一通讯单元向外部设备输出上报信息。本发明实施例中,蓝牙模块可以主动向主控模块发送安全信息且主控模块通过第一通讯单元向外部设备上报安全信息,显然,该蓝牙通讯装置可以主动上报安全信息,适用于安全连接方式;主控模块无需采用蓝牙通讯方式向外部设备上报安全信息,其内也不需要集成蓝牙通讯协议,降低了蓝牙通讯装置的开发要求。(The embodiment of the invention discloses a kind of blue-teeth communication equipments, comprising: bluetooth module, bluetooth module is used to carry out bluetooth configuration according to the first Bluetooth information, and sends the second Bluetooth information;Main control module and the first communication unit being electrically connected with main control module, main control module is used to generate the first Bluetooth information according to external command and is transmitted to bluetooth module, is also used to receive the second Bluetooth information and in detecting the second Bluetooth information comprising reporting information to external equipment output by the first communication unit when reporting information.In the embodiment of the present invention, bluetooth module actively can send security information to main control module and main control module reports security information to external equipment by the first communication unit, obviously, which can be suitable for safe connection mode with active reporting security information;Main control module reports security information to external equipment without bluetooth communication mode, does not also need integrated bluetooth communication agreement inside, reduces the exploitation requirement of blue-teeth communication equipment.)

1. a kind of blue-teeth communication equipment characterized by comprising

Bluetooth module, the bluetooth module is used to carry out bluetooth configuration according to the first Bluetooth information, and sends the second Bluetooth information;

The main control module being electrically connected with the bluetooth module and the first communication unit being electrically connected with the main control module, it is described Main control module is used to generate first Bluetooth information according to external command and is transmitted to the bluetooth module, is also used to receive institute State the second Bluetooth information and in detecting second Bluetooth information comprising passing through first communication unit when reporting information Information is reported to described in external equipment output.

2. blue-teeth communication equipment according to claim 1, which is characterized in that the main control module be used for receive it is described The first new Bluetooth information is retransmited after second Bluetooth information.

3. blue-teeth communication equipment according to claim 1, which is characterized in that the communications protocol of first communication unit is Asynchronous serial port communications protocol.

4. blue-teeth communication equipment according to claim 1, which is characterized in that first Bluetooth information includes configuration bluetooth At least one of order, Bluetooth connection command and transmission data command;

Second Bluetooth information includes Bluetooth feedback information and reports at least one of information.

5. blue-teeth communication equipment according to claim 1, which is characterized in that the main control module is micro-control unit MCU.

6. blue-teeth communication equipment according to claim 5, which is characterized in that the main control module includes low-power consumption pin, The current potential that the main control module is used to draw high the low-power consumption pin passes through first communication unit again and exports to external equipment It is described to report information, be also used to it is described report information output to complete after drag down the current potential of the low-power consumption pin.

7. blue-teeth communication equipment according to claim 6, which is characterized in that the main control module is for drawing high the low function It consumes the current potential of pin and keeps at least 5ms.

Technical field

The present embodiments relate to Bluetooth technology more particularly to a kind of blue-teeth communication equipments.

Background technique

Bluetooth technology is the global specifications of a kind of wireless data and voice communication opening, it is the short distance based on low cost It is wirelessly connected, is connected for the special near radio technology of fixed one kind for establishing communication environment with mobile device.Bluetooth makes the present It some portable mobile equipments and computer equipment, which can not need cable, just can connect to internet, and can wirelessly connect Enter internet.

The equipment for being integrated with bluetooth communication agreement, the control method for the bluetooth module being provided with can be AT command set mould Formula.In AT command set mode, the bluetooth module of equipment, which can receive instruction or data, bluetooth module, to be referred to based on the received It enables or data carries out information response.

However, the bluetooth module of equipment does not have the channel of active return instruction under AT command set mode, connect in bluetooth security In the agreement connect, the bluetooth module of equipment is some security information that report for needing active, therefore existing bluetooth module is only Suitable under unsecured connections mode.

Summary of the invention

The embodiment of the present invention provides a kind of blue-teeth communication equipment, to solve the problems, such as the secure connection of bluetooth equipment.

The embodiment of the invention provides a kind of blue-teeth communication equipments, comprising:

Bluetooth module, the bluetooth module is used to carry out bluetooth configuration according to the first Bluetooth information, and sends the second bluetooth Information;

The main control module being electrically connected with the bluetooth module and the first communication unit being electrically connected with the main control module, The main control module is used to generate first Bluetooth information according to external command and is transmitted to the bluetooth module, is also used to connect Receive second Bluetooth information and in detecting second Bluetooth information comprising communicating when reporting information by described first Unit reports information to described in external equipment output.

Further, the main control module after receiving second Bluetooth information for retransmiting the first new bluetooth Information.

Further, the communications protocol of first communication unit is asynchronous serial port communications protocol.

Further, first Bluetooth information includes configuration Bluetooth command, Bluetooth connection command and sends data command At least one of;

Second Bluetooth information includes Bluetooth feedback information and reports at least one of information.

Further, the main control module is micro-control unit MCU.

Further, the main control module includes low-power consumption pin, and the main control module draws for drawing high the low-power consumption The current potential of foot reports information to described in external equipment output by first communication unit again, is also used to report information described Output drags down the current potential of the low-power consumption pin after completing.

Further, the main control module is used to draw high the current potential of the low-power consumption pin and keeps at least 5ms.

Blue-teeth communication equipment provided in an embodiment of the present invention, main control module and bluetooth module carry out communication and realize bluetooth module Configuration, while bluetooth module can actively to main control module send security information and main control module by the first communication unit to External equipment reports security information, it is clear that the blue-teeth communication equipment has the channel of active return instruction or data, can be actively Security information is reported, therefore blue-teeth communication equipment can be compatible with bluetooth security connection protocol, is suitable for safe connection mode.Separately On the one hand, main control module reports security information to external equipment by the first communication unit, without bluetooth communication mode to External equipment reports security information, therefore integrated bluetooth communication agreement is not needed in main control module, reduces blue-teeth communication equipment Exploitation requirement.

Detailed description of the invention

In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to do one simply to introduce, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.

Fig. 1 is a kind of schematic diagram of blue-teeth communication equipment provided in an embodiment of the present invention.

Specific embodiment

To make the object, technical solutions and advantages of the present invention clearer, hereinafter with reference to attached in the embodiment of the present invention Figure, clearly and completely describes technical solution of the present invention by embodiment, it is clear that described embodiment is the present invention one Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.

Refering to what is shown in Fig. 1, being a kind of schematic diagram of blue-teeth communication equipment provided in an embodiment of the present invention.The present embodiment provides Blue-teeth communication equipment include: bluetooth module 1, bluetooth module 1 is used to carry out bluetooth configuration according to the first Bluetooth information, and sends Second Bluetooth information;The main control module 2 being electrically connected with bluetooth module 1 and the first communication unit being electrically connected with main control module 2 3, main control module 2 is used to generate the first Bluetooth information according to external command and is transmitted to bluetooth module 1, is also used to receive the second indigo plant Tooth information is simultaneously exported comprising passing through the first communication unit 3 when reporting information to external equipment 4 in detecting the second Bluetooth information Report information.

In the present embodiment, optional blue-teeth communication equipment is configurable in bluetooth U-shield, alternatively, blue-teeth communication equipment is configurable In mobile phone card-brushing machine Mpos, alternatively, blue-teeth communication equipment is configurable in electronic-parking charging system ETC.In other implementations In example, blue-teeth communication equipment be may also be disposed in other Bluetooth systems, in the present invention without specifically limiting.

In the present embodiment, external equipment 4 to main control module 2 transmit external command, this external equipment 4 can be independently of The external equipment of blue-teeth communication equipment, blue-teeth communication equipment and the electrical connection of external equipment 4 or communication, external equipment 4 is to bluetooth Communication device sends order or data;External equipment 4, which can also be, to be integrated in blue-teeth communication equipment, external equipment 4 and master control It is communicated between module 2, realizes the blue tooth communication function of blue-teeth communication equipment.

In the present embodiment, blue-teeth communication equipment includes bluetooth module 1, main control module 2 and the first communication unit 3, bluetooth mould It is communicated between block 1 and main control module 2.Main control module 2 generates the first Bluetooth information according to external command and is sent to bluetooth Module 1.It is appreciated that the information that main control module 2 is sent to bluetooth module 1 is named as the first Bluetooth information, first bluetooth Information, which can be instruction and be also possible to data, can also be instruction+data.

Bluetooth module 1 carries out bluetooth configuration according to the first Bluetooth information, and sends the second Bluetooth information.Specifically, bluetooth Module 1 receives and carries out bluetooth configuration, after the completion of configuration, 1 meeting of bluetooth module according to the first Bluetooth information after the first Bluetooth information The status feedback information about bluetooth configuration is sent to main control module 2.In other cases, bluetooth module 1 can also actively to Main control module 2 sends information, such as reports security information.It is appreciated that the information that bluetooth module 1 is sent to main control module 2 is equal It is named as the second Bluetooth information, which can be instruction and/or data.Obviously, bluetooth module 1 can actively to Main control module 2 sends the second Bluetooth information for having security information.

The content that the second Bluetooth information can be obtained after the second Bluetooth information of reception of main control module 2, if the second Bluetooth information Interior carrying is feedback of the bluetooth module 1 to bluetooth configuration, and main control module 2 can determine indigo plant according to the second Bluetooth information at this time The bluetooth configuration situation of tooth module 1.If carrying the security information that bluetooth module 1 reports in the second Bluetooth information, lead at this time Control module 2 can determine that bluetooth module 1 will report security information according to the second Bluetooth information, and main control module 2 exports this and reports safety Information.

First communication unit 3 is electrically connected with main control module 2, and main control module 2 is in detecting the second Bluetooth information comprising upper The security information can be exported to external equipment 4 by the first communication unit 3 when security information by reporting.Bluetooth module 1 can actively to Main control module 2 sends security information, which can be instruction or data, specifically, main control module 2 passes through the first communication Unit 3 exports the security information that bluetooth module 1 uploads.

The communications protocol of optional first communication unit 3 is asynchronous serial port communications protocol UART.UART communication protocol be by The data to be transmitted is converted between serial communication and parallel communications, is parallel input signal to be changed into Serial output letter Number chip, can be integrated in the connection of other communication interfaces.The model YC-DM1000 of optional first communication unit 3. First communication unit 3 is chosen as an individual chips, is external in the communication interface of main control module 3.

Optional first Bluetooth information includes configuration Bluetooth command, Bluetooth connection command and sends in data command at least It is a kind of;Second Bluetooth information includes Bluetooth feedback information and reports at least one of information.It is appreciated that heretofore described The relevant information for reporting information to refer to that bluetooth module is reported by main control module to external equipment, including but not limited to bluetooth Secure connection information.In the present embodiment, the first Bluetooth information that main control module 2 is sent to bluetooth module 1 is that configuration bluetooth is related Information, such as Bluetooth connection command.The second Bluetooth information that bluetooth module 1 is sent to main control module 2 is Bluetooth status information The response of bluetooth module 1 after executing the first Bluetooth information.In addition, bluetooth module 1 can also active reporting security information etc.. Information is reported to specifically refer to report security information herein.

Optional main control module is micro-control unit MCU.MCU has the advantages such as miniature, computing capability is strong.Bluetooth module is It is integrated with the chip or device of Bluetooth protocol, in the present invention without specifically limiting.

Blue-teeth communication equipment provided in this embodiment, main control module carry out communication with bluetooth module and realize matching for bluetooth module It sets, while bluetooth module actively can send security information to main control module and main control module passes through the first communication unit to outside Equipment reports security information, it is clear that compared with existing AT command set mode, the blue-teeth communication equipment of the present embodiment has actively The channel of return instruction or data, can be with active reporting security information, therefore blue-teeth communication equipment can be connect with bluetooth security Protocol-compliant is suitable for safe connection mode.On the other hand, main control module reports peace to external equipment by the first communication unit Full information reports security information to external equipment without bluetooth communication mode, therefore integrated indigo plant is not needed in main control module Tooth communications protocol reduces the exploitation requirement of blue-teeth communication equipment.

Illustratively, based on the above technical solution, optional main control module is for receiving the second Bluetooth information The first new Bluetooth information is retransmited afterwards.

In the present embodiment, blue-teeth communication equipment using bluetooth HCI instruction format between main control module and bluetooth module into The transmission of row the first Bluetooth information and the second Bluetooth information.The first Bluetooth information that main control module is sent to bluetooth module is order Packet, can also be referred to as CMD, the operation information that main control module is handed down in bluetooth module, i.e. main control module are carried in the CMD By operating the configuration Bluetooth operation of bluetooth module completion and external equipment, control bluetooth connection to bluetooth module transmission CMD, Send the operation such as data.The second Bluetooth information that bluetooth module is sent to main control module is event package, can also be referred to as Carry the feedback information that bluetooth module is reported to main control module in EVENT, the EVENT, bluetooth module by send EVENT come It completes to notify the operation such as bluetooth state variation, reported data to main control module.Optional command packet and the equal small end transmission of event package, i.e., Low byte first transmits in communication process.

Specifically, after bluetooth module receives each CMD of main control module, operation entrained in CMD is executed, and to master It controls module and replys an EVENT corresponding with the CMD, bluetooth module is to the instruction format for the EVENT that main control module is sent HCI_EVENT_CMD_COMPLETE.It is appreciated that main control module send CMD after should wait one it is corresponding with the CMD EVENT retransmits new CMD after receiving this EVENT.

In addition, bluetooth module actively can also send EVENT to main control module.For example, blue-teeth communication equipment powers on, then it is blue Tooth module executes powerup/reset initialization operation, and actively sends HCI_ to main control module after the completion of powerup/reset initialization EVENT_I_AM_READY, main control module receives bluetooth module powerup/reset is determined according to its command content after the EVENT at the beginning of Beginningization is completed and is ready to start to work.Then, main control module can send first to bluetooth module according to the EVENT A CMD.Obviously, each CMD has corresponding EVENT, but bluetooth module can actively be sent to main control module EVENT。

Optional main control module includes low-power consumption pin, and the current potential that main control module is used to draw high low-power consumption pin passes through the again One communication unit reports information to external equipment output, is also used to drag down low-power consumption pin after reporting information output to complete Current potential.Optional main control module is used to draw high the current potential of low-power consumption pin and keeps at least 5ms.

In the present embodiment, before main control module sends security information by the first communication unit, it is necessary to assure " low-power consumption is drawn 5ms or more is drawn high and kept to the current potential of foot ", can drag down after being sent.So realize the security information to bluetooth module Report.

Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts, be combined with each other and substitutes without departing from protection scope of the present invention.

Therefore, although the present invention has been described in more detail through the above examples, the present invention is not only It is limited to above embodiments, can also includes more other equivalent embodiments without departing from the inventive concept, and this hair Bright range is determined by the scope of the appended claims.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种蓝牙设备自动测试系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!