CN113507701B - Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration - Google Patents

Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration Download PDF

Info

Publication number
CN113507701B
CN113507701B CN202110329960.2A CN202110329960A CN113507701B CN 113507701 B CN113507701 B CN 113507701B CN 202110329960 A CN202110329960 A CN 202110329960A CN 113507701 B CN113507701 B CN 113507701B
Authority
CN
China
Prior art keywords
identification code
characteristic value
attribute
user
peripheral
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
CN202110329960.2A
Other languages
Chinese (zh)
Other versions
CN113507701A (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.)
Xiamenshi C Chip Co ltd
Original Assignee
Xiamenshi C Chip 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 Xiamenshi C Chip Co ltd filed Critical Xiamenshi C Chip Co ltd
Priority to CN202110329960.2A priority Critical patent/CN113507701B/en
Publication of CN113507701A publication Critical patent/CN113507701A/en
Application granted granted Critical
Publication of CN113507701B publication Critical patent/CN113507701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a method, a system, a terminal and a storage medium for simulating Bluetooth peripheral equipment through parameter configuration, which belong to the field of Bluetooth technology, wherein the method comprises the steps of obtaining a current peripheral equipment identification code and a current service identification code which are input by a user; acquiring characteristic value information in a local database according to the current service identification code, wherein the characteristic value information comprises the characteristic value identification code and a characteristic value authority attribute; screening the characteristic value information according to the characteristic value authority attribute to generate a current service class, wherein the current service class consists of a plurality of screened characteristic value information, and a service identification code corresponding to the current service class is identical to the current service identification code; correspondingly matching the current service class with the current peripheral identification code; acquiring a confirmation request sent by a user; in response to the confirmation request, a connection request including the current peripheral identification code is generated and broadcast for connection by the user. The application has the effects of reducing the communication requirement of software and hardware development and improving the development efficiency of Bluetooth software.

Description

Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration
Technical Field
The present application relates to the field of bluetooth technology, and in particular, to a method, a system, a terminal, and a storage medium for simulating bluetooth peripheral through parameter configuration.
Background
At present, along with the continuous development of technology, intelligent home gradually enters the life of people. In order to realize the centralized control and remote control functions of the household appliances, the household intelligent gateway controls the household appliances or the lighting equipment by means of the external expansion module in a wired or wireless mode according to a specific communication protocol. Bluetooth is used as a low-cost short-distance wireless connection mode and is also a communication mode of intelligent household appliances.
In the existing process of software development, development and debugging are required to be carried out by matching with hardware, and parameters of the software are adjusted according to the actual conditions of hardware equipment.
The related art in the above has the following drawbacks: the debugging of the software development is based on the premise of hardware development, so that the development speed of the software is limited by the development speed of the hardware, and if the development of the hardware is delayed due to unexpected reasons, the debugging of the software is delayed, thereby leading to lower development efficiency of the Bluetooth software.
Disclosure of Invention
In order to reduce the communication requirement of software and hardware development and improve the development efficiency of Bluetooth software, the application provides a method, a system, a terminal and a storage medium for simulating Bluetooth peripheral equipment through parameter configuration.
In a first aspect, the present application provides a method for simulating bluetooth peripheral equipment through parameter configuration, which adopts the following technical scheme:
a method of emulating a bluetooth peripheral through parameter configuration, comprising:
acquiring a current peripheral identification code and a current service identification code which are input by a user;
acquiring characteristic value information in a local database according to the current service identification code, wherein the characteristic value information comprises a characteristic value identification code and a characteristic value authority attribute;
screening the characteristic value information according to the characteristic value authority attribute to generate a current service class, wherein the current service class consists of a plurality of characteristic value information, and a service identification code corresponding to the current service class is the same as the current service identification code;
correspondingly matching the current service class with the current peripheral identification code;
acquiring a confirmation request sent by a user;
and responding to the confirmation request, generating and broadcasting a connection request comprising the current peripheral identification code for connection of a user.
Through the technical scheme, after the characteristic value information under the current service identification code input by a user is screened according to the characteristic value identification code, the characteristic value information is bound with the current simulation peripheral equipment, one simulation peripheral equipment can bind a plurality of service classes, the Bluetooth peripheral equipment is simulated through the characteristic value screened out from the local database by each service class, simulation interaction is carried out on the Bluetooth peripheral equipment with software developers, the software developers can conveniently carry out parameter adjustment, and therefore the development progress of hardware is not required to be waited, and the development efficiency of Bluetooth software is improved.
Optionally, before the step of obtaining the current peripheral identification code and the current service identification code input by the user, the method further includes:
acquiring characteristic value information input by a user, and storing the characteristic value information into a local database, wherein the characteristic value information comprises a service identification code of a service class to which the characteristic value information belongs;
acquiring attribute information selected by a user, wherein the attribute information comprises an attribute identification code;
acquiring a protocol header input by a user;
and generating a local instruction on the basis of the protocol header according to the attribute identification code, the service identification code and the characteristic value identification code, and storing the local instruction in a local database.
By adopting the technical scheme, the service identification code and the characteristic value identification code can be manually input after being communicated with hardware developers, so that the variety of the service and the characteristic value is increased, and the diversified demands of users are met; the user manually inputs different protocol heads to define and generate different instructions, so that a foundation is made for interactive response.
Alternatively, the attribute information may be manually input by a user.
By adopting the technical scheme, the user can manually input the attributes such as brightness, electric quantity and temperature, so that the generated simulated Bluetooth peripheral can meet the actual parameter requirements of software developers.
Optionally, the local instruction includes a protocol header, an attribute identifier, and a feature value identifier;
the method comprises the steps of responding to the confirmation request, generating and broadcasting a connection request comprising the current peripheral identification code, and after the connection of a user, further comprising:
acquiring a modification instruction sent by a user through a Bluetooth link established after the user is connected, wherein the modification instruction comprises an attribute identification code to be modified, a characteristic value identification code to be modified and a modification protocol header;
judging whether a local instruction with the same protocol header as the modified protocol header, the same characteristic value identification code as the characteristic value identification code to be modified and the same attribute identification code as the attribute identification code to be modified exists in a local database;
if the local instruction meeting the requirements exists, acquiring a corresponding attribute length according to the local instruction;
generating a new attribute value according to the attribute length and the modification instruction;
and updating the corresponding attribute value in the local database by using the new attribute value.
By adopting the technical scheme, after the Bluetooth link is established, the user sends the modification instruction to the simulated Bluetooth device, then the modification instruction is compared with the local instruction in the local database, and the corresponding attribute value in the modification instruction is modified and updated, so that interaction between the user and the simulated Bluetooth peripheral is realized.
Optionally, after updating the corresponding attribute value in the local database with the new attribute value, the method further includes:
judging whether the attribute of the characteristic value authority of the characteristic value information also comprises a 'notifiable', and judging whether a local instruction of which the corresponding protocol header is a peripheral receiving instruction protocol header exists in a local database;
if the attribute of the characteristic value authority further comprises a notification, and the local instruction exists in a local database, acquiring the local instruction and sending the local instruction to a user side.
By adopting the technical scheme, after the attribute value is modified through the instruction, if the corresponding characteristic value information comprises the characteristic value authority attribute capable of being notified, the response instruction is fed back to the user so as to notify the user of the current signal transmission condition, and therefore the use experience of the user is improved.
Optionally, the local database further includes, after determining whether a local instruction having the same protocol header as the modified protocol header, the same feature value identification code as the feature value identification code to be modified, and the same attribute identification code as the attribute identification code to be modified exists:
if the local instruction does not exist, acquiring a local instruction with the protocol header being an alarm protocol header from a local database according to the attribute identification code to be modified and the characteristic value identification code to be modified, and sending the local instruction to a user side.
By adopting the technical scheme, when the local database does not have the local instruction corresponding to the modification instruction, the modification of the attribute value cannot be performed, and at the moment, an alarm instruction is sent to indicate the modification failure, and a developer is timely reminded of the supplement perfection.
In a second aspect, the present application provides a bluetooth peripheral system configured by parameters, which adopts the following technical scheme:
an analog bluetooth peripheral system configured by parameters, comprising:
the user input sub-module is used for acquiring a current peripheral identification code and a current service identification code which are input by a user;
the peripheral matching sub-module is used for acquiring characteristic value information in a local database according to the current service identification code, wherein the characteristic value information comprises a characteristic value identification code and a characteristic value authority attribute; screening the characteristic value information according to the characteristic value authority attribute to generate a current service class, wherein the current service class consists of a plurality of characteristic value information, and a service identification code corresponding to the current service class is the same as the current service identification code; correspondingly matching the current service class with the current peripheral identification code;
the confirmation broadcast sub-module is used for acquiring a confirmation request sent by a user; and responding to the confirmation request, generating and broadcasting a connection request comprising the current peripheral identification code for connection of a user.
By adopting the technical scheme, after the user inputs the current peripheral identification code and the current service identification code, the characteristic value under the service can be screened, then the current service class is generated according to the screening result, and the current service class is matched with the current peripheral identification code, so that the analog peripheral with the attribute and the communication channel is generated, a software developer can directly communicate with the analog peripheral and adjust parameters, the time is saved, and the software development efficiency is improved.
In a third aspect, the present application provides an intelligent terminal, which adopts the following technical scheme:
a smart terminal comprising a memory and a processor, the memory having stored thereon a computer program capable of being loaded by the processor and executing the method according to the first aspect.
Through adopting above-mentioned technical scheme, through obtaining service and eigenvalue from local database, bind with current peripheral hardware identification code and generate analog bluetooth peripheral hardware for the software developer can be with bluetooth software and analog bluetooth peripheral hardware carry out the communication with the accent and take part in, and need not to cooperate with the hardware development, saves time, has improved the efficiency of software development.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium comprising a computer program stored with instructions executable by a processor to load and execute the method according to the first aspect.
Through adopting above-mentioned technical scheme, can be for the manual service that matches of simulation bluetooth peripheral hardware, make the simulation bluetooth peripheral hardware can be close the real required bluetooth peripheral hardware function, thereby make the software development personnel can transfer the ginseng based on the simulation bluetooth peripheral hardware, reduced the communication with the hardware development, save the time of software development, raise the efficiency.
In summary, the present application includes at least one of the following beneficial technical effects:
1. by matching and binding the service containing the characteristic value with the peripheral identification code, the peripheral identification code becomes an analog peripheral with a communication channel, and a developer can directly communicate with the analog peripheral and adjust parameters, so that time is saved, and the software development efficiency is improved;
2. after the attribute value is modified through the instruction, if the corresponding characteristic value information comprises the characteristic value authority attribute capable of being notified, the local instruction for responding is fed back to the user so as to notify the user of the current signal transmission condition, and therefore the use experience of the user is improved.
Drawings
Fig. 1 is a flow chart of a method for simulating bluetooth peripheral through parameter configuration according to an embodiment of the present application.
Fig. 2 is a flow chart of the substeps of S100 for digitizing a bluetooth peripheral and S200 for generating an analog bluetooth peripheral from the data according to an embodiment of the application.
Fig. 3 is a flow chart of the sub-steps of S300 for interacting with an analog peripheral in accordance with an embodiment of the present application.
Fig. 4 is a block diagram of a configuration of an analog bluetooth peripheral system by parameter configuration according to an embodiment of the present application.
Reference numerals illustrate: 1. a local data generation module; 2. an analog peripheral generation module; 21. a user input sub-module; 22. a matching sub-module is arranged outside; 23. a confirm broadcast sub-module; 3. and the instruction data interaction module.
Detailed Description
The application is described in further detail below with reference to fig. 1-4.
The embodiment of the application discloses a method for simulating Bluetooth peripheral equipment through parameter configuration. Referring to fig. 1, the method for simulating bluetooth peripheral through parameter configuration includes:
s100: and acquiring the characteristic value information, the service class, the attribute information and the protocol header input by the user, generating a corresponding local instruction, and storing the local instruction into a local database.
The user refers to a software developer, the software developer can communicate with the hardware developer in advance, specific values such as characteristic value information, service class, attribute information and the like are manually input, and the specific values are integrated to generate the simulated Bluetooth peripheral, so that the functions of the actual peripheral are simulated, and the development requirements of the user are met. Specifically, in connection with fig. 2, S100 comprises the following sub-steps:
s101: and acquiring the characteristic value information and the service class input by the user.
The service class corresponds to a service identification code, the service identification code is a unique identification of the service class, different service classes correspond to different service identification codes, in addition, each service class is composed of a plurality of function-related characteristic value information, and the characteristic value information comprises the characteristic value identification code. It should be noted that, the service identifier and the characteristic value identifier are UUID codes.
Specifically, on the interface of the analog peripheral end, the user can manually input the characteristic value identification code and the service identification code in the input frame, or the user can import the characteristic value identification code and the service identification code into the analog peripheral end, and the analog peripheral end can be a mobile phone terminal with a Bluetooth module or a computer terminal with a Bluetooth module. It should be noted that, the specific values of the feature value identification code and the service identification code input by the user are obtained by the software developer communicating with the hardware developer in advance and then determining according to the actual requirement.
S102: and acquiring attribute information selected by a user.
Wherein the attribute information includes attribute identification codes and attribute lengths, and different attribute identification codes correspond to different attributes, such as brightness, electric quantity, temperature, and the like. Specifically, the user can manually input the attribute identification code and the attribute length on the interface of the analog peripheral terminal, and select a certain required attribute information on the interface through a selection box.
S103: and acquiring a protocol header input by a user.
Wherein the specific values OF the different protocol headers are preset, and the different protocol headers represent different instruction meanings, for example, the protocol header OF01 may represent a modified instruction, the protocol header OF02 may represent a response instruction, etc.
S104: and generating a local instruction on the basis of the protocol header according to the attribute information, the characteristic value information and the service class.
Specifically, the local instruction sequentially comprises a peripheral identification code, a service identification code, a characteristic value identification code, a protocol header and an attribute identification code from high order to low order. The peripheral identification code is temporarily empty, and the service identification code, the characteristic value identification code, the protocol header and the attribute identification code correspond to the service identification code, the characteristic value identification code, the protocol header and the attribute identification code input by the user before respectively. And finally, storing the generated local instruction into a local database.
S200: and screening out characteristic value information from a local database according to the service identification code input by the user, binding the characteristic value information with the peripheral identification code input by the user, and generating and broadcasting a confirmation request.
Specifically, the user may input the peripheral identification code and the service identification code, bind the corresponding service class with the analog peripheral end, complete the generation of the analog bluetooth peripheral according to the local database, and then perform the broadcast waiting connection and interaction, and in connection with fig. 2, S200 includes the following sub-steps:
s201: and acquiring the current peripheral identification code input by the user.
The peripheral identification code is a unique identification of the analog peripheral, and different analog peripheral identification codes correspond to different peripheral identification codes for convenience of user distinction. Specifically, the user can manually input the current peripheral identification code in a peripheral input box of the analog peripheral display interface.
S202: and acquiring the current service identification code input by the user.
Specifically, the user may manually input a current service identification code in a peripheral input box of the analog peripheral display interface, where the current service identification code is one of a plurality of service identification codes pre-stored in the local database.
S203: and acquiring the characteristic value information in the local database according to the current service identification code.
The feature value information further comprises a service identification code of a service class to which the feature value belongs. Specifically, the user can click a virtual button on a display interface of the analog peripheral end, send a request for confirming the representation of the current service identification code, and after receiving the request, the system searches and acquires the characteristic value information with the same service identification code as the current service identification code from the local database.
S204: and binding and matching the characteristic value information with the current peripheral identification code.
The characteristic value information also comprises a peripheral identification code, and the peripheral identification code describes the peripheral which is correspondingly matched with the characteristic value information. Specifically, the current peripheral identification code input by the user is filled into the peripheral identification codes of the characteristic value information under the current service class, and the peripheral identification codes of all the characteristic value information are preset to be empty before binding and matching. After that, the user may select to continue to input other service identification codes on the interface of the debug terminal, and add a plurality of service classes to the current analog peripheral, that is, S202 may be returned, and the current service identification code input by the user may be acquired again.
S205: and acquiring a confirmation request sent by the user.
Specifically, after the user completes multiple service classes for the current configuration of the analog peripheral, a certain virtual button can be clicked on an interface of the analog peripheral end, and a confirmation request for indicating that the configuration of the analog peripheral is completed is sent.
S206: in response to the confirmation request, a connection request is generated and broadcast for connection by the user.
Wherein the connection request includes the current peripheral identification code. Specifically, after receiving the confirmation request sent by the user, a connection request is generated, and the program sdk is called to broadcast, waiting for the user to make a bluetooth connection.
S300: and according to the modification instruction sent by the user, acquiring a corresponding local instruction from the local database and sending the corresponding local instruction to the user side.
The user terminal can be a terminal such as a mobile phone APP which can interact with the Bluetooth peripheral in reality. Specifically, the user end is connected with the analog peripheral end through Bluetooth, and the interaction process with the analog peripheral end is realized through the exchange of instruction data. It should be noted that, the attribute information and the peripheral identification code included in the local instruction in this step are the same as the peripheral identification code in the connection request, that is, the interaction of the data is completed by calling the attribute information, the attribute information and the local instruction under the service class bound with the current analog peripheral.
Specifically, in connection with fig. 3, S300 comprises the following sub-steps:
s301: in response to the connection request, a bluetooth link is established.
Specifically, a software developer opens a bluetooth function of a user terminal, receives a connection request broadcasted by an analog peripheral terminal, establishes a bluetooth link for transmitting data between the user terminal and the analog peripheral terminal in response to the connection request, and prepares to exchange instruction data.
S302: and acquiring a modification instruction sent by the user.
The data structure of the modification instruction is the same as that of the local instruction, the attribute identification code of the modification instruction is the attribute identification code to be modified, the characteristic value identification code of the modification instruction is the characteristic value identification code to be modified, and the protocol header of the modification instruction is the modification protocol header. For example, the modification header of the modification instruction may be determined to be 0F01, and the attribute identifier to be modified may be the identifier of the attribute of brightness, and then the modification instruction represents modifying the attribute value of brightness at the analog peripheral end.
S303: and judging whether a local instruction meeting the instruction condition exists or not according to the modification protocol head, the characteristic value identification code to be modified and the attribute identification code to be modified.
It should be noted that, the feature value information further includes a feature value authority attribute, and the feature value authority attribute includes three types of "readable", "writable" and "notifiable". In this embodiment, the "readable" feature value authority corresponds to "0", the "writable" feature value authority corresponds to "1", and the "notifiable" feature value authority corresponds to "2".
The instruction conforming condition is a local instruction in which the protocol header is the same as the modification protocol header, the characteristic value identification code is the same as the characteristic value identification code to be modified, and the attribute identification code is the same as the attribute identification code to be modified. Specifically, firstly, obtaining characteristic value information with characteristic value identification codes equal to characteristic value identification codes to be modified and characteristic value authority attribute of 1 (writable) from a local database, providing a channel for modification of corresponding attribute values, then judging whether a local instruction meeting instruction conditions exists in the local database, and if the local instruction meeting the instruction conditions exists in the local database, jumping to S304; if there is no local instruction meeting the instruction condition in the local database, the process goes to S309.
S304: and acquiring the corresponding attribute length according to the local instruction.
Specifically, the local database is searched for the attribute information having the same attribute identifier as the modification identifier, and then the attribute length in the attribute information is obtained.
S305: and generating a new attribute value from the modification instruction according to the acquired attribute length.
The modification instruction further comprises a modification attribute value. Specifically, a character string with the same length as the attribute is obtained from a preset starting point in the modification instruction, and the character string is defined as a new attribute value.
S306: and updating the corresponding attribute value in the local database by using the new attribute value.
Specifically, the obtained new attribute value is used for replacing the attribute value in the corresponding attribute information in the local database, so that the attribute value is updated.
S307: and judging whether the characteristic value information and the local instruction meet the response condition.
The attribute of the feature value authority according with the response condition is that the feature value authority attribute of the feature value information also comprises '2' (which can be notified), meanwhile, the feature value identification code in the local database is a modified feature identification code, the attribute identification code is an attribute identification code to be modified, and the protocol header is a local instruction of the peripheral accepting instruction protocol header. Specifically, the characteristic value information with the same characteristic value identification code as the characteristic value identification code to be modified is obtained, whether the characteristic value information and the local instruction meet the response condition is judged, if the characteristic value information and the local instruction meet the response condition, the step is skipped to S308, and if the characteristic value information and the local instruction do not meet the response condition, the step is skipped to S309.
S308: and acquiring a local instruction and sending the local instruction to the user side.
Specifically, a local instruction meeting the response condition is obtained and sent to the user side through the Bluetooth link, and the user is notified of finishing the modification action of the corresponding attribute.
S309: according to the characteristic value information and the attribute identification code to be modified, a local instruction comprising an alarm protocol header is acquired, and the local instruction is sent to a user side.
Specifically, in the local database, searching and acquiring the characteristic value identification code as the modification characteristic identification code, wherein the attribute identification code is the attribute identification code to be modified, the protocol header is a local instruction of the alarm protocol header, and finally, the local instruction is sent to the user terminal through the Bluetooth link to carry out alarm prompt on the user, so that the user is informed that the modification action of the corresponding attribute can not be completed.
The implementation principle is as follows: firstly, acquiring characteristic value information, service class, attribute information and protocol header input by a user, storing the characteristic value information, service class, attribute information and protocol header in a local database, generating a corresponding local instruction according to the selection and input of the user, and storing the local instruction in the local database. And then, acquiring the current service identification code and the current peripheral identification code input by the user, and matching a plurality of service classes for the analog peripheral, so that the analog peripheral can simulate the functions of the peripheral in reality. After the Bluetooth link is established between the analog peripheral and the user terminal, instruction data is transmitted and responded between the analog peripheral and the user terminal, so that the software developer can connect and tune developed software on the premise of no need of matched hardware development, the speed of hardware development is not needed to be considered, and the efficiency and autonomy of software development are improved.
Based on the method, the embodiment of the application also discloses a system for simulating Bluetooth peripheral equipment through parameter configuration. Referring to fig. 4, the analog bluetooth peripheral system configured by parameters includes a local data generation module 1, an analog peripheral generation module 2, and an instruction data interaction module 3.
The local data generating module 1 is configured to obtain feature value information, service class, attribute information and protocol header input by a user, generate a local instruction, and store the local instruction and the input into a local database.
And the analog peripheral generation module 2 is used for binding the service class and the peripheral identification code according to the input of the user, acquiring the current peripheral identification code input by the user, calling the corresponding service identification code and the characteristic value identification code to generate an analog peripheral and broadcasting. Specifically, the module further includes a user input sub-module 21, a peripheral matching sub-module 22, and a confirmation broadcast sub-module 23:
the user input sub-module 21 is configured to obtain a current peripheral identification code and a current service identification code input by a user.
The peripheral matching sub-module 22 is configured to screen and generate feature value information from the local database according to the current service identification code, select and generate a current service class from the feature value information according to the feature value authority attribute of the feature value information, and correspondingly match the current service class with the peripheral identification code.
The confirmation broadcast sub-module 23 is configured to obtain a confirmation request sent by the user, generate a connection request including the current peripheral identification code, and broadcast the connection request for connection of the user.
The instruction data interaction module 3 is used for acquiring a modification instruction sent by a user, judging whether a local instruction conforming to an instruction condition exists according to the modification instruction, if so, updating an attribute value according to a corresponding attribute length, and sending a local instruction comprising a peripheral acceptance instruction protocol header to a user side when the attribute value authority comprises a 'notifiable'; if the local instruction meeting the instruction condition does not exist, generating the local instruction containing the alarm protocol header to the user side.
The embodiment of the application also discloses an intelligent terminal, which comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and execute the method for simulating Bluetooth peripheral equipment through parameter configuration.
The embodiment of the present application also discloses a computer readable storage medium storing a computer program capable of being loaded by a processor and executing the method for simulating bluetooth peripheral through parameter configuration as described above, the computer readable storage medium for example comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the scope of application. It will be apparent that the described embodiments are merely some, but not all, embodiments of the application. Based on these embodiments, all other embodiments that may be obtained by one of ordinary skill in the art without inventive effort are within the scope of the application.

Claims (9)

1. A method for simulating bluetooth peripherals by parameter configuration, comprising: acquiring a current peripheral identification code and a current service identification code which are input by a user; acquiring characteristic value information in a local database according to the current service identification code, wherein the characteristic value information comprises a characteristic value identification code and a characteristic value authority attribute; screening the characteristic value information according to the characteristic value authority attribute to generate a current service class, wherein the current service class consists of a plurality of characteristic value information, and a service identification code corresponding to the current service class is the same as the current service identification code; correspondingly matching the current service class with the current peripheral identification code; acquiring a confirmation request sent by a user; and responding to the confirmation request, generating and broadcasting a connection request comprising the current peripheral identification code for connection of a user.
2. The method for simulating bluetooth peripheral configuration by means of parameters according to claim 1, wherein said obtaining the current peripheral identification code and the current service identification code entered by the user is preceded by: acquiring characteristic value information input by a user, and storing the characteristic value information into a local database, wherein the characteristic value information comprises a service identification code of a service class to which the characteristic value information belongs; acquiring attribute information selected by a user, wherein the attribute information comprises an attribute identification code; acquiring a protocol header input by a user; and generating a local instruction on the basis of the protocol header according to the attribute identification code, the service identification code and the characteristic value identification code, and storing the local instruction in a local database.
3. The method of claim 2, wherein the attribute information is manually input by a user.
4. The method for simulating a bluetooth peripheral via parameter configuration according to claim 2, wherein the local instruction comprises a protocol header, an attribute identifier, and a characteristic value identifier; the method comprises the steps of responding to the confirmation request, generating and broadcasting a connection request comprising the current peripheral identification code, and after the connection of a user, further comprising: acquiring a modification instruction sent by a user through a Bluetooth link established after the user is connected, wherein the modification instruction comprises an attribute identification code to be modified, a characteristic value identification code to be modified and a modification protocol header; judging whether a local instruction with the same protocol header as the modified protocol header, the same characteristic value identification code as the characteristic value identification code to be modified and the same attribute identification code as the attribute identification code to be modified exists in a local database; if the local instruction meeting the requirements exists, acquiring a corresponding attribute length according to the local instruction; generating a new attribute value according to the attribute length and the modification instruction; and updating the corresponding attribute value in the local database by using the new attribute value.
5. The method for modeling bluetooth peripheral via parameter configuration according to claim 4, wherein said updating the corresponding attribute value in the local database with the new attribute value further comprises: judging whether the attribute of the characteristic value authority of the characteristic value information also comprises a 'notifiable', and judging whether a local instruction of which the corresponding protocol header is a peripheral receiving instruction protocol header exists in a local database; if the attribute of the characteristic value authority further comprises a notification, and the local instruction exists in a local database, acquiring the local instruction and sending the local instruction to a user side.
6. The method according to claim 4, wherein the determining, in the local database, whether there is a local instruction that a protocol header is the same as the modification protocol header, a feature value identification code is the same as the feature value identification code to be modified, and an attribute identification code is the same as the attribute identification code to be modified further comprises: if the local instruction does not exist, acquiring a local instruction with the protocol header being an alarm protocol header from a local database according to the attribute identification code to be modified and the characteristic value identification code to be modified, and sending the local instruction to a user side.
7. The analog Bluetooth peripheral system is configured by parameters, and is characterized by comprising a user input submodule (21) for acquiring a current peripheral identification code and a current service identification code which are input by a user; the peripheral matching sub-module (22) is used for acquiring characteristic value information in a local database according to the current service identification code, wherein the characteristic value information comprises a characteristic value identification code and a characteristic value authority attribute; screening the characteristic value information according to the characteristic value authority attribute to generate a current service class, wherein the current service class consists of a plurality of characteristic value information, and a service identification code corresponding to the current service class is the same as the current service identification code; correspondingly matching the current service class with the current peripheral identification code; a confirmation broadcast sub-module (23) for acquiring a confirmation request sent by the user; and responding to the confirmation request, generating and broadcasting a connection request comprising the current peripheral identification code for connection of a user.
8. An intelligent terminal comprising a memory and a processor, the memory having stored thereon a computer program capable of being loaded by the processor and performing the method according to any of claims 1 to 6.
9. A computer readable storage medium, characterized in that a computer program is stored which can be loaded by a processor and which performs the method according to any of claims 1 to 6.
CN202110329960.2A 2021-03-29 2021-03-29 Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration Active CN113507701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110329960.2A CN113507701B (en) 2021-03-29 2021-03-29 Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110329960.2A CN113507701B (en) 2021-03-29 2021-03-29 Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration

Publications (2)

Publication Number Publication Date
CN113507701A CN113507701A (en) 2021-10-15
CN113507701B true CN113507701B (en) 2023-11-21

Family

ID=78008420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110329960.2A Active CN113507701B (en) 2021-03-29 2021-03-29 Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration

Country Status (1)

Country Link
CN (1) CN113507701B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176899A (en) * 2011-12-26 2013-06-26 希姆通信息技术(上海)有限公司 Mobile phone emulator and method for emulating mobile phone functions on host machine
CN107195131A (en) * 2017-04-13 2017-09-22 深圳怡化电脑股份有限公司 A kind of method and device of analog hardware equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075420A1 (en) * 2012-06-04 2014-03-13 Google Inc. Generating hardware profiles by a software development environment
US20190034318A1 (en) * 2017-07-26 2019-01-31 Western Digital Technologies, Inc. Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176899A (en) * 2011-12-26 2013-06-26 希姆通信息技术(上海)有限公司 Mobile phone emulator and method for emulating mobile phone functions on host machine
CN107195131A (en) * 2017-04-13 2017-09-22 深圳怡化电脑股份有限公司 A kind of method and device of analog hardware equipment

Also Published As

Publication number Publication date
CN113507701A (en) 2021-10-15

Similar Documents

Publication Publication Date Title
US10284705B2 (en) Method and apparatus for controlling smart device, and computer storage medium
CN108683574A (en) A kind of apparatus control method, server and intelligent domestic system
CN103605531A (en) Household appliance control method and device and mobile terminal
CN102959597A (en) Remote control of a telephone
JP6715283B2 (en) Network system and information processing method
CN106933952B (en) Dance action file generation and processing method for mobile phone home terminal
EP1685680B1 (en) Association control apparatus, association control method and service association system
CN112332997A (en) Network distribution method of terminal equipment, terminal equipment and computer readable storage medium
CN1879355B (en) Consistent user interface front end for remote user interfaces
CN112436986A (en) Network distribution method and device, network distribution equipment and computer readable storage medium
WO2009057915A2 (en) Teminal and method of providing intelligent service in ubiquitous smart space
CN112671572B (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN113507701B (en) Method, system, terminal and storage medium for simulating Bluetooth peripheral through parameter configuration
CN106648805A (en) Intelligent device, intelligent system, and method for intelligently installing application
US20230143525A1 (en) Electronic device, data usage method, and recording medium
JP2007172289A (en) Network equipment management device, network management system and network equipment management method
CN113791766B (en) Method for combining data interfaces, electronic device and readable storage medium
CN106210898B (en) Upgrading method and system for television terminal in network-free state
JP2001211485A (en) Method for remotely controlling mobile device and electronic equipment
CN101336425B (en) Method and apparatus for generating task in network
CN106534279A (en) Dynamic native interface invoking method and system
CN115484040A (en) Voiceprint registration method of household appliance, terminal device, household appliance and medium
CN112124131A (en) Unified access management method and system for charging piles based on multiple communication protocols
CN110266613A (en) The flow managing method and terminal of application program
US11966656B2 (en) Server, electronic device, server communication method, device communication method, and communication system

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