CN114827967B - Software updating method, bluetooth device and storage medium - Google Patents

Software updating method, bluetooth device and storage medium Download PDF

Info

Publication number
CN114827967B
CN114827967B CN202210231714.8A CN202210231714A CN114827967B CN 114827967 B CN114827967 B CN 114827967B CN 202210231714 A CN202210231714 A CN 202210231714A CN 114827967 B CN114827967 B CN 114827967B
Authority
CN
China
Prior art keywords
data
slave
bluetooth
frame format
slave device
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
CN202210231714.8A
Other languages
Chinese (zh)
Other versions
CN114827967A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a software updating method, bluetooth equipment and a storage medium. A software updating method is applied to a Bluetooth device comprising a Bluetooth master-slave function, 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 transmitting 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 Bluetooth devices to be updated, handshake information is sent according to a set frame format by Bluetooth broadcasting, and then the software programs of the slave devices are updated by respectively transmitting burning data to the slave devices according to the set frame format, so that software updating can be performed on a plurality of Bluetooth devices at the same time, the trouble of wiring 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 technologies, and in particular, to a method for updating an array of software, a bluetooth device, and a storage medium.
Background
Conventional bluetooth update software has two modes: 1. a wired connection; 2. OTA (Over-the-Air Technology), upgrades.
The wired connection is limited by the constraint of the communication protocol, one interface can only update one bluetooth device software, and each device update needs to be rewiring, which is very cumbersome. OTA is a method of updating and upgrading software of a single device in a wireless communication manner, and although wiring is not needed, when updating a plurality of devices, a wireless communication channel needs to be separately established with each device, which is very time-consuming.
Therefore, the conventional bluetooth software updating method has the defects of inconvenient wiring and time consumption when the number of bluetooth devices needing software updating is large.
Disclosure of Invention
The invention provides a software updating method, a device, a monitoring device and a storage medium, which are used for realizing software updating of a plurality of Bluetooth devices without wiring, so that the required time is short, and the updating efficiency is improved.
In a first aspect, an embodiment of the present invention provides a software updating method, applied to a bluetooth device including a bluetooth master-slave function, including:
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 transmitting 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 the data is downloaded 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 missing data to the corresponding slave equipment according to the MAC address.
Optionally, the set frame format includes the following fields:
synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
Optionally, before sending the handshake information according to the set frame format through bluetooth broadcasting, the method further includes:
and receiving the update parameters and the update data set by the user through the serial port, wherein the update parameters comprise the number of the equipment to be updated and the length of the broadcast data, and the update data comprise hexadecimal data of the software program to be updated.
Optionally, before the data is downloaded 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 broadcasting.
In a second aspect, an embodiment of the present invention further provides a software update method, applied to a bluetooth device including a bluetooth master-slave function, including:
receiving a broadcast containing handshake information sent by a main 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 device;
and receiving the burning data in the set frame format issued 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 comprises:
determining missing data by comparing the packet address of the burnt data with a 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 set frame format includes the following fields:
synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
In a third aspect, an embodiment of the present invention further provides a bluetooth device, including:
one or more processors;
a 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 present 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 program is executed by a processor to implement the software updating method provided by 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 firstly sent according to a set frame format through Bluetooth broadcasting; 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 transmitting 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, and the software program of each slave equipment is updated by using the technical scheme, so that the software update of a plurality of Bluetooth equipment can be realized simultaneously, the trouble of wiring is avoided, the time is saved, and the update efficiency is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a flowchart of a software update method according to a first embodiment of the present invention;
FIG. 1b is a diagram illustrating a frame format configuration according to a first 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 a handshake between a master device and a slave device according to a second embodiment of the present invention;
FIG. 2c is a flowchart of a user setting update parameters and update data provided according to a second embodiment of the present invention;
FIG. 3a is a flowchart of a software update method according to a third embodiment of the present invention;
FIG. 3b is a flowchart of a master device updating slave device software program provided in accordance with 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 that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise 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 1
Fig. 1a is a flowchart of a software updating method according to a first embodiment of the present invention, where the embodiment is applicable to a case where a plurality of bluetooth devices need to be updated, and also applicable to a bluetooth device with a receiving function or a high-rate wireless communication device with a rate of 2.4G/5.8G being greater than 1M, the method may be performed by a software updating device, and the device may be implemented in a form of hardware and/or software, and the software updating device may be configured in the bluetooth device.
For both the bluetooth devices that need to be updated and updated, there is a bluetooth master-slave function, i.e. broadcast and scan functions. In this embodiment, the bluetooth device for updating software is used as a master device, and the bluetooth device to be updated is used as a slave device.
As shown in fig. 1a, the method comprises:
s110, sending 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 set frame format through a bluetooth broadcast manner, where the handshake information includes: and a check value generated by the handshake packet and the burnt data through hash check. The recording is also called recording, i.e. the desired data is recorded in the medium such as the optical disc, the recording card, etc. by means of a recorder, etc. The master device sends the handshake information in a Bluetooth broadcasting mode to interact with a plurality of slave devices receiving the handshake information, namely, the effect of one-to-multiple interaction can be achieved without connecting wires, the handshake information is sent through a set frame format, for example, the set frame format can comprise a synchronous frame (Sync), a device address to be updated (Mac Add, MD) and the like, the Sync can enable the master device to distinguish which slave devices need handshake interaction at the time, the MD can enable the master device to know the device addresses of the slave devices, and the master device can send data to the corresponding slave devices more accurately in the interaction process.
S120, 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.
Specifically, the master device sends handshake information in a bluetooth broadcast mode, after receiving the handshake information, the plurality of slave devices return response information to the master device, and the master device receives the response information of the plurality of slave devices to complete the handshake flow. 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.
S130, respectively transmitting the burnt data to each slave device according to a set frame format.
The burning data are used for updating software programs of the slave devices.
Specifically, the burning data may include: the number of devices to be updated, the broadcast data length. The master device may download the burn data to each slave device in a set frame format to update the software program of the slave device.
Optionally, the set frame format may include the following fields: synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
In particular, there are many bluetooth devices around in a normal usage scenario, which are always transmitting different broadcast data. The bluetooth searches for broadcast packet data sent by different bluetooth devices, and fig. 1b is a schematic diagram of setting a frame format according to a first embodiment of the present invention, where, as shown in fig. 1b, the frame format of the broadcast packet specifically includes the following fields: synchronization frames (Sync); packet Type (PT); packet 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 (Cyclic Redundancy Check, CRC).
Wherein, the length of the synchronization frame (Sync) is 4 bytes (i.e. 4 bytes), and the content of the field of the synchronization frame is the same as that of the master device (i.e. the Bluetooth device for updating the upgrade software), and the Bluetooth devices are all devices (i.e. slave devices) which need handshake/upgrade.
The packet type PT has a length of 2bits, and its specific meaning may include:
00: reserved (i.e. temporarily not setting any meaning, possibly adding new meaning later according to actual requirements);
01: handshaking;
10: data;
11: and (5) retransmitting.
The packet-enabled ME is 1bit in length, and its specific meaning may include:
0: the subsequent packet contains a MAC address;
1: the subsequent packet does not contain a MAC address.
The length of the data acquisition type MG is 1bit, and the specific meaning thereof may include:
0: sending a packet;
1: and acquiring a data packet request instruction.
PT, ME and MG occupy 1 byte in total, and there may be an Rsv reserved field of length 4 Bits.
The packet address PD, which is a count value, may packetize broadcast packet data starting with a length of 100Bytes, and the packet count starts with 0.
The packet length PD may be considered as the length of the packet sent during the interaction of the master and slave.
The data (Payload) may be specific data transferred between the master device and the slave device, such as burn data, handshake information, and the like.
Cyclic redundancy check (Cyclic Redundancy Check, CRC) for error detection using division and remainder principles to detect or verify errors that may occur after data transmission or storage.
According to the software updating method provided by the embodiment of the invention, handshake information is sent according to a set frame format through Bluetooth broadcasting; 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 transmitting 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 a 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, where the second embodiment is optimized based on the above embodiments. As shown in fig. 2a, the method comprises:
s210, receiving update parameters and update data set by a user through a serial port.
The updating parameters comprise the number of devices to be updated and the length of broadcast data, and the updating data comprise hexadecimal data of the software program to be updated.
S220, sending 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, set update parameters and update data of a device to be updated (i.e. a device to be updated) through a serial port, where the update parameters may include the number of devices to be updated and the length of broadcast data, the update data may include hexadecimal data of a software program to be updated, after the setting is completed, the master device returns to complete configuration to the user, and then the master device performs handshake interaction with the slave device to be updated.
S230, receiving response information of the plurality of slave devices.
Wherein the reply information of each slave device includes the MAC address of the slave device.
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 broadcasting.
Specifically, the master device may determine the number of slave devices received by detecting the MAC address, and if the number of slave devices received reaches the number of devices to be updated set by the user, the master device sends handshake completion information through bluetooth broadcast. On the basis, the method can realize the updating of the appointed number of slave devices and meet the requirement of more diversified software updating.
S250, respectively transmitting the burnt data to each slave device according to a set frame format.
Optionally, after the data is downloaded 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 missing data to the corresponding slave equipment according to the MAC address.
Specifically, there may be a case that the transmitted recording data slave device may not completely receive or lose data, at this time, the slave device may check the integrity of the recording data before updating the software program according to the recording data, so as to determine whether to request data to the master device, and may confirm the missing data by comparing the packet address (PD) of the recording data with the hash check value (CRC), and report a data request to the master device, so that the master device may receive the data request reported by at least one slave device, where the data request includes the MAC address of the slave device, and send the missing data to the corresponding slave device according to the MAC address until the update of the slave device is completed.
Fig. 2c is a flowchart of setting update parameters and update data by a user according to a second embodiment of the present invention, and as shown in fig. 2c, specifically includes:
s20, setting updating parameters and updating data.
S21, issuing the update parameters and the update data to the master device.
S22, the main equipment judges whether the update parameters and the update data are correct, if so, S23 is executed; if not, S21 is performed.
S23, the master device judges whether to update the software program of the slave device, if yes, S24 is executed; if not, the process of setting parameters is directly ended.
S24, the master device updates the software program of the slave device.
According to the software updating method provided by the embodiment of the invention, firstly, the updating parameters and the updating data set by a user are received through a serial port, and then handshake information is sent according to a set frame format through Bluetooth broadcasting; then receiving response information of a plurality of slave devices; and finally, respectively transmitting the recorded data to each slave device according to the set frame format, and updating the software program of each slave device through the recorded 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 a slave device. It should be noted that technical details not described in detail in this embodiment may be found in any of the above embodiments.
As shown in fig. 3a, the method comprises:
s310, receiving broadcasting which is sent by the main equipment and contains handshake information through a Bluetooth scanning function.
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 in the set frame format issued 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 device firstly receives the broadcast containing handshake information and sent by the master device through the Bluetooth scanning function; and then returning response information according to the handshake information. Wherein the response information includes the MAC address of the slave device; and finally, receiving the burning data in the set frame format issued by the main equipment, and updating the software program according to the burning data. By means of the technical scheme, when a plurality of Bluetooth devices need to be updated and wiring is inconvenient, the plurality of Bluetooth devices (namely a plurality of slave devices) can be updated simultaneously in a Bluetooth broadcasting mode, so that the Bluetooth device updating mode is more flexible and efficient.
Optionally, the set frame format includes the following fields: synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
Optionally, before updating the software program according to the burning data, the method further comprises: determining missing data by comparing the packet address of the burnt 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 recording data in the set frame format issued by the master device and updating the software program according to the recording data, there may be a situation that the transmitted recording data is not necessarily completely received by the slave device and there may be a data loss, so that the integrity of the recording data needs to be checked, the slave device may confirm the missing data by comparing the packet address (PD) of the recording data with the hash check value (CRC), and report the master device at the same time, so as to inform the master device that the missing data is needed. The master device may send its missing data to a single slave device by detecting the MAC address of the reporting slave device.
Fig. 3b is a flowchart of a master device updating 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 instruction.
S31, judging whether the handshake instruction is correct or not by the slave equipment, and if so, executing S32; if not, S30 is performed.
S32, the master device transmits the burnt data.
S33, judging whether the CRC is correct or not by the slave equipment, and if so, executing S34; if not, the slave discards the data, and S35 is executed.
S34, the slave device stores the burnt data.
S35, the main equipment judges whether the updating is needed to be continued, if so, S36 is executed; if not, return to S32.
S36, judging whether the burnt data is complete or not by the slave equipment, if so, ending; if not, S37 is executed, and S32 is returned.
S37, requesting missing data from the main equipment.
According to the software updating method provided by the embodiment of the invention, the master device sends handshake information according to a set frame format through Bluetooth broadcasting; then the slave device returns response information according to the handshake information; and then receiving the programming data in a set frame format issued by the master equipment, checking the integrity of the programming program, and finally updating the software program of each slave equipment by the root programming data. By using the technical scheme, the trouble of wiring can be avoided under the condition that the number of Bluetooth devices to be updated is numerous, the time is saved, and the updating efficiency is improved.
In the software updating method provided by the embodiment of the invention, the master device firstly uniformly transmits the burning data to all the slave devices, then the slave devices detect the integrity of the burning data in a verification mode, judging whether to ask for missing data to the master device, the master device can send the missing data to the single slave device by detecting and reporting the MAC address of the slave device, and in this way, all devices can be enabled to collect the data rapidly. After the transmission of the burnt data is completed, the method is not limited by updating a certain slave device independently until the update of the device is completed, but fully utilizes the bandwidth of the master device, and the data can be updated to the slave device after receiving the data of any slave device. In the whole process of the software updating method provided by the embodiment of the invention, only the handshake part needs to answer, the slave equipment receives the burnt data and processes the burnt data, and the slave equipment needs to partially miss the data without receiving the burnt data, so that the updating speed is ensured and the integrity of the updating content of the equipment is also ensured.
Example IV
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 transmitting module 41, a response information receiving module 42, and a burning information issuing module 43;
wherein, 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 the recording information issuing module 43 is configured to issue recording data to each slave device according to a set frame format, where the recording data is used to update a software program of each slave device.
In the embodiment of the invention, the device sends handshake information according to the set frame format by utilizing Bluetooth broadcasting, and then the software program of each slave device is updated by respectively transmitting the burnt data to the slave device according to the set frame format, so that the software update can be simultaneously carried out on a plurality of Bluetooth devices, the trouble of wiring is avoided, and the update efficiency is improved.
Further, the device further comprises:
the data request receiving module is used for receiving a data request reported by at least one slave device after transmitting the burnt data to each slave device according to a set frame format, wherein the data request comprises the 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 set frame format includes the following fields:
synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
Further, the device further comprises:
the device comprises an updating parameter and updating data receiving module, a data processing module and a data processing module, wherein 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 handshake information is sent according to a set frame format through Bluetooth broadcasting, 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 device further comprises:
and the handshake completion information sending module is used for sending handshake completion information through Bluetooth broadcasting if the number of slave devices sending response information reaches the number of the devices to be updated before the slave devices respectively send the burnt data according to a 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 the corresponding functional modules and beneficial effects of the executing 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 including handshake information sent by a master device;
a reply information returning module 52, configured to return reply information according to the handshake information, where the reply information includes a MAC address of the slave device;
the recording data receiving module 53 is configured to receive recording data in a set frame format issued by the host device, and update a software program according to the recording data.
In the embodiment of the invention, the device receives the broadcast containing the handshake information sent by the main equipment through the Bluetooth scanning function; then returning response information according to the handshake information; and finally, receiving the burning data in the set frame format issued by the main equipment, and updating the software program according to the burning data. The Bluetooth device updating method has the advantages that under the conditions that a plurality of Bluetooth devices need to be updated and wiring is inconvenient, a plurality of Bluetooth devices can be realized in a Bluetooth broadcasting mode, namely, a plurality of slave devices are updated at the same time, so that the Bluetooth device updating mode is more flexible and efficient.
Further, the device 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 the data request reporting module is used for 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.
Further, the set frame format includes the following fields:
synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) 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 the corresponding functional modules and beneficial effects of the executing method.
Example six
Fig. 6 shows a schematic diagram of a bluetooth device 10 that may be used to implement an embodiment of the present invention. Bluetooth devices are intended to mean devices that have bluetooth functionality or that can establish a connection with other devices through bluetooth, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Bluetooth devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, 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, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required 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.
Various 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, etc.; 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 via 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, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. 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 having stored thereon a computer program for executing a software updating method when executed by a processor, the method comprising:
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 MAC address of the slave device;
and respectively transmitting 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 may be further configured to perform a software update method provided by any embodiment of the present invention when executed by a processor.
A computer program for carrying out 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 implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the 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. The 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) through 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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. The client and server are typically 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 hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A software updating method applied to a bluetooth device comprising a bluetooth master-slave function, comprising:
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;
respectively transmitting 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;
after the data is transmitted to each slave device according to the set frame format, the method further comprises the following steps:
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 missing data to the corresponding slave equipment according to the MAC address.
2. The method of claim 1, wherein the set frame format comprises the following fields:
synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
3. The method of claim 1, further comprising, prior to transmitting the handshake information in the set frame format via bluetooth broadcast:
and receiving the update parameters and the update data set by the user through the serial port, wherein the update parameters comprise the number of the equipment to be updated and the length of the broadcast data, and the update data comprise hexadecimal data of the software program to be updated.
4. The method of claim 3, further comprising, prior to downloading the burned data to each of the slave devices in the set frame format, respectively:
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 broadcasting.
5. A software updating method applied to a bluetooth device comprising a bluetooth master-slave function, comprising:
receiving a broadcast containing handshake information sent by a main 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 device;
receiving burning data in a set frame format issued by main equipment, and updating a software program according to the burning data;
before the software program is updated according to the burning data, the method further comprises the following steps:
determining missing data by comparing the packet address of the burnt data with a 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.
6. The method of claim 5, wherein the set frame format comprises the following fields:
synchronizing the frames; a package type; packet enablement; a data acquisition type; an equipment address to be updated; a packet address; a packet length; data; and (5) cyclic redundancy check.
7. A bluetooth device, comprising:
one or more processors;
a storage means for storing one or more programs;
when executed by the one or more processors, causes the one or more processors to implement the software update method of any of claims 1-6.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the software updating method according to any of claims 1-6.
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 CN114827967A (en) 2022-07-29
CN114827967B true 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)

Families Citing this family (1)

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

Citations (3)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201826136A (en) * 2017-01-13 2018-07-16 致伸科技股份有限公司 Bluetooth pairing system and method for operating a bluetooth pairing system

Patent Citations (3)

* 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
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

Also Published As

Publication number Publication date
CN114827967A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN111786893B (en) method and device for synchronizing software versions of wireless routers in mesh networking
CN109788027A (en) Method of data synchronization, device, server and computer storage medium
WO2015143794A1 (en) Creating and upgrading methods, server, terminal, upgrading system, and storage media
CN110069288B (en) USB equipment sharing method, device and system
CN114827967B (en) Software updating method, bluetooth device and storage medium
CN115023919A (en) Firewall rule updating method and device, server and storage medium
CN103457748A (en) Data transmission method, system and device
CN113965904A (en) Device registration method, device and storage medium
CN104717280B (en) The labeling method and device of data syn-chronization
CN109600254A (en) The generation method and related system of full link log
CN111752577A (en) System version upgrading method and device
CN110418092B (en) Video recording management system, method, control management node and recording node
CN116962114A (en) Equipment interconnection method, device, equipment and medium based on distributed soft bus
CN116243949A (en) Software upgrading method and device, embedded equipment and storage medium
CN116418791A (en) Firmware upgrading method, firmware upgrading system, server and storage medium
CN109271454A (en) A kind of method and the network equipment that data are synchronous
CN111885613B (en) SIG MESH-based networking method, node equipment and computer equipment
CN103546513B (en) The method and device of communication between a kind of customer terminal webpage
CN112256714A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN110675613A (en) Communication method and device between 4G communication module and metering ammeter, computer equipment and storage medium
CN117193809B (en) Chip burning method and device and computer readable storage medium
CN116483678B (en) Information processing method and related device
CN116614199B (en) Clock synchronization method, device, slave clock equipment, clock synchronization system and medium
TWI723647B (en) Internet of things terminal device registration method and internet of things platform server
CN110737456B (en) Online upgrading method of wireless earphone and earphone equipment

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