CN109769237A - A kind of method and system upgraded based on bluetooth and Lora double mode - Google Patents

A kind of method and system upgraded based on bluetooth and Lora double mode Download PDF

Info

Publication number
CN109769237A
CN109769237A CN201910081776.3A CN201910081776A CN109769237A CN 109769237 A CN109769237 A CN 109769237A CN 201910081776 A CN201910081776 A CN 201910081776A CN 109769237 A CN109769237 A CN 109769237A
Authority
CN
China
Prior art keywords
lora
module
bluetooth
check code
upgrade package
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.)
Pending
Application number
CN201910081776.3A
Other languages
Chinese (zh)
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.)
Sunwave Communications Co Ltd
Original Assignee
Zhejiang Sanwei Communication Technology Co Ltd
Sunwave Communications 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 Zhejiang Sanwei Communication Technology Co Ltd, Sunwave Communications Co Ltd filed Critical Zhejiang Sanwei Communication Technology Co Ltd
Priority to CN201910081776.3A priority Critical patent/CN109769237A/en
Publication of CN109769237A publication Critical patent/CN109769237A/en
Pending legal-status Critical Current

Links

Classifications

    • 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 kind of method and system upgraded based on bluetooth and Lora double mode, system mainly includes internet of things equipment, mobile terminal, Lora gateway and server, and wherein internet of things equipment mainly includes bluetooth module, Lora module, memory module, power module;According to the different demands situation of upgrading, the characteristics of can choose Lora mode and upgrade or bluetooth approach upgrading, make full use of bluetooth transmission speed fast and Lora long transmission distance, learns from other's strong points to offset one's weaknesses, select different upgrading modes to upgrade equipment for different occasions;Bluetooth module directly broadcasts out bluetooth module and Lora module software check code in the present invention, reduces the time by updating mobile terminal;Mobile terminal can batch upgrade, it is identical when the check code not simultaneous transmission upgrade package of discovering device, scan next broadcast, mitigate the workload of operator significantly;Increased energy supply control module can effectively reduce for convenience of upgrading and bring extra power consumption, and extend internet of things equipment uses the time.

Description

A kind of method and system upgraded based on bluetooth and Lora double mode
Technical field
It is mainly a kind of to be upgraded based on bluetooth and Lora double mode the present invention relates to internet of things equipment upgrade maintenance field Method and system.
Background technique
Various low in energy consumption with the fast development of technology of Internet of things, the internet of things product of long transmission distance emerges one after another. Lora technology possesses low cost as one of numerous technology of Internet of things, low-power consumption, and wide coverage etc. is many excellent Point plays important role in Internet of Things solution.Currently, the interconnection such as domestic more companies such as Alibaba, Tencent Giant is netted to announce that Lora alliance is added, and Alibaba more indicates to connect 10,000,000,000 stylobates in the coming five years in the Internet of Things of Lora Net equipment, so that the development of Lora technology at home welcomes another spring.However, so many internet of things equipment is faced, Updating maintenance is just at a very big problem, when the software of internet of things equipment needs to upgrade, it is necessary to which maintenance personnel goes existing Field operation, or even product is directly replaced, a large amount of man power and material can be wasted in this way.To solve this inconvenience, currently have logical It crosses Lora mode and remote upgrade is carried out to internet of things equipment, but Lora transmission rate is excessively slow, transmits the upgrade package of a 50KB It is also required to nearly 20 minutes time, when upgrading to multiple internet of things equipment, is just seemed somewhat unable to do what one wishes.
To solve the problems, such as that Lora transmission rate is excessively slow, patent CN 107508702 A discloses a kind of based on bluetooth The setting of Lora module and firmware upgrade system and method, include mobile terminal and Internet of Things module, and Internet of Things module includes indigo plant Tooth chip, Lora module and sensor, wherein Lora module is connect with Bluetooth chip, and Bluetooth chip and mobile terminal pass through bluetooth Agreement connection;The Bluetooth chip is used to receive the configuration information and firmware of mobile terminal transmission, and blue-teeth data is sent to Lora module, Lora module energy return data to Bluetooth chip, while received information is transmitted to Bluetooth chip, bluetooth by sensor Received information is sent back mobile terminal by chip.The upgrade method of the invention is that Internet of Things module is matched by Bluetooth chip reception Confidence breath and firmware, and Lora module and upgrading Lora module drive are arranged according to configuration information, Lora module is according to confidence Corresponding setting operation is completed in breath and driving.The invention deficiency is: 1, transmission mode is only limitted to bluetooth, and distance is shorter, works as object Networking module, which is in when manpower is difficult to the place reached, just can not carry out upgrading Internet of Things module;2, it only discloses according to Internet of Things Module Internet of Things module information compares firmware version, i.e., compares using simple version number, this mode can not be complete The upgrade package for guaranteeing that software and needs in Internet of Things module update is identical or different;3, the reliable biography of upgrade package is not can guarantee It is defeated, since transmission process may be gone out by bluetooth module as terminal, wireless receiving and the serial ports transmission of bluetooth module is upgraded Existing mistake causes received transmission to be surrounded by mistake, and being likely to after one wrong upgrade package of Internet of Things module upgrade can not normal work Make even upgrade;4, Lora firmware information is not through Bluetooth broadcast and comes out, and needs to every Internet of Things module when upgrading Version information is just read after being attached, then decides whether to upgrade, finally disconnect, and being connected and disconnected from attended operation can wave Take certain time, when batch upgrade, the time of waste can be more;5, it can only be directed to Lora module upgrade, when needs while being given When bluetooth module upgrades, it is likely that can be because self EMS memory not enough can not download upgrade package;6, bluetooth module, which is in, continues work Make state, increases Internet of Things module dissipation, when Internet of Things module is powered using battery, the service time of battery meeting of same charge It is short very much.
Summary of the invention
It is an object of the invention to overcome the shortcomings of the prior art, and provide a kind of based on bluetooth and Lora double mode The method and system of upgrading are solved when internet of things equipment needs software upgrading, and maintenance personnel needs execute-in-place and bring The waste of a large amount of man power and materials.
The object of the present invention is achieved by the following technical solutions.It is a kind of to be upgraded based on bluetooth and Lora double mode Method, according to the different demands situation of upgrading, selection Lora mode upgrades or bluetooth approach upgrading, solves in different scenes There is the case where different demands to upgrading, as Internet of Things module is deployed in dangerous or unapproachable local (such as river surface or cliffside) When, upgraded using Lora, updating speed is required at this time little;Do not go out to the higher local or Internet of Things module of density is deployed in Factory but when software needs to update, can be used bluetooth approach upgrading, specific upgrade step is as follows:
Mode one: upgraded by bluetooth approach
Step 1: mobile terminal downloads from a server the upgrade package and check code of bluetooth module and Lora module, calculates simultaneously Store the check code of respective upgrades packet;
Step 2: the bluetooth module of acquisition for mobile terminal equipment and the check code of Lora module;
Step 3: mobile terminal stores bluetooth module in internet of things equipment and the check code of Lora module with itself respectively Check code be compared, check code is inconsistent, sends corresponding upgrade package, and check code unanimously then continues searching next object Networked devices;
Step 4: internet of things equipment receives upgrade package and starts bluetooth module or Lora module upgrade;
Step 5: internet of things equipment updates respective check code into the broadcast of bluetooth module after having upgraded;
Mode two: upgraded by Lora mode
Step 1: the Lora module of internet of things equipment sends the check code of Lora module and the relevant information of the Lora module To server, server saves after receiving;
Step 2: server calculates the software check code for the Lora module being locally stored, and traverses the Lora module verification of preservation Code list sends the request of Lora module upgrade to the Lora module of the corresponding internet of things equipment of inconsistent check code;
Step 3:Lora module receives the Lora module upgrade packet that server is sent and starts upgrading;
Lora module check code is sent to bluetooth module after step 4:Lora module upgrade is complete, bluetooth module again by it more Newly into broadcast.
As currently preferred technical solution: when being upgraded by bluetooth approach, mobile terminal is counted after having downloaded upgrade package Calculate the check code of local bluetooth module, Lora module, then with the verification from server received bluetooth module, Lora module Code is compared, and the different upgrade package of check code is re-downloaded if inconsistent.
As currently preferred technical solution: when being upgraded by bluetooth approach, internet of things equipment by bluetooth module and The check code of Lora module is deposited in Bluetooth broadcast content, and mobile terminal is by uniquely specifying identification code UUID and customized word Section searches for the broadcast of specified internet of things equipment, and parsing broadcasted content can obtain the check code of bluetooth module and Lora module.
As currently preferred technical solution: when being upgraded by bluetooth approach, if mobile terminal storage check code with Bluetooth module and the check code of Lora module are inconsistent in internet of things equipment, then mobile terminal initiates the connection internet of things equipment, Corresponding upgrade package and the corresponding check code of upgrade package are sent, upgrade package directly searches next Internet of Things and sets after being transmitted Standby, specific step is as follows after connection:
A: if only bluetooth module check code is different, bluetooth upgrade package and corresponding check code, internet of things equipment are sent On bluetooth module calculate the check code of bluetooth upgrade package first after receiving bluetooth upgrade package, if with the check code one that receives It causes, then stores the check code of bluetooth upgrade package and start upgrading, then update bluetooth module software check code in broadcasted content, it is no Upgrade package is then abandoned, and keeps the original corresponding check code of bluetooth software packet;
B: if the check code of only Lora module is different, Lora upgrade package and corresponding check code are sent, Internet of Things is set Standby upper bluetooth module calculates the check code of Lora upgrade package first after receiving Lora upgrade package, if with the check code that receives Unanimously, then start Lora upgrading, otherwise abandon upgrade package;When starting Lora upgrading, bluetooth module gives Lora module by serial ports Upgrade command is sent, after Lora module returns to scalable response, the verification of transmission Lora upgrading bag data and Lora upgrade package Code gives Lora module, and Lora module calculates the check code of Lora upgrade package first after receiving Lora upgrade package, if with receiving The check code of Lora upgrade package is consistent, then starts upgrading, otherwise abandons upgrade package, and re-downloads Lora upgrade package, if repeatedly Check code is still inconsistent after downloading, then abandons upgrading, and returns to the bluetooth module that responds to of upgrading failure, and bluetooth module, which is read, to be rung The reason of upgrading failure should be parsed, it is sent to mobile terminal;If upgrading successfully, the check code of Lora module is sent out by serial ports Bluetooth module is given, bluetooth module stores after receiving and updates the Lora module software check code in broadcasted content;
C: if the check code of Lora module and bluetooth module is different, step b is first carried out, then executes step a, i.e., is first risen Grade Lora module, then upgrade bluetooth module.
As currently preferred technical solution: when being upgraded by Lora mode, Lora module is receiving Lora upgrade package The check code for calculating Lora upgrade package first afterwards starts if consistent with the check code for receiving Lora upgrade package and upgrades and deposit The check code for storing up Lora upgrade package, is then sent to bluetooth module, and more Xinlan by serial ports for the check code of Lora upgrade package Lora module software check code in tooth broadcasted content, otherwise abandons upgrade package, keeps the check code of original Lora software package It is constant, and the server that responds to of upgrading failure is returned, server reads the reason of response parses upgrading failure.
As currently preferred technical solution: when being upgraded by Lora mode, equipment corresponding to inconsistent check code After sending upgrade request, needs to wait it to return to scalable response and just start starting and upgrade.
As currently preferred technical solution: bluetooth module, Lora module in the internet of things equipment, mobile terminal and The verification mode that server uses is consistent, guarantees that the calculated check code of the same upgrade package is identical.
As currently preferred technical solution: bluetooth module, Lora module in the mobile terminal, internet of things equipment Failed download number be more than that default maximum failed download number just stops continuing to download, and returns to failure cause, the maximum Failed download number is set as 3 times.
As currently preferred technical solution: the check code be parity check code, cyclic redundancy check or other can guarantee The calculated check code of the verification mode of reliable communication.
As currently preferred technical solution: being to upgrade for convenience due to increasing bluetooth module, based on Lora module Working cell is wanted, to save update time, upgrading bluetooth software is not supported then when upgrading using Lora mode, can only upgrade Lora module.
As currently preferred technical solution: upgrading mode is optional, when equipment, which is in manpower, is difficult to the place reached Lora mode can be selected to upgrade, bluetooth approach upgrading can be used when equipment, which is in, disposes intensive place;Or same equipment Usable bluetooth upgrades when needing to update software before factory, and the place that manpower is difficult to reach is placed on after factory and selects Lora mode Upgrading.
It should be understood that upgrade command can be sent before upgrading to avoid two kinds of upgrading modes of synchronization while carrying out, Internet of things equipment receive provide after upgrade command whether scalable response, can determine whether internet of things equipment currently by the response is It is no scalable.The check code of upgrade package and the check code of transmission after downloading can be all recalculated after downloading upgrade package every time, it is different Cause then abandons upgrade package, and upgrade package is avoided to be damaged in transmission process, and internet of things equipment occurs after the impaired upgrade package of upgrading Fatal software issue so that it cannot upgrade again, it is necessary to which maintenance personnel removes execute-in-place.
The invention discloses one kind to be based on bluetooth and Lora double mode upgrade-system, mainly includes internet of things equipment, movement Terminal, Lora gateway and server, wherein internet of things equipment mainly includes bluetooth module, Lora module, memory module, power supply mould Block;The bluetooth module is connect with Lora module by serial ports, and the bluetooth module is connected by the way of bluetooth with mobile terminal It connects, the Lora module input/output terminal connects Lora gateway input/output terminal, and Lora gateway connects the server of system;It is described The input/output terminal of memory module is connect with the bluetooth module and the input/output terminal of Lora module using spi bus respectively;
The bluetooth module is used to receive the instruction and upgrade package of mobile terminal sending, and broadcasts out current Lora module With the software check code of bluetooth module;
The memory module is used to store the upgrade package of bluetooth module and Lora module;
The power module is used for bluetooth module, Lora module and memory module power supply;
The mobile terminal is used for the upgrade package of download server, sends control instruction to internet of things equipment, and to Internet of Things Net equipment bluetooth module and Lora module are upgraded;
The Lora gateway is used for Lora module access server, the data of forwarding server and Lora module;
The server is used to store the upgrade package of bluetooth module and Lora module, the internet of things equipment different to check code Bluetooth module and Lora module are upgraded, and are sent control instruction and given Lora module.
As currently preferred technical solution: the memory module includes flash storage A, flash storage B, is led to It crosses spi bus to communicate with bluetooth module and Lora module respectively, wherein the flash storage A storage connecting with bluetooth module is blue Tooth module upgrade packet and Lora module upgrade packet, the upgrading for the flash storage B storage Lora module being connect with Lora module Packet.
As currently preferred technical solution: the power module connects energy supply control module, for controlling bluetooth mould The power supply of block and flash storage A connected to it, when internet of things equipment is higher to power consumption requirements (as supplied using battery Electricity), it is instructed by server application transmission relevant control and gives Lora module, Lora module controls energy supply control module to disconnect The power supply of bluetooth module and flash storage A connected to it.
The invention has the benefit that
1, the characteristics of two kinds of upgrading modes are optional, bluetooth transmission speed can be made full use of fast and Lora long transmission distance, takes Long benefit is short, selects different upgrading modes to upgrade internet of things equipment for different occasions.
2, mobile terminal, which directly scans broadcast message, can determine whether internet of things equipment needs to upgrade, without connecting bluetooth After reconnect.Bluetooth connects every time exits the time that connection at least needs about 3s or more again, when high-volume upgrades, will expend For a long time.Bluetooth module directly broadcasts out bluetooth module and Lora module software check code in the present invention, and reduction passes through The time of updating mobile terminal.
3, mobile terminal can batch upgrade, when the check code not simultaneous transmission upgrade package of discovery internet of things equipment, it is identical then Next broadcast is scanned, need to only click a lower button on terminal interface in this way, the upgrading of mobile terminal automatic batch mitigates significantly The workload of operator.
4, it due to being wireless transmission, is easy to be interfered and lead to loading error occurring, keeps upgrade package impaired, work as internet of things equipment After having upgraded impaired upgrade package, it is likely that internet of things equipment can not start, and can not all carry out remote upgrade later, it is necessary to tie up Protect personnel on site's operation.The present invention equal Inspection code in each downloading, it is ensured that escalation process is reliable and stable.
5, with the update of function, upgrade package can be increasing, and the memory space inadequate of module itself to store liter again Grade packet.Bluetooth module and Lora module are equipped with flash storage in the present invention, and the memory space that module can be prevented included is not The case where upgrade package enough can not be received.
6, after internet of things equipment receives upgrade package and verifies successfully, internet of things equipment itself must be allowed to enter upgrading mould first Then formula reads upgrade package in flash memory to itself memory space, could complete updating operation, more unrestrained in this way It is time-consuming.It is just found after mobile terminal or the complete upgrade package of server transport in the present invention and next the Internet of Things upgraded is needed to set It is standby, shorten entire update time.
7, Lora module is generally powered using battery, will increase when for convenience of upgrading, increased bluetooth module works Internet of things equipment power consumption shortens service time of battery, so that replacement cell frequency is promoted, increases maintenance cost.Lead in the present invention It crosses whether Lora module control bluetooth module works, internet of things equipment power consumption can be reduced.
Detailed description of the invention
Fig. 1 is systematic square frame schematic diagram of the invention.
Fig. 2 is the upgrading flow diagram of bluetooth approach.
Fig. 3 is the upgrading flow chart of Lora mode.
Description of symbols: 1- bluetooth module, 2-Lora module, 3- memory module, 4- power module, 5- power supply control mould Block, 6- mobile terminal, 7-Lora gateway, 8- server.
Specific embodiment
Below in conjunction with attached drawing, the present invention will be described in detail:
As shown in Figure 1, a kind of be based on bluetooth and Lora double mode upgrade-system, it mainly include internet of things equipment, mobile whole End 6, Lora gateway 7 and server 8, wherein internet of things equipment mainly includes bluetooth module 1, Lora module 2, memory module 3, electricity Source module 4;The memory module 3 includes flash storage A, flash storage B, and the bluetooth module 1 and Lora module 2 are logical Serial ports connection is crossed, the bluetooth module 1 is connect by the way of bluetooth with mobile terminal 6, and the bluetooth module 1 is moved for receiving The instruction and upgrade package that dynamic terminal 7 issues, and broadcast out the software check code of current Lora module and bluetooth module.Described Lora module 2 connects Lora gateway 7, and Lora gateway 7 connects the server 8 of system.Flash memory module A, Flash is deposited The input/output terminal for storing up module B is led to the bluetooth module and the input/output terminal of Lora module using spi bus respectively Letter, flash storage A store bluetooth upgrade package and Lora upgrade package, and flash storage B stores Lora upgrade package.The power supply The output end and Lora module input, flash storage A input terminal, flash storage B input terminal of module, power supply control mould The connection of block input terminal;Power module is used for bluetooth module, Lora module and 2 flash storage power supplies.The power supply control The output end of module 5 is connect with bluetooth module input terminal, and whether the energy supply control module 5 is for controlling power module to bluetooth Module is powered, and is issued control instruction by server application and is given Lora module, then by the control power supply control of Lora module Whether module powers to bluetooth module.The mobile terminal is used for the upgrade package of download server, sends and controls to internet of things equipment System instruction, and internet of things equipment bluetooth module and Lora module are upgraded;The Lora gateway is accessed for Lora module Server, the data of forwarding server and Lora module;The server is used to store the upgrading of bluetooth module and Lora module Packet, the internet of things equipment bluetooth module different to check code and Lora module upgrade, and send control instruction and give Lora mould Block.
Embodiment 1: as shown in Figure 2 bluetooth approach upgrading flow chart (upgrade package transmit it is wrong after need to transmit again Step is omitted);The scene of application are as follows: internet of things equipment does not dispatch from the factory but software has update, needs batch upgrade internet of things equipment Software.
Steps are as follows:
1: mobile terminal downloads from a server the verification for needing the bluetooth and Lora upgrade package and respective upgrades packet that update Code, calculates separately the check code of the upgrade package of downloading, if the difference on wherein one or two upgrade package and server, again Download the different upgrade package of check code.
2: the bluetooth module on internet of things equipment broadcasts out on bluetooth module software on the check code of software and Lora module Check code.
3: mobile terminal to search internet of things equipment searches for specified internet of things equipment, parsing by UUID and custom field The check code of bluetooth module and Lora module that internet of things equipment is broadcast out.
4: by the bluetooth module of the check code of bluetooth module and Lora module on internet of things equipment and mobile terminal storage It is compared with the check code of Lora module, if all identical, next internet of things equipment is continued searching, as long as otherwise wherein having One difference, then mobile terminal initiates the connection, and sends corresponding upgrade package and the corresponding check code of upgrade package, and upgrade package transfers At next internet of things equipment of rear direct search.Concrete operations after connection are as follows:
A: if only bluetooth module check code is different, bluetooth upgrade package and corresponding check code, internet of things equipment are sent On bluetooth module stored after receiving bluetooth upgrade package to flash storage A, then calculate bluetooth upgrade package verification Code, if consistent with the check code received, store the check code of bluetooth upgrade package and starts upgrading, then update broadcasted content Middle bluetooth module software check code, otherwise abandons upgrade package, and keeps the original corresponding check code of bluetooth software packet.
B: if the check code of only Lora module is different, Lora upgrade package and corresponding check code are sent, Internet of Things is set Standby upper bluetooth module is stored after receiving Lora upgrade package to flash storage B, then calculates the verification of Lora upgrade package Code starts Lora upgrading and otherwise abandons upgrade package if consistent with the check code received.When starting Lora upgrading, bluetooth mould Block sends upgrade command to Lora module by serial ports, after Lora module returns to scalable response, transmits Lora upgrade package number Lora module is given according to the check code with Lora upgrade package, Lora module calculates Lora upgrade package first after receiving Lora upgrade package Check code start upgrading if consistent with the check code for receiving Lora upgrade package, otherwise abandon upgrade package, and again under Carry Lora upgrade package, if repeatedly downloading after check code it is still inconsistent, abandon upgrading, and return upgrading failure respond to bluetooth The reason of module, bluetooth module reads response parsing upgrading failure, it is sent to mobile terminal.If upgrading successfully, by Lora mould The check code of block is sent to bluetooth module by serial ports, and bluetooth module stores after receiving and updates the Lora module in broadcasted content Software check code.
C: if the check code of Lora module and bluetooth module is different, step b is first carried out, a is thened follow the steps, i.e., first rises Grade Lora module, then upgrade bluetooth module.
Embodiment 2: the upgrading flow chart of Lora mode as shown in Figure 3, application scenarios are as follows: internet of things equipment is deployed in river Face center monitors the depth of water.
Steps are as follows:
1: internet of things equipment is disposed and is powered on for the first time, and the school of the software of Lora module is sent after the success of Lora module screening The information such as code and Lora module number are tested to server, waiting for server, which returns, receives successfully response.
2: server end stores the information such as the check code received and Lora module number to Lora module information list.
3: maintenance personnel updates internet of things equipment software in server end.
4: server calculates the check code of updated internet of things equipment software, and then the Lora module with itself storage is believed Check code in breath list is compared, and when the two is inconsistent, issues upgrade command to inconsistent Lora module, waits it Response.
After 5:Lora module receives the upgrade command of server, if being not presently within upgrade status, to server response Scalable response.
6: after server receives the scalable response of internet of things equipment, beginning through Lora mode and transmit Lora upgrade package And check code.
7:Lora module is deposited into flash storage B after receiving Lora upgrade package, then calculates received upgrading The check code of packet, and compared with received check code, if unanimously, storing the check code, and check code is passed through serial ports side Formula is transmitted to bluetooth module, and bluetooth module updates the check code of the Lora module of broadcast, and then Lora module reads Flash storage The content of device B, starting upgrading.
8: sending instructions under server application and close the power supply of bluetooth and flash storage A, to reduce power consumption.
It is understood that it will be understood by those skilled in the art that being subject to technical solution of the present invention and inventive concept It all should fall within the scope of protection of the appended claims of the present invention with replacement or change.

Claims (10)

1. a kind of method upgraded based on bluetooth and Lora double mode, it is characterised in that: according to the different demands situation of upgrading, choosing It selects Lora mode to upgrade or bluetooth approach upgrading, upgrade step is as follows:
Mode one: upgraded by bluetooth approach
Step 1: mobile terminal downloads from a server the upgrade package and check code of bluetooth module and Lora module, calculates and stores The check code of respective upgrades packet;
Step 2: the bluetooth module of acquisition for mobile terminal equipment and the check code of Lora module;
Step 3: the school that mobile terminal stores bluetooth module in internet of things equipment and the check code of Lora module with itself respectively It tests code to be compared, check code is inconsistent, sends corresponding upgrade package, and check code unanimously then continues searching next Internet of Things Equipment;
Step 4: internet of things equipment receives upgrade package and starts bluetooth module or Lora module upgrade;
Step 5: internet of things equipment updates respective check code into the broadcast of bluetooth module after having upgraded;
Mode two: upgraded by Lora mode
Step 1: the Lora module of internet of things equipment sends the check code of Lora module and the relevant information of the Lora module to clothes Business device, server save after receiving;
Step 2: server calculates the software check code for the Lora module being locally stored, and traverses the Lora module check code column of preservation Table sends the request of Lora module upgrade to the Lora module of the corresponding internet of things equipment of inconsistent check code;
Step 3:Lora module receives the Lora module upgrade packet that server is sent and starts upgrading;
Lora module check code is sent to bluetooth module after step 4:Lora module upgrade is complete, bluetooth module is updated again In broadcast.
2. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: by bluetooth side In the step 1 of formula upgrading, mobile terminal has downloaded the check code that local bluetooth module, Lora module are calculated after upgrade package, so It is compared afterwards with from the check code of the received bluetooth module of server, Lora module, check code is re-downloaded if inconsistent Different upgrade package.
3. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: by bluetooth side In the step 2 of formula upgrading, internet of things equipment deposits in the check code of bluetooth module and Lora module in Bluetooth broadcast content, moves Dynamic terminal parses broadcasted content by uniquely specifying identification code UUID and custom field to search for the broadcast of specified internet of things equipment The check code of bluetooth module and Lora module can be obtained.
4. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: by bluetooth side When formula upgrades, if bluetooth module and the check code of Lora module are different in the check code and internet of things equipment of mobile terminal storage It causes, then mobile terminal initiates the connection internet of things equipment, sends corresponding upgrade package and the corresponding check code of upgrade package, upgrade package Next internet of things equipment is directly searched after being transmitted, specific step is as follows after connection:
A: if only bluetooth module check code is different, sending bluetooth upgrade package and corresponding check code, on internet of things equipment Bluetooth module calculates the check code of bluetooth upgrade package first after receiving bluetooth upgrade package, if consistent with the check code received,
It then stores the check code of bluetooth upgrade package and starts upgrading, then update bluetooth module software check code in broadcasted content, Otherwise upgrade package is abandoned, and keeps the original corresponding check code of bluetooth software packet;
B: if the check code of only Lora module is different, sending Lora upgrade package and corresponding check code, on internet of things equipment Bluetooth module calculate the check code of Lora upgrade package first after receiving Lora upgrade package, if with the check code one that receives It causes, then starts Lora upgrading, otherwise abandon upgrade package;When starting Lora upgrading, bluetooth module is sent out by serial ports to Lora module Upgrade command is sent, after Lora module returns to scalable response, the check code of transmission Lora upgrading bag data and Lora upgrade package Lora module is given, Lora module calculates the check code of Lora upgrade package first after receiving Lora upgrade package, if with receiving The check code of Lora upgrade package is consistent, then starts upgrading, otherwise abandons upgrade package, and re-downloads Lora upgrade package, if repeatedly Check code is still inconsistent after downloading, then abandons upgrading, and returns to the bluetooth module that responds to of upgrading failure, and bluetooth module, which is read, to be rung The reason of upgrading failure should be parsed, it is sent to mobile terminal;If upgrading successfully, the check code of Lora module is sent out by serial ports Bluetooth module is given, bluetooth module stores after receiving and updates the Lora module software check code in broadcasted content;
C: if the check code of Lora module and bluetooth module is different, step b is first carried out, then executes step a, i.e., is first upgraded Lora module, then upgrade bluetooth module.
5. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: by the side Lora When formula upgrades, Lora module calculates the check code of Lora upgrade package first after receiving Lora upgrade package, if with Lora is received The check code of upgrade package is consistent, then starts upgrading and store the check code of Lora upgrade package, then by the verification of Lora upgrade package Code is sent to bluetooth module by serial ports, and updates the Lora module software check code in Bluetooth broadcast content, otherwise abandons and rises Grade packet, keeps the check code of original Lora software package constant, and returns to the server that responds to of upgrading failure, and server is read The reason of response parsing upgrading failure.
6. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: by the side Lora In the step 2 of formula upgrading, after sending upgrade request to the corresponding equipment of inconsistent check code, need that it is waited to return scalable Response just starts starting upgrading.
7. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: the Internet of Things Bluetooth module, Lora module in equipment, mobile terminal and the server verification mode used are consistent, guarantee the same upgrade package Calculated check code is identical.
8. the method according to claim 1 upgraded based on bluetooth and Lora double mode, it is characterised in that: described mobile whole End, the bluetooth module in internet of things equipment, Lora module failed download number be more than that default maximum failed download number just stops Only continue to download, and return to failure cause, the maximum failed download number is set as 3 times.
9. the method according to claim 1-7 upgraded based on bluetooth and Lora double mode, it is characterised in that: institute State check code be parity check code, cyclic redundancy check or other can guarantee the calculated check code of the verification mode of reliable communication.
10. a kind of realize the described in any item systems based on bluetooth and Lora double mode upgrade method of claim 1-9, spy Sign is: including mainly internet of things equipment, mobile terminal, Lora gateway and server, wherein internet of things equipment mainly includes indigo plant Tooth module, Lora module, memory module, power module;The bluetooth module is connect with Lora module by serial ports, the bluetooth Module is connect by the way of bluetooth with mobile terminal, and the Lora module input/output terminal connects the input and output of Lora gateway End, Lora gateway connect the server of system;The input/output terminal of the memory module respectively with the bluetooth module and Lora The input/output terminal of module is connected using spi bus;
The bluetooth module is used to receive the instruction and upgrade package of mobile terminal sending, and broadcasts out current Lora module and indigo plant The software check code of tooth module;
The memory module is used to store the upgrade package of bluetooth module and Lora module;
The power module is used for bluetooth module, Lora module and memory module power supply;
The mobile terminal is used for the upgrade package of download server, sends control instruction to internet of things equipment, and set to Internet of Things Standby bluetooth module and Lora module are upgraded;
The Lora gateway is used for Lora module access server, the data of forwarding server and Lora module;
The server is used to store the upgrade package of bluetooth module and Lora module, the internet of things equipment bluetooth different to check code Module and Lora module are upgraded, and are sent control instruction and given Lora module.
CN201910081776.3A 2019-01-28 2019-01-28 A kind of method and system upgraded based on bluetooth and Lora double mode Pending CN109769237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910081776.3A CN109769237A (en) 2019-01-28 2019-01-28 A kind of method and system upgraded based on bluetooth and Lora double mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910081776.3A CN109769237A (en) 2019-01-28 2019-01-28 A kind of method and system upgraded based on bluetooth and Lora double mode

Publications (1)

Publication Number Publication Date
CN109769237A true CN109769237A (en) 2019-05-17

Family

ID=66454504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910081776.3A Pending CN109769237A (en) 2019-01-28 2019-01-28 A kind of method and system upgraded based on bluetooth and Lora double mode

Country Status (1)

Country Link
CN (1) CN109769237A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769411A (en) * 2019-10-23 2020-02-07 厦门四信通信科技有限公司 Method, device, equipment and system for stably realizing batch OTA (over the air) upgrade of terminal equipment
CN112015442A (en) * 2019-05-31 2020-12-01 南京理控物联技术有限公司 Method for remotely upgrading software in batches by single lamp controller in non-public network communication
CN112484766A (en) * 2020-11-17 2021-03-12 浙江中控技术股份有限公司 Split type process calibrator and application method thereof
CN112994939A (en) * 2021-02-23 2021-06-18 合肥师范学院 Remote automatic upgrading method and system for equipment software of Internet of things
CN114080077A (en) * 2021-11-30 2022-02-22 深圳市飞天鹰科技有限公司 LED controller with WIFI and Bluetooth dual modes

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070051523A (en) * 2005-11-15 2007-05-18 주식회사 현대오토넷 Firmware upgrade system of audio/video/navigation(avn) system for vehicle using bluetooth mobile communication terminal and the method
CN101695027A (en) * 2009-09-29 2010-04-14 北京星网锐捷网络技术有限公司 Method, device and network equipment for upgrading distributed communication system software
CN206348778U (en) * 2016-12-29 2017-07-21 金卡智能集团股份有限公司 A kind of device of instrument program upgrading
CN107247604A (en) * 2017-05-17 2017-10-13 杭州魔猫科技有限公司 A kind of charger baby software firmware update system and its update method
CN107832064A (en) * 2017-10-13 2018-03-23 东峡大通(北京)管理咨询有限公司 Smart lock and its firmware upgrade method, device, system and upgrading part
CN109002319A (en) * 2018-07-25 2018-12-14 东信和平科技股份有限公司 A kind of patch upgrading methods, devices and systems based on LORA agreement

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070051523A (en) * 2005-11-15 2007-05-18 주식회사 현대오토넷 Firmware upgrade system of audio/video/navigation(avn) system for vehicle using bluetooth mobile communication terminal and the method
CN101695027A (en) * 2009-09-29 2010-04-14 北京星网锐捷网络技术有限公司 Method, device and network equipment for upgrading distributed communication system software
CN206348778U (en) * 2016-12-29 2017-07-21 金卡智能集团股份有限公司 A kind of device of instrument program upgrading
CN107247604A (en) * 2017-05-17 2017-10-13 杭州魔猫科技有限公司 A kind of charger baby software firmware update system and its update method
CN107832064A (en) * 2017-10-13 2018-03-23 东峡大通(北京)管理咨询有限公司 Smart lock and its firmware upgrade method, device, system and upgrading part
CN109002319A (en) * 2018-07-25 2018-12-14 东信和平科技股份有限公司 A kind of patch upgrading methods, devices and systems based on LORA agreement

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015442A (en) * 2019-05-31 2020-12-01 南京理控物联技术有限公司 Method for remotely upgrading software in batches by single lamp controller in non-public network communication
CN112015442B (en) * 2019-05-31 2024-04-02 南京理控物联技术有限公司 Method for remotely upgrading software of single-lamp controllers in batch by using non-public network communication
CN110769411A (en) * 2019-10-23 2020-02-07 厦门四信通信科技有限公司 Method, device, equipment and system for stably realizing batch OTA (over the air) upgrade of terminal equipment
CN112484766A (en) * 2020-11-17 2021-03-12 浙江中控技术股份有限公司 Split type process calibrator and application method thereof
CN112994939A (en) * 2021-02-23 2021-06-18 合肥师范学院 Remote automatic upgrading method and system for equipment software of Internet of things
CN112994939B (en) * 2021-02-23 2022-02-18 合肥师范学院 Remote automatic upgrading method and system for equipment software of Internet of things
CN114080077A (en) * 2021-11-30 2022-02-22 深圳市飞天鹰科技有限公司 LED controller with WIFI and Bluetooth dual modes
CN114080077B (en) * 2021-11-30 2024-01-12 深圳市飞天鹰科技有限公司 LED controller with WIFI and Bluetooth modes

Similar Documents

Publication Publication Date Title
CN109769237A (en) A kind of method and system upgraded based on bluetooth and Lora double mode
CN102098590B (en) Automatic upgrading method and system of firmware version of optical network unit
CN102064955B (en) Method and system for remotely upgrading optical network unit
US8249644B2 (en) Wireless terminal, base station, wireless communication system, and wireless communication method
CN101577901B (en) Wireless access platform and equipment upgrading management system and method thereof
CN100391289C (en) Method of updating remote subsystem in mobile communication system
CN103874113A (en) Wireless network maintenance method, device and system
CN102063321B (en) The installation method of terminal software, device and system
CN112910679B (en) Multi-level remote upgrading method for power Internet of things
CN107181618A (en) Firmware upgrade method and system
CN102300201A (en) Software upgrading system and method for remote radio unit (RRU)
CN102065508B (en) Wireless bridge forwarding equipment and method
CN102202430B (en) Zigbee wireless gateway and data transmission method thereof
CN105430597A (en) Bluetooth device, and Bluetooth Scatternet networking method and device thereof
CN102238594A (en) Method and device for managing distributed base station
CN104539493B (en) Based on the intelligent terminal that USB interface is realized to the managing and control system and its implementation of intelligent appliance
CN207766560U (en) Smart machine and smart machine distribution network systems
CN111682965A (en) FOTA controller
CN111417112B (en) Distributed OTA gateway networking and terminal access method and OTA upgrading system
CN116684873A (en) Photovoltaic tracking system and ad hoc network method
CN101938765A (en) Method and system for automatically adapting network manager and network element
CN111880457B (en) Wireless single fire control method, device and system
CN114679439A (en) Bluetooth BLE-based auxiliary upgrade package downloading method for Internet of things
CN110061765B (en) 5G onboard double 2X 2MIMO wireless control system
CN103068000A (en) Self-organizing network method and system based on minisatellites

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20190704

Address after: 310053 Zhejiang Hangzhou Binjiang District torch Avenue 581 building (high tech Zone)

Applicant after: SUNWAVE COMMUNICATIONS Co.,Ltd.

Address before: 310053 Zhejiang Hangzhou Binjiang District torch Avenue 581 building (high tech Zone)

Applicant before: SUNWAVE COMMUNICATIONS Co.,Ltd.

Applicant before: ZHEJIANG SUNWAVE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190517

RJ01 Rejection of invention patent application after publication