CN106385273A - Response-based bluetooth communication module and bluetooth communication method - Google Patents

Response-based bluetooth communication module and bluetooth communication method Download PDF

Info

Publication number
CN106385273A
CN106385273A CN201610821225.2A CN201610821225A CN106385273A CN 106385273 A CN106385273 A CN 106385273A CN 201610821225 A CN201610821225 A CN 201610821225A CN 106385273 A CN106385273 A CN 106385273A
Authority
CN
China
Prior art keywords
unit
instruction
data
hardware
abstraction
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
CN201610821225.2A
Other languages
Chinese (zh)
Other versions
CN106385273B (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.)
Kangtai Zhiai Beijing Medical Holding Co ltd
Original Assignee
Beijing Ding Care Technology Co Ltd
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 Beijing Ding Care Technology Co Ltd filed Critical Beijing Ding Care Technology Co Ltd
Priority to CN201610821225.2A priority Critical patent/CN106385273B/en
Publication of CN106385273A publication Critical patent/CN106385273A/en
Application granted granted Critical
Publication of CN106385273B publication Critical patent/CN106385273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive loop type

Abstract

The invention discloses a response-based bluetooth communication module which comprises an instruction configuration unit, a search unit, a data transmission unit, an instruction control unit, a hardware push unit, a switch unit, an operation abstract unit, a state control unit and a data transformation unit, wherein the search unit, the data transmission unit, the instruction control unit, the hardware push unit and the switch unit are packaged in a same packaging module, and the packaging module is coupled to the instruction configuration unit and the operation abstract unit separately and is used for processing data transmission and data transformation with a bluetooth device in a unified mode. The invention also discloses a method for performing bluetooth communication by using the above response-based bluetooth communication module. According to the invention, an instruction mode serves as a framework, a response type is adopted to design the bluetooth communication module, the bluetooth communication module is packaged, the response type is adopted to write codes, multiple callback can be avoided, and the codes can be greatly simplified.

Description

Bluetooth communication based on response type and Bluetooth communication method
Technical field
The present invention relates to computer communication field, specifically, it is to be related to a kind of bluetooth communication based on response type And Bluetooth communication method.
Background technology
Bluetooth (Bluetooth), is a kind of short-distance wireless communication technology, operates in for Alternative digital equipment tooth equipment Cable and between computer peripheral equipment couples and realizes the wireless networking between digital device.In May, 1998 is by Ericsson, IBM, English Company of Te Er, Nokia, Toshiba etc. 5 has set up Bluetooth Special Interest group (SIG), is responsible for joint formulation Bluetooth specification.Blue Tooth is operated in the unified and open 2.4GHz industry in the whole world, science, medical science (Industrial Scientific Medical) frequently Section, can be with simultaneous transmission data and voice, and at most 8 movable bluetooth equipments can form so-called with shared channel bandwidth Gram net (piconet).In each piconet, 1 is had to be bluetooth master, remaining 7 is from equipment, may be allowed to simultaneously Have and more lock onto main equipment from equipment in the way of suspending (park).Multiple picon-et can be overlapped.Formed and dissipate Penetrate net (scattern-et).
The Bluetooth specification that SIG is promulgated is exactly Bluetooth wireless communication consensus standard, and it defines what bluetooth applications should be followed The requirement that standard reaches with needs, including core protocol (Core) and application framework (Profiles) two parts.Protocol specification portion Divide each layer communication protocol defining bluetooth, it then follows open system interconnection reference model, define Bluetooth protocol from low to high Storehouse at all levels.According to the logic function of Bluetooth protocol, protocol stack is divided into three parts from the bottom to top:Host-host protocol, Broker protocol and application protocol.
Bluetooth module, is a kind of PCBA board of integrated Bluetooth function, for short-distance wireless communication, is divided into bluetooth by function Data module and blue tooth voice module.Bluetooth module of the prior art is all to need multiple step setting behaviour in compiling procedure Make, multiple readjustment.
Content of the invention
Can the technical problem to be solved be to provide a kind of bluetooth based on response type that avoid multiple readjustment Communication module and Bluetooth communication method, this bluetooth communication can be realized interacting between bluetooth equipment, it is to avoid interim card.
For solving above-mentioned technical problem, the invention provides a kind of bluetooth communication based on response type, positioned at movement In terminal, including instruction dispensing unit, search unit, data transmission unit, instruction control unit, hardware push unit, switch Unit, operation abstraction unit, status unit data converting unit, described search unit, data transmission unit, instruction control Unit processed, hardware push unit and switch element are encapsulated in same package module, this package module respectively with described instruction Dispensing unit mutually couples with operation abstraction unit, for the data transfer that is uniformly processed and bluetooth equipment between and data conversion, Wherein,
Described instruction dispensing unit, respectively with parallel described search unit, data transmission unit, instruction control unit, Hardware push unit mutually couples with switch element, for described search unit, data transmission unit, instruction control unit, hard Part push unit and switch element carry out instruction configuration, send search instruction to search unit, transmission data transfer instruction to institute State data transmission unit, send operational order to described instruction control unit, transmission hardware trigger push instruction to described hardware Push unit and transmission switch order are to described switch element;
Described search unit, is coupled with described instruction dispensing unit and operation abstraction unit phase respectively, described for receiving The search instruction that instruction dispensing unit sends, and execute search instruction acquisition nearby just in whole bluetooth equipments of broadcast state, By the bluetooth equipment searching data is activation to described operation abstraction unit;
Described data transmission unit, is coupled with described instruction dispensing unit and operation abstraction unit phase, respectively for receiving The data transfer instruction that described instruction dispensing unit sends, by actual data transfer to operating described operation abstraction unit, described Real data refers to the data transmitted when described mobile terminal is interacted with bluetooth equipment;
Described instruction control unit, is coupled with described instruction dispensing unit and operation abstraction unit phase, respectively for receiving The operational order that described instruction dispensing unit sends, is cooperated with described operation abstraction unit and completes operational order, described operation refers to Order refers to binding instruction, Planning Directive that the application program of described mobile terminal sends and unbinding;
Described hardware push unit, is coupled with described instruction dispensing unit and operation abstraction unit phase, respectively for receiving The hardware trigger that described instruction dispensing unit sends pushes instruction, executes hardware trigger push operation, hardware trigger data is passed Deliver to operation abstraction unit;
Described switch element, is coupled with described instruction dispensing unit and operation abstraction unit phase respectively, described for receiving The switch order that instruction dispensing unit sends, determines that described data transfer instruction, operational order and hardware trigger push instruction The switch order whether transmitted is to described operation abstraction unit;
Described operation abstraction unit, controls single respectively with described parallel described search unit, data transmission unit, instruction Unit, hardware push unit mutually couple with switch element and status unit, for receiving the indigo plant that described search unit sends Tooth device data, the real data of described data transmission unit transmission, the operational order of instruction control unit, hardware push unit The hardware trigger data sending and the switch order whether transmitted of switch element transmission, send after process and control to described state Unit;
Described status unit, is coupled with described operation abstraction unit data converting unit phase, respectively for receiving After instruction after described operation abstraction unit process and data, carry out judging whether normally to get described data, normal acquisition After send to described Date Conversion Unit;
Described Date Conversion Unit, is coupled with described status unit phase, for receiving in described status unit The normal data obtaining, is converted to readable data.
Preferably, also include bluetooth module communication interface, in described package module, be connected with described package module, For the Bluetooth commands blue-teeth data transmitting according to defined in instruction dispensing unit, described Bluetooth commands are to bind, unbind, sending The operational order of plan, described blue-teeth data refers to the scrutable data of bluetooth equipment.
Preferably, described Date Conversion Unit, is also coupled with Basic API phase, for character string is converted to byte, then will Byte conversion is 16 system bytes, and sends to described Basic API.
Disclosed herein as well is a kind of method carrying out Bluetooth communication using the above-mentioned bluetooth communication based on response type, It is applied between mobile terminal and bluetooth equipment, including step:
Carry out instruction configuration, described instruction includes search instruction, data transfer instruction, operational order, hardware trigger push Instruction and switch order;
To described search instruction, data transfer instruction, operational order, hardware trigger pushes instruction and switch order is entered Row encapsulation;
Execute described search instruction, data transfer instruction, operational order, hardware trigger push instruction and switch order: Obtain nearby just in whole bluetooth equipments of broadcast state, by the bluetooth equipment searching data is activation to operating level of abstraction;Will Actual data transfer is to operating described operation level of abstraction;Cooperate with described operation level of abstraction and complete operational order, described operation refers to Order refers to binding instruction, Planning Directive that the application program of described mobile terminal sends and unbinding;Execution hardware trigger Push operation, hardware trigger data is sent to operation level of abstraction;Determine described data transfer instruction, operational order and hard Part triggering pushes whether instruction is transmitted, and sends to operation level of abstraction;
Operation level of abstraction to execution after search instruction, data transfer instruction, operational order, hardware trigger push instruction, And switch order carries out data processing, send after process to state key-course;
State key-course judges whether normally to get described data, sends to described data conversion layer after normal acquisition;
Data conversion layer, receives the data obtaining in described state key-course, is converted to readable data.
Preferably, described search instruction, data transfer instruction, operational order, hardware trigger are pushed instruction and switch Instruction is encapsulated in a package module, is turned by carrying out data transmission between this package module and bluetooth equipment and data Change.
Preferably, character string is converted to byte by described data conversion layer, then byte conversion is 16 system bytes, concurrently Deliver to Basic API.
Compared with prior art, the bluetooth communication based on response type of the present invention and Bluetooth communication method, reach Arrive following effect:
1) bluetooth communication based on response type of the application and Bluetooth communication method, with command mode as framework, adopt Response type designs bluetooth communication, bluetooth communication is encapsulated, writes code using response type, it is to avoid multiple Readjustment, can significantly simplified code;
2) to design the module of this encapsulation using the framework of command mode, to make the use of module more succinct;
3) with command mode framework in the application, Bluetooth communication (news) module is write using response type, led to using this bluetooth Letter module can be the application program needing Bluetooth communication (news);Bring more smooth Consumer's Experience and simpler use, keep away Exempt from application program interim card.
Brief description
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the present invention, this Bright schematic description and description is used for explaining the present invention, does not constitute inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the bluetooth communication structure chart based on response type of embodiment 1;
Fig. 2 is the Bluetooth communication method flow chart based on response type of embodiment 2.
Specific embodiment
To censure specific components as employed some vocabulary in the middle of description and claim.Those skilled in the art should It is understood that hardware manufacturer may call same assembly with different nouns.This specification and claims are not with name The difference claiming is used as distinguishing the mode of assembly, but difference functionally is used as the criterion distinguished with assembly.As logical In the middle of piece description and claim, mentioned "comprising" is an open language, therefore should be construed to " comprise but do not limit In "." substantially " refer in receivable range of error, those skilled in the art can solve described in the range of certain error Technical problem, basically reaches described technique effect.Additionally, " coupling " word here comprises any directly and indirectly electric property coupling Means.Therefore, if a first device is coupled to a second device described in literary composition, representing described first device can direct electrical coupling It is connected to described second device, or be indirectly electrically coupled to described second device by other devices or the means that couple.Description Subsequent descriptions are to implement the better embodiment of the present invention, and so described description is for the purpose of the rule that the present invention is described, It is not limited to the scope of the present invention.Protection scope of the present invention ought be defined depending on the defined person of claims.
Below in conjunction with accompanying drawing, the present invention is described in further detail, but not as a limitation of the invention.
Embodiment 1:
In conjunction with Fig. 1, present embodiments provide a kind of bluetooth communication based on response type and Bluetooth communication method, to order Make pattern architecture, bluetooth communication is designed using response type, specifically includes:Instruction dispensing unit 101, search unit 102, number According to transmission unit 103, instruction control unit 104, hardware push unit 105, switch element 106, operation abstraction unit 107, shape State control unit 108 data converting unit 109, wherein,
Described instruction dispensing unit 101, respectively with parallel described search unit 102, data transmission unit 103, instruction Control unit 104, hardware push unit 105 mutually couple with switch element 106, for described search unit 102, data transfer Unit 103, instruction control unit 104, hardware push unit 105 and switch element 106 carry out instruction configuration, send search instruction To search unit 102, send data transfer instruction to described data transmission unit 103, transmission operational order to described instruction control Unit 104 processed, send hardware trigger and push instruction and to described hardware push unit 105 and send switch order and open to described Close unit 106;
Described search unit 102, is mutually coupled with described instruction dispensing unit 101 and operation abstraction unit 107 respectively, is used for Receive the search instruction that described instruction dispensing unit 101 sends, and it is just complete in broadcast state nearby to execute search instruction acquisition Portion's bluetooth equipment, by the bluetooth equipment searching data is activation to described operation abstraction unit 107;
Described data transmission unit 103, is mutually coupled with described instruction dispensing unit 101 and operation abstraction unit 107 respectively, For receiving the data transfer instruction that described instruction dispensing unit 101 sends, by actual data transfer to operating described operation to take out As unit 107;
Mobile terminal is administered the data of box, the such as information such as medicine box token by Bluetooth transmission
Described instruction control unit 104, is mutually coupled with described instruction dispensing unit 101 and operation abstraction unit 107 respectively, For receiving the operational order that described instruction dispensing unit 101 sends, cooperate with described operation abstraction unit 107 and complete operation and refer to Order;Here operational order refers specifically to binding instruction, sends Planning Directive, the medicine box control instruction such as unbinding.
Described hardware push unit 105, is mutually coupled with described instruction dispensing unit 101 and operation abstraction unit 107 respectively, Push instruction for receiving the hardware trigger that described instruction dispensing unit 101 sends, execute hardware trigger push operation, by hardware Trigger data is sent to operation abstraction unit 107;
Described switch element 106, is mutually coupled with described instruction dispensing unit 101 and operation abstraction unit 107 respectively, is used for Receive the switch order that described instruction dispensing unit 101 sends, determine described data transfer instruction, operational order and hardware Triggering pushes and instructs the switch order whether transmitted to described operation abstraction unit 107;
Switch element open and close state is determined by hardware firmware, acquiescence is factory set conditions, by later stage firmware version This upgrading can be changed assigned switch order and determine that switch opens or cuts out.
Described operation abstraction unit 107, respectively with described parallel described search unit 102, data transmission unit 103, Instruction control unit 104, hardware push unit 105 mutually couple with switch element 106 and status unit 108, are used for connecing Receive the bluetooth equipment data that described search unit 102 sends, real data that described data transmission unit 103 sends, instruction control Whether the operational order of unit 104 processed, the hardware trigger data of hardware push unit 105 transmission and switch element 106 transmission The switch order of transmission, sends after process to described status unit 108;
Described status unit 108, is mutually coupled with described operation abstraction unit 107 data converting unit 109 respectively, For receiving after the instruction after described operation abstraction unit 107 is processed and data, carry out judging whether normally to get specified number According to, normal obtain after send to described Date Conversion Unit 109;
Middle finger fixed number of the present invention is according to being the actual clothes returning to application program for mobile terminal after the complete instruction of medicine box hardware handles The information such as medicine record are packaged and return the state of successfully failure.
Described Date Conversion Unit 109, is mutually coupled with described status unit 108, controls for receiving described state In unit 108, the normal data obtaining, is converted to readable data.
Described search unit 102, data transmission unit 103, instruction control unit 104, hardware push unit 105 and switch Unit 106 is encapsulated in same package module, and this package module instructs dispensing unit 101 and operates abstract list with described respectively Unit 107 mutually couples, for the data transfer that is uniformly processed and bluetooth equipment between and data conversion.
This bluetooth communication also includes bluetooth module communication interface, in described package module, with described Encapsulation Moulds Block connects, for good Bluetooth commands blue-teeth data transmitting according to defined in instruction dispensing unit 101.
The practical operation instruction such as Bluetooth commands include binding, unbind, transmission plan, blue-teeth data refers to according to Bluetooth protocol The scrutable data of bluetooth equipment specified, for example, include binding, unbind, the associated data in detail such as actual dosing regimens.
Described Date Conversion Unit 109, is also mutually coupled with Basic API 110, for character string is converted to byte, then will Byte conversion is 16 system bytes, and sends to described Basic API 110.Command mode in the application refers to java design mould When " command mode " inside formula, the application software on mobile terminal (mobile phone) and hardware device interaction, there are four kinds of behaviors:Search Bluetooth equipment, the data to equipment sending data (instruction and general data may be referred to collectively as sending data), receiving device.
, application program of mobile phone APP can formulate dosing regimens and be sent to pill box storage taking the medicine box of applicant as a example, Medicine box can also be controlled to go to play an order, when medicine box can also be worked as user is detected and eaten medicine, proactive notification mobile phone Application APP, although these interactions are all different operations, essence be all send instructions, accept data, search, Connect this four most basic behaviors (can be understood as all being become) by these behavior combinations.Different parameters can be set To produce different operations.
So, it is the package module that a software has been fabricated separately in the application, this several behavior is each packaged into one Individual object, application program (APP) does not need to carry out data interaction with the API of bluetooth bottom again.One specific application APP The order controlling bluetooth equipment of course not sends individual instructions it may be necessary to several instructing combinations, such as:Set with bluetooth Standby coupling together is to need first to search for, and then sets up connection, then the switch of receiving data inside bluetooth is opened.These three steps It has been combined into a complete behavior.So in the application, these three behaviors are packaged into complete object (Encapsulation Moulds Block), now this object just becomes a command object possessing concrete behavior (operation), and this is order described herein Pattern.When needing this behavior (operation), call this package module all right, use compared to assembling bluetooth Each step will save a lot of steps.
Bluetooth interaction is an asynchronous process, and in order to prevent application APP interface stuck, the application adopts response type Literary style, to write this module, can prevent application APP to be stuck.Key technology is that several asynchronous operations are ined succession and carried out When, after response type framework has been carried out first step, second step is triggered by first, after then second step terminates 3rd step is triggered, in the management of step, response type with better function.
Search unit 102 calls binding bluetooth equipment instruction by instruction control unit 104 after searching, and operates abstract list Binding information is encapsulated by unit 107, and binding data (as token information) is sent to data conversion by data transmission unit 103 Unit 109 converts the data into the data that hardware device can identify, equipment receives the data of data transmission unit 103 transmission And carry out corresponding hardware logic process by 110 Basic APIs after instruction, and the result after processing and state are pushed by hardware Unit 105 returns to status unit 108, and switch element 106 is that a hardware dispatches from the factory configuration information, can pass through hardware Firmware upgrade is adjusting some on off states.
Embodiment 2:
In conjunction with Fig. 2, present embodiments provide a kind of Bluetooth communication method based on response type, be applied between bluetooth equipment Communication, including step:
Step 201:Carry out instruction configuration, described instruction includes search instruction, data transfer instruction, operational order, hardware Triggering pushes instruction and switch order;
Step 202:Instruction, Yi Jikai are pushed to described search instruction, data transfer instruction, operational order, hardware trigger Close instruction to be packaged;
Described search instruction, data transfer instruction, operational order, hardware trigger are pushed instruction and switch order envelope It is contained in a package module, by carrying out data transmission between this package module and bluetooth equipment and data conversion.
Step 203:Execute described search instruction, data transfer instruction, operational order, hardware trigger push instruction and Switch order:Obtain nearby just in whole bluetooth equipments of broadcast state, by the bluetooth equipment searching data is activation to operation Level of abstraction;By actual data transfer to operating described operation level of abstraction;Cooperate with described operation level of abstraction and complete operational order, institute State the binding instruction that operational order refers to that the application program of described mobile terminal sends, Planning Directive and unbinding;Execution Hardware trigger push operation, hardware trigger data is sent to the abstract monolayer of operation;Determine that described data transfer instruction, operation refer to Make and hardware trigger pushes whether instruction is transmitted, and send to operation level of abstraction;
Step 204:Operation level of abstraction pushes away to the search instruction after execution, data transfer instruction, operational order, hardware trigger Send instruction and switch order to carry out data processing, send after process to state key-course;
Step 205:State key-course judges whether normally to get specified data, sends to described data after normal acquisition Conversion layer;
Step 206:Data conversion layer, receives the normal data obtaining in described state key-course, is converted to readable number According to.Character string is converted to byte by described data conversion layer, then byte conversion is 16 system bytes.
Also include step step 207:Data conversion coating by 16 system bytes and sends to Basic API.
After search unit searches in actual application, binding bluetooth equipment instruction, behaviour are called by instruction control unit Make abstraction unit to encapsulate binding information, binding data (as token information) is sent to data by data transmission unit and turns Change unit and convert the data into the data such as 16 system byte that hardware device can identify, bluetooth equipment receives data transfer list After the data of unit's transmission and instruction, corresponding hardware logic process is carried out by Basic API, and the result after processing and state are led to Cross hardware push unit and return to status unit, switch element is that a hardware dispatches from the factory configuration information, can pass through hardware Firmware upgrade adjusting some on off states.
Embodiment 3:
On the basis of embodiment 1, the present embodiment is Application Example, and the bluetooth communication providing in the present embodiment is One service medicine box that can affect application APP, the medicine box being previously mentioned in the present invention is to comprise fixer system (Basic API) Intelligent hardware, function be mainly receive the incoming data in upper strata and various order and process, replying mobile terminal (mobile phone) needs The response wanted dosing regimens prompting (as sounding reminding) from main response user setup.
When binding, the application APP interface prompts user of mobile terminal (mobile phone) binds medicine box, notifies medicine box Prepare bound, after medicine box have received the instruction of preparation, sounding reminding user taps medicine box to show confirmation, after user taps, medicine Box notifies application APP user to tap.After application program of mobile phone APP is notified, change interface display binding completes.
Using the mode of response type, these steps are all completely carried out one by one, previous not complete Cheng Shi, program can wait, and this wait does not result in main thread and blocks, and this is employ response type in the application good Place.The application based on the bluetooth communication of response type and command mode framework be be exactly allow application APP use When function of Bluetooth communication, simply call the object of certain order, need not repeat to adjust back.
Under binding state, the application program of mobile terminal (mobile phone) has been synchronized carrying of pre-setting to medicine box with medicine box Awake information, reminds the moment when time is up, and medicine box actively triggering can remind operation, and pushed information is to mobile terminal (mobile phone), After opening medicine box and opening medicine box stop operation triggering in 10 seconds, medicine box can generate an actual medication and record user, and will take Medicine record information is pushed to mobile terminal (mobile phone), and mobile terminal can be by the letter after conversion after module data of the present invention is processed Breath is synchronized to mobile terminal (mobile phone) interface, reaches medicine box and reminds and the visible actual medication state of mobile phone.
Compared with prior art, the bluetooth communication based on response type of the present invention and Bluetooth communication method, reach Arrive following effect:
1) in the application, bluetooth communication has been carried out with an encapsulation, code has been write using response type, it is to avoid multiple Readjustment, can significantly simplified code;
2) to design the module of this encapsulation using the framework of command mode, to make the use of module more succinct;
3) with command mode framework in the application, Bluetooth communication (news) module is write using response type, led to using this bluetooth Letter module can be for needing the application program of Bluetooth communication (news) to bring more smooth Consumer's Experience and simpler use, it is to avoid Application program interim card.
Described above illustrate and describes some preferred embodiments of the present invention, but as previously mentioned it should be understood that the present invention Be not limited to form disclosed herein, be not to be taken as the exclusion to other embodiment, and can be used for various other combinations, Modification and environment, and can be in invention contemplated scope described herein, by technology or the knowledge of above-mentioned teaching or association area It is modified.And the change that those skilled in the art are carried out and change without departing from the spirit and scope of the present invention, then all should be at this In the protection domain of bright claims.

Claims (6)

1. a kind of bluetooth communication based on response type, it is characterised in that including instruction configuration list in mobile terminal Unit, search unit, data transmission unit, instruction control unit, hardware push unit, switch element, operation abstraction unit, state Control unit data converting unit, described search unit, data transmission unit, instruction control unit, hardware push unit and Switch element is encapsulated in same package module, and this package module instructs dispensing unit and operation abstraction unit with described respectively Mutually couple, for the data transfer that is uniformly processed and bluetooth equipment between and data conversion, wherein,
Described instruction dispensing unit, respectively with parallel described search unit, data transmission unit, instruction control unit, hardware Push unit mutually couples with switch element, for pushing away to described search unit, data transmission unit, instruction control unit, hardware Send unit and switch element to carry out instruction configuration, send search instruction to search unit, transmission data transfer instruction to described number According to transmission unit, send operational order extremely described instruction control unit, transmission hardware trigger push instruction to described hardware push Unit and transmission switch order are to described switch element;
Described search unit, is coupled with described instruction dispensing unit and operation abstraction unit phase, respectively for receiving described instruction The search instruction that dispensing unit sends, and execute search instruction acquisition nearby just in whole bluetooth equipments of broadcast state, will search The bluetooth equipment data is activation that rope arrives is to described operation abstraction unit;
Described data transmission unit, is coupled with described instruction dispensing unit and operation abstraction unit phase respectively, described for receiving The data transfer instruction that instruction dispensing unit sends, by actual data transfer to operating described operation abstraction unit, described reality Data refers to the data transmitted when described mobile terminal is interacted with bluetooth equipment;
Described instruction control unit, is coupled with described instruction dispensing unit and operation abstraction unit phase respectively, described for receiving The operational order that instruction dispensing unit sends, is cooperated with described operation abstraction unit and completes operational order, described operational order is Refer to binding instruction, Planning Directive that the application program of described mobile terminal sends and unbinding;
Described hardware push unit, is coupled with described instruction dispensing unit and operation abstraction unit phase respectively, described for receiving The hardware trigger that instruction dispensing unit sends pushes instruction, executes hardware trigger push operation, hardware trigger data is sent to Operation abstraction unit;
Described switch element, is coupled with described instruction dispensing unit and operation abstraction unit phase, respectively for receiving described instruction The switch order that dispensing unit sends, determines whether described data transfer instruction, operational order and hardware trigger push instruction The switch order of transmission is to described operation abstraction unit;
Described operation abstraction unit, respectively with described parallel described search unit, data transmission unit, instruction control unit, Hardware push unit mutually couples with switch element and status unit, for receiving the bluetooth that described search unit sends Device data, the real data of described data transmission unit transmission, the operational order of instruction control unit, hardware push unit are sent out The hardware trigger data sent and the switch order whether transmitted of switch element transmission, send after process and control list to described state Unit;
Described status unit, is coupled with described operation abstraction unit data converting unit phase respectively, described for receiving After instruction after operation abstraction unit process and data, carry out judging whether normally to get described data, send out after normal acquisition Deliver to described Date Conversion Unit;
Described Date Conversion Unit, is coupled with described status unit phase, normal in described status unit for receiving The data obtaining, is converted to readable data.
2. the bluetooth communication based on response type according to claim 1 is led to it is characterised in that also including bluetooth module Letter interface, in described package module, is connected with described package module, for the bluetooth according to defined in instruction dispensing unit Instruction blue-teeth data transmitting, described Bluetooth commands be bind, unbind, the operational order of transmission plan, described blue-teeth data refers to The scrutable data of bluetooth equipment.
3. the bluetooth communication based on response type according to claim 1 is it is characterised in that described data conversion list Unit, is also coupled with Basic API phase, for character string is converted to byte, then by byte conversion be 16 system bytes, and send to Described Basic API.
4. method Bluetooth communication being carried out according to the described bluetooth communication based on response type arbitrary in claims 1 to 3, It is applied between mobile terminal and bluetooth equipment it is characterised in that including step:
Carry out instruction configuration, described instruction includes search instruction, data transfer instruction, operational order, hardware trigger push instruct, And switch order;
To described search instruction, data transfer instruction, operational order, hardware trigger pushes instruction and switch order is sealed Dress;
Execute described search instruction, data transfer instruction, operational order, hardware trigger push instruction and switch order:Obtain Nearby just in whole bluetooth equipments of broadcast state, by the bluetooth equipment searching data is activation to operating level of abstraction;By reality Data transfer is to operating described operation level of abstraction;Cooperate with described operation level of abstraction and complete operational order, described operational order is Refer to binding instruction, Planning Directive that the application program of described mobile terminal sends and unbinding;Execution hardware trigger pushes Operation, hardware trigger data is sent to operation level of abstraction;Determine that described data transfer instruction, operational order and hardware touch Send out and push whether instruction is transmitted, and send to operation level of abstraction;
Operation level of abstraction to execution after search instruction, data transfer instruction, operational order, hardware trigger push instruction and Switch order carries out data processing, sends to state key-course after process;
State key-course judges whether normally to get described data, sends to described data conversion layer after normal acquisition;
Data conversion layer, receives the data obtaining in described state key-course, is converted to readable data.
5. the Bluetooth communication method based on response type according to claim 4 is it is characterised in that refer to described search Make, data transfer instruction, operational order, hardware trigger push instruction and switch order is encapsulated in a package module, lead to Cross carrying out data transmission between this package module and bluetooth equipment and data conversion.
6. the Bluetooth communication method based on response type according to claim 4 is it is characterised in that described data conversion layer Character string is converted to byte, then byte conversion is 16 system bytes, and send to Basic API.
CN201610821225.2A 2016-09-13 2016-09-13 Bluetooth communication based on response type and Bluetooth communication method Active CN106385273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610821225.2A CN106385273B (en) 2016-09-13 2016-09-13 Bluetooth communication based on response type and Bluetooth communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610821225.2A CN106385273B (en) 2016-09-13 2016-09-13 Bluetooth communication based on response type and Bluetooth communication method

Publications (2)

Publication Number Publication Date
CN106385273A true CN106385273A (en) 2017-02-08
CN106385273B CN106385273B (en) 2018-08-07

Family

ID=57936562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610821225.2A Active CN106385273B (en) 2016-09-13 2016-09-13 Bluetooth communication based on response type and Bluetooth communication method

Country Status (1)

Country Link
CN (1) CN106385273B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111060901A (en) * 2019-11-05 2020-04-24 安徽工程大学 AGV (automatic guided vehicle) distance measuring system based on low-power consumption

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7855952B2 (en) * 2008-11-20 2010-12-21 At&T Intellectual Property I, L.P. Silent failure identification and trouble diagnosis
CN105101061A (en) * 2015-08-07 2015-11-25 深圳市广和通无线股份有限公司 Bluetooth communication realization method by means of AT command
CN105846863A (en) * 2016-05-31 2016-08-10 青岛海信电器股份有限公司 Bluetooth based operation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7855952B2 (en) * 2008-11-20 2010-12-21 At&T Intellectual Property I, L.P. Silent failure identification and trouble diagnosis
CN105101061A (en) * 2015-08-07 2015-11-25 深圳市广和通无线股份有限公司 Bluetooth communication realization method by means of AT command
CN105846863A (en) * 2016-05-31 2016-08-10 青岛海信电器股份有限公司 Bluetooth based operation method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王愉: "响应式网页设计初探", 《北京印刷学院学报》 *
罗富财: "基于Android平台的蓝牙通信系统的研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111060901A (en) * 2019-11-05 2020-04-24 安徽工程大学 AGV (automatic guided vehicle) distance measuring system based on low-power consumption

Also Published As

Publication number Publication date
CN106385273B (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN108023952A (en) A kind of modularization Internet of Things application rapid build platform combined based on cloud and mist
CN100383755C (en) Software interface testing method and apparatus
CN101137170A (en) Software automatic testing instrument and method of embedded equipment
CN105404385B (en) A kind of method and device of intelligent display terminal and somatosensory device realization data interaction
JP2005518015A (en) Middleware service layer for platform systems for mobile terminals
CN108124475A (en) Virtual system Bluetooth communication method and device, virtual system, storage medium and electronic equipment
CN101980152A (en) Mobile middleware system and implementation method thereof
CN102420891A (en) Mobile terminal and test method, equipment and system thereof
CN102073542A (en) Method for integrating Chinese input method during operation of Linux applications on Android mobile phone
KR101036760B1 (en) Mobile Terminal Comprising Layered Architecture
CN102331927A (en) Method for integrating soft keyboard input of Wine and Android mobile phone
CN107071551A (en) Applied to the multi-screen interactive screen response method in intelligent television system
CN103796058A (en) Method for achieving control over Android smart television based on virtual input equipment
CN105467960A (en) Control system and method making host computer compatible with multiple controllers and stirring stations
CN105573816B (en) The method, apparatus and system virtually inputted
CN101415251B (en) Apparatus for implementing data transmission based on Bluetooth
CN102455910B (en) GUI (Graphical User Interface) platformization realization method orienting to IC (Integrated Circuit) equipment control software
US20080005286A1 (en) Step-wise command line interface for configuring network devices
CN106686074A (en) System and method for quickly constructing IOT (Internet of Things) application
CN106385273A (en) Response-based bluetooth communication module and bluetooth communication method
CN105521603B (en) The method, apparatus and system of virtual input control are carried out for the game of cool run class
CN108664799A (en) The authority setting method and device of device management application
CN103379372A (en) Intelligent television and control system and control method of intelligent television
CN109445384A (en) A kind of more apparatus control systems
CN109901830A (en) A kind of symbol arranging method and system for scada system development

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201218

Address after: No. l101, 102-79, Honggao world, No. 792, section 4, Furong South Road, Muyun street, Tianxin District, Changsha City, Hunan Province

Patentee after: Changsha Zhiai Yaohe Medical Technology Co.,Ltd.

Address before: Room 215, 2 / F, building 14, Wenhui Beiyuan, Haidian District, Beijing 100082

Patentee before: BEIJING DINGCARE TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220818

Address after: 100123 2-28, floor 2, building 9, No.3 courtyard, Qingnian Road, Chaoyang District, Beijing

Patentee after: Kangtai Zhiai (Beijing) medical Holding Co.,Ltd.

Address before: No. l101, 102-79, Honggao world, No. 792, section 4, Furong South Road, Muyun street, Tianxin District, Changsha City, Hunan Province

Patentee before: Changsha Zhiai Yaohe Medical Technology Co.,Ltd.

TR01 Transfer of patent right