CN107395389B - Dimmer firmware upgrading method based on Bluetooth Mesh network - Google Patents

Dimmer firmware upgrading method based on Bluetooth Mesh network Download PDF

Info

Publication number
CN107395389B
CN107395389B CN201710190737.8A CN201710190737A CN107395389B CN 107395389 B CN107395389 B CN 107395389B CN 201710190737 A CN201710190737 A CN 201710190737A CN 107395389 B CN107395389 B CN 107395389B
Authority
CN
China
Prior art keywords
firmware
dimmer
bluetooth
upgrading
upgraded
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
CN201710190737.8A
Other languages
Chinese (zh)
Other versions
CN107395389A (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.)
XIAMEN YADE ELECTRONIC TECHNOLOGY CO LTD
Original Assignee
XIAMEN YADE ELECTRONIC TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XIAMEN YADE ELECTRONIC TECHNOLOGY CO LTD filed Critical XIAMEN YADE ELECTRONIC TECHNOLOGY CO LTD
Priority to CN201710190737.8A priority Critical patent/CN107395389B/en
Publication of CN107395389A publication Critical patent/CN107395389A/en
Application granted granted Critical
Publication of CN107395389B publication Critical patent/CN107395389B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for upgrading a dimmer firmware based on a Bluetooth Mesh network, which is characterized in that the dimmer function and the Bluetooth function are controlled by different mcus, so that the dimmer can be normally used in the Bluetooth upgrading process, the user experience can be improved, the upgrading speed is also improved, the safety of equipment is improved by encrypting the dimmer firmware when Bluetooth and the dimmer firmware are integrated, upgrading failure is caused by accidental operation during Bluetooth upgrading, or the Bluetooth firmware is damaged, the manual control of the dimmer is not influenced, an upgrading backup area is opened up for upgrading the dimmer mcus inside a Bluetooth chip, and the information of the backup area is read when the dimmer is restarted every time, so that the dimmer cannot cause permanent faults even if the dimmer is powered off accidentally during upgrading, the use is more convenient, and the stability and the reliability are higher.

Description

Dimmer firmware upgrading method based on Bluetooth Mesh network
Technical Field
The invention belongs to the field of intelligent lighting control, and particularly relates to a method for upgrading a dimmer firmware based on a Mesh network.
Background
Along with the release of Bluetooth Low Energy (BLE) technique and the popularization of bluetooth Mesh technique, in the intelligent lighting control field, the bluetooth light modulator kind based on bluetooth Mesh technique is more and more abundant, the diversification of bluetooth light modulator product and a large amount of popularization of product for the bluetooth light modulator needs to upgrade the optimization to the product function at the in-process that uses. Therefore, the reliability and convenience of product upgrading are ensured to be necessary, the existing Bluetooth dimmer based on the Bluetooth Mesh technology mainly carries out online upgrading on dimmer firmware through a Bluetooth module, the method can realize the upgrading of the dimmer firmware, but has the great defect that the firmware upgrading speed is slow, and the dimmer must stop working in the process of upgrading the dimmer firmware, so that the normal application cannot be met, and great inconvenience is brought to daily illumination; in addition, in the upgrading process, the misoperation of a user may cause permanent faults of the bluetooth dimmer, and the bluetooth dimmer can be used only when a new bluetooth dimmer needs to be replaced, so that the use cost is increased, and great inconvenience is brought to people.
SUMMERY OF THE UTILITY MODEL
In order to solve the problems that the prior art is slow in upgrading speed, a dimmer stops working during upgrading, the use is inconvenient, misoperation is easy to occur, permanent faults are caused, the use cost is required to be frequently replaced and the like, the invention adopts the following technical scheme:
the invention provides a dimmer firmware upgrading method based on a Bluetooth Mesh network, which comprises the following eight steps:
1) firstly, packaging the Bluetooth dimmer firmware to be upgraded, and integrating the packaged Bluetooth dimmer firmware into the Bluetooth firmware;
2) the Bluetooth firmware is upgraded, corresponding APP runs in the intelligent equipment, the upgrading state is manually entered, and the Bluetooth firmware packaged in the step 1 is transmitted to a Bluetooth chip through Bluetooth, so that the Bluetooth firmware is upgraded;
3) after the Bluetooth firmware upgrading is completed, the restarting dimmer intelligent equipment sends a restarting dimmer command;
4) after the bootloader executes the restarting of the dimmer, entering the bootloader for execution;
5) before the upgrading of the light modulator, the bootloader acquires the description information about the light modulator firmware in the Bluetooth chip through the serial port, and the firmware description information part comprises: whether a zone bit, a forced upgrading zone bit, a firmware version number, a firmware length, an initial address of firmware operation and the like are upgraded, wherein before the firmware of the light modulator is upgraded, the upgrading zone bit is not upgraded, when the light modulator upgrades the local firmware through a serial port, the upgrading zone bit is changed into yes to indicate that the firmware is upgraded, when the forced upgrading zone bit is not upgraded, whether the upgrading is needed is judged according to the firmware version number, and the firmware length is used for determining the length of the firmware to be burned;
6) before the dimmer is upgraded, the dimmer is confirmed to compare the acquired firmware description information with local firmware description information to determine whether the upgrade is needed;
7) and (3) upgrading the dimmer:
8) and after the upgrade is finished, the dimmer exits from the bootloader and is switched to the application program for execution.
As an improvement to the present invention, the dimmer upgrade of step 7 specifically includes the following six steps;
1: starting upgrading;
2: acquiring the content of the specified firmware block from the Bluetooth chip through the serial port;
3: and decrypting the acquired firmware block content. Encryption and decryption modes of firmware: taking 8 bytes of firmware data and specific 8 bytes of array data to carry out OR operation one by one, wherein the 8 bytes of array data are designated invariable;
4: burning the acquired firmware block content in a block form;
5: whether all the firmware blocks are successfully acquired and written in is judged, if yes, the step 206 is carried out, and if not, the step 202 is carried out;
6: and exiting the bootloader and running the new application code.
The invention has the beneficial effects that:
1. the dimmer function and the Bluetooth function are controlled by different mcus, so that the dimmer can be normally used in the Bluetooth upgrading process, the user experience can be improved, and the upgrading speed is increased;
2. when the Bluetooth and the dimmer firmware are integrated, the dimmer firmware is encrypted, so that the safety of equipment is improved;
3. even if the upgrading fails due to accidental operation during Bluetooth upgrading or Bluetooth firmware is damaged, the manual control of the dimmer is not influenced;
4. the upgrading of light modulator mcu opens up a backup area of upgrading inside the bluetooth chip, reads the information in this backup area when light modulator restarts at every turn, even unexpected outage when light modulator upgrades like this can not cause permanent trouble to light modulator yet, and it is more convenient to use, and stability reliability is higher.
Drawings
Fig. 1 is a schematic diagram of an upgrade process of a bluetooth dimmer according to the present invention.
Fig. 2 is a schematic diagram of the dimmer upgrade logic of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1 and fig. 2, a method for upgrading a firmware of a dimmer based on a bluetooth Mesh network includes the following eight steps: 1) firstly, packaging the Bluetooth dimmer firmware to be upgraded, and integrating the packaged Bluetooth dimmer firmware into the Bluetooth firmware;
2) the Bluetooth firmware is upgraded, corresponding APP runs in the intelligent equipment, the upgrading state is manually entered, and the Bluetooth firmware packaged in the step 1 is transmitted to a Bluetooth chip through Bluetooth, so that the Bluetooth firmware is upgraded;
3) after the Bluetooth firmware upgrading is completed, the restarting dimmer intelligent equipment sends a restarting dimmer command;
4) after the bootloader executes the restarting of the dimmer, entering the bootloader for execution;
5) before the upgrading of the light modulator, the bootloader acquires the description information about the light modulator firmware in the Bluetooth chip through the serial port, and the firmware description information part comprises: whether a zone bit, a forced upgrading zone bit, a firmware version number, a firmware length, an initial address of firmware operation and the like are upgraded, wherein before the firmware of the light modulator is upgraded, the upgrading zone bit is not upgraded, when the light modulator upgrades the local firmware through a serial port, the upgrading zone bit is changed into yes to indicate that the firmware is upgraded, when the forced upgrading zone bit is not upgraded, whether the upgrading is needed is judged according to the firmware version number, and the firmware length is used for determining the length of the firmware to be burned;
6) before the dimmer is upgraded, the dimmer is confirmed to compare the acquired firmware description information with local firmware description information to determine whether the upgrade is needed;
7) and (3) upgrading the dimmer:
8) and after the upgrade is finished, the dimmer exits from the bootloader and is switched to the application program for execution.
The step 7 of upgrading the dimmer specifically comprises the following six steps;
1: starting upgrading;
2: acquiring the content of the specified firmware block from the Bluetooth chip through the serial port;
3: and decrypting the acquired firmware block content. Encryption and decryption modes of firmware: taking 8 bytes of firmware data and specific 8 bytes of array data to carry out OR operation one by one, wherein the 8 bytes of array data are designated invariable;
4: burning the acquired firmware block content in a block form;
5: whether all the firmware blocks are successfully acquired and written in is judged, if yes, the step 206 is carried out, and if not, the step 202 is carried out;
6: exiting the bootloader and running a new application code;
by adopting the method, the dimming function part of the Bluetooth dimmer and the Bluetooth Mesh function part are independently separated, different MCUs are adopted for control, serial ports are adopted for communication interaction between the dimming function part and the Bluetooth Mesh function part, dimmer firmware to be upgraded is encrypted, the related description information of the firmware is inserted, the processed dimmer firmware and the processed Bluetooth firmware are integrated and packaged, the related APP of the intelligent equipment enters upgrading through manual control, the packaged firmware is upgraded to a Bluetooth chip through Bluetooth wireless communication, and the APP controls to restart the dimmer. The method comprises the steps that after the dimmer is powered on every time, dimmer firmware description information is obtained from a Bluetooth chip through a serial port, the dimmer firmware description information is compared with local dimmer firmware description information, whether the local dimmer firmware is updated or not is determined, if the local dimmer firmware is determined to be updated by the dimmer, dimmer firmware is obtained from the Bluetooth chip through the serial port, a Flash area corresponding to the dimmer is written in, the local dimmer description information is updated, and therefore the Bluetooth dimmer is upgraded. As can be seen from the above upgrading method, each time the bluetooth dimmer is powered on and restarted, the new firmware description information is obtained and compared with the local firmware description information, so as to determine whether to upgrade. The Bluetooth firmware and the dimmer firmware are independently upgraded, so that the normal use of the dimmer is not influenced even if the Bluetooth is changed into a brick in the upgrading process. In addition, when the intelligent device updates the firmware through the Bluetooth, the light modulator can normally operate, and the user experience is not influenced. And, this method is better in upgrading speed than directly upgrading the dimmer firmware through bluetooth.
The above embodiments and drawings are not intended to limit the form and style of the present invention, and any suitable changes or modifications thereof by those skilled in the art should be considered as not departing from the scope of the present invention.

Claims (2)

1. A dimmer firmware upgrading method based on a Bluetooth Mesh network is characterized in that: comprises the following eight steps: 1) firstly, packaging the Bluetooth dimmer firmware to be upgraded, and integrating the packaged Bluetooth dimmer firmware into the Bluetooth firmware;
2) the Bluetooth firmware is upgraded, corresponding APP runs in the intelligent equipment, the upgrading state is manually entered, and the Bluetooth firmware packaged in the step 1 is transmitted to a Bluetooth chip through Bluetooth, so that the Bluetooth firmware is upgraded;
3) after the Bluetooth firmware upgrading is completed, the restarting dimmer intelligent equipment sends a restarting dimmer command;
4) after the bootloader executes the restarting of the dimmer, entering the bootloader for execution;
5) before the upgrading of the light modulator, the bootloader acquires the description information about the light modulator firmware in the Bluetooth chip through the serial port, and the firmware description information part comprises: whether a zone bit, a forced upgrading zone bit, a firmware version number, a firmware length, an initial address of firmware operation and the like are upgraded, wherein before the firmware of the light modulator is upgraded, the upgrading zone bit is not upgraded, when the light modulator upgrades the local firmware through a serial port, the upgrading zone bit is changed into yes to indicate that the firmware is upgraded, when the forced upgrading zone bit is not upgraded, whether the upgrading is needed is judged according to the firmware version number, and the firmware length is used for determining the length of the firmware to be burned;
6) before the dimmer is upgraded, the dimmer is confirmed to compare the acquired firmware description information with local firmware description information to determine whether the upgrade is needed;
7) and (3) upgrading the dimmer:
8) and after the upgrade is finished, the dimmer exits from the bootloader and is switched to the application program for execution.
2. The method for upgrading the firmware of the light modulator based on the bluetooth Mesh network as claimed in claim 1, wherein: the dimmer upgrade of the step 7 specifically comprises the following six steps;
1: starting upgrading;
2: acquiring the content of the specified firmware block from the Bluetooth chip through the serial port;
3: and decrypting the obtained firmware block content, wherein the encryption and decryption modes of the firmware are as follows: taking 8 bytes of firmware data and specific 8 bytes of array data to carry out OR operation one by one, wherein the 8 bytes of array data are designated invariable;
4: burning the acquired firmware block content in a block form;
5: whether all the firmware blocks are successfully acquired and written in is judged, if yes, the step 206 is carried out, and if not, the step 202 is carried out;
6: and exiting the bootloader and running the new application code.
CN201710190737.8A 2017-03-28 2017-03-28 Dimmer firmware upgrading method based on Bluetooth Mesh network Active CN107395389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710190737.8A CN107395389B (en) 2017-03-28 2017-03-28 Dimmer firmware upgrading method based on Bluetooth Mesh network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710190737.8A CN107395389B (en) 2017-03-28 2017-03-28 Dimmer firmware upgrading method based on Bluetooth Mesh network

Publications (2)

Publication Number Publication Date
CN107395389A CN107395389A (en) 2017-11-24
CN107395389B true CN107395389B (en) 2022-04-05

Family

ID=60338921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710190737.8A Active CN107395389B (en) 2017-03-28 2017-03-28 Dimmer firmware upgrading method based on Bluetooth Mesh network

Country Status (1)

Country Link
CN (1) CN107395389B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737448B (en) * 2018-09-05 2023-08-11 杭州瑞彼加医疗科技有限公司 Firmware encryption system comprising microcontroller and firmware protection and upgrading method thereof
CN111459536A (en) * 2020-03-31 2020-07-28 Tcl移动通信科技(宁波)有限公司 Mobile terminal Bluetooth firmware updating method and device, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0021353D0 (en) * 1999-11-26 2000-10-18 Samsung Electronics Co Ltd Method for operating personal ad-hoc network (pan) among bluetooth devices
CN104331312A (en) * 2014-11-24 2015-02-04 东软熙康健康科技有限公司 Firmware updating method and embedded device
CN104915237A (en) * 2015-06-24 2015-09-16 深圳市兰丁科技有限公司 Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN106406935A (en) * 2016-08-29 2017-02-15 青岛海信电器股份有限公司 OTA upgrading method for Bluetooth chip and Bluetooth chip
CN106507339A (en) * 2016-09-18 2017-03-15 深圳市青柠互动科技开发有限公司 A kind of aerial upgrade system and method for smart machine firmware

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0021353D0 (en) * 1999-11-26 2000-10-18 Samsung Electronics Co Ltd Method for operating personal ad-hoc network (pan) among bluetooth devices
CN104331312A (en) * 2014-11-24 2015-02-04 东软熙康健康科技有限公司 Firmware updating method and embedded device
CN104915237A (en) * 2015-06-24 2015-09-16 深圳市兰丁科技有限公司 Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN106406935A (en) * 2016-08-29 2017-02-15 青岛海信电器股份有限公司 OTA upgrading method for Bluetooth chip and Bluetooth chip
CN106507339A (en) * 2016-09-18 2017-03-15 深圳市青柠互动科技开发有限公司 A kind of aerial upgrade system and method for smart machine firmware

Also Published As

Publication number Publication date
CN107395389A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN105354070B (en) A method of passing through I2C updating apparatus firmware
CN102232304B (en) Method, system and terminal for system update between mobile communication terminals
CN103176824A (en) System upgrade method and system upgrade device
CN103019755B (en) The wireless program method for down loading of multi-CPU in embedded system
CN104579719A (en) A method and system for updating firmware, upper computer and optical module
CN103677915B (en) A method of card is started based on TF and carries out the automatic programming of flash mirror
CN102508686A (en) Method and system for realizing safe upgrading of system
CN104331312A (en) Firmware updating method and embedded device
CN107395389B (en) Dimmer firmware upgrading method based on Bluetooth Mesh network
CN106937275B (en) Equipment for storing system unique identifier and hardware ID (identity) under android system
CN104657161A (en) Method and device for updating firmware of mobile terminal
CN103997683A (en) System for using set-top-box platform to realize customizable Flash CD-ROM recorder and method thereof
CN102736941A (en) Method for automatically starting central processing unit (CPU) system by utilizing double flashes
CN105159719A (en) Starting method and device of master basic input/output system and slave basic input/output system
CN104021014B (en) A kind of firmware upgrade method based on dual-CPU system
CN106789334A (en) A kind of method and apparatus of firmware upgrade
CN104503814A (en) Firmware program automatically downloading method of USB 3.0 data acquisition module
CN105208752B (en) A kind of LED lamp wireless control system and control method
CN101651794A (en) Method for coping television memory data and intelligent copier
CN106909480A (en) A kind of embedded system cross debugging method and apparatus
CN105760194A (en) DSP control system software update method and device
CN115408013A (en) Firmware and file automatic programming method of Zynq UltraScale + MPSoC platform
CN205158340U (en) Burn to external program memory microprocessor's automatic code and write ware
CN107332589A (en) A kind of device for upgrading firmware based on bluetooth
CN209928235U (en) External equipment and system for refrigerator

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