Movatterモバイル変換


[0]ホーム

URL:


CN106301488B - A kind of Bluetooth adapter and its working method - Google Patents

A kind of Bluetooth adapter and its working method
Download PDF

Info

Publication number
CN106301488B
CN106301488BCN201610864548.XACN201610864548ACN106301488BCN 106301488 BCN106301488 BCN 106301488BCN 201610864548 ACN201610864548 ACN 201610864548ACN 106301488 BCN106301488 BCN 106301488B
Authority
CN
China
Prior art keywords
bluetooth
usb
protocol
response
data
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.)
Active
Application number
CN201610864548.XA
Other languages
Chinese (zh)
Other versions
CN106301488A (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co LtdfiledCriticalFeitian Technologies Co Ltd
Priority to CN201610864548.XApriorityCriticalpatent/CN106301488B/en
Publication of CN106301488ApublicationCriticalpatent/CN106301488A/en
Application grantedgrantedCritical
Publication of CN106301488BpublicationCriticalpatent/CN106301488B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of Bluetooth adapter and its working method, the method includes:Bluetooth adapter searches for the bluetooth security equipment to match with default device identification and establishes connection with it;Bluetooth adapter states the usb protocol mark of itself to host computer;Bluetooth adapter receives the USB command from host computer;Bluetooth adapter is according to the protocol type and USB command tissue Bluetooth commands of bluetooth security equipment;Bluetooth adapter sends Bluetooth commands to bluetooth security equipment;Bluetooth adapter receives the bluetooth response from bluetooth security equipment;Bluetooth adapter identifies the usb protocol tissue USB response to match according to bluetooth response and with usb protocol;USB response is returned to host computer by Bluetooth adapter, and the Bluetooth adapter and host computer for so that bluetooth security equipment is provided through the invention are communicated.

Description

A kind of Bluetooth adapter and its working method
Technical field
The present invention relates to Bluetooth communication field more particularly to a kind of Bluetooth adapter and its working methods.
Background technique
With the continuous progress of science and technology, bluetooth security equipment can be communicated by Bluetooth channels and mobile terminal.ButIn the prior art, bluetooth security equipment can not be communicated directly with host computer (such as the end PC).
Summary of the invention
Present invention solves the technical problem that:The present invention provides a kind of Bluetooth adapter and its working methods, pacify bluetoothThe Bluetooth adapter and host computer that full equipment can provide through the invention are communicated.
The present invention provides a kind of working methods of Bluetooth adapter, including:
Step s1:The bluetooth security equipment that Bluetooth adapter search matches with default device identification simultaneously connects with its foundationIt connects;
Step s2:The Bluetooth adapter states the usb protocol mark of itself to host computer;
Step s3:The Bluetooth adapter receives the USB command from the host computer;
Step s4:The Bluetooth adapter is according to the protocol type and the USB command tissue of the bluetooth security equipmentBluetooth commands;
Step s5:The Bluetooth adapter sends Bluetooth commands to the bluetooth security equipment;
Step s6:The Bluetooth adapter receives the bluetooth response from the bluetooth security equipment;
Step s7:The Bluetooth adapter is assisted according to the bluetooth response and the USB to match with usb protocol markDiscuss tissue USB response;
Step s8:The USB response is returned to the host computer by the Bluetooth adapter.
The present invention also provides a kind of working method of Bluetooth adapter, the Bluetooth adapter includes control chip, indigo plantTooth chip and USB module;The method includes:
Step y1:The control chip sends poll instruction to the Bluetooth chip, and the Bluetooth chip receives pollAfter instruction, searches for the bluetooth security equipment to match with default device identification and establish a connection, to the control chipReturn to poll repeat-back;
Step y2:The control chip initiation USB module states to host computer the USB of itself by the USB moduleProtocol-identifier;
Step y3:The control chip receives the USB command from host computer by the USB module;
Step y4:The control chip is according to the protocol type and the second preset protocol of the bluetooth security equipment to describedUSB command is packaged, and obtains instruction encapsulation of data;
Step y5:Described instruction encapsulation of data is sent to the Bluetooth chip by the control chip;
Step y6:The Bluetooth chip obtains Bluetooth commands from described instruction encapsulation of data;
Step y7:The Bluetooth chip sends Bluetooth commands to bluetooth security equipment;It receives and is set from the bluetooth securityStandby bluetooth response;
Step y8:The Bluetooth chip encapsulates the bluetooth response according to the second preset protocol, obtains response encapsulation of data;
Step y9:The Bluetooth chip sends the response encapsulation of data to the control chip;
Step y10:What the control chip matched according to the response encapsulation of data and with usb protocol markUsb protocol tissue USB response;
Step y11:The USB response is returned to the host computer by the USB module by the control chip.
The present invention provides a kind of Bluetooth adapter, including:First search module, the first link block, the first statement mouldBlock, the first tissue module, the first sending module, the first receiving module, the second receiving module, minor microstructure module and second sendModule;
First search module, for searching for the bluetooth security equipment to match with default device identification;
First link block connects for searching the bluetooth security equipment that plain block search arrives with described first and establishingIt connects;
First declaration module, for after first link block and the bluetooth security equipment establish connection,The usb protocol mark of itself is stated to host computer;
First receiving module, for receiving the USB command from the host computer;
The first tissue module, for the protocol type and first receiving module according to the bluetooth security equipmentThe USB command tissue Bluetooth commands received;
First sending module, for sending Bluetooth commands to the bluetooth security equipment;
Second receiving module, for receiving the bluetooth response from the bluetooth security equipment;
The minor microstructure module, the bluetooth response for being received according to second receiving module and with it is describedUsb protocol identifies the usb protocol tissue USB response to match;
Second sending module, for the USB response to be returned to the host computer.
The present invention also provides a kind of Bluetooth adapter, including:Control chip, Bluetooth chip and USB module;
The control chip includes:First transmission unit, the first initialization unit, the first receiving unit, the first tissue listMember, the second transmission unit, minor microstructure unit and third transmission unit
First transmission unit, for sending poll instruction to the Bluetooth chip;
First initialization unit, for receiving the poll from the Bluetooth chip when first receiving unitAfter repeat-back, USB module is initialized, states that the usb protocol of itself identifies to host computer by the USB module;
First receiving unit, for receiving the poll repeat-back from the Bluetooth chip;Pass through the USB mouldBlock receives the USB command from host computer;Receive the response encapsulation of data from the Bluetooth chip;
The first tissue unit, for the protocol type and the second preset protocol according to the bluetooth security equipment to instituteIt states USB command to be packaged, obtains instruction encapsulation of data;
Second transmission unit, for described instruction encapsulation of data to be sent to the Bluetooth chip;
The minor microstructure unit, for according to from the Bluetooth chip the response encapsulation of data and with it is describedUsb protocol identifies the usb protocol tissue USB response to match;
The third transmission unit, for the USB response to be returned to the host computer by the USB module;
The Bluetooth chip includes:Second receiving unit, the first search unit, the first connection unit, the 4th transmission unit,Third receiving unit, second acquisition unit, the 5th transmission unit, the 4th receiving unit, third organizational unit and the 6th send singleMember;
Second receiving unit, for receiving the poll instruction from control chip;
First search unit, for searching for and default after second receiving unit receives poll instructionThe bluetooth security equipment that device identification matches;
First connection unit, for establishing connection with the bluetooth security equipment,
4th transmission unit, for returning to poll repeat-back to the control chip;
Third receiving unit, for receiving the instruction encapsulation of data from the control chip;
The second acquisition unit, for obtaining Bluetooth commands from described instruction encapsulation of data;
5th transmission unit, for sending the Bluetooth commands that second acquisition unit is got to bluetooth security equipment;
4th receiving unit, for receiving the bluetooth response from the bluetooth security equipment;
The third organizational unit, for encapsulating the bluetooth that the 4th receiving unit receives according to the second preset protocolResponse obtains response encapsulation of data;
6th transmission unit sends the response encapsulation of data to the control chip.
Beneficial effects of the present invention are:The present invention provides a kind of Bluetooth adapter and its working method, Bluetooth adapterThe USB command for meeting USB specification from host computer is converted, the Bluetooth commands that bluetooth security equipment can identify are obtainedAfterwards, Bluetooth commands are sent to bluetooth security equipment, the bluetooth response that bluetooth security equipment returns is reconverted into upper functionThe USB response for meeting USB specification enough identified, and the USB response for meeting USB specification is returned into host computer, finally make bluetoothThe Bluetooth adapter and host computer that safety equipment can provide through the invention are communicated.
Detailed description of the invention
Fig. 1 is a kind of working method for Bluetooth adapter that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of working method for Bluetooth adapter that the embodiment of the present invention 2 provides;
Fig. 2-1 is the refined flow chart for the step 107 that the embodiment of the present invention 2 provides;
Fig. 2-2 is the refined flow chart for the step 110 that the embodiment of the present invention 2 provides;
Fig. 3 is a kind of flow chart of the working method for Bluetooth adapter that the embodiment of the present invention 3 provides;
Fig. 3-1 is the refined flow chart for the step 207 that the embodiment of the present invention 3 provides;
Fig. 3-2 is the refined flow chart for the step 210 that the embodiment of the present invention 3 provides;
Fig. 4 and Fig. 5 is the specific flow chart of the working method for the Bluetooth adapter that the embodiment of the present invention 4 provides;
Fig. 6 is a kind of flow chart of the working method for Bluetooth adapter that the embodiment of the present invention 5 provides;
Fig. 6-1 is the refined flow chart for the step 507 that the embodiment of the present invention 5 provides;
Fig. 6-2 is the refined flow chart for the step 508 that the embodiment of the present invention 5 provides;
Fig. 7 is a kind of structure chart for Bluetooth adapter that the embodiment of the present invention 6 provides;
Fig. 8 is a kind of structure chart for Bluetooth adapter that the embodiment of the present invention 7 provides.
Specific implementation method
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, completeSite preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based onEmbodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every otherEmbodiment shall fall within the protection scope of the present invention.
Embodiment 1
A kind of working method of Bluetooth adapter is present embodiments provided, as shown in Figure 1, specifically including:
Step s1:The bluetooth security equipment that Bluetooth adapter search matches with default device identification simultaneously connects with its foundationIt connects;
Step s2:Bluetooth adapter states the usb protocol mark of itself to host computer;
Step s3:Bluetooth adapter receives the USB command from host computer;
Step s4:Bluetooth adapter is according to the protocol type and USB command tissue Bluetooth commands of bluetooth security equipment;
Step s5:Bluetooth adapter sends Bluetooth commands to bluetooth security equipment;
Step s6:Bluetooth adapter receives the bluetooth response from bluetooth security equipment;
Step s7:Bluetooth adapter is answered according to bluetooth response and the usb protocol tissue USB to match with usb protocol markIt answers;
Step s8:USB response is returned to host computer by Bluetooth adapter.
In the present embodiment, host computer be can be, but not limited to as PC.
In the present embodiment, after step s1, can also include:Bluetooth adapter is from the broadcast message of bluetooth security equipmentObtain the first protocol-identifier of bluetooth security equipment;Correspondingly, step s4 is specially:Bluetooth adapter is set according to bluetooth securityThe standby corresponding protocol type of the first protocol-identifier and USB command tissue Bluetooth commands.
In the present embodiment, step s4 can be specially:Bluetooth adapter obtains the effective instruction data in USB command, rootAccording to the protocol type and effective instruction data organization Bluetooth commands of bluetooth security equipment;Correspondingly, step s7 is specially:Bluetooth is suitableOrchestration obtains the effective response data in bluetooth response, includes effective according to the usb protocol tissue to match with usb protocol markThe USB response of reply data.
In the present embodiment, the effective instruction data in USB command are specially the APDU in USB command(ApplicationProtocolDataUnit, Application Protocol Data Unit).
In the present embodiment, after step s1, can also include before step s4:Bluetooth adapter is from bluetooth security equipmentThe first protocol-identifier of bluetooth security equipment is obtained in broadcast message;Correspondingly, after step s3, further include:Bluetooth adapterJudge that usb protocol identifies whether to match with the first protocol-identifier;
When usb protocol mark matches with the first protocol-identifier, following steps are executed:
Step r1:Bluetooth adapter sends USB command to bluetooth security equipment;
Step r2:Bluetooth adapter receives the USB response from bluetooth security equipment;
Step r3:USB response is returned to host computer by Bluetooth adapter;
When usb protocol mark is mismatched with the first protocol-identifier, following steps are executed:
Step t1:Bluetooth adapter obtains the effective instruction data in USB command, according to the protocol class of bluetooth security equipmentType and effective instruction data organization Bluetooth commands;
Step t2:Bluetooth adapter sends Bluetooth commands to bluetooth security equipment;
Step t3:Bluetooth adapter receives the bluetooth response from bluetooth security equipment;
Step t4:Bluetooth adapter obtains the effective response data in bluetooth response, matches according to usb protocol markUsb protocol tissue include imitate reply data USB response;
Step t4 is specially:Bluetooth adapter obtains effective in bluetooth response according to the protocol type of bluetooth security equipmentReply data includes the USB response for imitating reply data according to the usb protocol tissue to match with usb protocol mark;
Step t5:USB response is returned to host computer by Bluetooth adapter.
In the present embodiment, after step s1, further include before step s2:Broadcast of the Bluetooth adapter from bluetooth security equipmentThe first protocol-identifier of bluetooth security equipment is obtained in information;Correspondingly, step s2 is specially:Bluetooth adapter by itselfUsb protocol mark is set as the first protocol-identifier, states that the usb protocol of itself is identified as the first protocol-identifier to host computer;PhaseYing Di, step s4 are specially:Bluetooth adapter is using USB command as Bluetooth commands;Step s7 is specially:Bluetooth adapter will be blueTooth response is as USB response.
In the present embodiment, the protocol type of bluetooth security equipment can also be that Bluetooth adapter itself is preset;
When the protocol type of preset bluetooth security equipment is matched with the usb protocol of Bluetooth adapter itself mark:StepSuddenly s4 is specially:Bluetooth adapter is using USB command as Bluetooth commands;Step s7 is specially:Bluetooth adapter is by bluetooth responseAs USB response;
When the usb protocol of the protocol type of preset bluetooth security equipment and Bluetooth adapter itself, which identifies, to be mismatched:Step s4 is specially:Bluetooth adapter obtains the effective instruction data in USB command, according to the protocol type of bluetooth security equipmentWith effective instruction data organization Bluetooth commands;Step s7 is specially:Bluetooth adapter obtains the effective response number in bluetooth responseAccording to including the USB response for imitating reply data according to the usb protocol tissue that matches of usb protocol mark.
In the present embodiment, step s3 is specially:The USB command to be received from host computer such as Bluetooth adapter, when pre-If after receiving the USB command from host computer in the time, executing step s4;When being not received by within a preset time from upperIt after the USB command of position machine, detects whether to have disconnected with bluetooth security equipment, if it is, Bluetooth adapter resets, returnStep s1;Otherwise, it continues waiting for receiving the USB command from host computer;After step s8, return step s3 continues waiting for receivingUSB command from host computer.
In the present embodiment, further include after step s1:Bluetooth adapter detects whether to have disconnected company with bluetooth security equipmentIt connects, if it is, Bluetooth adapter resets, return step s1;Otherwise, it continues to test and whether with bluetooth security equipment has disconnected companyIt connects.
In the present embodiment, Bluetooth adapter resets, specially:Bluetooth chip in Bluetooth adapter resets, and controls chipIt resets.After Bluetooth adapter resets, host computer detects Bluetooth adapter on usb bus and upper by the hub of itselfPosition machine disconnects.
In the present embodiment, usb protocol is specially CCID protocol or SCSI protocol or HID protocol or other agreements.
The present embodiment additionally provides a kind of working method of Bluetooth adapter, wherein Bluetooth adapter include control chip,Bluetooth chip and USB module;The method includes:
Step y1:It controls chip and sends poll instruction to Bluetooth chip, after Bluetooth chip receives poll instruction, searchThe bluetooth security equipment that matches with default device identification simultaneously establishes a connection, and returns to poll repeat-back to control chip;
Step y2:Chip initiation USB module is controlled, the usb protocol mark of itself is stated to host computer by USB moduleKnow;
Step y3:It controls chip and the USB command from host computer is received by USB module;
Step y4:Chip is controlled to carry out USB command according to the protocol type and the second preset protocol of bluetooth security equipmentEncapsulation obtains instruction encapsulation of data;
Step y5:Control chip will instruct encapsulation of data to be sent to Bluetooth chip;
Step y6:Bluetooth chip obtains Bluetooth commands from instruction encapsulation of data;
Step y7:Bluetooth chip sends Bluetooth commands to bluetooth security equipment;Receive the bluetooth from bluetooth security equipmentResponse;
Step y8:Bluetooth chip encapsulates bluetooth response according to the second preset protocol, obtains response encapsulation of data;
Step y9:Bluetooth chip sends response encapsulation of data to control chip;
Step y10:Control chip identifies the usb protocol tissue USB to match according to response encapsulation of data and with usb protocolResponse;
Step y11:It controls chip and USB response is returned to by host computer by USB module.
Further, after step y1, further include:It controls chip and sends acquisition bluetooth security device identification to Bluetooth chipInstruction;Bluetooth chip returns to the response of the first protocol-identifier including bluetooth security equipment to control chip;Correspondingly, step y4Specially:Chip is controlled according to protocol type corresponding with the first protocol-identifier of bluetooth security equipment and the second preset protocol pairUSB command is packaged, and obtains instruction encapsulation of data.
Further, step y4 is specially:The effective instruction data in chip acquisition USB command are controlled, are pacified according to bluetoothThe protocol type of full equipment and the second preset protocol are packaged effective instruction data, obtain instruction encapsulation of data;Step y10Specially:Control chip response encapsulation of data is unsealed, obtain bluetooth response in effective response data, according to USBThe usb protocol tissue that protocol-identifier matches includes the USB response for imitating reply data.
Further, step y4 is specially:The effective instruction data in chip acquisition USB command are controlled, are pacified according to bluetoothThe protocol type of full equipment is packaged effective instruction data, obtains the first encapsulation of data;According to the second preset protocol toOne encapsulation of data is packaged, and obtains instruction encapsulation of data;Step y6 is specially:Bluetooth chip is obtained from instruction encapsulation of dataFirst encapsulation of data, using the first encapsulation of data as Bluetooth commands.
Further, step y10 is specially:Control chip unseals response encapsulation of data, obtains bluetooth response, rootThe effective response data in bluetooth response are obtained according to the protocol type of bluetooth security equipment, are matched according to usb protocol markUsb protocol tissue include imitate reply data USB response.
Further, after step y1, further include before step y4:It controls chip and sends acquisition bluetooth to Bluetooth chipSafety equipment mark instruction;Bluetooth chip returns to the response of the first protocol-identifier including bluetooth security equipment to control chip;Correspondingly, after step y3, further include:Control chip judges that usb protocol identifies whether to match with the first protocol-identifier, whenWhen usb protocol mark matches with the first protocol-identifier, following steps are executed:
Step m1:Control chip is packaged USB command according to the second preset protocol, obtains instruction encapsulation of data;
Step m2:Control chip will instruct encapsulation of data to be sent to Bluetooth chip;
Step m3:Bluetooth chip unseals instruction encapsulation of data, obtains USB command;
Step m4:Bluetooth chip sends USB command to bluetooth security equipment;The USB from bluetooth security equipment is received to answerIt answers;
Step m5:Bluetooth chip encapsulates USB response according to the second preset protocol, obtains response encapsulation of data;
Step m6:Bluetooth chip sends response encapsulation of data to control chip;
Step m7:Control chip unseals response encapsulation of data, obtains USB response;
Step m8:It controls chip and USB response is returned to by host computer by USB module;
When usb protocol mark is mismatched with the first protocol-identifier, step y4 is executed.
Further, after step y1, further include before step y2:It controls chip and sends acquisition bluetooth peace to Bluetooth chipFull device identification instruction;Bluetooth chip returns to the response of the first protocol-identifier including bluetooth security equipment to control chip;
Step y2 is specially:Chip initiation USB module is controlled, sets the first agreement for the usb protocol mark of itselfMark states to host computer the first protocol-identifier of itself by USB module;
Step y4 is specially:Control chip is packaged USB command according to the second preset protocol, obtains instruction encapsulation numberAccording to;
Step y6 is specially:Bluetooth chip unseals instruction encapsulation of data, obtains USB command;
Step y7 is specially:Bluetooth chip sends bluetooth to bluetooth security equipment and refers to using USB command as Bluetooth commandsIt enables;Receive the bluetooth response from bluetooth security equipment;
Step y10 is specially:Control chip obtains bluetooth response from response encapsulation of data, using bluetooth response as USBResponse.
Further, the protocol type of bluetooth security equipment can also be preset for Bluetooth adapter;
When the protocol type of preset bluetooth security equipment is matched with usb protocol mark:
Step y4 is specially:Control chip is packaged USB command according to the second preset protocol, obtains instruction encapsulation numberAccording to;Step y6 is specially:Bluetooth chip obtains USB command, using USB command as Bluetooth commands from instruction encapsulation of data;StepSuddenly y10 is specially:Control chip obtains bluetooth response from response encapsulation of data, using bluetooth response as USB response;
When the protocol type of preset bluetooth security equipment and usb protocol mark mismatch:
Step y4 is specially:The effective instruction data in chip acquisition USB command are controlled, according to the association of bluetooth security equipmentView type and the second preset protocol are packaged effective instruction data, obtain instruction encapsulation of data;Step y10 is specially:ControlCoremaking piece unseals response encapsulation of data, obtains the effective response data in bluetooth response, identifies phase according to usb protocolMatched usb protocol tissue includes the USB response for imitating reply data.
Further, step y3 is specially:The USB commands to be received from host computer such as chip are controlled, when defaultIn receive the USB command from host computer after, execute step y4;When being not received by within a preset time from host computerUSB command after, judge whether to receive from the Bluetooth chip and information that has disconnected of bluetooth security equipment, ifIt is then to reset Bluetooth chip, resets control chip, return step y1;Otherwise, it continues waiting for receiving the USB from host computer and refer toIt enables;After step y11, return step y3.
Further, further include after step y1:Control chip judges whether to receive from Bluetooth chip and bluetoothThe information that safety equipment has disconnected resets control chip, return step y1 if it is, resetting Bluetooth chip;Otherwise,Continue to determine whether to receive information from Bluetooth chip and that bluetooth security equipment has disconnected.
The working method of Bluetooth adapter provided in this embodiment, Bluetooth adapter are establishing connection with bluetooth security equipmentLater, report the usb protocol mark of itself to the end PC, Bluetooth adapter is suitable can be identified as HID device or CCID equipment orScsi device or other USB devices enhance the adaptability and application of Bluetooth adapter.When Bluetooth adapter has receivedAfter the USB command for meeting USB specification from the end PC, the USB command for meeting USB specification is converted, bluetooth security is obtainedAfter the Bluetooth commands that equipment can identify, Bluetooth commands are sent to bluetooth security equipment, the indigo plant that bluetooth security equipment is returnedTooth response is reconverted into the USB response for meeting USB specification that the end PC can identify, and the USB response for meeting USB specification is returnedThe end PC is given, the Bluetooth adapter and the end PC for so that bluetooth security equipment is provided through the invention are communicated.
Embodiment 2
A kind of working method of Bluetooth adapter is present embodiments provided, as shown in Fig. 2, specifically including:
Step 101:Bluetooth adapter powers on;
Step 102:Bluetooth adapter initialization;
In the present embodiment, Bluetooth adapter initialization is specially:Bluetooth adapter initialization control chip and Bluetooth chip.
Step 103:The bluetooth security equipment that Bluetooth adapter search matches with default device identification simultaneously connects with its foundationIt connects;
Specifically, Bluetooth adapter askes instruction by control chipset driving wheel, sends poll instruction to Bluetooth chip, receivesPoll repeat-back from Bluetooth chip.After Bluetooth chip receives poll instruction, search and default device identification phaseMatched bluetooth security equipment simultaneously establishes a connection, and returns to poll repeat-back to control chip.
Wherein, Bluetooth adapter askes instruction by control chipset driving wheel, specially:Bluetooth adapter passes through control chipIt is instructed according to the second preset protocol tissue poll.In the present embodiment, include in poll instruction:Instruct start byte, command identification,Data length, data field and the check bit of data field.
For example, the instruction banner word that Bluetooth adapter is instructed " 0x5A " and " 0xA5 " as poll by controlling chipSection is arranged in the first byte and the second byte of poll instruction, the command identification that " 0x02 " is instructed as poll, and setting existsPoll instruction third byte on, will " 0x00 " and " 0x00 " as poll instruct in data field data length, set respectivelyIt sets on the nybble and the 5th byte of poll instruction, the check value " XOR " that poll is instructed, poll instruction is set mostIn the latter byte (check bit), obtained poll instruction is specially:" 02 00 00 XOR of 5A A5 " is sent to Bluetooth chipPoll instructs " 02 00 00 XOR of 5A A5 ";Etc. the poll repeat-back to be received from Bluetooth chip.
In the present embodiment, presetting device identification is preset device identification, wherein device identification includes:Bluetooth equipmentUUID (Universally Unique Identifier, Universally Unique Identifier), the MAC Address of bluetooth equipment and bluetooth are setAt least one of standby device name.Wherein, the UUID of bluetooth equipment is the service unique identification information that bluetooth equipment is supported,The MAC Address of bluetooth equipment or the device name of bluetooth equipment are the unique identification information of bluetooth equipment.
In the present embodiment, bluetooth security equipment be can be, but not limited to as blue-tooth intelligence key devices and Bluetooth intelligent card etc..
Step 104:Bluetooth adapter judges whether to establish connection with bluetooth security equipment, if so, thening follow the steps105;Otherwise, return step 104;
Specifically, after Bluetooth adapter receives the poll repeat-back from Bluetooth chip by controlling chip, rootJudge whether to establish connection with bluetooth security equipment according to poll repeat-back, if so, thening follow the steps 105;Otherwise, step is returnedRapid 104;
More specifically, after Bluetooth adapter receives the poll repeat-back from Bluetooth chip by control chip,Poll repeat-back is parsed according to the second preset protocol, obtains the connection result mark in the data field in poll repeat-back,Judge whether to establish connection with bluetooth security equipment according to connection result mark, if connection result is identified as success flag" 00 " then establishes connection with bluetooth security equipment;Otherwise, connection failure.
For example, if Bluetooth adapter by control chip receive from Bluetooth chip poll repeat-back be " A502 00 01 00 XOR of 5A ", obtain the 5th byte after, the data in byte before the last byte, and by itsAs the connection result mark in the data field in poll repeat-back, then " 00 " is identified according to connection result and determine to pacify with bluetoothFull equipment establishes connection;If Bluetooth adapter is " A5 by controlling chip to receive the poll repeat-back from Bluetooth chip02 00 01 01 XOR of 5A ", obtain the 5th byte after, the data in byte before the last byte, and by itsAs the connection result mark in the data field in poll repeat-back, then " 01 " is identified according to connection result and determine no and indigo plantTooth safety equipment establishes connection.
Step 105:Bluetooth adapter states the usb protocol mark of itself to host computer;
Specifically, Bluetooth adapter passes through the control chip initiation USB module of itself, states itself to host computerUsb protocol mark.
In the present embodiment, host computer be can be, but not limited to as PC;Usb protocol mark be specially CCID protocol mark orHID protocol mark or SCSI protocol mark.In the present embodiment, usb protocol is identified so that SCSI protocol identifies as an example.
Step 106:The USB command to be received from host computer such as Bluetooth adapter comes when receiving within a preset timeFrom after the USB command of host computer, step 107 is executed;When being not received by the USB command from host computer within a preset timeAfterwards, it detects whether to have disconnected with bluetooth security equipment, if it is, Bluetooth adapter resets, return step 102;Otherwise,Return step 106;
Preferably, preset time is 3 seconds.
In the present embodiment, Bluetooth adapter resets, specially:Bluetooth chip in Bluetooth adapter resets, and controls chipIt resets.After Bluetooth adapter resets, host computer detects Bluetooth adapter on usb bus and upper by the hub of itselfPosition machine disconnects.
Step 107:Bluetooth adapter parses USB command, obtains the effective instruction data in USB command, is pacified according to bluetoothThe protocol type and effective instruction data organization Bluetooth commands of full equipment;
In the present embodiment, the effective instruction data in USB command are specially the APDU in USB command(ApplicationProtocolDataUnit, Application Protocol Data Unit).
In the present embodiment, USB command is by taking SCSI command as an example;The type protocol of bluetooth security equipment can be bluetooth adaptationWhat device and bluetooth security equipment consulted in advance, it can be by taking CCID protocol as an example.
Specifically, Bluetooth adapter parses USB command according to the usb protocol to match with usb protocol mark, obtains USBEffective instruction data in instruction add the first protocol header and command description mark before effective instruction data, pre- according to firstIf checking algorithm carries out operation to the data for including the first protocol header, command description mark and effective instruction data, first is obtainedCheck value adds the first check value after valid data, obtains including the first protocol header, command description mark, effective instruction numberAccording to the Bluetooth commands with the first check value.
For example, Bluetooth adapter parses SCSI command according to SCSI protocol" 5553424358aad6d60500000000000aff455041535300000055000000 0000000047474b80 ", willThe data in preceding 31 bytes in SCSI command obtain in the 13rd byte in command control word as command control wordData " 00 " determine that current SCSI command is upper according to the data " 00 " in the 13rd byte in the command control word gotPosition machine sends the instruction of effective instruction data, obtains the data " 05 " in the 9th byte of command control word, and asThe length of effective instruction data in SCSI command, obtains the data of 5 byte lengths after command control word, and is madeFor the effective instruction data in SCSI command, the effective instruction data for obtaining SCSI command are " 00 47 47 4b 80 ", are being hadCCID protocol head " 6F,070,000 00,000,400 0000 " and command description mark " 00 " are added before imitating director data, includingData " the 6F070000 00000400 of CCID protocol head, command description mark and effective instruction data0000000047474b80 ", according to EDC checking algorithm to including that CCID protocol head and effective instruction data carry out operation and obtain theOne check value " A7 ", adds the first check value after valid data, obtain include CCID protocol head, command description mark, effectivelyThe Bluetooth commands " 00,000,400 00000000 0047474b80A7 of 6F070000 " of director data and the first check value.
It should be noted that further including being returned to host computer after Bluetooth adapter receives the SCSI command from host computerIt echoes and answers control word, for example, when Bluetooth adapter receives the SCSI command from host computerAfter " 5553424358aad6d60500000000000aff455041535300000055000000 0000000047474b80 ",To host computer returning response control word " 5553425358aad6d60000000000 ".
Step 108:Bluetooth adapter sends Bluetooth commands to bluetooth security equipment;
Specifically, Bluetooth adapter sends Bluetooth commands to bluetooth security equipment by Bluetooth chip.
Step 109:Bluetooth adapter receives the bluetooth response from bluetooth security equipment;
Specifically, Bluetooth adapter receives the bluetooth response from bluetooth security equipment by Bluetooth chip.
Step 110:Bluetooth adapter parse bluetooth response, obtain bluetooth response in effective response data, according to USBThe usb protocol tissue that protocol-identifier matches includes the USB response for imitating reply data;
Specifically, Bluetooth adapter obtains the effective response number in bluetooth response according to the protocol type of bluetooth security equipmentAccording to according to the USB response for the usb protocol tissue that matches of usb protocol mark including the effective response data.
More specifically, Bluetooth adapter parses bluetooth response according to the protocol type of bluetooth security equipment, and bluetooth is answeredData after the first protocol header answered obtain in bluetooth response in the data field of bluetooth response as bluetooth reply data domainEffective response data, include the USB response for imitating reply data according to the usb protocol tissue that matches of usb protocol mark.
For example, Bluetooth adapter parses bluetooth response according to the protocol type of bluetooth security equipment“80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F90 00 66 ", will be in bluetooth responseData " 80,830,000 000106000000 " in preceding ten bytes are as the CCID protocol head in bluetooth response, by crossData after section are as the data field in bluetooth response, using the first character section in the data field in bluetooth response as bluetoothCommand description in response identifies, and the last byte in data field obtains the number in bluetooth response as third check valueThe data in all bytes after the command description mark in domain, before third check value“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 ", and as effective response data, include according to SCSI protocol tissueImitate the USB response " 6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE 2 of reply data895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 55 53 42 53f8 58 df da 00 00 00 00 00”。
It should be noted that according to SCSI protocol tissue include imitate reply data USB response be specially:According to SCSIAgreement organizations include the USB response for imitating reply data and response control word.More specifically:According to SCSI protocol effectiveResponse control word is added after reply data, obtains including the USB response for imitating reply data and response control word.
For example, according to SCSI protocol in effective response data“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 " adds response control word " 55 53 42 53f8,58 df da 00 00 afterwards00 00 00 ", obtain include imitate reply data and response control word USB response be:“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000”。
Step 111:USB response is returned to host computer, return step 106 by Bluetooth adapter;
It is when USB response is specially SCSI response, i.e., blue when usb protocol is identified as SCSI protocol mark in the present embodimentBefore USB response is returned to host computer by tooth adapter, further include:Receive the return USB response instruction from host computer.
In the present embodiment, step 107 can be specifically included as shown in Fig. 2-1:
Step 1071:It controls chip and parses USB command, the effective instruction data in USB command are obtained, according to bluetooth securityThe protocol type of equipment and the second preset protocol are packaged effective instruction data;
Specifically, control chip obtains the effective instruction data in USB command, according to the protocol type of bluetooth security equipmentEffective instruction data are packaged, the first encapsulation of data is obtained;The first encapsulation of data is sealed according to the second preset protocolDress obtains instruction encapsulation of data;
More specifically, control chip parses USB command according to the usb protocol to match with usb protocol mark, obtainsEffective instruction data in USB command add the first protocol header and command description mark, according to first before effective instruction dataDefault checking algorithm carries out operation to the data for including the first protocol header, command description mark and effective instruction data, obtains theOne check value adds the first check value after effective instruction data, obtain include the first protocol header, command description mark, haveImitate the first encapsulation of data of director data and the first check value;The second preset protocol head is added before the first encapsulation of data, according toSecond default checking algorithm carries out operation to the data for including the first encapsulation of data and the second preset protocol head, obtains the second verificationValue, the second check value is added after the first encapsulation of data, is obtained according to the first protocol header and the second preset protocol head to effectiveDirector data be packaged after instruction encapsulation of data.
For example, control chip parses SCSI command according to SCSI protocol, the effective instruction data for obtaining SCSI command are " 0047 47 4b 80 " add CCID protocol head " 6F,070,000 00,000,400 000000 " before effective instruction data and order are retouchedMark " 00 " is stated, obtaining includes CCID protocol head, command description identifies and the data " 6F070000 of effective instruction data00000400 0000000047474b80 ", according to EDC checking algorithm to include CCID protocol head and effective instruction data intoRow operation obtains the first check value " A7 ", obtains the first encapsulation of data " 6F,070,000 00,000,400 000000000047474b80 A7";The second preset protocol head " 5A A5 04 0013 " is added before the first encapsulation of data, obtains including firstData " the 5A A50400136F070000 00,000,400 00000000 of encapsulation of data and the second preset protocol head0047474b80 A7 " transports the data for including the first encapsulation of data and the second preset protocol head according to LRC checking algorithmIt calculates, obtains the second check value " 00 ", the second check value is added after the first encapsulation of data, obtain according to the first protocol header and theTwo preset protocol heads effective instruction data are packaged after instruction encapsulation of data " 04 00 13 6F 07 00 00 of 5A A500 00 04 00 00 00 00 00 00 47 47 4b 80 A7 00”。
Step 1072:Control chip by according to the protocol type of bluetooth security equipment and the second preset protocol to effective instructionData be packaged after data, be sent to Bluetooth chip;
Specifically, control chip will instruct encapsulation of data to be sent to Bluetooth chip.
Step 1073:Bluetooth chip is from the protocol type and the second preset protocol according to bluetooth security equipment to effective instructionData be packaged after data in, obtain Bluetooth commands;
Specifically, Bluetooth chip obtains the first encapsulation of data from instruction encapsulation of data, and first encapsulation of data is madeFor Bluetooth commands.
More specifically, Bluetooth chip unseals instruction encapsulation of data according to the second preset protocol, encapsulates from instructionThe first encapsulation of data is obtained in data, using the first encapsulation of data as Bluetooth commands.
For example, Bluetooth chip unseals instruction encapsulation of data, obtained data are " 0013 6F070000 of 5AA50400000400 00000000 004,747,4b8,0A7 00 ", after obtaining the second preset protocol head, before the second check valueData in all bytes, the data that will acquire " 00,000,400 00000000 0047474b80 A7 of 6F070000 " conductFirst encapsulation of data, using the first encapsulation of data as Bluetooth commands.
Correspondingly, step 110 can be specifically included as shown in Fig. 2-2:
Step 1101:Bluetooth chip encapsulates bluetooth response according to the second preset protocol;
Specifically, Bluetooth chip adds the second preset protocol head before bluetooth response, presets checking algorithm according to thirdOperation is carried out to the data for including the second preset protocol head and bluetooth response, the 4th check value is obtained, adds after bluetooth responseAdd the 4th check value, the bluetooth response after being encapsulated, using the bluetooth response after encapsulation as response encapsulation of data.
For example, Bluetooth chip is in bluetooth response " 80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106It before D0F9000 66 ", adds the second preset protocol head " 04 00 8F of A5 5A ", according to LRC checking algorithm to including secondPreset protocol head and the data of bluetooth response carry out operation, obtain the 4th check value " 00 ", and the 4th is added after bluetooth responseCheck value obtains the bluetooth response after encapsulating according to the second preset protocol head“A55A04008F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D 0F9,000 66 00 " will be encapsulatedBluetooth response afterwards is as response encapsulation of data.
Step 1102:Bluetooth chip is sent to control chip according to the bluetooth response after the encapsulation of the second preset protocol;
Specifically, Bluetooth chip sends response encapsulation of data to control chip.
Step 1103:Chip is controlled to according to the bluetooth response after the encapsulation of the second preset protocol, is unsealed, obtains bluetoothEffective response data in response include effect reply data according to the usb protocol tissue to match with usb protocol markUSB response.
Specifically, control chip is to according to the bluetooth response after the encapsulation of the second preset protocol, i.e., to response encapsulation of data, intoRow deblocking, obtains bluetooth response, obtains the effective response data in bluetooth response, root according to the protocol type of bluetooth security equipmentIt include the USB response for imitating reply data according to the usb protocol tissue to match with usb protocol mark.
More specifically, control chip encapsulates number to response to according to the bluetooth response after the encapsulation of the second preset protocolAccording to being unsealed, using all data after the first protocol header as the data field in bluetooth response, obtain having in data fieldReply data is imitated, includes the USB response for imitating reply data according to the usb protocol tissue to match with usb protocol mark.
For example, control chip is to according to the bluetooth response after the encapsulation of the second preset protocol“A55A04008F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D 0F9,000 66 00 " is solvedEnvelope, after obtaining CCID protocol head, the data in all bytes before third check value, the data that will acquire“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 " is as the effective response data in bluetooth response, according to SCSI protocol tissueIt include the SCSI response " 6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD for imitating reply data95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F900055534253f858dfda0000000000”。
It should be noted that according to SCSI protocol tissue include imitate reply data USB response be specially:According to SCSIAgreement organizations include the USB response for imitating reply data and response control word.More specifically:According to SCSI protocol effectiveResponse control word is added after reply data, obtains including the USB response for imitating reply data and response control word.
For example, according to SCSI protocol in effective response data“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 " adds response control word " 55534253f858dfda0000000000 " afterwards,Obtain include imitate reply data and response control word USB response be:“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000”。
In the present embodiment, the protocol type phase of the data format and bluetooth security equipment of Bluetooth commands and bluetooth responseMatch, the data format for controlling the communication between chip and Bluetooth chip matches with the second preset protocol, wherein bluetooth security is setStandby protocol type is that Bluetooth adapter and bluetooth security equipment consult in advance, and the second preset protocol is control chip and indigo plantIt is consulted in advance between tooth chip.It can be, but not limited between Bluetooth chip and control chip through UART (UniversalAsynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter)/SPI (Serial PeripheralInterface, Serial Peripheral Interface (SPI))/I2C (Inter-Integrated Circuit, internal integrated circuit) bus etc. is a variety ofMode transmits data.
It should be noted that in the present invention, when the protocol type of bluetooth security equipment is preset for Bluetooth adapter, with bluetoothThe usb protocol usb protocol that matches of mark of adapter and the first agreement can be different agreement or identical agreement, such asIn the present embodiment, usb protocol is SCSI protocol, and the protocol type of bluetooth security equipment is CCID protocol.
It should be noted that in the present embodiment, the protocol type of bluetooth security equipment can also be Bluetooth adapter according toIt is got in the broadcast message of bluetooth security equipment, specifically, after step 104, can also include:Bluetooth adapter is from indigo plantThe first protocol-identifier of bluetooth security equipment is obtained in the broadcast message of tooth safety equipment;Correspondingly, according to bluetooth in step 107The protocol type and effective instruction data organization Bluetooth commands of safety equipment, specially:According to first with bluetooth security equipmentThe corresponding protocol type of protocol-identifier and USB command tissue Bluetooth commands.
In the present embodiment, when Bluetooth adapter after step 104, before step 107, from the broadcast of bluetooth security equipmentAfter the first protocol-identifier for obtaining bluetooth security equipment in information, after step 106, can also include:Bluetooth adapter is sentencedDisconnected usb protocol identifies whether to match with the first protocol-identifier of bluetooth security equipment, if not, thening follow the steps 107;IfIt is to then follow the steps a1;
Step a1:Bluetooth adapter sends USB command to bluetooth security equipment;
Step a2:Bluetooth adapter receives the USB response from bluetooth security equipment;
Step a3:USB response is returned to host computer by Bluetooth adapter.
In the present embodiment, when Bluetooth adapter after step 104, before step 105, from the broadcast of bluetooth security equipmentAfter the first protocol-identifier for obtaining bluetooth security equipment in information, step 107 may be replaced with step b1:Bluetooth adapterUsing USB command as Bluetooth commands, step 108 is executed;Step 110 may be replaced with step c1:Bluetooth adapter will be blueTooth response executes step 111 as USB response.
In the present embodiment, after step 104, can also include:Bluetooth adapter is detected whether with bluetooth security equipmentIt disconnects, if it is, Bluetooth adapter resets, return step 102;Otherwise, continue to test whether with bluetooth security equipmentIt has disconnected.Correspondingly, it in step 106 after being not received by the USB command from host computer within a preset time, returnsStep 106.
Embodiment 3
A kind of working method of Bluetooth adapter is present embodiments provided, as shown in figure 3, specifically including:
Step 201:Bluetooth adapter powers on;
Step 202:Bluetooth adapter initialization;
In the present embodiment, Bluetooth adapter initialization is specially:Bluetooth adapter initialization control chip and Bluetooth chip.
Step 203:The bluetooth security equipment that Bluetooth adapter search matches with default device identification simultaneously connects with its foundationIt connects;
Specifically, Bluetooth adapter askes instruction by control chipset driving wheel, sends poll instruction to Bluetooth chip, receivesPoll repeat-back from Bluetooth chip.After Bluetooth chip receives poll instruction, search and default device identification phaseMatched bluetooth security equipment simultaneously establishes a connection, and returns to poll repeat-back to control chip.
Wherein, Bluetooth adapter askes instruction by control chipset driving wheel, specially:Bluetooth adapter passes through control chipIt is instructed according to the second preset protocol tissue poll.In the present embodiment, include in poll instruction:Instruct start byte, command identification,Data length, data field and the check bit of data field.
For example, the instruction banner word that Bluetooth adapter is instructed " 0x5A " and " 0xA5 " as poll by controlling chipSection is arranged in the first byte and the second byte of poll instruction, the command identification that " 0x02 " is instructed as poll, and setting existsPoll instruction third byte on, will " 0x00 " and " 0x00 " as poll instruct in data field data length, set respectivelyIt sets on the nybble and the 5th byte of poll instruction, the check value " XOR " that poll is instructed, poll instruction is set mostIn the latter byte (check bit), obtained poll instruction is specially:" 02 00 00 XOR of 5A A5 " is sent to Bluetooth chipPoll instructs " 02 00 00 XOR of 5A A5 ";Etc. the poll repeat-back to be received from Bluetooth chip.
In the present embodiment, presetting device identification is preset device identification, wherein device identification includes:Bluetooth equipmentUUID (Universally Unique Identifier, Universally Unique Identifier), the MAC Address of bluetooth equipment and bluetooth are setAt least one of standby device name.Wherein, the UUID of bluetooth equipment is the service unique identification information that bluetooth equipment is supported,The MAC Address of bluetooth equipment or the device name of bluetooth equipment are the unique identification information of bluetooth equipment.
In the present embodiment, bluetooth security equipment be can be, but not limited to as blue-tooth intelligence key devices and Bluetooth intelligent card etc..
Step 204:Bluetooth adapter judges whether to establish connection with bluetooth security equipment, if so, thening follow the steps205;Otherwise, return step 204;
Specifically, after Bluetooth adapter receives the poll repeat-back from Bluetooth chip by controlling chip, rootJudge whether to establish connection with bluetooth security equipment according to poll repeat-back, if so, thening follow the steps 205;Otherwise, step is returnedRapid 204;
More specifically, after Bluetooth adapter receives the poll repeat-back from Bluetooth chip by control chip,Poll repeat-back is parsed according to the second preset protocol, obtains the connection result mark in the data field in poll repeat-back,Judge whether to establish connection with bluetooth security equipment according to connection result mark, if connection result is identified as success flag,Connection is established with bluetooth security equipment;Otherwise, connection failure.
For example, if Bluetooth adapter by control chip receive from Bluetooth chip poll repeat-back be " A502 00 01 00 XOR of 5A ", obtain the 5th byte after, the data in byte before the last byte, and by itsAs the connection result mark in the data field in poll repeat-back, then " 00 " is identified according to connection result and determine to pacify with bluetoothFull equipment establishes connection;If Bluetooth adapter is " A5 by controlling chip to receive the poll repeat-back from Bluetooth chip02 00 01 01 XOR of 5A ", obtain the 5th byte after, the data in byte before the last byte, and by itsAs the connection result mark in the data field in poll repeat-back, then " 01 " is identified according to connection result and determine no and indigo plantTooth safety equipment establishes connection.
Step 205:Bluetooth adapter states the usb protocol mark of itself to host computer;
Specifically, Bluetooth adapter passes through the control chip initiation USB module of itself, states itself to host computerUsb protocol mark.
In the present embodiment, host computer be can be, but not limited to as PC;Usb protocol mark be specially CCID protocol mark orHID protocol mark or SCSI protocol mark.In the present embodiment, usb protocol is identified so that HID protocol identifies as an example.
Step 206:The USB command to be received from host computer such as Bluetooth adapter comes when receiving within a preset timeFrom after the USB command of host computer, step 207 is executed;When being not received by the USB command from host computer within a preset timeAfterwards, it detects whether to have disconnected with bluetooth security equipment, if it is, Bluetooth adapter resets, return step 202;Otherwise,Return step 206;
Preferably, preset time is 3 seconds.
In the present embodiment, Bluetooth adapter resets, specially:Bluetooth chip in Bluetooth adapter resets, and controls chipIt resets.After Bluetooth adapter resets, host computer detects Bluetooth adapter on usb bus and upper by the hub of itselfPosition machine disconnects.
Step 207:Bluetooth adapter parses USB command, obtains the effective instruction data in USB command, is pacified according to bluetoothThe protocol type and effective instruction data organization Bluetooth commands of full equipment;
In the present embodiment, the effective instruction data in USB command are specially the APDU in USB command.
In the present embodiment, USB command is by taking HID is instructed as an example;The protocol type of bluetooth security equipment can be adapted to for bluetoothWhat device and bluetooth security equipment consulted in advance, it can be by taking CCID protocol as an example.
Specifically, Bluetooth adapter parses USB command according to the usb protocol to match with usb protocol mark, obtains USBEffective instruction data in instruction add the first protocol header and command description mark before effective instruction data, pre- according to firstIf checking algorithm carries out operation to the data for including the first protocol header, command description mark and effective instruction data, first is obtainedCheck value adds the first check value after valid data, obtains including the first protocol header, command description mark, effective instruction numberAccording to the Bluetooth commands with the first check value.
For example, Bluetooth adapter, which parses HID according to HID protocol, instructs " 00 05 00 00 00 05 00 47 47 4b80cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cccc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ccCc cc ", the HID protocol head " 00 05 00 00 00 that the data in the first six byte of HID instruction are instructed as HID05 ", the data length by the first two byte " 00 05 " of HID protocol head as the HID effective instruction data instructed assists HIDOffset of the data " 00 00 " as current packet data transmission data packet in the third and fourth byte of head is discussed, by HID protocol headThe the 5th and the 6th byte on data length of the data " 00 05 " as current packet transmission, HID is obtained according to HID protocol headThe data of 5 byte lengths after protocol header, and as the effective instruction data of HID instruction, obtain having for HID instructionImitating director data is " 00 47 47 4b 80 ", and HID protocol head " 6F,070,000 00000400 is added before effective instruction data0000 " identifies " 00 " with command description, and obtaining includes CCID protocol head, command description identifies and the data of effective instruction data" 00000400 0000000047474b80 of 6F070000 ", according to EDC checking algorithm to including CCID protocol head and effectively fingerIt enables the carry out operation of data obtain the first check value " A7 ", the first check value is added after valid data, obtain including CCID associationDiscuss the Bluetooth commands " 6F,070,000 00000400 of head, command description mark, effective instruction data and the first check value00000000 0047474b80 A7”。
Step 208:Bluetooth adapter sends Bluetooth commands to bluetooth security equipment;
Specifically, Bluetooth adapter sends Bluetooth commands to bluetooth security equipment by Bluetooth chip.
Step 209:Bluetooth adapter receives the bluetooth response from bluetooth security equipment;
Specifically, Bluetooth adapter receives the bluetooth response from bluetooth security equipment by Bluetooth chip.
Step 210:Bluetooth adapter parse bluetooth response, obtain bluetooth response in effective response data, according to USBThe usb protocol tissue that protocol-identifier matches includes the USB response for imitating reply data;
Specifically, Bluetooth adapter obtains the effective response number in bluetooth response according to the protocol type of bluetooth security equipmentAccording to including the USB response for imitating reply data according to the usb protocol tissue that matches of usb protocol mark.
More specifically, Bluetooth adapter parses bluetooth response according to the protocol type of bluetooth security equipment, and bluetooth is answeredData after the first protocol header answered obtain in bluetooth response in the data field of bluetooth response as bluetooth reply data domainEffective response data, include the USB response for imitating reply data according to the usb protocol tissue that matches of usb protocol mark.
For example, Bluetooth adapter parses bluetooth response according to the protocol type of bluetooth security equipment“80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 66 ", by preceding ten in bluetooth responseData " 80,830,000 000106000000 " in byte are as the CCID protocol head in bluetooth response, after crossed jointData as the data field in bluetooth response, using the first character section in the data field in bluetooth response as in bluetooth responseCommand description mark, the last byte in data field is used as third check value, in the data field in acquisition bluetooth responseCommand description mark after, the data in all bytes before third check value“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 ", and as effective response data, include according to HID protocol tissueImitate the USB response of reply data.
Wherein, it is specially according to the USB response that HID protocol tissue includes effect reply data:According to HID protocol tissue packetInclude the USB response of HID protocol head and effective response data.
More specifically, it can also judge whether needs according to HID protocol, preset subpackage length and effective response dataSubpackage is surrounded by effect reply data if it is, being divided into effective response data according to preset subpackage length more, is often being surrounded by effectCorresponding HID protocol head is added before reply data, obtains including the more packet USB responses for imitating reply data;Otherwise, tissue includesThe USB response of HID protocol head and effective response data.
For example, according to according to HID protocol, preset subpackage length " 40 " and effective response data“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 ", judgement need USB response being divided into three guarantees, and first obtained is surrounded by effectAnswer evidence is 6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE 2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB80;Second, which is surrounded by effect reply data, is:55F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B;Third is surrounded by effect reply dataFor:00820074000e746F50544C008A7CDC106D0F9000, and added accordingly before being often surrounded by effect reply dataHID protocol head, obtain include first be surrounded by effect reply data first packet USB response be:00820000003a6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB80;
Obtain include second be surrounded by effect reply data second packet USB response be:
0082003a003a55F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B;
Obtain include third be surrounded by effect reply data third packet USB response be:
00820074000e746F50544C008A7CDC106D0F9000cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc。
Step 211:USB response is returned to host computer, return step 206 by Bluetooth adapter;
In the present embodiment, step 207 can specifically include as shown in figure 3-1:
Step 2071:It controls chip and parses USB command, the effective instruction data in USB command are obtained, according to bluetooth securityThe protocol type of equipment and the second preset protocol are packaged effective instruction data;
Specifically, control chip obtains the effective instruction data in USB command, according to the protocol type of bluetooth security equipmentEffective instruction data are packaged, the first encapsulation of data is obtained;The first encapsulation of data is sealed according to the second preset protocolDress obtains instruction encapsulation of data;
More specifically, control chip parses USB command according to the usb protocol to match with usb protocol mark, obtainsEffective instruction data in USB command add the first protocol header and command description mark, according to first before effective instruction dataDefault checking algorithm carries out operation to the data for including the first protocol header, command description mark and effective instruction data, obtains theOne check value adds the first check value after effective instruction data, obtain include the first protocol header, command description mark, haveImitate the first encapsulation of data of director data and the first check value;The second preset protocol head is added before the first encapsulation of data, according toSecond default checking algorithm carries out operation to the data for including the first encapsulation of data and the second preset protocol head, obtains the second verificationValue, the second check value is added after the first encapsulation of data, is obtained according to the first protocol header and the second preset protocol head to effectiveDirector data be packaged after instruction encapsulation of data.
For example, control chip parses HID instruction according to HID protocol“0005000000050047474b80ccccccccccccccccccccccccccccccccccccccccccccccccccccccCccccccccccccccccccccccccccccccccccccccccccccccccccc ", will be in the first six byte of HID instructionThe HID protocol head that is instructed as HID of data " 00 05 00 00 00 05 ", by the first two byte " 00 of HID protocol head05 " the data length as the effective instruction data of HID instruction, by the data " 00 in the third and fourth byte of HID protocol head00 " the offset as current packet data transmission data packet, by the data " 00 05 " in the 5th and the 6th byte of HID protocol headAs the data length of current packet transmission, the data of 5 byte lengths after HID protocol head are obtained according to HID protocol head, andAs the effective instruction data of HID instruction, the effective instruction data for obtaining HID instruction are " 00 47 47 4b 80 ",CCID protocol head " 6F,070,000 00,000,400 000000 " and command description mark " 00 " are added before effective instruction data, are obtainedData " 6F,070,000 00000400 including CCID protocol head, command description mark and effective instruction data0000000047474b80 " obtains the carry out operation for including CCID protocol head and effective instruction data according to EDC checking algorithmFirst check value " A7 " obtains the first encapsulation of data " 00,000,400 00000000 0047474b80 A7 of 6F070000 ";?The second preset protocol head " 5A A5 04 0013 " is added before first encapsulation of data, obtains including that the first encapsulation of data and second are pre-If the data " 00,000,400 00000000 0047474b80 A7 of 5A A50400136F070000 " of protocol header, according to the school LRCChecking method carries out operation to the data for including the first encapsulation of data and the second preset protocol head, obtains the second check value " 00 ",The second check value is added after first encapsulation of data, is obtained according to the first protocol header and the second preset protocol head to effective instruction numberAccording to instruction encapsulation of data " 04 00 13 6F 07 00 00 00 00 04 00 00 00 00 00 of 5A A5 after being packaged00 47 47 4b 80 A7 00”。
Step 2072:Control chip by according to the protocol type of bluetooth security equipment and the second preset protocol to effective instructionData be packaged after data, be sent to Bluetooth chip;
Specifically, control chip will instruct encapsulation of data to be sent to Bluetooth chip;
Step 2073:Bluetooth chip is from the protocol type and the second preset protocol according to bluetooth security equipment to effective instructionData be packaged after data in, obtain Bluetooth commands;
Specifically, Bluetooth chip obtains the first encapsulation of data from instruction encapsulation of data, and first encapsulation of data is madeFor Bluetooth commands.
More specifically, Bluetooth chip unseals instruction encapsulation of data according to the second preset protocol, encapsulates from instructionThe first encapsulation of data is obtained in data, using the first encapsulation of data as Bluetooth commands.
For example, Bluetooth chip unseals instruction encapsulation of data, obtained data are " 0013 6F070000 of 5AA50400000400 00000000 0047474b80 A7 00 ", after obtaining the second preset protocol head, before the second check valueData in all bytes, the data that will acquire " 00,000,400 00000000 0047474b80 A7 of 6F070000 " conductFirst encapsulation of data, using the first encapsulation of data as Bluetooth commands.
Correspondingly, step 210 can specifically include as shown in figure 3-2:
Step 2101:Bluetooth chip encapsulates bluetooth response according to the second preset protocol;
Specifically, Bluetooth chip adds the second preset protocol head before bluetooth response, presets checking algorithm according to thirdOperation is carried out to the data for including the second preset protocol head and bluetooth response, the 4th check value is obtained, adds after bluetooth responseAdd the 4th check value, the bluetooth response after being encapsulated, using the bluetooth response after encapsulation as response encapsulation of data.
For example, Bluetooth chip is in bluetooth response " 80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106It before D0F9000 66 ", adds the second preset protocol head " 04 00 8F of A5 5A ", according to LRC checking algorithm to including secondPreset protocol head and the data of bluetooth response carry out operation, obtain the 4th check value " 00 ", and the 4th is added after bluetooth responseCheck value obtains the bluetooth response after encapsulating according to the second preset protocol head“A55A04008F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D 0F9,000 66 00 " will be encapsulatedBluetooth response afterwards is as response encapsulation of data.
Step 2102:Bluetooth chip is sent to control chip according to the bluetooth response after the encapsulation of the second preset protocol;
Specifically, Bluetooth chip sends response encapsulation of data to control chip.
Step 2103:Chip is controlled to according to the bluetooth response after the encapsulation of the second preset protocol, is unsealed, obtains bluetoothEffective response data in response include effect reply data according to the usb protocol tissue to match with usb protocol markUSB response.
Specifically, control chip is to according to the bluetooth response after the encapsulation of the second preset protocol, i.e., to response encapsulation of data, intoRow deblocking, obtains bluetooth response, obtains the effective response data in bluetooth response, root according to the protocol type of bluetooth security equipmentIt include the USB response for imitating reply data according to the usb protocol tissue to match with usb protocol mark.
More specifically, control chip encapsulates number to response to according to the bluetooth response after the encapsulation of the second preset protocolAccording to being unsealed, using all data after the first protocol header as the data field in bluetooth response, obtain having in data fieldReply data is imitated, includes the USB response for imitating reply data according to the usb protocol tissue to match with usb protocol mark.
For example, control chip is to according to the bluetooth response after the encapsulation of the second preset protocol“A55A04008F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 66 00 " is unsealed, obtain CCID protocol head after, third check value itData in preceding all bytes, the data that will acquire“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 " is as the effective response data in bluetooth response, according to HID protocol tissue packetInclude the HID response of effective response data.
Wherein, it is specially according to the USB response that HID protocol tissue includes effect reply data:According to HID protocol tissue packetInclude the USB response of HID protocol head and effective response data.
More specifically, it can also judge whether needs according to HID protocol, preset subpackage length and effective response dataSubpackage is surrounded by effect reply data if it is, being divided into effective response data according to preset subpackage length more, is often being surrounded by effectCorresponding HID protocol head is added before reply data, obtains including the more packet USB responses for imitating reply data;Otherwise, tissue includesThe USB response of HID protocol head and effective response data.
For example, according to according to HID protocol, preset subpackage length and effective response data“6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 ", judge to need by USB response be divided into three guarantees, first obtained is surrounded by effect reply data and is:6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB80;Second, which is surrounded by effect reply data, is:55F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B;Third is surrounded by effect reply data:00820074000e746F50544C008A7CDC106D0F9000, and corresponding HID is added before being often surrounded by effect reply dataProtocol header, obtain include first be surrounded by effect reply data first packet USB response be:00820000003a6AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB80;
Obtain include second be surrounded by effect reply data second packet USB response be:
0082003a003a55F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B;
Obtain include third be surrounded by effect reply data third packet USB response be
00820074000e746F50544C008A7CDC106D0F9000cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc。
In the present embodiment, the protocol type phase of the data format and bluetooth security equipment of Bluetooth commands and bluetooth responseMatch, the data format for controlling the communication between chip and Bluetooth chip matches with the second preset protocol, wherein bluetooth security is setStandby protocol type can be Bluetooth adapter and bluetooth security equipment consults in advance, and the second preset protocol is control chipIt is consulted in advance between Bluetooth chip.It can be, but not limited to pass through UART between Bluetooth chip and control chip(Universal Asynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter)/SPI (SerialPeripheral Interface, Serial Peripheral Interface (SPI)) (Inter-Integrated Circuit, is internally integrated electricity to/I2CRoad) the various mode transmissions data such as bus.
It should be noted that in the present invention, when the protocol type of bluetooth security equipment is preset for Bluetooth adapter, with bluetoothThe usb protocol mark usb protocol to match of adapter and the protocol type of bluetooth security equipment can for different agreement orThe identical agreement of person, in the present embodiment, usb protocol is HID protocol, and the protocol type of bluetooth security equipment is CCID associationView.
It should be noted that in the present embodiment, the protocol type of bluetooth security equipment can also be Bluetooth adapter according toIt is got in the broadcast message of bluetooth security equipment, specifically, after step 204, can also include:Bluetooth adapter is from indigo plantThe first protocol-identifier of bluetooth security equipment is obtained in the broadcast message of tooth safety equipment;Correspondingly, bluetooth is adapted in step 207Device is according to the protocol type and effective instruction data organization Bluetooth commands of bluetooth security equipment, specially:According to bluetooth securityThe corresponding protocol type of the first protocol-identifier and USB command tissue Bluetooth commands of equipment.
In the present embodiment, when Bluetooth adapter after step 204, before step 207, from the broadcast of bluetooth security equipmentAfter the first protocol-identifier for obtaining bluetooth security equipment in information, after step 206, can also include:Bluetooth adapter is sentencedDisconnected usb protocol identifies whether to match with the first protocol-identifier of bluetooth security equipment, if not, thening follow the steps 207;IfIt is to then follow the steps d1;
Step d1:Bluetooth adapter sends USB command to bluetooth security equipment;
Step d2:Bluetooth adapter receives the USB response from bluetooth security equipment;
Step d3:USB response is returned to host computer by Bluetooth adapter.
In the present embodiment, when Bluetooth adapter after step 204, before step 205, from from the wide of bluetooth security equipmentAfter broadcasting the first protocol-identifier for obtaining bluetooth security equipment in information, step 207 may be replaced with step e1:Bluetooth adaptationDevice executes step 208 using USB command as Bluetooth commands;Step 210 may be replaced with step f1:Bluetooth adapter willBluetooth response executes step 211 as USB response.
In the present embodiment, after step 204, can also include:Bluetooth adapter is detected whether with bluetooth security equipmentIt disconnects, if it is, Bluetooth adapter resets, return step 202;Otherwise, continue to test whether with bluetooth security equipmentIt has disconnected.Correspondingly, it in step 206 after being not received by the USB command from host computer within a preset time, returnsStep 206.
Embodiment 4
A kind of working method of Bluetooth adapter is present embodiments provided, is suitable for including Bluetooth adapter, bluetooth securityThe system of equipment and host computer, as shown in figure 4, including:
Step 301:Bluetooth adapter powers on;
Step 302:Bluetooth adapter initialization;
Step 303:The bluetooth security equipment that Bluetooth adapter search matches with default device identification simultaneously connects with its foundationIt connects;
Step 304:Bluetooth adapter judges whether to establish connection with bluetooth security equipment, if so, thening follow the steps305;Otherwise, return step 304;
Step 305:Bluetooth adapter states the usb protocol mark of itself to host computer;
Step 306:Host computer sends USB command to Bluetooth adapter;
Step 307:Bluetooth adapter parses USB command, obtains the effective instruction data in USB command, is pacified according to bluetoothThe protocol type and effective instruction data organization Bluetooth commands of full equipment;
Specifically, Bluetooth adapter parses USB command according to the usb protocol to match with usb protocol mark, obtains USBEffective instruction data in instruction, according to the protocol type of bluetooth security equipment and effective instruction data organization Bluetooth commands.
In the present embodiment, the effective instruction data in USB command are specially the APDU in USB command.
Step 308:Bluetooth adapter sends Bluetooth commands to bluetooth security equipment;
Step 309:Bluetooth security equipment parses Bluetooth commands, organizes bluetooth response corresponding with Bluetooth commands;
Specifically, bluetooth security equipment parses Bluetooth commands according to the protocol type of bluetooth security equipment, is pacified according to bluetoothThe protocol type tissue bluetooth response corresponding with Bluetooth commands of full equipment.
Step 310:Bluetooth security equipment sends bluetooth response to Bluetooth adapter;
Step 311:Bluetooth adapter parse bluetooth response, obtain bluetooth response in effective response data, according to USBThe usb protocol tissue that protocol-identifier matches includes the USB response for imitating reply data;
Specifically, bluetooth security equipment parses bluetooth response according to the protocol type of bluetooth security equipment, obtains bluetooth and answersEffective response data in answering, according to the usb protocol and effective response data organization USB response to match with usb protocol mark.
Step 312:Bluetooth adapter sends USB response to host computer.
It should be noted that in the present invention, when the protocol type of bluetooth security equipment is preset for Bluetooth adapter, with bluetoothThe usb protocol mark usb protocol to match of adapter and the protocol type of bluetooth security equipment can for different agreement orThe identical agreement of person.
It should be noted that in the present embodiment, the protocol type of bluetooth security equipment can also be Bluetooth adapter according toIt is got in the broadcast message of bluetooth security equipment, specifically, after step 304, can also include:Bluetooth adapter is from indigo plantThe first protocol-identifier of bluetooth security equipment is obtained in the broadcast message of tooth safety equipment;Correspondingly, bluetooth is adapted in step 307Device is according to the protocol type and effective instruction data organization Bluetooth commands of bluetooth security equipment, specially:Bluetooth adapter according toProtocol type corresponding with the first protocol-identifier of bluetooth security equipment and USB command tissue Bluetooth commands.
In the present embodiment, when Bluetooth adapter after the step 304, before step 307, from the broadcast of bluetooth security equipmentAfter the first protocol-identifier for obtaining bluetooth security equipment in information, after step 306, can also include:Bluetooth adapter is sentencedDisconnected usb protocol identifies whether to match with the first protocol-identifier of bluetooth security equipment, if not, thening follow the steps 307;IfIt is to then follow the steps g1;
Step g1:Bluetooth adapter sends USB command to bluetooth security equipment;
Step g2:Bluetooth adapter receives the USB response from bluetooth security equipment;
Step g3:USB response is returned to host computer by Bluetooth adapter.
In the present embodiment, when Bluetooth adapter after the step 304, before step 305, from from the wide of bluetooth security equipmentAfter broadcasting the first protocol-identifier for obtaining bluetooth security equipment in information, step 307 may be replaced with step:Bluetooth adapterUsing USB command as Bluetooth commands;Step 310 may be replaced with step:Bluetooth adapter is answered using bluetooth response as USBIt answers.
In the present embodiment, after step 304, can also include:Bluetooth adapter is detected whether with bluetooth security equipmentIt disconnects, if it is, Bluetooth adapter resets, return step 302;Otherwise, continue to test whether with bluetooth security equipmentIt has disconnected.
In the present embodiment, a kind of working method of Bluetooth adapter is additionally provided, is suitable for including Bluetooth adapter, bluetoothThe system of safety equipment and host computer, wherein Bluetooth adapter includes control chip and Bluetooth chip, specifically as shown in figure 5, working asAfter Bluetooth adapter powers on, including:
Step 401:Control chip initiation, Bluetooth chip initialization;
Step 402:It controls chip and sends poll instruction to Bluetooth chip;
In the present embodiment, after control chip sends poll instruction to Bluetooth chip, control chip etc. is to be received to come from bluetoothThe poll repeat-back of chip.
Specifically, control chip is instructed according to the second preset protocol tissue poll, sends poll instruction to Bluetooth chip, toReceive the poll repeat-back from Bluetooth chip.
Step 403:Bluetooth chip is searched for the bluetooth security equipment to match with default device identification and is established a connection;
Step 404:Bluetooth chip returns to poll repeat-back to control chip;
Specifically, control chip returns to poll to Bluetooth chip and refers to according to the second preset protocol tissue poll repeat-backEnable response.
Step 405:Chip is controlled to be judged whether to establish connection with bluetooth security equipment according to poll repeat-back, ifIt is to then follow the steps 406;Otherwise, it continues waiting for receiving the poll repeat-back from Bluetooth chip, comes from bluetooth when receivingAfter the poll repeat-back of chip, return step 405;
Specifically, after control chip receives the poll repeat-back from Bluetooth chip, according to the second preset protocol solutionPoll repeat-back is analysed, the connection result mark in the data field in poll repeat-back is obtained, is sentenced according to connection result markIt is disconnected whether with bluetooth security equipment to establish connection, if connection result is identified as success flag " 00 ", and bluetooth security equipmentEstablish connection;Otherwise, connection failure.
Step 406:Chip initiation USB module is controlled, the usb protocol mark of itself is stated to host computer;
Step 407:Host computer sends USB command to control chip;
Step 408:It controls chip and parses USB command, the effective instruction data in USB command are obtained, according to bluetooth securityThe protocol type of equipment and the second preset protocol are packaged effective instruction data;
Specifically, control chip parses USB command according to the usb protocol to match with usb protocol mark, obtains USB and refers toEffective instruction data in order carry out effective instruction data according to the protocol type of bluetooth security equipment and the second preset protocolEncapsulation obtains instruction encapsulation of data.
More specifically, control chip parses USB command according to the usb protocol to match with usb protocol mark, obtainsEffective instruction data in USB command are packaged effective instruction data according to the protocol type of bluetooth security equipment, obtainFirst encapsulation of data;The first encapsulation of data is packaged according to the second preset protocol, obtains instruction encapsulation of data;
Step 409:Control chip by according to the protocol type of bluetooth security equipment and the second preset protocol to effective instructionData be packaged after data, be sent to Bluetooth chip;
Specifically, control chip will instruct encapsulation of data to be sent to Bluetooth chip;
Step 410:Bluetooth chip is from the protocol type and the second preset protocol according to bluetooth security equipment to effective instructionData be packaged after data in, obtain Bluetooth commands;
Specifically, Bluetooth chip obtains the first encapsulation of data from instruction encapsulation of data, using the first encapsulation of data as indigo plantTooth instruction.
More specifically, Bluetooth chip unseals instruction encapsulation of data according to the second preset protocol, encapsulates from instructionThe first encapsulation of data is obtained in data, using the first encapsulation of data as Bluetooth commands.
Step 411:Bluetooth chip sends Bluetooth commands to bluetooth security equipment;
Step 412:Bluetooth security equipment parses Bluetooth commands, organizes bluetooth response corresponding with Bluetooth commands;
Specifically, bluetooth security equipment parses Bluetooth commands according to the protocol type of bluetooth security equipment, is pacified according to bluetoothThe protocol type tissue bluetooth response corresponding with Bluetooth commands of full equipment.
Step 413:Bluetooth security equipment sends bluetooth response to Bluetooth chip;
Step 414:Bluetooth chip encapsulates bluetooth response according to the second preset protocol;
Specifically, Bluetooth chip encapsulates bluetooth response according to the second preset protocol, obtains response encapsulation of data;
Step 415:Bluetooth chip is sent to control chip according to the bluetooth response after the encapsulation of the second preset protocol;
Specifically, Bluetooth chip sends response encapsulation of data to control chip;
Step 416:Chip is controlled to according to the bluetooth response after the encapsulation of the second preset protocol, is unsealed, obtains bluetoothEffective response data in response include effect reply data according to the usb protocol tissue to match with usb protocol markUSB response;
Specifically, control chip is unsealed to according to the bluetooth response after the encapsulation of the second preset protocol, i.e., seals to responseDress data are unsealed, and the effective response data in bluetooth response are obtained, and identify the usb protocol to match according to usb protocolTissue includes the USB response for imitating reply data.
Step 417:It controls chip and sends USB response to host computer.
In the present embodiment, it can be, but not limited between Bluetooth chip and control chip through UART (UniversalAsynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter)/SPI (Serial PeripheralInterface, Serial Peripheral Interface (SPI))/I2C (Inter-Integrated Circuit, internal integrated circuit) bus etc. is a variety ofMode transmits data.
It should be noted that the protocol type of bluetooth security equipment can be Bluetooth adapter and bluetooth security equipment is assisted in advanceQuotient is good, consults in advance between the second preset protocol control chip and Bluetooth chip.
It should be noted that the protocol type of bluetooth security equipment can also be control chip according to indigo plant in the present embodimentWhat the broadcast message of tooth safety equipment was got, specifically, after step 402, further include:Chip is controlled to send to Bluetooth chipObtain bluetooth security device identification instruction;Bluetooth chip returns to the first protocol-identifier including bluetooth security equipment to control chipResponse;
Correspondingly, chip is controlled in step 408 according to the protocol type of bluetooth security equipment and the second preset protocol to havingEffect director data is packaged specially:Chip is controlled according to protocol class corresponding with the first protocol-identifier of bluetooth security equipmentType and the second preset protocol are packaged effective instruction data.
In the present embodiment, when controlling chip after step 405, before step 408, further include:Chip is controlled to bluetoothChip, which is sent, obtains bluetooth security device identification instruction;It includes the first of bluetooth security equipment that Bluetooth chip is returned to control chipAfter the response of protocol-identifier, after step 406, can also include:Control chip judges that usb protocol identifies whether and the first associationSensible matching of assessing a bid for tender executes following steps when usb protocol mark matches with the first protocol-identifier:
Step m1:Control chip is packaged USB command according to the second preset protocol, obtains instruction encapsulation of data;
Step m2:Control chip will instruct encapsulation of data to be sent to Bluetooth chip;
Specifically, control chip is sent to Bluetooth chip for according to the USB command after the encapsulation of the second preset protocol;
Step m3:Bluetooth chip unseals instruction encapsulation of data, obtains USB command;
Specifically, Bluetooth chip unseals the USB command after encapsulation according to the second preset protocol, obtains USB command;I.e. Bluetooth chip unseals instruction encapsulation of data according to the second preset protocol, obtains USB command.
Step m4:Bluetooth chip sends USB command to bluetooth security equipment;The USB from bluetooth security equipment is received to answerIt answers;
Step m5:Bluetooth chip encapsulates USB response according to the second preset protocol, obtains response encapsulation of data;
Step m6:Bluetooth chip sends response encapsulation of data to control chip;
Specifically, Bluetooth chip is sent to control chip according to the USB response after the encapsulation of the second preset protocol;
Step m7:Control chip unseals response encapsulation of data, obtains USB response;
Specifically, control chip is carried out according to the second preset protocol to according to the USB response after the encapsulation of the second preset protocolDeblocking, obtains USB response;That is control chip unseals response encapsulation of data according to the second preset protocol, obtains USB and answersIt answers.
Step m8:It controls chip and USB response is returned to by host computer by USB module;
When usb protocol mark is mismatched with the first protocol-identifier, step 408 is executed.
In the present embodiment, when controlling chip after step 402, before step 406, further include:Chip is controlled to bluetoothChip, which is sent, obtains bluetooth security device identification instruction;It includes the first of bluetooth security equipment that Bluetooth chip is returned to control chipAfter the response of protocol-identifier, step 406 is specially:Chip initiation USB module is controlled, the usb protocol of itself is identified into settingFor the first protocol-identifier, the first protocol-identifier of itself is stated to host computer by USB module;
Step 408 is replaced by:Control chip is packaged USB command according to the second preset protocol, obtains instruction envelopeFill data;
Step 409 is replaced by:Chip is controlled by according to the USB command after the encapsulation of the second preset protocol, i.e., is sealed instructionData are filled, Bluetooth chip is sent to;
Step 410 is replaced by:Bluetooth chip unseals the USB command after encapsulation according to the second preset protocol, obtainsTo USB command, step 411 is executed;I.e. step 410 is replaced by:Bluetooth chip encapsulates number to instruction according to the second preset protocolAccording to being unsealed, USB command is obtained, executes step 411;
Step 416 is replaced by:Control chip obtains bluetooth from according to the bluetooth response after the encapsulation of the second preset protocolResponse, using bluetooth response as USB response.That is, step 416 is replaced by:Control chip obtains indigo plant from response encapsulation of dataTooth response, using bluetooth response as USB response.
In the present embodiment, after step 406, before step 408, the USB to be received from host computer such as control chip refers toIt enables, after receiving the USB command from host computer within a preset time, executes step 408;When not connecing within a preset timeAfter receiving the USB command from host computer, judges whether to receive from Bluetooth chip and bluetooth security equipment and disconnected companyThe information connect resets control chip, return step 401 if it is, resetting Bluetooth chip;Otherwise, it continues waiting for receiving and come fromThe USB command of host computer;
After step 417, control chip returns to waiting for receiving the USB command from host computer.
In the present embodiment, after step 405, further include:Control chip judges whether to receive the sum from Bluetooth chipThe information that bluetooth security equipment has disconnected resets control chip, return step 401 if it is, resetting Bluetooth chip;Otherwise, continue to determine whether to receive information from Bluetooth chip and that bluetooth security equipment has disconnected.
Embodiment 5
A kind of working method of Bluetooth adapter is present embodiments provided, as shown in fig. 6, specifically including:
Step 501:Bluetooth adapter powers on;
Step 502:Bluetooth adapter initialization;
In the present embodiment, Bluetooth adapter initialization control chip and Bluetooth chip.
Step 503:The bluetooth security equipment that Bluetooth adapter search matches with default device identification simultaneously connects with its foundationIt connects;
Specifically, Bluetooth adapter askes instruction by control chipset driving wheel, sends poll instruction to Bluetooth chip, receivesPoll repeat-back from Bluetooth chip.After Bluetooth chip receives poll instruction, search and default device identification phaseMatched bluetooth security equipment simultaneously establishes a connection, and returns to poll repeat-back to control chip.
Wherein, Bluetooth adapter askes instruction by control chipset driving wheel, specially:Bluetooth adapter passes through control chipIt is instructed according to the second preset protocol tissue poll.In the present embodiment, include in poll instruction:Instruct start byte, command identification,Data length, data field and the check bit of data field.
For example, the instruction banner word that Bluetooth adapter is instructed " 0x5A " and " 0xA5 " as poll by controlling chipSection is arranged in the first byte and the second byte of poll instruction, the command identification that " 0x02 " is instructed as poll, and setting existsPoll instruction third byte on, will " 0x00 " and " 0x00 " as poll instruct in data field data length, set respectivelyIt sets on the nybble and the 5th byte of poll instruction, the check value " XOR " that poll is instructed, poll instruction is set mostIn the latter byte (check bit), obtained poll instruction is specially:" 02 00 00 XOR of 5A A5 " is sent to Bluetooth chipPoll instructs " 02 00 00 XOR of 5A A5 ";Etc. the poll repeat-back to be received from Bluetooth chip.
In the present embodiment, presetting device identification is preset device identification, wherein device identification includes:Bluetooth equipmentUUID (Universally Unique Identifier, Universally Unique Identifier), the MAC Address of bluetooth equipment and bluetooth are setAt least one of standby device name.Wherein, the UUID of bluetooth equipment is the service unique identification information that bluetooth equipment is supported,The MAC Address of bluetooth equipment or the device name of bluetooth equipment are the unique identification information of bluetooth equipment.
In the present embodiment, bluetooth security equipment be can be, but not limited to as blue-tooth intelligence key devices and Bluetooth intelligent card etc..
Step 504:Bluetooth adapter judges whether to establish connection with bluetooth security equipment, if so, thening follow the steps505;Otherwise, return step 504;
Specifically, after Bluetooth adapter receives the poll repeat-back from Bluetooth chip by controlling chip, rootJudge whether to establish connection with bluetooth security equipment according to poll repeat-back, if so, thening follow the steps 505;Otherwise, step is returnedRapid 504;
More specifically, after Bluetooth adapter receives the poll repeat-back from Bluetooth chip by control chip,Poll repeat-back is parsed according to the second preset protocol, obtains the connection result mark in the data field in poll repeat-back,Judge whether to establish connection with bluetooth security equipment according to connection result mark, if connection result is identified as success flag,Connection is established with bluetooth security equipment;Otherwise, connection failure.
For example, if Bluetooth adapter by control chip receive from Bluetooth chip poll repeat-back be " A502 00 01 00 XOR of 5A ", obtain the 5th byte after, the data in byte before the last byte, and by itsAs the connection result mark in the data field in poll repeat-back, then " 00 " is identified according to connection result and determine to pacify with bluetoothFull equipment establishes connection;If Bluetooth adapter is " A5 by controlling chip to receive the poll repeat-back from Bluetooth chip02 00 01 01 XOR of 5A ", obtain the 5th byte after, the data in byte before the last byte, and by itsAs the connection result mark in the data field in poll repeat-back, then " 01 " is identified according to connection result and determine no and indigo plantTooth safety equipment establishes connection.
Step 505:Bluetooth adapter states the CCID protocol mark of itself to host computer;
Specifically, Bluetooth adapter passes through the control chip initiation USB module of itself, states itself to host computerCCID protocol mark.
Step 506:The CCID instruction to be received from host computer such as Bluetooth adapter, comes when receiving within a preset timeFrom after the CCID instruction of host computer, step 507 is executed;It is instructed when being not received by the CCID from host computer within a preset timeAfterwards, it detects whether to have disconnected with bluetooth security equipment, if it is, Bluetooth adapter resets, return step 502;Otherwise,Return step 506;
Preferably, preset time is 3 seconds.
In the present embodiment, Bluetooth adapter resets, specially:Bluetooth chip in Bluetooth adapter resets, and controls chipIt resets.After Bluetooth adapter resets, host computer detects Bluetooth adapter on usb bus and upper by the hub of itselfPosition machine disconnects.
Step 507:Bluetooth adapter sends CCID instruction to bluetooth security equipment;
Specifically, Bluetooth adapter sends CCID instruction to bluetooth security equipment by Bluetooth chip.
For example, Bluetooth adapter, which sends CCID to bluetooth security equipment by Bluetooth chip, instructs " 6F07000000000400 00000000 0047474b80A7”。
Step 508:Bluetooth adapter receives the CCID response from bluetooth security equipment;
Specifically, Bluetooth adapter receives the CCID response from bluetooth security equipment by Bluetooth chip.
For example, Bluetooth adapter is by CCID response of the Bluetooth chip reception from bluetooth security equipment“80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 66”。
Step 509:CCID response is returned to host computer, return step 506 by Bluetooth adapter;
In the present embodiment, step 507 can be as in Figure 6-1, specifically includes:
Step 5071:Control chip is packaged CCID instruction according to the second preset protocol;
Specifically, control chip instructs the second preset protocol head of addition in CCID, according to the second default checking algorithm to packetThe data for including CCID instruction and the second preset protocol head carry out operation, obtain the second check value, add the after CCID instructionTwo check values, the CCID instruction after being encapsulated, by the CCID instruction after encapsulation as instruction encapsulation of data.
For example, control chip adds before CCID instructs " 00,000,400 00000000 0047474b80 A7 of 6F070000 "Add the second preset protocol head " 5A A5 04 0013 ", obtain include CCID instruction and the second preset protocol head data " 5A00,000,400 00000000 0047474b80 A7 " of A50400136F070000, refers to according to LRC checking algorithm to including CCIDIt enables and the data of the second preset protocol head carries out operation, obtain the second check value " 00 ", add the second school after CCID instructionValue is tested, the CCID after encapsulating according to the second preset protocol head is obtained and instructs " 04 00 13 6F 07 00 00 00 00 of 5A A504 00 00 00 00 00 00 47 47 4b 80 A7 00”。
Step 5072:Controlling chip will instruct according to the CCID after the encapsulation of the second preset protocol, be sent to Bluetooth chip;
Step 5073:Bluetooth chip unseals the CCID instruction after encapsulation according to the second preset protocol, obtains CCIDInstruction;
Specifically, Bluetooth chip unseals the CCID instruction after encapsulation to according to the second preset protocol, from according to theTwo preset protocols carry out in the data that solution is honored as a queen the CCID instruction after encapsulation, obtain CCID instruction.
For example, Bluetooth chip unseals the data after being packaged according to the second preset protocol to effective instruction dataObtained data are " 0013 6F070000 of 5AA504,00,000,400 00000000 0047474b80 A7 00 ", obtain theAfter two preset protocol heads, data in all bytes before the second check value, the data " 6F070000 that will acquire00000400 00000000 0047474b80 A7 " are instructed as CCID.
Step 5074:Bluetooth chip sends CCID instruction to bluetooth security equipment.
Correspondingly, step 508 can specifically include as in fig. 6-2:
Step 5081:Bluetooth chip encapsulates CCID response according to the second preset protocol;
Specifically, Bluetooth chip adds the second preset protocol head before CCID response, presets checking algorithm according to thirdOperation is carried out to the data for including the second preset protocol head and CCID response, the 4th check value is obtained, adds after CCID responseAdd the 4th check value, the CCID response after being encapsulated, using the CCID response after encapsulation as response encapsulation of data.
For example, Bluetooth chip is in CCID response " 80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106It before D0F9000 66 ", adds the second preset protocol head " 04 00 8F of A5 5A ", according to LRC checking algorithm to including secondPreset protocol head and the data of CCID response carry out operation, obtain the 4th check value " 00 ", and the 4th is added after CCID responseCheck value obtains the CCID response after encapsulating according to the second preset protocol head“A55A04008F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D 0F9,000 66 00 " will be encapsulatedCCID response afterwards is as response encapsulation of data.
Step 5082:Bluetooth chip is sent to control chip according to the CCID response after the encapsulation of the second preset protocol;
Step 5083:Chip is controlled to according to the CCID response after the encapsulation of the second preset protocol, is unsealed, obtains CCIDResponse.
Specifically, control chip is unsealed to according to the CCID response after the encapsulation of the second preset protocol, second is presetAfter protocol header, all data before the 4th check value are as CCID response.
For example, control chip is to according to the CCID response after the encapsulation of the second preset protocol“A55A04008F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D 0F9,000 66 00 ", is solvedEnvelope, after obtaining the second preset protocol head, the data in all bytes before the 4th check value, the data that will acquire“8F80830000000106000000006AF61B6E94C5CE5871D54D31F9456F9BA397DE422AC11D75DD95A8FE2895D234CF80D2F1436A91E94CAB11F0A577461BC384F7E9B8DFBC19CB8055F8B43E8A23B1DCF2FE1BAC129FB85889161DC5176BE28F3CE62E9ED1BDE1FCB190DD1CBD3417EEB06D1CBE52CC5D490E9B47A8C5AECE485C9B746F50544C008A7CDC106D0F9000 66 " is used as CCID response.
In the present embodiment, the data format and the second preset protocol phase of the communication between chip and Bluetooth chip are controlledMatch, wherein consulted in advance between the second preset protocol control chip and Bluetooth chip.Bluetooth chip and control chip itBetween can be, but not limited to through UART (Universal Asynchronous Receiver/Transmitter, universal asynchronous receiptsSend out transmitter)/SPI (Serial Peripheral Interface, Serial Peripheral Interface (SPI))/I2C (Inter-IntegratedCircuit, internal integrated circuit) the various mode transmissions data such as bus.
In the present embodiment, after step 504, can also include:Bluetooth adapter is detected whether with bluetooth security equipmentIt disconnects, if it is, Bluetooth adapter resets, return step 502;Otherwise, continue to test whether with bluetooth security equipmentIt has disconnected.Correspondingly, it in step 506 after being not received by the USB command from host computer within a preset time, returnsStep 506.
Embodiment 6
A kind of Bluetooth adapter is present embodiments provided, as shown in fig. 7, comprises:First search module 01, first connects mouldBlock 02, the first declaration module 03, the first tissue module 04, the first sending module 05, the first receiving module 06, the second receiving module07, minor microstructure module 08 and the second sending module 09;
First search module 01, for searching for the bluetooth security equipment to match with default device identification;
First link block 02 establishes connection for searching the bluetooth security equipment that plain module 01 searches with first;
First declaration module 03, for after the first link block 02 establishes connection with bluetooth security equipment, to host computerState the usb protocol mark of itself;
First receiving module 06, for receiving the USB command from host computer;
The first tissue module 04 is received for the protocol type and the first receiving module 06 according to bluetooth security equipmentUSB command tissue Bluetooth commands;
First sending module 05, for sending Bluetooth commands to bluetooth security equipment;
Second receiving module 07, for receiving the bluetooth response from bluetooth security equipment;
Minor microstructure module 08, bluetooth response for being received according to the second receiving module 07 and identifies with usb protocolThe usb protocol tissue USB response to match;
Second sending module 09, for USB response to be returned to host computer.
In the present embodiment, usb protocol is specially CCID protocol or SCSI protocol or HID protocol or other agreements.
In the present embodiment, Bluetooth adapter can also include the first acquisition module;
First obtains module, for after the first link block 02 and bluetooth security equipment establish connection, from bluetooth securityThe first protocol-identifier of bluetooth security equipment is obtained in the broadcast message of equipment;
Correspondingly, the first tissue module 04, specifically for according to corresponding with the first protocol-identifier of bluetooth security equipmentProtocol type and USB command tissue Bluetooth commands.
In the present embodiment, the first tissue module 04, specifically for obtaining the effective instruction data in USB command, according to indigo plantThe protocol type and effective instruction data organization Bluetooth commands of tooth safety equipment;
Minor microstructure module 08 is identified specifically for obtaining the effective response data in bluetooth response according to usb protocolThe usb protocol tissue to match includes the USB response for imitating reply data.
Further, Bluetooth adapter can also include second obtain module, first judgment module, third sending module,Third receiving module and the 4th sending module;
Second obtains module, for after the first link block 02 establishes connection with bluetooth security equipment, the first tissue mouldBefore block 04 organizes Bluetooth commands, the first Protocol Standard of bluetooth security equipment is obtained from the broadcast message of bluetooth security equipmentKnow;
First judgment module judges USB after for receiving the USB command from host computer when the first receiving module 06Whether protocol-identifier matches with the first protocol-identifier;
Third sending module, for sending USB command to bluetooth security equipment after first judgment module is judged as YES;
Third receiving module, for receiving the USB response from bluetooth security equipment;
4th sending module, for USB response to be returned to host computer;
Correspondingly, the first tissue module 04, specifically for obtaining in USB command after first judgment module is judged as NOEffective instruction data, according to the protocol type of bluetooth security equipment and effective instruction data organization Bluetooth commands;
Minor microstructure module 08 is identified specifically for obtaining the effective response data in bluetooth response according to usb protocolThe usb protocol tissue to match includes the USB response for imitating reply data.
In the present embodiment, minor microstructure module 08 can be specifically included:First acquisition unit and the first tissue unit;
First acquisition unit, for obtaining the effective response number in bluetooth response according to the protocol type of bluetooth security equipmentAccording to;
The first tissue unit, for including effect reply data according to the usb protocol tissue to match with usb protocol markUSB response.
In the present embodiment, Bluetooth adapter can also include:Third obtains module;
Third obtains module, for after the first link block 02 establishes connection with bluetooth security equipment, first to state mouldBefore block 03 states the usb protocol mark of itself to host computer, bluetooth security is obtained from the broadcast message of bluetooth security equipmentFirst protocol-identifier of equipment;
First declaration module 03, specifically for setting the first protocol-identifier for the usb protocol mark of itself, to host computerState the first protocol-identifier of itself;
The first tissue module 04 is specifically used for using USB command as Bluetooth commands;
Minor microstructure module 08 is specifically used for using bluetooth response as USB response.
In the present embodiment, the protocol type of bluetooth security equipment can be preset for Bluetooth adapter;
Correspondingly:The first tissue module 04, specifically for protocol type and the usb protocol mark when bluetooth security equipmentTiming, using USB command as Bluetooth commands;When the protocol type of bluetooth security equipment and usb protocol mark mismatch, obtainEffective instruction data in USB command, according to the protocol type of bluetooth security equipment and effective instruction data organization Bluetooth commands;
Minor microstructure module 08, specifically for inciting somebody to action when the protocol type of bluetooth security equipment is matched with usb protocol markBluetooth response is as USB response;When the protocol type of bluetooth security equipment and usb protocol mark mismatch, obtains bluetooth and answerEffective response data in answering include the USB for imitating reply data according to the usb protocol tissue to match with usb protocol markResponse.
In this implementation, Bluetooth adapter can also include first detection module and the first reseting module;
First receiving module 06, specifically for stating that the usb protocol of itself identifies to host computer when the first declaration module 03Afterwards, the USB command to be received from host computer is waited;After first detection module is detected as no, wait to be received from host computerUSB command;And after USB response is returned to host computer by the second sending module 09, the USB to be received from host computer is waited to refer toIt enables;
The first tissue module 04, specifically for being received within a preset time when the first receiving module 06 from host computerAfter USB command, according to the protocol type of bluetooth security equipment and USB command tissue Bluetooth commands;
First detection module, for being not received by within a preset time when the first receiving module 06 from host computerAfter USB command, detect whether to have disconnected with bluetooth security equipment;
First reseting module, for resetting after first detection module, which is detected as, is;
First search module 01 is also used to after the first reseting module resets, what search matched with default device identificationBluetooth security equipment.
In the present embodiment, Bluetooth adapter can also include:Second detection module and the second reseting module;
Second detection module, for after link block establishes connection with bluetooth security equipment and for working as testing resultAfter no, continue to test and whether disconnected with the bluetooth security equipment;, detect whether to have disconnected with bluetooth security equipmentConnection;
Second reseting module, for resetting after the second detection module is detected as being;
First search module 01 is also used to after the second reseting module resets, what search matched with default device identificationBluetooth security equipment.
In the present embodiment, usb protocol is specially CCID protocol or SCSI protocol or HID protocol or other agreements.This implementationThe Bluetooth adapter that example provides reports the usb protocol mark of itself to the end PC after establishing connection with bluetooth security equipment, blueTooth adapter is suitable can be identified as HID device or CCID equipment or scsi device or other USB devices by the end PC, enhance indigo plantThe adaptability and application of tooth adapter.When Bluetooth adapter has received the USB command for meeting USB specification from the end PCAfterwards, the USB command for meeting USB specification is converted, after obtaining the Bluetooth commands that bluetooth security equipment can identify, by bluetoothInstruction is sent to bluetooth security equipment, meets what the bluetooth response that bluetooth security equipment returns was reconverted into that the end PC can identifyThe USB response of USB specification, and the USB response for meeting USB specification is returned into the end PC, so that bluetooth security equipment is led toBluetooth adapter and PC provided by the invention end is crossed to be communicated.
Embodiment 7
A kind of Bluetooth adapter is present embodiments provided, as shown in figure 8, including:Control chip, Bluetooth chip and USB mouldBlock;
Controlling chip includes:First transmission unit 601, the first initialization unit 602,603, first groups of the first receiving unitKnit unit 604, the second transmission unit 605, minor microstructure unit 606 and third transmission unit 607;
First transmission unit 601, for sending poll instruction to Bluetooth chip;
First initialization unit 602, for being answered when the first receiving unit 603 receives the instruction of the poll from Bluetooth chipAfter answering, USB module is initialized, states that the usb protocol of itself identifies to host computer by USB module;
In the present embodiment, usb protocol is specially CCID protocol or SCSI protocol or HID protocol or other agreements.
First receiving unit 603, for receiving the poll repeat-back from Bluetooth chip;By USB module reception comeFrom the USB command of host computer;Receive the response encapsulation of data from Bluetooth chip;
The first tissue unit 604, for the protocol type and the second preset protocol according to bluetooth security equipment to USB commandIt is packaged, obtains instruction encapsulation of data;
Second transmission unit 605, for that encapsulation of data will be instructed to be sent to Bluetooth chip;
Minor microstructure unit 606, for identifying phase according to the response encapsulation of data from Bluetooth chip and with usb protocolThe usb protocol tissue USB response matched;
Third transmission unit 607, for USB response to be returned to host computer by USB module;
Bluetooth chip includes:Second receiving unit 701, the first search unit 702, the first connection unit the 703, the 4th are sentUnit 704, third receiving unit 705, second acquisition unit 706, the 5th transmission unit 707, the 4th receiving unit 708, thirdOrganizational unit 709 and the 6th transmission unit 710;
Second receiving unit 701, for receiving the poll instruction from control chip;
First search unit 702, for searching for and setting after the second receiving unit 701 receives poll instructionThe bluetooth security equipment that standby mark matches;
First connection unit 703, for establishing connection with bluetooth security equipment,
4th transmission unit 704, for returning to poll repeat-back to control chip;
Third receiving unit 705, for receiving the instruction encapsulation of data from control chip;
Second acquisition unit 706, for obtaining bluetooth from the instruction encapsulation of data that third receiving unit 705 receivesInstruction;
5th transmission unit 707 refers to for sending the bluetooth that second acquisition unit 706 is got to bluetooth security equipmentIt enables;
4th receiving unit 708, for receiving the bluetooth response from bluetooth security equipment;
Third organizational unit 709 is answered for encapsulating the bluetooth that the 4th receiving unit 708 receives according to the second preset protocolIt answers, obtains response encapsulation of data;
6th transmission unit 710 sends the response encapsulation of data that third organizational unit 709 is organized to control chip.
In the present embodiment, control chip further includes the 7th transmission unit;Bluetooth chip further includes the 8th transmission unit;
7th transmission unit returns to poll instruction to control chip for the 4th transmission unit 704 when Bluetooth chip and answersAfter answering, is sent to Bluetooth chip and obtain bluetooth security device identification instruction;
8th transmission unit, for returning to the response of the first protocol-identifier including bluetooth security equipment to control chip;
Correspondingly, the first tissue unit 604, specifically for according to corresponding with the first protocol-identifier of bluetooth security equipmentProtocol type and the second preset protocol are packaged USB command, obtain instruction encapsulation of data.
In the present embodiment, the first tissue unit 604 can be specifically used for obtaining the effective instruction data in USB command, rootEffective instruction data are packaged according to the protocol type and the second preset protocol of bluetooth security equipment, obtain instruction encapsulation numberAccording to;
Minor microstructure unit 606 can be specifically used for unsealing the response encapsulation of data from Bluetooth chip, obtainEffective response data in bluetooth response include effect reply data according to the usb protocol tissue to match with usb protocol markUSB response.
In the present embodiment, the first tissue unit 604 can also be specifically used for obtaining the effective instruction data in USB command,Effective instruction data are packaged according to the protocol type of bluetooth security equipment, obtain the first encapsulation of data;It is pre- according to secondIf agreement is packaged the first encapsulation of data, instruction encapsulation of data is obtained;Second acquisition unit 706, can be specifically used for fromThe first encapsulation of data is obtained in instruction encapsulation of data, using the first encapsulation of data as Bluetooth commands.
In the present embodiment, minor microstructure unit 606 can also be specifically used for unsealing response encapsulation of data, obtainBluetooth response, according to the protocol type of bluetooth security equipment obtain bluetooth response in effective response data, according to usb protocolIdentifying the usb protocol tissue to match includes the USB response for imitating reply data.
Further, control chip further includes the 9th transmission unit, the first judging unit, the first encapsulation unit, the tenthOne transmission unit, the second deblocking unit and the 14th transmission unit;Bluetooth chip further includes the tenth transmission unit, the first deblocking listMember, the second encapsulation unit, the 12nd transmission unit, the 5th receiving unit and the 13rd transmission unit;
9th transmission unit returns to poll instruction to control chip for the 4th transmission unit 704 when Bluetooth chip and answersAfter answering, before the first tissue unit 604 is packaged USB command, is sent to Bluetooth chip and obtain bluetooth security device identificationInstruction;
Tenth transmission unit, for returning to the response of the first protocol-identifier including bluetooth security equipment to control chip;
First judging unit, for receiving the USB command from host computer by USB module when the first receiving unit 603Afterwards, judge that usb protocol identifies whether to match with the first protocol-identifier;After the first judging unit is determined as no, triggering firstOrganizational unit 604;
Correspondingly, the first tissue unit 604 is specifically used for obtaining the effective instruction data in USB command, is pacified according to bluetoothThe protocol type of full equipment is packaged effective instruction data, obtains the first encapsulation of data;According to the second preset protocol toOne encapsulation of data is packaged, and obtains instruction encapsulation of data;Or specifically for obtaining the effective instruction data in USB command,Effective instruction data are packaged according to the protocol type of bluetooth security equipment and the second preset protocol, obtain instruction encapsulation numberAccording to.
First encapsulation unit, for after the first judging unit is judged to being, according to the second preset protocol to USB command intoRow encapsulation obtains instruction encapsulation of data;
11st transmission unit, for that encapsulation of data will be instructed to be sent to Bluetooth chip;
First deblocking unit obtains USB command for unsealing to instruction encapsulation of data;
12nd transmission unit, for sending USB command to bluetooth security equipment;
5th receiving unit, for receiving the USB response from bluetooth security equipment;
Second encapsulation unit obtains response encapsulation of data for encapsulating USB response according to the second preset protocol;
13rd transmission unit, for sending response encapsulation of data to control chip;
Second deblocking unit obtains USB response for unsealing to response encapsulation of data;
14th transmission unit, for USB response to be returned to host computer by USB module.
In the present embodiment, control chip can also include the 15th transmission unit;Bluetooth chip can also include the 16thTransmission unit;
15th transmission unit returns to poll instruction to control chip for the 4th transmission unit 704 when Bluetooth chipAfter response, before the first initialization unit 602 states the usb protocol mark of itself by USB module to host computer, to bluetooth corePiece, which is sent, obtains bluetooth security device identification instruction;
16th transmission unit, for returning to answering for the first protocol-identifier including bluetooth security equipment to control chipIt answers;
First initialization unit 602 is specifically used for initialization USB module, sets first for the usb protocol mark of itselfProtocol-identifier states to host computer the first protocol-identifier of itself by USB module;
The first tissue unit 604 obtains instruction envelope specifically for being packaged according to the second preset protocol to USB commandFill data;
Second acquisition unit 706 obtains the USB command specifically for unsealing to instruction encapsulation of data;
5th transmission unit 707 is specifically used for sending bluetooth to bluetooth security equipment using USB command as Bluetooth commandsInstruction;
Minor microstructure unit 606, be specifically used for from response encapsulation of data obtain bluetooth response, using bluetooth response asUSB response.
In the present embodiment, the protocol type of bluetooth security equipment is preset;
The first tissue unit 604, when specifically for being matched when the protocol type of bluetooth security equipment and usb protocol mark,USB command is packaged according to the second preset protocol, obtains instruction encapsulation of data;When bluetooth security equipment protocol type withWhen usb protocol mark mismatches, obtain the effective instruction data in USB command, according to the protocol type of bluetooth security equipment andSecond preset protocol is packaged effective instruction data, obtains instruction encapsulation of data;
Second acquisition unit 706, when specifically for being matched when the protocol type of bluetooth security equipment and usb protocol mark,From instruction encapsulation of data, USB command is obtained, using USB command as Bluetooth commands;When bluetooth security equipment protocol type withWhen usb protocol mark mismatches, from instruction encapsulation of data, Bluetooth commands are obtained;
Minor microstructure unit 606, when specifically for being matched when the protocol type of bluetooth security equipment and usb protocol mark,Bluetooth response is obtained from response encapsulation of data, using bluetooth response as USB response;When bluetooth security equipment protocol type withWhen usb protocol mark mismatches, response encapsulation of data is unsealed, obtains the effective response data in bluetooth response, according toThe usb protocol tissue to match with usb protocol mark includes the USB response for imitating reply data.
In the present embodiment, control chip can also include second judgment unit and the first reset unit;First receiving unit603 include the first receiving subelement, the second receiving subelement and third receiving subelement;
First receiving subelement, for stating that the usb protocol of itself identifies to host computer when the first initialization unit 602Afterwards, the USB command to be received from host computer is waited;After second judgment unit is judged as NO, wait to be received from host computerUSB command;And after USB response is returned to host computer by third transmission unit 607, the USB to be received from host computer is waitedInstruction;
Second receiving subelement, for receiving the poll repeat-back from Bluetooth chip;
Third receiving subelement, for receiving the response encapsulation of data from Bluetooth chip;
The first tissue unit 604, specifically for being received within a preset time when the first receiving unit 603 from host computerUSB command after, USB command is packaged according to the protocol type of bluetooth security equipment and the second preset protocol;
Second judgment unit, for being not received by within a preset time when the first receiving unit 603 from host computerAfter USB command, judge whether to receive information from Bluetooth chip and that bluetooth security equipment has disconnected;
First reset unit resets control chip for resetting Bluetooth chip after second judgment unit is judged as YES;
First transmission unit 601 is also used to reset Bluetooth chip when the first reset unit, after resetting control chip, Xiang LanTooth chip sends poll instruction.
In the present embodiment, control chip can also include:Third judging unit and the second reset unit;
Third judging unit, for after the 4th transmission unit 704 returns to poll repeat-back to control chip and certainlyAfter body is judged as NO, judge whether to receive information from Bluetooth chip and that bluetooth security equipment has disconnected;
Second reset unit resets control chip for resetting Bluetooth chip after third judging unit is judged as YES;
First transmission unit 601 is also used to reset Bluetooth chip when the second reset unit, after resetting control chip, Xiang LanTooth chip sends poll instruction.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,Anyone skilled in the art is in technical scope disclosed by the invention, and any changes or substitutions that can be easily thought of,It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of protection of the claimsSubject to.

Claims (38)

CN201610864548.XA2016-09-292016-09-29A kind of Bluetooth adapter and its working methodActiveCN106301488B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610864548.XACN106301488B (en)2016-09-292016-09-29A kind of Bluetooth adapter and its working method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610864548.XACN106301488B (en)2016-09-292016-09-29A kind of Bluetooth adapter and its working method

Publications (2)

Publication NumberPublication Date
CN106301488A CN106301488A (en)2017-01-04
CN106301488Btrue CN106301488B (en)2018-11-20

Family

ID=57715455

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610864548.XAActiveCN106301488B (en)2016-09-292016-09-29A kind of Bluetooth adapter and its working method

Country Status (1)

CountryLink
CN (1)CN106301488B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107135476B (en)*2017-06-272018-12-11飞天诚信科技股份有限公司A kind of Bluetooth adapter and its working method
CN109428658A (en)*2017-08-292019-03-05深圳市美好创亿医疗科技有限公司Bluetooth equipment Performance Test System and test method
CN107885674B (en)*2017-10-182020-05-29北京明华联盟科技有限公司Bluetooth device simulator, working method thereof and Bluetooth device operating system
CN112770307A (en)*2020-12-312021-05-07重庆百瑞互联电子技术有限公司Multi-mode Bluetooth adapter and working method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104346722A (en)*2014-10-272015-02-11飞天诚信科技股份有限公司Mobile payment terminal supporting Bluetooth communication and work method of mobile payment terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2004055638A2 (en)*2002-12-122004-07-01Flexiworld Technologies, Inc.Wireless communication between computing devices
US20130031392A1 (en)*2011-07-292013-01-31Mclane William JUsb device side wake-up for power conservation and management
CN105005540B (en)*2015-05-222018-01-05飞天诚信科技股份有限公司A kind of CCID equipment and its method of work with blue tooth interface
CN105162498B (en)*2015-09-282018-09-25飞天诚信科技股份有限公司Bluetooth adapter and its communication means
CN205608729U (en)*2016-04-192016-09-28飞天诚信科技股份有限公司Integral type bluetooth key

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104346722A (en)*2014-10-272015-02-11飞天诚信科技股份有限公司Mobile payment terminal supporting Bluetooth communication and work method of mobile payment terminal

Also Published As

Publication numberPublication date
CN106301488A (en)2017-01-04

Similar Documents

PublicationPublication DateTitle
CN106301488B (en)A kind of Bluetooth adapter and its working method
US20050076150A1 (en)Home network system and method for operating the same
CN106130770B (en)Established using the simple connection of mixing networking of agent equipment
CN103684500B (en)Pairing method of wireless transmitting terminal and wireless receiving terminal and related device
CN106304245B (en)Equipment network access configuration method and device
CN208158154U (en)Fast charge line and fast charging system
CN106686526B (en)Method and device for acquiring routing information of electric appliance
CN107135476B (en)A kind of Bluetooth adapter and its working method
CN105099844B (en)Media releasing method, media data acquisition methods and media issuing system
CN108200559A (en)A kind of method and bluetooth equipment that bluetooth equipment function is represented by broadcast data
CN109768596B (en) A power display method, an earphone charging device, and an earphone
WO2003026184A3 (en)Method for detecting and regulating identifier overlap on power line communication network, electronic appliance connected to subnet of power line communication network, and communication module used in electronic appliance
CN104980215A (en)System and method for achieving WiFi configuration of intelligent equipment based on optical signal transmission
CN108616582A (en)Pairing method, device and system of internal machine and wire controller
CN105183687B (en)A kind of timesharing serial port communication method and system
CN107749799A (en)Distribution method, apparatus, system and the computer-readable recording medium of home appliance
CN107506578A (en)Clinical monitoring system of medical health that multichannel wireless data communication was handled based on ARM
CN114120609A (en)Remote controller pairing, binding and pairing system and method based on Bluetooth broadcast
WO2008093164A3 (en)Communication system and method
CN106797329A (en)Special-purpose terminal and its operating method for measuring the Internet wire quality
CN101977244A (en)Control method, device and system
WO2005094191A3 (en)Data processing method for network layer
CN110337103A (en)A kind of connectionless data hided transmission method based on 802.11 agreements
CN202035000U (en)Control host for internet of things and internet of things provided with same
WO2021203759A1 (en)Electroencephalogram acquisition system based on bluetooth separated architecture

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp