CN114827967A - Software updating method, Bluetooth device and storage medium - Google Patents

Software updating method, Bluetooth device and storage medium Download PDF

Info

Publication number
CN114827967A
CN114827967A CN202210231714.8A CN202210231714A CN114827967A CN 114827967 A CN114827967 A CN 114827967A CN 202210231714 A CN202210231714 A CN 202210231714A CN 114827967 A CN114827967 A CN 114827967A
Authority
CN
China
Prior art keywords
data
slave
bluetooth
frame format
updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210231714.8A
Other languages
Chinese (zh)
Other versions
CN114827967B (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.)
Shanghai Frequen Microelectronics Co ltd
Original Assignee
Shanghai Frequen Microelectronics 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 Shanghai Frequen Microelectronics Co ltd filed Critical Shanghai Frequen Microelectronics Co ltd
Priority to CN202210231714.8A priority Critical patent/CN114827967B/en
Publication of CN114827967A publication Critical patent/CN114827967A/en
Application granted granted Critical
Publication of CN114827967B publication Critical patent/CN114827967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a software updating method, Bluetooth equipment and a storage medium. A software updating method is applied to Bluetooth equipment with Bluetooth master-slave functions, and comprises the following steps: transmitting handshake information according to a set frame format through Bluetooth broadcasting; receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises a Media Access Control (MAC) address of the slave device; and respectively issuing burning data to each slave device according to a set frame format, wherein the burning data is used for updating the software program of each slave device. The slave equipment is the Bluetooth equipment to be updated, handshake information is sent according to a set frame format by utilizing Bluetooth broadcasting, and then burning data is issued to the slave equipment according to the set frame format to update the software programs of the slave equipment, so that software updating can be performed on a plurality of Bluetooth equipment at the same time, the wiring trouble is avoided, and the updating efficiency is improved.

Description

Software updating method, Bluetooth device and storage medium
Technical Field
The present invention relates to the field of bluetooth technology, and in particular, to a method for updating software, a bluetooth device, and a storage medium.
Background
Traditional bluetooth update software has two kinds of modes: firstly, wired connection; second, OTA (Over-the-Air Technology ) upgrades.
The wired connection is limited by the restriction of a communication protocol, one interface can only update one piece of Bluetooth device software, and each device update needs to be reconnected, which is very tedious. The OTA upgrades the software of a single device by wireless communication, which is not wired, but requires a separate wireless communication channel with each device for many device updates, which is time consuming.
Therefore, when the number of bluetooth devices requiring software update is large, the conventional bluetooth software updating method has the defects of inconvenient wiring and time consumption.
Disclosure of Invention
The invention provides a software updating method, a software updating device, monitoring equipment and a storage medium, which are used for realizing software updating of a plurality of Bluetooth devices, do not need wiring, have short required time and improve the updating efficiency.
In a first aspect, an embodiment of the present invention provides a software updating method, which is applied to a bluetooth device including a bluetooth master-slave function, and includes:
transmitting handshake information according to a set frame format through Bluetooth broadcasting;
receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises a Media Access Control (MAC) address of the slave device;
and respectively issuing burning data to each slave device according to a set frame format, wherein the burning data is used for updating the software program of each slave device.
Optionally, after issuing the burning data to each slave device according to the set frame format, the method further includes:
receiving a data request reported by at least one slave device, wherein the data request comprises an MAC address of the slave device;
and sending the missing data to the corresponding slave equipment according to the MAC address.
Optionally, the setting frame format includes the following fields:
a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
Optionally, before sending the handshake information according to the set frame format through bluetooth broadcast, the method further includes:
and receiving update parameters and update data set by a user through a serial port, wherein the update parameters comprise the number of equipment to be updated and the length of broadcast data, and the update data comprise hexadecimal data of a software program to be updated.
Optionally, before issuing the burning data to each slave device according to the set frame format, the method further includes:
and if the number of the slave devices sending the response information reaches the number of the devices to be updated, sending handshake completion information through Bluetooth broadcast.
In a second aspect, an embodiment of the present invention further provides a software updating method, applied to a bluetooth device including a bluetooth master-slave function, including:
receiving a broadcast containing handshake information sent by a master device through a Bluetooth scanning function;
returning response information according to the handshake information, wherein the response information comprises the MAC address of the slave equipment;
and receiving the burning data with the set frame format sent by the main equipment, and updating the software program according to the burning data.
Optionally, before updating the software program according to the burning data, the method further includes:
determining missing data by comparing the packet address of the burning data with the hash check value;
and reporting a data request to request the master device to send the missing data, wherein the data request comprises the MAC address of the slave device.
Optionally, the setting frame format includes the following fields:
a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
In a third aspect, an embodiment of the present invention further provides a bluetooth device, including:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the software updating method provided by the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the software updating method provided in the embodiment of the present invention.
The embodiment of the invention provides a software updating method, a device, monitoring equipment and a storage medium, wherein handshake information is sent according to a set frame format through Bluetooth broadcast; then receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises the MAC address of the slave device; and finally, respectively issuing burning data to each slave device according to a set frame format, wherein the burning data is used for updating the software program of each slave device. The slave devices are the Bluetooth devices to be updated, the software programs of the slave devices are updated by the technical scheme, software updating can be performed on the Bluetooth devices simultaneously, wiring troubles are avoided, time is saved, and updating efficiency is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
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 description of the embodiments will be briefly introduced 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 creative efforts.
FIG. 1a is a flowchart of a software updating method according to an embodiment of the present invention;
fig. 1b is a schematic diagram of a setting frame format according to an embodiment of the present invention;
FIG. 2a is a flowchart of a software updating method according to a second embodiment of the present invention;
fig. 2b is a schematic diagram of handshake between a master device and a slave device according to a second embodiment of the present invention;
FIG. 2c is a flowchart illustrating a process of setting update parameters and update data by a user according to a second embodiment of the present invention;
FIG. 3a is a flowchart of a software updating method according to a third embodiment of the present invention;
FIG. 3b is a flowchart of a master device updating a slave device software program according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a software updating apparatus according to a fourth embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a software updating apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a bluetooth device according to a sixth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1a is a flowchart of a software updating method according to an embodiment of the present invention, where the present embodiment is applicable to a situation where a plurality of bluetooth devices need software updating, and may also be applied to a bluetooth device with a receiving function or a high-rate wireless communication device with a constant rate of 2.4G/5.8G greater than 1M.
The Bluetooth devices which need to be updated and updated have Bluetooth master-slave functions, namely broadcasting and scanning functions. In this embodiment, a bluetooth device for updating software is used as a master device, and a bluetooth device to be updated is used as a slave device.
As shown in fig. 1a, the method comprises:
and S110, transmitting handshake information according to a set frame format through Bluetooth broadcasting.
Specifically, the master device may send handshake information to a plurality of slave devices within a certain range (for example, within 10 meters) in a bluetooth broadcast manner according to a set frame format, where the handshake information includes: and the handshake package and the burning data are subjected to hash check to generate check values. The burning is also called burning, that is, the desired data is burned into the media such as optical disc, burning card, etc. by means of a burning machine, etc. The master device sends the handshake information in a bluetooth broadcast manner, and can interact with multiple slave devices receiving the handshake information, that is, without connection, a multi-interaction effect can be achieved, the handshake information is sent by setting a frame format, for example, the setting frame format may include a synchronization frame (Sync), a device address to be updated (Mac Add, MD), and the like, the Sync may allow the master device to distinguish which slave devices need handshake interaction at this time, the MD may allow the master device to know the device addresses of the slave devices, and the master device may send data to the corresponding slave devices more accurately in an interaction process.
And S120, receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises the MAC address of the slave device.
Specifically, the master device sends handshake information in a bluetooth broadcast manner, after receiving the handshake information, the multiple slave devices return response information to the master device, and the master device receives the response information of the multiple slave devices to complete a handshake process. The response information of each slave device comprises the MAC address of the slave device, and the master device can judge the number of the received slave devices through the MAC address.
And S130, respectively issuing burning data to each slave device according to a set frame format.
And the burning data is used for updating the software program of each slave device.
Specifically, the burning data may include: the number of devices to be updated and the length of broadcast data. The master device can respectively issue burning data to each slave device according to a set frame format to update the software program of the slave device.
Optionally, the setting frame format may include the following fields: a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
In particular, in a normal usage scenario there are many bluetooth devices around the perimeter, which are transmitting different broadcast data at all times. Fig. 1b is a schematic diagram of a setting frame format according to an embodiment of the present invention, and as shown in fig. 1b, the frame format of the broadcast packet specifically includes the following fields: a synchronization frame (Sync); packet Type (Packet Type, PT); package Enable (Mac Enable, ME); a data acquisition type (Mac Get, ME), a device address to be updated (Mac Add, MD); packet address (PD); packet Length (PL); data (Payload); cyclic Redundancy Check (CRC).
The length of the synchronization frame (Sync) is 4 bytes (i.e. 4 bytes), and bluetooth devices whose field contents are the same as those of the master device (i.e. bluetooth device for updating upgrade software) are all devices (i.e. slave devices) that need handshaking/upgrading.
The length of the packet type PT is 2bits, and its specific meaning may include:
00: retention (i.e. not setting any meaning for the moment, and adding new meaning according to actual requirement later);
01: handshaking;
10: data;
11: and (6) retransmitting.
The length of the packet enable ME is 1bit, and its specific meaning may include:
0: the subsequent packet contains the MAC address;
1: subsequent packets do not contain a MAC address.
The data acquisition type MG is 1bit long, and specific meanings thereof may include:
0: sending the packet;
1: and acquiring a data packet request instruction.
PT, ME and MG occupy 1 byte together, and there may be a length-4 Bits Rsv reserved field.
The packet address PD can package the broadcast packet data with the length of 100Bytes, the packet is counted from 0, and the PD is the counting value.
The packet length PD may be considered to be the length of a packet transmitted during the interaction between the master and the slave.
The data (Payload) may be specific data transmitted between the master device and the slave device, such as burning data, handshake information, and the like.
Cyclic Redundancy Check (CRC) is used for error detection by using the principle of division and remainder to detect or Check errors that may occur after data transmission or storage.
The software updating method provided by the embodiment of the invention sends handshake information according to a set frame format through Bluetooth broadcast; then receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises the MAC address of the slave device; and finally, respectively issuing burning data to each slave device according to a set frame format, wherein the burning data is used for updating the software program of each slave device. By using the technical scheme to update the software programs of the plurality of slave devices simultaneously, the trouble of wiring can be avoided, the time is saved, and the updating efficiency is improved.
Example two
Fig. 2a is a flowchart of a software updating method according to a second embodiment of the present invention, and the second embodiment is optimized based on the above embodiments. As shown in fig. 2a, the method comprises:
and S210, receiving the updating parameters and the updating data set by the user through a serial port.
The updating parameters comprise the number of the devices to be updated and the length of the broadcast data, and the updating data comprise hexadecimal data of the software program to be updated.
And S220, transmitting handshake information according to a set frame format through Bluetooth broadcasting.
Specifically, fig. 2b is a schematic diagram of handshake between a master device and a slave device according to a second embodiment of the present invention, as shown in fig. 2b, a user may control to operate the master device, and set an update parameter and update data of a device to be updated (i.e., a device to be updated) through a serial port, where the update parameter may include the number of devices to be updated and a broadcast data length, the update data may include hexadecimal data of a software program to be updated, after the setting is completed, the master device may return to the configuration completion to the user, and then the master device and the slave device to be updated perform handshake interaction.
And S230, receiving response information of a plurality of slave devices.
Wherein the response information of each slave device includes the MAC address of the slave device.
And S240, if the number of the slave devices sending the response information reaches the number of the devices to be updated, sending handshake completion information through Bluetooth broadcast.
Specifically, the master device may determine the number of the received slave devices by detecting the MAC address, and if the number of the received slave devices reaches the number of the devices to be updated set by the user, the master device sends handshake completion information through bluetooth broadcast. On the basis, the updating of the slave devices with the specified number can be realized, and more various software updating requirements are met.
And S250, respectively issuing burning data to each slave device according to a set frame format.
Optionally, after issuing the burning data to each slave device according to the set frame format, the method further includes: receiving a data request reported by at least one slave device, wherein the data request comprises an MAC address of the slave device; and sending the missing data to the corresponding slave equipment according to the MAC address.
Specifically, there may be a case that the sent burning data slave device does not necessarily receive the burning data completely or loses the data, at this time, before the slave device updates the software program according to the burning data, the slave device checks the integrity of the burning data, thereby determining whether to ask for the data from the master device, the missing data may be confirmed by comparing a packet address (PD) of the burning data with a hash check value (CRC), and meanwhile, the slave device reports a data request to notify the missing data required by the master device, and the master device may receive a data request reported by at least one slave device, where the data request includes an MAC address of the slave device, and sends the missing data to a corresponding slave device according to the MAC address until the updating of the slave device is completed.
Exemplarily, fig. 2c is a flowchart for setting an update parameter and update data by a user according to a second embodiment of the present invention, as shown in fig. 2c, the flowchart specifically includes:
and S20, setting the updating parameters and updating data.
And S21, issuing the update parameters and the update data to the master device.
S22, the master device judges whether the update parameters and the update data are correct, if yes, the S23 is executed; if not, S21 is executed.
S23, the master equipment judges whether to update the software program of the slave equipment, if so, the S24 is executed; if not, the process of setting the parameters is directly ended.
And S24, the master device updates the software program of the slave device.
The software updating method provided by the embodiment of the invention comprises the steps of receiving the updating parameters and the updating data set by a user through a serial port, and sending handshake information according to a set frame format through Bluetooth broadcasting; then receiving response information of a plurality of slave devices; and finally, respectively issuing burning data to each slave device according to a set frame format, and updating the software program of each slave device through the burning data. By using the technical scheme to update the software program of each slave device, the trouble of wiring can be avoided, and the time is saved.
EXAMPLE III
Fig. 3a is a flowchart of a software updating method according to a third embodiment of the present invention. The method is applicable to slave devices. It should be noted that technical details that are not described in detail in the present embodiment may be referred to any of the above embodiments.
As shown in fig. 3a, the method comprises:
s310, receiving the broadcast containing the handshake information sent by the main device through the Bluetooth scanning function.
And S320, returning response information according to the handshake information.
Wherein the reply information includes the MAC address of the slave device.
S330, receiving the burning data with the set frame format sent by the main equipment, and updating the software program according to the burning data.
According to the software updating method provided by the embodiment of the invention, the slave equipment receives the broadcast containing handshake information sent by the master equipment through the Bluetooth scanning function; and then response information is returned according to the handshake information. Wherein the response information includes the MAC address of the slave device; and finally, receiving the burning data with the set frame format sent by the main equipment, and updating the software program according to the burning data. By utilizing the technical scheme, the updating of the plurality of Bluetooth devices (namely the plurality of slave devices) can be realized in a Bluetooth broadcasting mode under the condition that the plurality of Bluetooth devices need to be updated and the wiring is inconvenient, so that the updating mode of the Bluetooth devices is more flexible and efficient.
Optionally, the setting frame format includes the following fields: a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
Optionally, before updating the software program according to the burning data, the method further includes: determining missing data by comparing the packet address of the burning data with the hash check value; and reporting a data request to request the master device to send the missing data, wherein the data request comprises the MAC address of the slave device.
Specifically, before receiving the burning data in the set frame format issued by the master device and updating the software program according to the burning data, the sent burning data is not necessarily completely received by the slave device and the data is lost, so that the completeness of the burning data needs to be checked, the slave device can confirm the missing data by comparing the packet address (PD) and the hash check value (CRC) of the burning data, and simultaneously report to the master device to inform the master device of the missing data. The master device may send the missing data to a single slave device by detecting the MAC address of the reporting slave device.
Exemplarily, fig. 3b is a flowchart of a master device updating a slave device software program according to a third embodiment of the present invention, as shown in fig. 3b, specifically including:
s30, the master device sends a handshake command.
S31, the slave device judges whether the handshake instruction is correct, if yes, S32 is executed; if not, S30 is executed.
And S32, the master device issues the burning data.
S33, the slave device judges whether the CRC is correct, if yes, S34 is executed; if not, the slave discards the data and proceeds to S35.
And S34, the slave device stores the burning data.
S35, the master device judges whether the updating is needed to be continued, if yes, the S36 is executed; if not, the process returns to S32.
S36, the slave device judges whether the burning data is complete, if yes, the process is finished; if not, S37 is executed, and the process returns to S32.
And S37, asking the main device for the missing data.
In the software updating method provided by the embodiment of the invention, the main equipment sends handshake information according to a set frame format through Bluetooth broadcast; then the slave device returns response information according to the handshake information; and receiving the burning data with the set frame format sent by the master device, checking the integrity of the burning program, and updating the software program of each slave device according to the burning data. By using the technical scheme, the trouble of wiring can be avoided under the condition that the number of the Bluetooth devices needing to be updated is large, the time is saved, and the updating efficiency is improved.
According to the software updating method provided by the embodiment of the invention, the master device sends the burning data to all the slave devices in a unified manner, then the slave devices judge whether to ask for the missing data from the master device after detecting the completeness of the burning data in a checking manner, and the master device can send the missing data to a single slave device by detecting the MAC address of the reported slave device. After the burning data is sent, a certain slave device is not separately updated until the device is completely updated, but the bandwidth of the master device is fully utilized, and the data can be updated to the slave device after any slave device data is received. In the whole process of the software updating method provided by the embodiment of the invention, only the handshake part needs to respond, the slave device processes the received burning data, and the part of missing data is required if the burning data is not received, so that the updating speed is ensured, and the integrity of the updated content of the device is also ensured.
Example four
Fig. 4 is a schematic structural diagram of a software updating apparatus according to a fourth embodiment of the present invention. As shown in fig. 4, the apparatus includes: a handshake information sending module 41, a response information receiving module 42, and a burning information issuing module 43;
the handshake information sending module 41 is configured to send handshake information according to a set frame format through bluetooth broadcast;
a response information receiving module 42, configured to receive response information of a plurality of slave devices, where the response information of each slave device includes a MAC address of the slave device;
and a burning information issuing module 43, configured to issue burning data to each slave device according to a set frame format, where the burning data is used to update a software program of each slave device.
In the embodiment of the invention, the device sends the handshake information according to the set frame format by using the Bluetooth broadcast, and then sends the burning data to the slave equipment according to the set frame format to update the software program of each slave equipment, so that the software of a plurality of Bluetooth equipment can be updated simultaneously, the wiring trouble is avoided, and the updating efficiency is improved.
Further, the apparatus further comprises:
the data request receiving module is used for receiving a data request reported by at least one slave device after the burning data is respectively issued to each slave device according to a set frame format, wherein the data request comprises an MAC address of the slave device;
and the missing data sending module is used for sending the missing data to the corresponding slave equipment according to the MAC address.
Further, the setting frame format includes the following fields:
a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
Further, the apparatus further comprises:
and the updating parameter and updating data receiving module is used for receiving updating parameters and updating data set by a user through a serial port before handshaking information is sent according to a set frame format through Bluetooth broadcasting, wherein the updating parameters comprise the number of devices to be updated and the length of broadcasting data, and the updating data comprise hexadecimal data of a software program to be updated.
Further, the apparatus further comprises:
and the handshake completion information sending module is used for sending handshake completion information through Bluetooth broadcast if the number of the slave devices sending the response information reaches the number of the devices to be updated before the burning data is respectively sent to each slave device according to the set frame format.
The software updating device provided by the embodiment of the invention can execute the software updating method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a software updating apparatus according to a fifth embodiment of the present invention. As shown in fig. 5, the apparatus includes: a handshake information receiving module 51, a response information returning module 52, and a burning data receiving module 53;
the handshake information receiving module 51 is configured to receive, through a bluetooth scanning function, a broadcast containing handshake information sent by a master device;
a response information returning module 52, configured to return response information according to the handshake information, where the response information includes the MAC address of the slave device;
the recording data receiving module 53 is configured to receive recording data in a set frame format sent by a host device, and update a software program according to the recording data.
In the embodiment of the invention, the device receives the broadcast containing handshake information sent by the main equipment through the Bluetooth scanning function; then, response information is returned according to the handshake information; and finally, receiving the burning data with the set frame format sent by the main equipment, and updating the software program according to the burning data. Can need to update at numerous bluetooth equipment of quantity, and under the inconvenient condition of working a telephone switchboard, realize a plurality of bluetooth equipment through the mode of bluetooth broadcast, update when a plurality of slave units promptly, make bluetooth equipment's mode of updating more nimble, high-efficient.
Further, the apparatus further comprises:
the missing data determining module is used for determining missing data by comparing the packet address of the burning data with the hash check value before updating the software program according to the burning data;
and a data request reporting module, configured to report a data request to request the master device to send the missing data, where the data request includes an MAC address of the slave device.
Further, the setting frame format includes the following fields:
a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
The software updating device provided by the embodiment of the invention can execute the software updating method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 shows a schematic block diagram of a bluetooth device 10 that may be used to implement an embodiment of the invention. A bluetooth device is intended to mean a device that has bluetooth functionality or can establish a connection with other devices via bluetooth, such as a laptop computer, a desktop computer, a workstation, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. Bluetooth devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the bluetooth device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the bluetooth device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A plurality of components in the bluetooth device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the bluetooth device 10 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as implementing the software update methods provided by the above-described embodiments of the present invention.
EXAMPLE seven
A seventh embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, is configured to perform a software updating method, where the method includes:
transmitting handshake information according to a set frame format through Bluetooth broadcasting;
receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises the MAC address of the slave device;
and respectively issuing burning data to each slave device according to a set frame format, wherein the burning data is used for updating the software program of each slave device.
Optionally, the program, when executed by the processor, may be further configured to perform a software update method provided in any of the embodiments of the present invention.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A software updating method is applied to Bluetooth equipment with Bluetooth master-slave functions, and is characterized by comprising the following steps:
transmitting handshake information according to a set frame format through Bluetooth broadcasting;
receiving response information of a plurality of slave devices, wherein the response information of each slave device comprises a Media Access Control (MAC) address of the slave device;
and respectively issuing burning data to each slave device according to a set frame format, wherein the burning data is used for updating the software program of each slave device.
2. The method of claim 1, further comprising, after issuing the burning data to each of the slave devices according to the set frame format, respectively:
receiving a data request reported by at least one slave device, wherein the data request comprises an MAC address of the slave device;
and sending the missing data to the corresponding slave equipment according to the MAC address.
3. The method of claim 1, wherein the configured frame format comprises the following fields:
a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
4. The method of claim 1, prior to transmitting the handshake information in the configured frame format via bluetooth broadcast, further comprising:
and receiving update parameters and update data set by a user through a serial port, wherein the update parameters comprise the number of equipment to be updated and the length of broadcast data, and the update data comprise hexadecimal data of a software program to be updated.
5. The method of claim 4, before sending the burning data to each slave device according to the set frame format, further comprising:
and if the number of the slave devices sending the response information reaches the number of the devices to be updated, sending handshake completion information through Bluetooth broadcast.
6. A software updating method is applied to Bluetooth equipment with Bluetooth master-slave functions, and is characterized by comprising the following steps:
receiving a broadcast containing handshake information sent by a master device through a Bluetooth scanning function;
returning response information according to the handshake information, wherein the response information comprises a Media Access Control (MAC) address of the slave equipment;
and receiving the burning data with the set frame format sent by the main equipment, and updating the software program according to the burning data.
7. The method of claim 6, further comprising, before updating the software program according to the burning data:
determining missing data by comparing the packet address of the burning data with the hash check value;
and reporting a data request to request the master device to send the missing data, wherein the data request comprises the MAC address of the slave device.
8. The method of claim 6, wherein the default frame format comprises the following fields:
a synchronization frame; a packet type; packet enable; a data acquisition type; the device address to be updated; a packet address; packet length; data; and (4) cyclic redundancy check.
9. A bluetooth device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the software update method of any one of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the software updating method according to any one of claims 1 to 8.
CN202210231714.8A 2022-03-10 2022-03-10 Software updating method, bluetooth device and storage medium Active CN114827967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210231714.8A CN114827967B (en) 2022-03-10 2022-03-10 Software updating method, bluetooth device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210231714.8A CN114827967B (en) 2022-03-10 2022-03-10 Software updating method, bluetooth device and storage medium

Publications (2)

Publication Number Publication Date
CN114827967A true CN114827967A (en) 2022-07-29
CN114827967B CN114827967B (en) 2023-08-01

Family

ID=82529053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210231714.8A Active CN114827967B (en) 2022-03-10 2022-03-10 Software updating method, bluetooth device and storage medium

Country Status (1)

Country Link
CN (1) CN114827967B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002941A (en) * 2022-08-08 2022-09-02 浙江正泰仪器仪表有限责任公司 Communication method of Bluetooth electric energy meter

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378144A (en) * 2014-10-10 2015-02-25 惠州市博泰通讯设备有限公司 Bluetooth equipment software installing method and system
US20180206276A1 (en) * 2017-01-13 2018-07-19 Primax Electronics Ltd. Bluetooth pairing system and operating method thereof
CN109417691A (en) * 2018-09-17 2019-03-01 深圳市汇顶科技股份有限公司 A kind of blue tooth cluster online upgrading method and device
CN112261635A (en) * 2020-10-21 2021-01-22 上海闻泰信息技术有限公司 Bluetooth test method, device, electronic equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378144A (en) * 2014-10-10 2015-02-25 惠州市博泰通讯设备有限公司 Bluetooth equipment software installing method and system
US20180206276A1 (en) * 2017-01-13 2018-07-19 Primax Electronics Ltd. Bluetooth pairing system and operating method thereof
CN109417691A (en) * 2018-09-17 2019-03-01 深圳市汇顶科技股份有限公司 A kind of blue tooth cluster online upgrading method and device
CN112261635A (en) * 2020-10-21 2021-01-22 上海闻泰信息技术有限公司 Bluetooth test method, device, electronic equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002941A (en) * 2022-08-08 2022-09-02 浙江正泰仪器仪表有限责任公司 Communication method of Bluetooth electric energy meter

Also Published As

Publication number Publication date
CN114827967B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
CN103117879A (en) Network monitoring system for computer hardware processing parameters
CN109788027A (en) Method of data synchronization, device, server and computer storage medium
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
CN108877188A (en) A kind of environment protection digital concurrently acquires and Multi net voting dissemination method and device
CN114827967A (en) Software updating method, Bluetooth device and storage medium
CN103457748A (en) Data transmission method, system and device
CN109600254A (en) The generation method and related system of full link log
CN112422485B (en) Communication method and device of transmission control protocol
CN109413180B (en) Data acquisition method, system and equipment and storage medium
CN111092774A (en) Configuration method and equipment of acquisition gateway
CN116243949A (en) Software upgrading method and device, embedded equipment and storage medium
CN113434604B (en) Time sequence database synchronization method, system, equipment and storage medium
CN112256714A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN114048206A (en) Configuration consistency checking method, system and device for large-scale cluster
CN113722340A (en) Processing method and system for remote automatic point table updating based on power distribution device
CN109871277B (en) Inter-process multi-request management method and device, terminal equipment and readable storage medium
CN114374705A (en) Service cluster and message pushing method
CN112637151A (en) Data message transmission method, terminal device, server and storage medium
CN106412657B (en) A kind of method and system of set-top box programming sequence code
CN111885613B (en) SIG MESH-based networking method, node equipment and computer equipment
CN112968933B (en) Data transmission method, device, server and storage medium
CN107104865B (en) RS485 bus-based background extension method and system
CN110221869B (en) Method and device for configuring data center operating environment
WO2024045012A1 (en) Master-backup switching method and apparatus, computer device, and storage medium

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