CN107885674B - Bluetooth device simulator, working method thereof and Bluetooth device operating system - Google Patents

Bluetooth device simulator, working method thereof and Bluetooth device operating system Download PDF

Info

Publication number
CN107885674B
CN107885674B CN201710970842.3A CN201710970842A CN107885674B CN 107885674 B CN107885674 B CN 107885674B CN 201710970842 A CN201710970842 A CN 201710970842A CN 107885674 B CN107885674 B CN 107885674B
Authority
CN
China
Prior art keywords
bluetooth
host
bluetooth device
usb
simulator
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
CN201710970842.3A
Other languages
Chinese (zh)
Other versions
CN107885674A (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.)
Beijing Minghua Union Technology Co ltd
Original Assignee
Beijing Minghua Union Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Minghua Union Technology Co ltd filed Critical Beijing Minghua Union Technology Co ltd
Priority to CN201710970842.3A priority Critical patent/CN107885674B/en
Publication of CN107885674A publication Critical patent/CN107885674A/en
Application granted granted Critical
Publication of CN107885674B publication Critical patent/CN107885674B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function
    • G06F13/107Terminal emulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a Bluetooth device simulator, a working method thereof and a Bluetooth device operating system, and relates to the technical field of communication. The method comprises the following steps: the system is connected with a host through a USB and is in USB soft disconnection with the host; establishing Bluetooth communication connection with a Bluetooth device; carrying out USB flexible connection with the host; responding to the host to send a USB standard request, and returning USB information of the Bluetooth equipment to the host; and receiving an instruction sent by the host, forwarding the instruction to the Bluetooth equipment, receiving response data of the Bluetooth equipment, and forwarding the response data to the host. The invention can lead the Bluetooth device simulator to simulate the functions of pulling out and inserting the Bluetooth device into the host through the USB interface through the USB soft disconnection and the USB soft connection, does not need to transform the host operation software, and has no influence on the stability and compatibility of the host system; in addition, automatic switching of the Bluetooth equipment is realized, and the batch production efficiency is improved.

Description

Bluetooth device simulator, working method thereof and Bluetooth device operating system
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a Bluetooth device simulator, a working method thereof and a Bluetooth device operating system.
Background
With the continuous development of the internet of things industry, more and more terminal devices support the bluetooth communication mode, however, in the mass production and upgrade, the terminal devices still need to be connected with the host through the USB interface, and the advantage of the bluetooth channel is not exerted on the production and upgrade efficiency.
However, if it is necessary to establish a communication connection between the terminal device and the host through the bluetooth channel in the batch production and upgrade to improve the production or upgrade efficiency of the terminal device, the software and hardware channels of the host need to be modified in a large range to increase the access and operation support of the host to the bluetooth device, which requires a large amount of upgrade cost and modification cost.
Disclosure of Invention
In view of the above, the present invention provides a bluetooth device emulator, a working method thereof, and a bluetooth device operating system, and aims to solve the above-mentioned problems that if a terminal device needs to establish a communication connection with a host through a bluetooth channel, a software and a hardware channel of the host need to be modified in a large range, so as to increase access and operation support of the host to a bluetooth device, and a large amount of upgrade cost and modification cost need to be invested.
The problem of high transformation cost and the problem of low efficiency because the switching of the Bluetooth equipment connected with the host machine is realized by physical plugging of the USB interface in batch production and upgrading.
The first aspect of the present invention provides a working method of a bluetooth device simulator, including:
the system is connected with a host through a USB and is in USB soft disconnection with the host;
establishing Bluetooth communication connection with a Bluetooth device;
carrying out USB flexible connection with the host;
responding to the host to send a USB standard request, and returning USB information of the Bluetooth equipment to the host;
and receiving an instruction sent by the host, forwarding the instruction to the Bluetooth equipment, receiving response data of the Bluetooth equipment, and forwarding the response data to the host.
On the basis of the above technical solution, after receiving the instruction sent by the host, forwarding the instruction to the bluetooth device, receiving the response data of the bluetooth device, and forwarding the response data to the host, the method further includes:
and when the operation is detected to be completed, carrying out USB soft disconnection with the host computer, and destroying the Bluetooth communication connection with the Bluetooth equipment so as to establish Bluetooth communication connection with other Bluetooth equipment again.
On the basis of the above technical solution, the detecting that the job is completed includes: and when an operation completion instruction sent by the host is received or when the Bluetooth communication connection with the Bluetooth equipment is detected to be disconnected, the operation is completed.
On the basis of the above technical solution, before establishing a bluetooth communication connection with a bluetooth device, the method further includes: and acquiring the unique identifier of the Bluetooth device to be connected.
On the basis of the above technical solution, after establishing a bluetooth communication connection with a bluetooth device, the method further includes:
acquiring USB configuration information of the Bluetooth equipment;
before the returning the USB information of the Bluetooth device to the host, the method comprises the following steps:
and determining the USB information according to the USB configuration information.
A second aspect of the present invention provides a bluetooth device emulator comprising: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to the first aspect are performed when the processor executes the computer program.
A third aspect of the present invention provides a bluetooth device operating system, which includes a host and a bluetooth device, wherein the bluetooth device operating system further includes the bluetooth device simulator according to the second aspect.
On the basis of the technical scheme, the Bluetooth device simulator is connected with the Bluetooth device through Bluetooth, performs USB soft connection with the host, and returns USB information of the Bluetooth device to the host according to a USB standard request sent by the host so as to simulate the Bluetooth device to be inserted into the host through a USB interface; when the host detects that a USB device of a preset type is inserted, starting an operation process; when the operation is finished, the Bluetooth device simulator is in USB soft disconnection with the host and destroys the Bluetooth connection with the Bluetooth device to simulate the Bluetooth device to be pulled out from the host USB port.
On the basis of the technical scheme, the Bluetooth simulator further comprises a Bluetooth signal shielding device for shielding the interference of external Bluetooth signals on the Bluetooth connection between the Bluetooth simulator and the Bluetooth equipment.
A fourth aspect of the invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method according to the first aspect.
The invention is connected with the host through the USB and carries out USB soft disconnection with the host; establishing Bluetooth communication connection with a Bluetooth device; carrying out USB flexible connection with the host; responding to the host to send a USB standard request, and returning USB information of the Bluetooth equipment to the host; receiving an instruction sent by the host, forwarding the instruction to the Bluetooth equipment, receiving response data of the Bluetooth equipment, and forwarding the response data to the host; when the operation is detected to be completed, the USB soft disconnection is carried out with the host, the Bluetooth communication connection with the Bluetooth equipment is destroyed, and the Bluetooth communication connection with other Bluetooth equipment is reestablished, so that the Bluetooth simulator can simulate the functions of pulling out and inserting the Bluetooth equipment into the host through the USB interface through the USB soft disconnection and the USB soft connection, for the host, the simulation method is basically consistent with the effect of directly inserting and pulling out the Bluetooth equipment into and from the host through the USB interface, therefore, the host operation software can work without changing or changing a little, the upgrading cost is low, and the stability and the compatibility of a host system are basically not influenced; in addition, the invention also realizes the automatic switching of the Bluetooth equipment and improves the mass production efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a working method of a bluetooth device simulator provided in an embodiment of the present invention;
fig. 2 is a schematic flow chart of a working method of a bluetooth device simulator according to another embodiment of the present invention;
FIG. 3 is an exemplary block diagram of a Bluetooth device emulator provided by an embodiment of the present invention;
fig. 4 is a schematic block diagram of a bluetooth device simulator provided in another embodiment of the present invention;
fig. 5 is a schematic block diagram of a bluetooth device operating system according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic flowchart of a working method of a bluetooth device simulator according to an embodiment of the present invention, where an execution subject of the flowchart is the bluetooth device simulator in the implementation of the present invention. Referring to fig. 1, the working method of the bluetooth device emulator provided in this embodiment may include the following steps:
and S101, connecting with a host through a USB and carrying out USB soft disconnection with the host.
In this embodiment, the soft disconnection and the soft connection respectively refer to disconnection and connection of USB interface communication with a host through software configuration, and a physical connection between a USB interface of the bluetooth device emulator and the host exists all the time in a process of switching between the soft disconnection and the soft connection.
And step S102, establishing Bluetooth communication connection with the Bluetooth equipment.
In this embodiment, the bluetooth device includes, but is not limited to, electronic devices such as a usb key, a smart phone, an audio device, and a tablet computer with specific bluetooth functions. Establishing a bluetooth communication connection with a bluetooth device specifically includes:
the Bluetooth device simulator opens a Bluetooth searching function and detects whether a target Bluetooth device exists in the Bluetooth communication range of the Bluetooth device simulator;
if the target Bluetooth equipment exists, sending pairing request information to the target Bluetooth equipment;
receiving response information returned by the target Bluetooth equipment according to the pairing request information;
performing identity authentication on the target Bluetooth equipment according to the response information;
and if the verification is passed, establishing Bluetooth communication connection with the target Bluetooth equipment.
Preferably, in this embodiment, before sending the pairing request information to the target bluetooth device, the method may further include:
if the target Bluetooth equipment exists, judging whether the target Bluetooth equipment is accessed into the Bluetooth equipment simulator for the first time according to the equipment type of the target Bluetooth equipment;
if the Bluetooth device simulator is connected to the Bluetooth device simulator for the first time, entering the step of sending pairing request information to the target Bluetooth device;
if the target Bluetooth device is not connected to the Bluetooth device simulator for the first time, when the target Bluetooth device enters the Bluetooth communication range of the Bluetooth device simulator, the Bluetooth device automatically establishes Bluetooth communication connection with the target Bluetooth device.
Preferably, in this embodiment, after sending the pairing request information to the target bluetooth device, if response information that allows establishing bluetooth communication connection and is sent by the target bluetooth device is received, the bluetooth device simulator establishes bluetooth communication connection with the target bluetooth device, where the response information carries identification information used for authentication, and after receiving the response information, the target bluetooth device performs authentication on the target bluetooth device according to the identification information used for authentication carried by the target bluetooth device, and if the authentication passes, it indicates that the target bluetooth device allows establishing bluetooth communication connection with the bluetooth device simulator.
And step S103, carrying out USB soft connection with the host.
In this embodiment, when detecting that a new target bluetooth device establishes a bluetooth communication connection, the bluetooth device emulator is in soft connection with the host to "access" the new bluetooth device to the host, so that the host detects that a new device is plugged into the USB interface.
And step S104, responding to the USB standard request sent by the host, and returning the USB information of the Bluetooth equipment to the host.
Preferably, in this embodiment, the USB information may be fixed in the bluetooth emulator in advance, or may be dynamically matched.
When the USB information is dynamically matched, after step S102, the method further includes:
acquiring USB configuration information of the Bluetooth equipment;
before the returning the USB information of the Bluetooth device to the host, the method comprises the following steps:
and determining the USB information according to the USB configuration information.
Specifically, the USB configuration information may be key information such as USB protocol type, VID, PID, and the like, and other information may be dynamically matched inside the bluetooth emulator according to the key information. Therefore, the problem of poor performance caused by directly acquiring all USB information can be avoided.
In this embodiment, after the bluetooth device emulator performs the USB soft connection with the host, since the bluetooth device emulator requests to return the USB information of the bluetooth device to the host according to the USB standard of the host, the host recognizes the bluetooth device emulator as the bluetooth device. This enables the host and the bluetooth device to communicate data directly using the same protocol. Preferably, in this embodiment, the host includes, but is not limited to, a computer or other terminal device.
Step S105, receiving the instruction sent by the host, forwarding the instruction to the Bluetooth device, receiving the response data of the Bluetooth device, and forwarding the response data to the host.
In this embodiment, after the bluetooth device establishes the USB soft connection with the host through the bluetooth device emulator, the host may implement operation control on the bluetooth device through the bluetooth device emulator, and in this process, the working principle of the bluetooth device emulator is specifically as follows:
receiving an operation instruction issued by the host through the USB interface, and sending the operation instruction to the Bluetooth equipment through a Bluetooth channel;
and receiving response information of the Bluetooth equipment through the Bluetooth channel, and returning the response information to the host through the USB interface.
As can be seen from the above, in this embodiment, the USB is connected to the host through the USB, and the USB is in soft disconnection with the host; establishing Bluetooth communication connection with a Bluetooth device; carrying out USB flexible connection with the host; responding to the host to send a USB standard request, and returning USB information of the Bluetooth equipment to the host; the method comprises the steps of receiving an instruction sent by a host, forwarding the instruction to the Bluetooth device, receiving response data of the Bluetooth device, and forwarding the response data to the host, so that the Bluetooth device simulator can simulate the functions of pulling out and inserting the Bluetooth device into and out of the host through a USB interface through USB soft disconnection and USB soft connection, and for the host, the simulation method is basically consistent with the effect of directly inserting and pulling the Bluetooth device into and out of the host through the USB interface, so that host operation software can work without changing or changing a little, the upgrading cost is low, and the stability and the compatibility of a host system are basically not influenced; in addition, the invention also realizes the automatic switching of the Bluetooth equipment and improves the mass production efficiency.
Fig. 2 is a flowchart illustrating a method for operating a bluetooth device simulator according to another embodiment of the present invention. Referring to fig. 2, with respect to the previous embodiment, the working method of the bluetooth device emulator provided in this embodiment further includes:
and step S206, when the completion of the operation is detected, carrying out USB soft disconnection with the host computer, and destroying the Bluetooth communication connection with the Bluetooth equipment so as to establish Bluetooth communication connection with other Bluetooth equipment again.
Preferably, in this embodiment, the detecting that the job is completed includes:
and when an operation completion instruction sent by the host is received or when the Bluetooth communication connection with the Bluetooth equipment is detected to be disconnected, the operation is completed.
Preferably, in this embodiment, before establishing the bluetooth communication connection with the bluetooth device, the method further includes:
and acquiring the unique identifier of the Bluetooth device to be connected.
In this embodiment, since the unique identifier of the bluetooth device to be connected is obtained before establishing the bluetooth communication connection with the bluetooth device, when a plurality of bluetooth devices are directly placed in the bluetooth connection range of the adaptor, the bluetooth device emulator selects the next target bluetooth device to be connected according to the order of the sizes of the identifier numbers of the plurality of new bluetooth devices. Therefore, the Bluetooth device simulator can accurately and automatically connect the next Bluetooth device, otherwise, the old Bluetooth device is disconnected, and the old Bluetooth device is possibly connected when the Bluetooth device is reconnected. Specifically, the unique identifier may be a serial number, and according to a serial number rule, a serial number of a next bluetooth device may be obtained from serial numbers of a batch of bluetooth devices with consecutive serial numbers according to a serial number of a current bluetooth device, where the first serial number may be a serial number of a bluetooth device to which a host issues a command configuration, or may be a serial number of a bluetooth device to which a first connection is set when the host is powered on.
In addition, since the implementation manners of step S201 to step S205 in this embodiment are completely the same as the implementation manners of step S101 to step S105 in the previous embodiment, detailed descriptions thereof are omitted here.
Therefore, it can be seen that the working method of the bluetooth device simulator provided by this embodiment can also enable the bluetooth device simulator to simulate the functions of "pulling out" and "plugging in" the bluetooth device to the host through the USB interface by means of USB soft disconnection and USB soft connection, and for the host, the effect of the simulation method is substantially the same as that of directly plugging in and pulling out the bluetooth device to the host through the USB interface, so that the host working software can work without modification or minimal modification, the upgrade cost is low, and the system stability and compatibility of the host are not affected basically; in addition, the invention also realizes the automatic switching of the Bluetooth equipment and improves the mass production efficiency.
Fig. 3 is a schematic block diagram of a bluetooth device emulator provided by an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 3, the bluetooth device simulator 3 provided in this embodiment includes:
a soft disconnection unit 31 for performing USB soft disconnection with the host;
a bluetooth connection unit 32, configured to establish a bluetooth communication connection with a bluetooth device;
a flexible connection unit 33, configured to perform USB flexible connection with the host;
the simulation unit 34 is configured to respond to the host sending a USB standard request, and return USB information of the bluetooth device to the host;
and the data transmission unit 35 is configured to receive an instruction sent by the host, forward the instruction to the bluetooth device, receive response data of the bluetooth device, and forward the response data to the host.
Preferably, the bluetooth device emulator 3 further includes:
and the operation detection unit 36 is configured to perform USB soft disconnection with the host when it is detected that the operation is completed, and destroy the bluetooth communication connection with the bluetooth device, so as to establish bluetooth communication connection with another bluetooth device again.
Preferably, the detecting that the job is completed includes: and when an operation completion instruction sent by the host is received or when the Bluetooth communication connection with the Bluetooth equipment is detected to be disconnected, the operation is completed.
Preferably, the bluetooth device emulator 3 further includes:
the device identification acquisition unit 37 acquires the unique identification of the bluetooth device to be connected.
Preferably, the bluetooth device emulator 3 further includes:
a USB configuration information obtaining unit 38, configured to obtain USB configuration information of the bluetooth device;
a USB information obtaining unit 39, configured to determine the USB information according to the USB configuration information.
It should be noted that, since each unit in the bluetooth device simulator provided in the embodiment of the present invention is based on the same concept as that of the method embodiment of the present invention, the technical effect brought by the unit is the same as that of the method embodiment of the present invention, and specific contents may refer to descriptions in the method embodiment of the present invention, and are not described herein again.
Therefore, the Bluetooth device simulator provided by the embodiment of the invention can also ensure that the Bluetooth device establishes communication connection with the host through the Bluetooth channel under the condition that host operation software can not be changed or the change is extremely small, thereby reducing the upgrading cost of the host operation software and basically having no influence on the stability and compatibility of a host system; in addition, automatic switching of the Bluetooth equipment is realized, and the batch production efficiency is improved.
The function of 'inserting' or 'pulling out' the host computer of the USB interface is simulated through software, the rapid switching of the Bluetooth equipment is realized, and the efficiency of batch production and Bluetooth equipment upgrading is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 is a schematic diagram of a bluetooth device simulator according to a fifth embodiment of the present invention. As shown in fig. 4, the bluetooth device emulator 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the various method embodiments described above, such as the steps 101 to 105 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 31 to 35 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the bluetooth device emulator 4. For example, the computer program 42 may be divided into the soft disconnection unit 31, the bluetooth connection unit 32, the soft connection unit 33, the analog unit 34, and the data transmission unit 35, and each unit has the following specific functions:
the soft disconnection unit 31 is used for connecting with a host through a USB and performing USB soft disconnection with the host;
a bluetooth connection unit 32, configured to establish a bluetooth communication connection with a bluetooth device;
a flexible connection unit 33, configured to perform USB flexible connection with the host;
the simulation unit 34 is configured to respond to the host sending a USB standard request, and return USB information of the bluetooth device to the host;
and the data transmission unit 35 is configured to receive an instruction sent by the host, forward the instruction to the bluetooth device, receive response data of the bluetooth device, and forward the response data to the host.
The bluetooth device emulator 4 may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of bluetooth device emulator 4 and does not constitute a limitation of bluetooth device emulator 4, and may include more or less components than those shown, or combine some components, or different components, e.g., the terminal may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the bluetooth device emulator 4, such as a hard disk or a memory of the bluetooth device emulator 4. The memory 41 may also be an external storage device of the bluetooth device emulator 4, such as a plug-in hard disk provided on the bluetooth device emulator 4, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 41 may also include both an internal storage unit and an external storage device of the bluetooth device emulator 4. The memory 41 is used for storing the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.
Fig. 5 is a schematic block diagram of a bluetooth device operating system according to an embodiment of the present invention. Only the portions related to the present embodiment are shown for convenience of explanation.
Referring to fig. 5, the bluetooth device operating system provided in this embodiment includes a host and a bluetooth device, wherein the bluetooth device operating system further includes the bluetooth device simulator as described in the embodiments shown in fig. 3 or fig. 4.
In this embodiment, the bluetooth device emulator is connected to the bluetooth device via bluetooth, performs USB soft connection with the host, and returns USB information of the bluetooth device to the host according to a USB standard request sent by the host, so as to emulate that the bluetooth device is "plugged" into the host via a USB interface; when the host detects that a USB device of a preset type is inserted, starting an operation process; when the operation is finished, the Bluetooth device simulator is in USB soft disconnection with the host and destroys the Bluetooth connection with the Bluetooth device to simulate the Bluetooth device to be pulled out from the host USB port.
Preferably, in this embodiment, the bluetooth device operating system further includes:
and the Bluetooth signal shielding device is used for shielding the interference of an external Bluetooth signal on the Bluetooth connection between the Bluetooth simulator and the Bluetooth equipment.
It should be noted that the structure and the operation principle of the bluetooth device simulator in this embodiment are completely the same as those of the bluetooth device simulator provided in the embodiment shown in fig. 3 or fig. 4, and therefore, the details are not repeated herein.
It can be seen from the above that, the bluetooth device operating system provided by this embodiment can also realize the fast switching of the bluetooth device by simulating the function of "plugging in" or "unplugging" the host computer through software, and improves the efficiency of batch production and upgrading of the bluetooth device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An operating method of a Bluetooth device simulator, comprising:
the system is connected with a host through a USB and is in USB soft disconnection with the host;
establishing Bluetooth communication connection with a Bluetooth device;
carrying out USB flexible connection with the host;
responding to the host to send a USB standard request, and returning USB information of the Bluetooth device to the host so that the host recognizes the Bluetooth device simulator as the Bluetooth device;
and receiving an instruction sent by the host, forwarding the instruction to the Bluetooth equipment, receiving response data of the Bluetooth equipment, and forwarding the response data to the host.
2. The method of claim 1, wherein the receiving the command sent by the host and forwarding the command to the bluetooth device, receiving the response data of the bluetooth device and forwarding the response data to the host further comprises:
and when the operation is detected to be completed, carrying out USB soft disconnection with the host computer, and destroying the Bluetooth communication connection with the Bluetooth equipment so as to establish Bluetooth communication connection with other Bluetooth equipment again.
3. The method of claim 2, wherein said detecting completion of a job comprises: and when an operation completion instruction sent by the host is received or when the Bluetooth communication connection with the Bluetooth equipment is detected to be disconnected, the operation is completed.
4. The method of claim 1, further comprising, prior to establishing a bluetooth communication connection with the bluetooth device: and acquiring the unique identifier of the Bluetooth device to be connected.
5. The method of claim 1, further comprising, after establishing a bluetooth communication connection with the bluetooth device:
acquiring USB configuration information of the Bluetooth equipment;
before the returning the USB information of the Bluetooth device to the host, the method comprises the following steps:
and determining the USB information according to the USB configuration information.
6. A Bluetooth device simulator comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.
7. A bluetooth device operating system comprising a host, a bluetooth device, and the bluetooth device operating system further comprising the bluetooth device emulator of claim 6.
8. The bluetooth device operating system according to claim 7, wherein the bluetooth device emulator is connected to the bluetooth device through bluetooth, emulates the bluetooth device "plugged in" to the host through a USB interface by making a USB soft connection with the host and requesting to return USB information of the bluetooth device to the host according to a USB standard transmitted from the host; when the host detects that a USB device of a preset type is inserted, starting an operation process; when the operation is finished, the Bluetooth device simulator is in USB soft disconnection with the host and destroys the Bluetooth connection with the Bluetooth device to simulate the Bluetooth device to be pulled out from the host USB port.
9. The bluetooth device operating system of claim 7, further comprising a bluetooth signal shielding means for shielding interference of an external bluetooth signal with the bluetooth connection of the bluetooth simulator and the bluetooth device.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201710970842.3A 2017-10-18 2017-10-18 Bluetooth device simulator, working method thereof and Bluetooth device operating system Active CN107885674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710970842.3A CN107885674B (en) 2017-10-18 2017-10-18 Bluetooth device simulator, working method thereof and Bluetooth device operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710970842.3A CN107885674B (en) 2017-10-18 2017-10-18 Bluetooth device simulator, working method thereof and Bluetooth device operating system

Publications (2)

Publication Number Publication Date
CN107885674A CN107885674A (en) 2018-04-06
CN107885674B true CN107885674B (en) 2020-05-29

Family

ID=61781685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710970842.3A Active CN107885674B (en) 2017-10-18 2017-10-18 Bluetooth device simulator, working method thereof and Bluetooth device operating system

Country Status (1)

Country Link
CN (1) CN107885674B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090487A (en) * 2021-11-26 2022-02-25 上海星融汽车科技有限公司 Communication method, device and system of android simulator and diagnosis equipment, storage medium and electronic equipment
CN114363939B (en) * 2021-12-29 2024-01-19 上海庆科信息技术有限公司 Node simulation test method, device, storage medium, processor and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1430145A (en) * 2002-12-31 2003-07-16 艾威梯软件技术(北京)有限公司 Method of making bluetooth USB adaptor having man-machine interaction function
CN1449169A (en) * 2003-04-26 2003-10-15 金纯� Bluetooth adapter having flash memory
CN102681950A (en) * 2011-03-09 2012-09-19 札拉姆科技株式会社 Input interface providing usb apparatus and interface providing method
CN104335497A (en) * 2012-06-04 2015-02-04 高通股份有限公司 Automatic connection of bluetooth human interface devices
CN106301488A (en) * 2016-09-29 2017-01-04 飞天诚信科技股份有限公司 A kind of Bluetooth adapter and method of work thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092802B (en) * 2013-02-07 2015-07-22 飞天诚信科技股份有限公司 Method of communication of card reader and upper computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1430145A (en) * 2002-12-31 2003-07-16 艾威梯软件技术(北京)有限公司 Method of making bluetooth USB adaptor having man-machine interaction function
CN1449169A (en) * 2003-04-26 2003-10-15 金纯� Bluetooth adapter having flash memory
CN102681950A (en) * 2011-03-09 2012-09-19 札拉姆科技株式会社 Input interface providing usb apparatus and interface providing method
CN104335497A (en) * 2012-06-04 2015-02-04 高通股份有限公司 Automatic connection of bluetooth human interface devices
CN106301488A (en) * 2016-09-29 2017-01-04 飞天诚信科技股份有限公司 A kind of Bluetooth adapter and method of work thereof

Also Published As

Publication number Publication date
CN107885674A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
US7603501B2 (en) Communication circuit of serial peripheral interface devices
CN104216840B (en) The method and device that a kind of USB sets and operated to external equipment
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN107885674B (en) Bluetooth device simulator, working method thereof and Bluetooth device operating system
CN104519105A (en) Method and device for acquiring applications matched with terminals
CN106126465A (en) A kind of data transmission method and device
CN111756858A (en) Remote development processing system, method and device of embedded equipment
CN111736866A (en) One-to-one and one-to-many compatible online upgrading method and terminal equipment
CN108628712B (en) Application program testing method and terminal equipment
CN111130828A (en) Intelligent network distribution method and device and terminal equipment
CN113177015A (en) Frame header-based serial port communication method and serial port chip
CN108259895A (en) set-top box test method, system and terminal device
CN112422485B (en) Communication method and device of transmission control protocol
CN110991088A (en) Cable model construction method and system, terminal device and storage medium
CN109976778B (en) Software updating method and system of vehicle electronic product, upper computer and storage medium
CN111143092A (en) Fault recording data processing method and system and terminal equipment
CN115827543A (en) Method, system, device and medium for realizing eSIP communication based on FPGA
CN111176164B (en) Method, device and medium for expanding multiple remote input and output modules
CN111722858A (en) Online upgrading method and terminal equipment
CN101459919B (en) Network selecting method and apparatus
CN113766406A (en) Method, system and device for testing earphone
CN109120731B (en) Universal communication method, system and device
CN104407846A (en) Information processing method and device
CN115983192B (en) Verification system and method for configuring peripheral sub-card resources of verification system
CN211628234U (en) Multi-serial port extension circuit and multi-serial port television board card

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant