CN107085525A - Method for upgrading software and device based on Bluetooth electronic devices - Google Patents

Method for upgrading software and device based on Bluetooth electronic devices Download PDF

Info

Publication number
CN107085525A
CN107085525A CN201710158691.1A CN201710158691A CN107085525A CN 107085525 A CN107085525 A CN 107085525A CN 201710158691 A CN201710158691 A CN 201710158691A CN 107085525 A CN107085525 A CN 107085525A
Authority
CN
China
Prior art keywords
upgrade
upgrade file
electronic devices
file
upgrading
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
CN201710158691.1A
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.)
Shenzhen Zhanyin Technology Co Ltd
Original Assignee
Shenzhen Zhanyin 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 Shenzhen Zhanyin Technology Co Ltd filed Critical Shenzhen Zhanyin Technology Co Ltd
Priority to CN201710158691.1A priority Critical patent/CN107085525A/en
Publication of CN107085525A publication Critical patent/CN107085525A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention belongs to wireless data transmission field, there is provided a kind of method for upgrading software and device based on Bluetooth electronic devices.The method for upgrading software comprises the following steps:S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;S2 judges whether Bluetooth electronic devices to be upgraded have upgrade file to be received;If S3 has upgrade file to be received, the file sequence number of upgrade file to be received is initialized;S4 sends file sequence number to upgrading source device;S5 receives the control instruction of upgrading source device, and associative operation is performed to upgrade file to be received according to control instruction.The method for upgrading software based on Bluetooth electronic devices and device of the present invention can still be that software upgrading can be achieved using simple method, improve Consumer's Experience after terminal user's purchase Bluetooth electronic devices on the premise of user's use is not influenceed.

Description

Method for upgrading software and device based on Bluetooth electronic devices
Technical field
The present invention relates to wireless data transmission technology field, more particularly to a kind of software upgrading based on Bluetooth electronic devices Method and device.
Background technology
Common Bluetooth electronic product in the market, upgrading typically will return-to-factory change firmware, or pass through production The USB interface of product in itself, carries out wired upgrading, and such product up-gradation is made troubles to user, directly affects Bluetooth electronic The follow-up maintenance of product.
Documents 1 (CN104915237A) disclose a kind of upgrade method of bluetooth equipment firmware program, including:Bluetooth After device power, whether automatic decision starts updating firmware program;If starting, enter bluetooth equipment and wait firmware upgrade shape State, and upgrade command is sent to the wireless microcontroller for having physical link to be connected is set up with bluetooth equipment by APP ends;Bluetooth is set The standby wireless microcontroller that receives sends detection instruction, and will wait firmware upgrade feedback of status to wireless micro-control according to detection instruction Device processed, makes wireless microcontroller obtain corresponding updating firmware program bag from high in the clouds according to upgrade command, and by firmware program liter Level bag is back to bluetooth equipment;Bluetooth equipment carries out updating firmware program using updating firmware program bag.Although the above method can Automatic upgrading is realized, but is not taken one thing with another, such as upgrade file is interrupted suddenly in precedent transmission, and it is existing in equipment Part upgrade file, if re-downloading, will necessarily expend the time.
In addition, the software liter in prior art document CN104820611A, CN106210102A to Bluetooth electronic devices Level carries out associated description, but does not account for the bluetooth various situations during upgrading actually faced, such as user uses bluetooth Electronic equipment is listened music or made a phone call, and now carrying out upgrading software download certainly will influence user to use.Meanwhile, risen if interrupting Level software download, then due to not considering that the breakpoint transmission of Bluetooth communication, user's interrupt software are downloaded in the prior art after, need to delete Caching is re-downloaded, therefore its Consumer's Experience is not good.
The content of the invention
It is an object of the invention to provide a kind of method for upgrading software and device based on Bluetooth electronic devices, to solve In the prior art Bluetooth electronic devices are carried out with escalation process complexity during software upgrading, influence user uses caused user's body Test not good technical problem.
The present invention provides a kind of method for upgrading software based on Bluetooth electronic devices, and the method for upgrading software includes following Step:
S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;
S2 judges whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
If S3 has upgrade file to be received, the file sequence number of the upgrade file to be received is initialized;
S4 sends the file sequence number to the upgrading source device;
S5 receives the control instruction of the upgrading source device, according to the control instruction to the upgrade file to be received Perform associative operation.
Preferably, step S3 further comprises the steps:
If S31 has upgrade file to be received, the current working condition of the Bluetooth electronic devices to be upgraded is judged;
Working condition current according to the Bluetooth electronic devices to be upgraded S32, it is determined whether start to treat described in initialization The file sequence number of the upgrade file of reception;
S33 is if so, the file sequence number of the initialization upgrade file to be received.
Preferably, the control instruction is upgrade file data command, the instruction of upgrade file attribute information, new firmware upgrade Instruction, device upgrade instruction, equipment cancel at least one of upgrade command.
Preferably, step S5 further comprises:
S51 when the control instruction be upgrade file data command when, judge the upgrade file data sequence number whether institute State file sequence number consistent, if inconsistent, return to step S30;
S52 stores current information of upgrade file when the control instruction is that information of upgrade file is instructed, including:Currently The corresponding version number letter of the verification of upgrade file and information, the length information of current upgrade file and current upgrade file Breath;
S53 deletes previous information of upgrade file, initialization is received when the control instruction is that new firmware upgrade is instructed The attribute information of new firmware upgrade file, sends to the upgrading source device and gets out upgrade command;
S54 closes the connection with the upgrading source device, closed and institute when the control instruction is that device upgrade is instructed The incoherent equipment of device upgrade and application program are stated, the Bluetooth electronic devices to be upgraded are upgraded, after having upgraded certainly It is dynamic to restart system;
S55 deletes the upgrade file to be received, and delete when the control instruction is that equipment cancels upgrade command The attribute information of the upgrade file to be received.
Preferably, if when consistent in step S51, it is further comprising the steps of:
S511 local file sequence numbers add 1;
S512 checks whether the upgrade file to be received has been transmitted;
If S513 is transmitted, whole upgrade file is verified and checked, if result after the verification and inspection To be correct, then the information of the upgrade file end of transmission is sent to the upgrading source device;If result is after the verification and inspection Mistake, then delete the upgrade file, and sets document misregistration serial number zero, notifies the upgrading source device upgrade file transmission Failure, the information for getting out upgrading is sent to the upgrading source device, the upgrade file is transmitted again.
Preferably, the method for upgrading software is further comprising the steps of between step S1 and step S2:
Source device of upgrading described in S01 obtains the current version of firmware information of the Bluetooth electronic devices to be upgraded, and from clothes Business device obtains the latest firmware version information of the Bluetooth electronic devices to be upgraded;
S02 judges whether the firmware version information is consistent with the latest firmware version information;
If S03 is inconsistent, the Bluetooth electronic devices to be upgraded are sent information to;
Source device of upgrading described in S04 receives the feedback information of the Bluetooth electronic devices to be upgraded;
The step S5 further comprises:
Source device of upgrading described in S05 sends the control instruction according to the feedback information.
The present invention also provides a kind of software updating apparatus based on Bluetooth electronic devices, and the software updating apparatus includes:
Communication connection module, is matched and set up and communicate with upgrading source device by bluetooth for Bluetooth electronic devices to be upgraded Connection;
Judge module, for judging whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
Initialization module, if for there is upgrade file to be received, initializing the text of the upgrade file to be received Part sequence number;
Sending module, for sending the file sequence number to the upgrading source device;
Updating operation module is controlled, the control instruction for receiving the upgrading source device, according to the control instruction pair The upgrade file to be received performs associative operation.
Preferably, the initialization module is specifically included:
Judging unit, for when there is upgrade file to be received, judging that the Bluetooth electronic devices to be upgraded are current Working condition;
Determining unit, for the working condition current according to the Bluetooth electronic devices to be upgraded, it is determined whether start just The file sequence number of the beginningization upgrade file to be received;
Initialization unit, the file sequence number for initializing the upgrade file to be received.
Preferably, the control updating operation module includes:
Upgrade file data sequence number judging unit, for when the control instruction is upgrade file data command, judging Whether described the upgrade file data sequence number file sequence number be consistent;
Memory cell, for when the control instruction is that information of upgrade file is instructed, storing current information of upgrade file, Including:The verification and information of current upgrade file, the length information of current upgrade file and current upgrade file it is corresponding Version number information;
The control updating operation module also includes:New firmware upgrade unit, and/or device upgrade unit, and/or equipment Cancel upgrade unit;
The new firmware upgrade unit, for when the control instruction is that new firmware upgrade is instructed, deleting previous liter Level fileinfo, initialization receives the attribute information of new firmware upgrade file, is sent to the upgrading source device and gets out upgrading Order;
The device upgrade unit, for when the control instruction is that device upgrade is instructed, closing and the upgrading source The connection of equipment, is closed and the incoherent equipment of the device upgrade and application program, to the Bluetooth electronic devices to be upgraded Upgraded, restart system after having upgraded automatically;
The equipment cancels upgrade unit, for when the control instruction is that equipment cancels upgrade command, deleting described Upgrade file to be received, and delete the attribute information of the upgrade file to be received.
The present invention also provides a kind of software updating apparatus based on Bluetooth electronic devices, including processor and memory, institute Stating memory storage has programmed instruction, and the processor calls the programmed instruction stored in the memory to be used to perform following step Suddenly:
S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;
S2 judges whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
If S3 has upgrade file to be received, the file sequence number of the upgrade file to be received is initialized;
S4 sends the file sequence number to the upgrading source device;
S5 receives the control instruction of the upgrading source device, according to the control instruction to the upgrade file to be received Perform associative operation.
The method for upgrading software based on Bluetooth electronic devices and device of the present invention is set in terminal user's purchase Bluetooth electronic It can still be that software upgrading can be achieved using simple method, improve user's body on the premise of user's use is not influenceed after standby Test.
Brief description of the drawings
Fig. 1 shows the flow signal of the method for upgrading software based on Bluetooth electronic devices of embodiment of the present invention one Figure.
Fig. 2 shows step S3 schematic flow sheet.
Fig. 3 shows the structural representation of the software updating apparatus based on Bluetooth electronic devices of embodiment of the present invention two Figure.
Fig. 4 shows the structural representation of initialization module in Fig. 3.
Embodiment
It is below in conjunction with the accompanying drawings and specific real in order to be more clearly understood that the above objects, features and advantages of the present invention Mode is applied the present invention is further described in detail.It should be noted that in the case where not conflicting, the implementation of the application Feature in mode and embodiment can be mutually combined.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also Implemented with being different from other modes described here using other, therefore, protection scope of the present invention is not by described below Embodiment limitation.
Embodiment one
Fig. 1 is referred to, the present invention provides a kind of method for upgrading software based on Bluetooth electronic devices, Bluetooth electronic here Equipment, refers mainly to Portable intelligent terminal, amusement game equipment and monitoring device with Bluetooth function etc., such as bluetooth sound The products such as case, mobile phone, tablet personal computer, game machine, these Bluetooth electronic devices are after terminal user buys, and manufacturer need to be to above-mentioned indigo plant The firmware of tooth electronic equipment is iterated renewal, to lift Consumer's Experience of the user to electronic equipment.The method for upgrading software Comprise the following steps:
S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;Here bluetooth Communication connection is preferential to be connected using SPP, if no SPP connections reuse BLE connections.On above-mentioned Bluetooth electronic devices to be upgraded refer to Bluetooth electronic devices are stated not upgrade also completion, otherwise in have received interrupted after the part upgrade file to firmware upgrade, will Or be do not receive the data of any upgrade file also, be that the attribute information that have received upgrade file does not receive upgrading also Situations such as file.Upgrading source device can be mobile phone, tablet personal computer or other computer equipments with bluetooth communication.
S2 judges whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;Here upgrading to be received File includes attribute information, data of upgrade file of upgrade file etc..
If S3 has upgrade file to be received, the file sequence number of the upgrade file to be received is initialized;Have waiting The upgrade file of receipts includes the upgrade file not yet transmitted and transmits part but the two kinds of situations of upgrade file not transferred, The upgrade file not being transmitted across completely previously exactly, after upgrading source device has been detected, notifies Bluetooth electronic to be upgraded Whether equipment is upgraded;Part but the upgrade file not transferred are also transmitted, in existing Bluetooth electronic devices, is led to Often this transmission means is not supported, but Bluetooth electronic devices can be commonly encountered such case in use:Such as risen During level file transmission, because extraneous some reasons, such as to dial visual telephone, play video etc., be not influence Consumer's Experience, Need to interrupt ongoing upgrade file transmission, once interrupting, be then originally transferred to the part upgrading text of Bluetooth electronic devices Part is retained in caching when restarting Bluetooth transmission next time, and Bluetooth electronic devices re-download the category of whole upgrade file again Property information and the data of upgrade file etc., will ensure to continuously transmit to ensure the integrality of upgrade file every time, and previous Incomplete upgrade file can stay in the caching of Bluetooth electronic devices, committed memory, influence Bluetooth electronic devices operation Speed.And the present invention is the file sequence number X=X0+1 by initializing upgrade file to be received, wherein X0 transferred for last time Into file sequence number, only file sequence number is initialized.
S4 sends the file sequence number to the upgrading source device;Include above-mentioned X in this file sequence number.Initialization is completed File sequence number is issued into upgrading source device afterwards to be compared.
S5 receives the control instruction of the upgrading source device, according to the control instruction to the upgrade file to be received Perform associative operation.After upgrading source device confirms file sequence number, control instruction is correspondingly sent, then according to control instruction pair Upgrade file carries out associative operation.In a particular embodiment, the control instruction is upgrade file data command, upgrade file category Property information command, new firmware upgrade instruction, device upgrade instruction, equipment cancel at least one of upgrade command.
The present invention the method for upgrading software based on Bluetooth electronic devices terminal user purchase Bluetooth electronic devices after still It can be that software upgrading can be achieved using simple method, improve Consumer's Experience on the premise of user's use is not influenceed.Together When, because the method for upgrading software based on Bluetooth electronic devices of the present invention upgrade file to be received for having includes not yet passing Defeated upgrade file and the upgrade file for transmitting but not being transmitted, that is to say, that the upgrade file transmitted, if occurring The situation that influence user uses, such as when transmitting upgrade file, user needs to start the other application of Bluetooth electronic devices Program, such as when playing game or other situations, interrupt the transmission of upgrade file, this interruption can be made to lift user With experience, Bluetooth electronic devices are interrupted automatically, when Bluetooth electronic devices do not have other application program to be used in idle condition, The two sets up communication connection.Can also be that extraneous some situations cause Bluetooth transmission poor signal, such as upgrade source device because with Family carries displacement Bluetooth electronic devices farther out, cannot be set up and communicated to connect by bluetooth approach, or Bluetooth electronic devices After shutdown or upgrading one of source device shutdown, close to or turn back on and cause the two is set up to communicate to connect, data are done by BLE Passage, although with bluetooth BLE communication speeds than relatively low, but carries out upgrade file packet using User Defined control instruction Continuation transmission, the transmission of last time unfinished upgrade file data will be continued, can be effectively ensured by completion is transmitted several times The transmission of whole upgrade file, finally realizes the upgrade job of Bluetooth electronic devices.Thus, the present invention greatly improves bluetooth electricity The Consumer's Experience of sub- equipment.
Fig. 2 is referred to, above-mentioned steps S3 further comprises the steps:
If S31 has upgrade file to be received, the current working condition of the Bluetooth electronic devices to be upgraded is judged;
Working condition current according to the Bluetooth electronic devices to be upgraded S32, it is determined whether start to treat described in initialization The file sequence number of the upgrade file of reception;For example the Bluetooth electronic devices to be upgraded are Baffle Box of Bluetooth, now play music, It then should not now start the file sequence number of initialization upgrade file to be received, Baffle Box of Bluetooth should be waited to be not on holding state When in other words idle condition when start initialization.And for example, the Bluetooth electronic devices to be upgraded are mobile phone, and user makes a phone call, Then without initialization.
S33 is if so, the file sequence number of the initialization upgrade file to be received.In Bluetooth electronic devices to be upgraded Working condition is idle or holding state, is starting to upgrade to Bluetooth electronic devices, so user will not be used blue Tooth electronic equipment brings interference,
Preferably, step S5 further comprises:
S51 when the control instruction be upgrade file data command when, judge the upgrade file data sequence number whether institute State file sequence number consistent, if inconsistent, return to step S30;
S52 stores current upgrade file attribute information, bag when the control instruction is that upgrade file attribute information is instructed Include:The verification of current upgrade file and the corresponding version of information, the length information of current upgrade file and current upgrade file This number information;
S53 deletes previous information of upgrade file, initialization is received when the control instruction is that new firmware upgrade is instructed The attribute information of the new firmware upgrade file, sends to the upgrading source device and gets out upgrade command;Here attribute letter Breath includes:The version number of upgrade file, the length information of upgrade file and waits information at the verification of upgrade file.
S54 closes the connection with the upgrading source device, closed and institute when the control instruction is that device upgrade is instructed The incoherent equipment of device upgrade and application program are stated, the Bluetooth electronic devices to be upgraded are upgraded, after having upgraded certainly It is dynamic to restart system;Here close and be primarily referred to as some of Bluetooth electronic devices and equipment liter with the incoherent equipment of device upgrade The incoherent hardware module of level, such as when for Baffle Box of Bluetooth, play the loudspeaker of music, and for example, is now connected with upgrading source device Bluetooth communication, by user to mobile phone send close bluetooth connection instruct, mobile phone send instruction close Bluetooth electronic set Standby blue tooth communication function.
S55 deletes the upgrade file to be received, and delete when the control instruction is that equipment cancels upgrade command The attribute information of the upgrade file to be received.Here the attribute information of current upgrade file is purged, and by The upgrade file data erasing of download so that the caching of Bluetooth electronic devices will not be taken, improve Bluetooth electronic devices is Reaction speed during system work.
Preferably, if when consistent in step S51, it is further comprising the steps of:
S511 local file sequence numbers add 1;
S512 checks whether the upgrade file to be received has been transmitted;
If S513 is transmitted, whole upgrade file is verified and checked, if result after the verification and inspection To be correct, then the information of the upgrade file end of transmission is sent to the upgrading source device;If result is after the verification and inspection Mistake, then delete the upgrade file, and sets document misregistration serial number zero, notifies the upgrading source device upgrade file transmission Failure, the information for getting out upgrading is sent to the upgrading source device, the upgrade file is transmitted again.Set document misregistration sequence Number it is zero, upgrades again during so as to upgrading next time.In addition, document misregistration sequence number herein refer to upgrade file split into it is many After individual packet, each one file sequence number of packet, the file sequence number and the packet of sequence first of each packet are sequentially assigned File sequence number difference be document misregistration sequence number.
Preferably, the method for upgrading software is further comprising the steps of between step S1 and step S2:
Source device of upgrading described in S01 obtains the current version of firmware information of the Bluetooth electronic devices to be upgraded, and from clothes Business device obtains the latest firmware version information of the Bluetooth electronic devices to be upgraded;Here the upgrading source device of firmware upgrade is excellent Elect mobile electronic terminal, such as mobile phone as, mobile phone is downloaded from server after the upgrade file of the firmware, and firmware is transmitted by mobile phone Upgrade file to Bluetooth electronic devices.
Upgrade file is transferred to before equipment, and upgrade file has data in itself, also has the inspection to this data, also has his institute The version number information at place, is referred to as information of upgrade file, is also firmware upgrade information.
S02 judges whether the firmware version information is consistent with the latest firmware version information;
If S03 is inconsistent, the Bluetooth electronic devices to be upgraded are sent information to;
Source device of upgrading described in S04 receives the feedback information of the Bluetooth electronic devices to be upgraded;
The step S5 further comprises:
Source device of upgrading described in S05 sends the control instruction according to the feedback information.Here feedback information includes Bluetooth electronic devices get out the solicited message of upgrading, the file sequence number of Bluetooth electronic devices request upgrade file, Bluetooth electronic The upgrade file of equipment such as has transferred at the information.
The running for source device of upgrading also is introduced by taking mobile phone as an example below:
The first step:Start application program (APP) connection bluetooth relevant with the firmware upgrade of Bluetooth electronic devices in mobile phone Electronic equipment, Bluetooth electronic devices can be controlled by the application program, and now connection is exactly to be led to by the BLE data of bluetooth Road;
Second step:The application program relevant with the firmware upgrade of Bluetooth electronic devices is asked to Bluetooth electronic devices in mobile phone The current version of firmware number of Bluetooth electronic devices, and request server obtains the latest firmware version number of this Bluetooth electronic devices, If two firmware version numbers are consistent, the 4th step is will jump to, the 3rd step is otherwise jumped to;
3rd step:Notify Bluetooth electronic devices firmware to have new firmware version, upgrading can be received;
4th step:The application program waiting facilities order relevant with the firmware upgrade of Bluetooth electronic devices in mobile phone, if The solicited message that Bluetooth electronic devices get out upgrading is received, then jumps to the 5th step;If receiving Bluetooth electronic devices request The file sequence number of upgrade file, then jump to the 6th step;If the upgrade file for receiving Bluetooth electronic devices has been transferred, jump Go to the 7th step;
5th step:Now Bluetooth electronic devices need to completely newly upgrade, that is, notify Bluetooth electronic devices, bluetooth by the 3rd step Electronic equipment, which will return to application program relevant with the firmware upgrade of Bluetooth electronic devices in the request completely newly upgraded, mobile phone, to upgrade The relevant information of file is sent to Bluetooth electronic devices.The 4th step is jumped to again;Here relevant information includes the liter of new firmware The attribute information and upgrade file packet of level file;
6th step:Application program relevant with the firmware upgrade of Bluetooth electronic devices in file, mobile phone is now transmitted by phase The offset data answered is sent to Bluetooth electronic devices, because the offset data amount transmitted every time is all known quantity, so file sequence number The deviant of upgrade file where data can uniquely be confirmed, then jump to the 4th step;Above-mentioned offset data is torn open for upgrade file It is divided into multiple packets, each packet assigns a file sequence number in order, because the present invention can be transmitted in upgrade file Continue to transmit remaining upgrade file after termination, when in connection next time, therefore, when transmitting next time, need to only find corresponding Offset data (include upgrade file split packet and file sequence number) continue transmit, this avoid existing skill During art is transmitted to Bluetooth electronic devices to be upgraded, exist after the interruption of appearance, in data buffer storage and do not transmit file retention, pass next time It is defeated former so the problem of re-download.Also the present invention in, for the upgrade file transmitted after Transmission, can by its from Buffer area moves on to permanent storage area, when starting upgrade file reception in next time, then recalls to buffer area, complete to form one Upgrade file.The internal memory of Bluetooth electronic devices to be upgraded will not be so taken, the speed of service is unaffected, improves user's body Test.
7th step:Receive the request that the upgrade file of Bluetooth electronic devices is transmitted, and in mobile phone with Bluetooth electronic Prompting user's Bluetooth electronic devices have new firmware version in the relevant application program of the firmware upgrade of equipment, if upgrading, if User's selection upgrading, jumps to the 8th step;Otherwise the 9th step is jumped to;
8th step:Upgrade command is sent to Bluetooth electronic devices, now Bluetooth electronic devices can close uncorrelated to upgrading Hardware module, and disconnect and the connection between application program relevant with the firmware upgrade of Bluetooth electronic devices in mobile phone, enter Row firmware upgrade;Jump back to the 4th step;
9th step:User cancels upgrading, logical by the mobile phone application program relevant with the firmware upgrade of Bluetooth electronic devices Know that Bluetooth electronic devices are ignored this time to upgrade;Jump back to the 4th step.
User only need to can just complete the operation of whole Bluetooth electronic devices in hand hands- operation, it is to avoid in the prior art The firmware upgrade of Bluetooth electronic devices needs to return factory's upgrading or participates in the cumbersome of upgrading by professional, is not influenceing user to make With, do not increase customer charge in the case of, to Bluetooth electronic devices carry out firmware upgrade work, it is ensured that after Bluetooth electronic devices Continuous iteration updates.
Embodiment two
Fig. 3 and Fig. 4 are referred to, embodiment of the present invention two also provides one kind on the basis of above-mentioned embodiment one and is based on The software updating apparatus of Bluetooth electronic devices, the software updating apparatus includes:
Communication connection mould, 10, matched for Bluetooth electronic devices to be upgraded by bluetooth with upgrading source device and set up logical Letter connection;
Judge module 20, for judging whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
Initialization module 30, if for there is upgrade file to be received, initializing the upgrade file to be received File sequence number;
Sending module 40, for sending the file sequence number to the upgrading source device;
Updating operation module 50 is controlled, the control instruction for receiving the upgrading source device, according to the control instruction Associative operation is performed to the upgrade file to be received.
The present invention the software updating apparatus based on Bluetooth electronic devices terminal user purchase Bluetooth electronic devices after still It can be that software upgrading can be achieved using simple method, improve Consumer's Experience on the premise of user's use is not influenceed.
Fig. 4 is referred to, the initialization module 30 is specifically included:
Judging unit 31, for when there is upgrade file to be received, judging that the Bluetooth electronic devices to be upgraded are current Working condition;
Determining unit 32, for the working condition current according to the Bluetooth electronic devices to be upgraded, it is determined whether start Initialize the file sequence number of the upgrade file to be received;
Initialization unit 33, the file sequence number for initializing the upgrade file to be received.
The control updating operation module includes:
Upgrade file data sequence number judging unit, for when the control instruction is upgrade file data command, judging Whether described the upgrade file data sequence number file sequence number be consistent;
Memory cell, for when the control instruction is that information of upgrade file is instructed, storing current information of upgrade file, Including:The verification and information of current upgrade file, the length information of current upgrade file and current upgrade file it is corresponding Version number information;
The control updating operation module also includes:New firmware upgrade unit, and/or device upgrade unit, and/or equipment Cancel upgrade unit;
The new firmware upgrade unit, for when the control instruction is that new firmware upgrade is instructed, deleting previous liter Level fileinfo, initialization receives the attribute information of new firmware upgrade file, is sent to the upgrading source device and gets out upgrading Order;
The device upgrade unit, for when the control instruction is that device upgrade is instructed, closing and the upgrading source The connection of equipment, is closed and the incoherent equipment of the device upgrade and application program, to the Bluetooth electronic devices to be upgraded Upgraded, restart system after having upgraded automatically;
The equipment cancels upgrade unit, for when the control instruction is that equipment cancels upgrade command, deleting described Upgrade file to be received, and delete the attribute information of the upgrade file to be received.
Because the control updating operation module can be included above-mentioned new firmware upgrade unit, device upgrade unit and set The upgrade unit thrin that disappears is on the waiting list, or three includes entirely, therefore different upgrading control instructions can be corresponded to, realize bluetooth Electronic equipment is upgraded accordingly.
Above-mentioned initialization module, the correlation for controlling the detailed description of updating operation module to refer in embodiment one are retouched State, will not be repeated here.
Embodiment three
Embodiment of the present invention three also provides a kind of software updating apparatus based on Bluetooth electronic devices, including processor and Memory, the memory storage has programmed instruction, and the processor calls the programmed instruction stored in the memory to be used for Perform following steps:
S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;
S2 judges whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
If S3 has upgrade file to be received, the file sequence number of the upgrade file to be received is initialized;
S4 sends the file sequence number to the upgrading source device;
S5 receives the control instruction of the upgrading source device, according to the control instruction to the upgrade file to be received Perform associative operation.
Preferably, step S3 further comprises the steps:
If S31 has upgrade file to be received, the current working condition of the Bluetooth electronic devices to be upgraded is judged;
Working condition current according to the Bluetooth electronic devices to be upgraded S32, it is determined whether start to treat described in initialization The file sequence number of the upgrade file of reception;
S33 is if so, the file sequence number of the initialization upgrade file to be received.
Preferably, the control instruction is upgrade file data command, the instruction of upgrade file attribute information, new firmware upgrade Instruction, device upgrade instruction, equipment cancel at least one of upgrade command.
Preferably, step S5 further comprises:
S51 when the control instruction be upgrade file data command when, judge the upgrade file data sequence number whether institute State file sequence number consistent, if inconsistent, return to step S30;
S52 stores current information of upgrade file when the control instruction is that information of upgrade file is instructed, including:Currently The corresponding version number letter of the verification of upgrade file and information, the length information of current upgrade file and current upgrade file Breath;
S53 deletes previous information of upgrade file, initialization is received when the control instruction is that new firmware upgrade is instructed The attribute information of new firmware upgrade file, sends to the upgrading source device and gets out upgrade command;
S54 closes the connection with the upgrading source device, closed and institute when the control instruction is that device upgrade is instructed The incoherent equipment of device upgrade and application program are stated, the Bluetooth electronic devices to be upgraded are upgraded, after having upgraded certainly It is dynamic to restart system;
S55 deletes the upgrade file to be received, and delete when the control instruction is that equipment cancels upgrade command The attribute information of the upgrade file to be received.
Preferably, if when consistent in step S51, it is further comprising the steps of:
S511 local file sequence numbers add 1;
S512 checks whether the upgrade file to be received has been transmitted;
If S513 is transmitted, whole upgrade file is verified and checked, if result after the verification and inspection To be correct, then the information of the upgrade file end of transmission is sent to the upgrading source device;If result is after the verification and inspection Mistake, then delete the upgrade file, and sets document misregistration serial number zero, notifies the upgrading source device upgrade file transmission Failure, the information for getting out upgrading is sent to the upgrading source device, the upgrade file is transmitted again.
The present invention the software updating apparatus based on Bluetooth electronic devices terminal user purchase Bluetooth electronic devices after still It can be that software upgrading can be achieved using simple method, improve Consumer's Experience on the premise of user's use is not influenceed.
The preferred embodiment of the present invention is these are only, is not intended to limit the invention, for the technology of this area For personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

1. a kind of method for upgrading software based on Bluetooth electronic devices, it is characterised in that the method for upgrading software includes following Step:
S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;
S2 judges whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
If S3 has upgrade file to be received, the file sequence number of the upgrade file to be received is initialized;
S4 sends the file sequence number to the upgrading source device;
S5 receives the control instruction of the upgrading source device, and the upgrade file to be received is performed according to the control instruction Associative operation.
2. the method for upgrading software according to claim 1 based on Bluetooth electronic devices, it is characterised in that step S3 enters one Step comprises the following steps:
If S31 has upgrade file to be received, the current working condition of the Bluetooth electronic devices to be upgraded is judged;
Working condition current according to the Bluetooth electronic devices to be upgraded S32, it is determined whether start initialization described to be received Upgrade file file sequence number;
S33 is if so, the file sequence number of the initialization upgrade file to be received.
3. the method for upgrading software according to claim 1 based on Bluetooth electronic devices, it is characterised in that the control refers to Make and being taken for upgrade file data command, the instruction of upgrade file attribute information, new firmware upgrade instruction, device upgrade instruction, equipment Disappear at least one of upgrade command.
4. the method for upgrading software according to claim 3 based on Bluetooth electronic devices, it is characterised in that step S5 enters one Step includes:
S51 judges the whether described text of the upgrade file data sequence number when the control instruction is upgrade file data command Part sequence number is consistent, if inconsistent, return to step S30;
S52 stores current information of upgrade file when the control instruction is that information of upgrade file is instructed, including:Current upgrading The verification of file and the corresponding version number information of information, the length information of current upgrade file and current upgrade file;
S53 deletes previous information of upgrade file, initialization receives described when the control instruction is that new firmware upgrade is instructed The attribute information of new firmware upgrade file, sends to the upgrading source device and gets out upgrade command;
S54 closes the connection with the upgrading source device, closing is set with described when the control instruction is that device upgrade is instructed The Bluetooth electronic devices to be upgraded are upgraded by standby upgrade incoherent equipment and application program, automatic weight after having upgraded Starting system;
S55 deletes the upgrade file to be received, and delete described when the control instruction is that equipment cancels upgrade command The attribute information of upgrade file to be received.
5. the method for upgrading software according to claim 4 based on Bluetooth electronic devices, it is characterised in that in step S51 If further comprising the steps of when consistent:
S511 local file sequence numbers add 1;
S512 checks whether the upgrade file to be received has been transmitted;
If S513 is transmitted, whole upgrade file is verified and checked, if result is just after the verification and inspection Really, then the information of the upgrade file end of transmission is sent to the upgrading source device;If result is mistake after the verification and inspection, The upgrade file is then deleted, and document misregistration serial number zero is set, the upgrading source device upgrade file bust this is notified, The information for getting out upgrading is sent to the upgrading source device, the upgrade file is transmitted again.
6. the method for upgrading software according to claim 1 based on Bluetooth electronic devices, it is characterised in that the software liter Level method is further comprising the steps of between step S1 and step S2:
Source device of upgrading described in S01 obtains the current version of firmware information of the Bluetooth electronic devices to be upgraded, and from server Obtain the latest firmware version information of the Bluetooth electronic devices to be upgraded;
S02 judges whether the firmware version information is consistent with the latest firmware version information;
If S03 is inconsistent, the Bluetooth electronic devices to be upgraded are sent information to;
Source device of upgrading described in S04 receives the feedback information of the Bluetooth electronic devices to be upgraded;
The step S5 further comprises:
Source device of upgrading described in S05 sends the control instruction according to the feedback information.
7. a kind of software updating apparatus based on Bluetooth electronic devices, it is characterised in that the software updating apparatus includes:
Communication connection module, is matched with upgrading source device by bluetooth for Bluetooth electronic devices to be upgraded and sets up communication link Connect;
Judge module, for judging whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
Initialization module, if for there is upgrade file to be received, initializing the file sequence of the upgrade file to be received Number;
Sending module, for sending the file sequence number to the upgrading source device;
Updating operation module is controlled, the control instruction for receiving the upgrading source device, according to the control instruction to described Upgrade file to be received performs associative operation.
8. the software updating apparatus according to claim 7 based on Bluetooth electronic devices, it is characterised in that the initialization Module is specifically included:
Judging unit, for when there is upgrade file to be received, judging the work of the Bluetooth electronic devices to be upgraded currently State;
Determining unit, for the working condition current according to the Bluetooth electronic devices to be upgraded, it is determined whether start initialization The file sequence number of the upgrade file to be received;
Initialization unit, the file sequence number for initializing the upgrade file to be received.
9. the software updating apparatus according to claim 8 based on Bluetooth electronic devices, it is characterised in that the control liter Level operation module includes:
Upgrade file data sequence number judging unit, for when the control instruction is upgrade file data command, judging described Whether described upgrade file data sequence number file sequence number be consistent;
Memory cell, for when the control instruction is that information of upgrade file is instructed, storing current information of upgrade file, bag Include:The verification of current upgrade file and the corresponding version of information, the length information of current upgrade file and current upgrade file This number information;
The control updating operation module also includes:New firmware upgrade unit, and/or device upgrade unit, and/or equipment are cancelled Upgrade unit;
The new firmware upgrade unit, for when the control instruction is that new firmware upgrade is instructed, deleting previous upgrading text Part information, initialization receives the attribute information of new firmware upgrade file, is sent to the upgrading source device and gets out upgrade command;
The device upgrade unit, for when the control instruction is that device upgrade is instructed, closing and the upgrading source device Connection, close with the incoherent equipment of the device upgrade and application program, the Bluetooth electronic devices to be upgraded are carried out Upgrading, restarts system automatically after having upgraded;
The equipment cancels upgrade unit, for when the control instruction is that equipment cancels upgrade command, deleting described waiting The upgrade file of receipts, and delete the attribute information of the upgrade file to be received.
10. a kind of software updating apparatus based on Bluetooth electronic devices, it is characterised in that described including processor and memory Memory storage has programmed instruction, and the processor calls the programmed instruction stored in the memory to be used to perform following step Suddenly:
S1 Bluetooth electronic devices to be upgraded are matched with upgrading source device by bluetooth and set up communication connection;
S2 judges whether the Bluetooth electronic devices to be upgraded have upgrade file to be received;
If S3 has upgrade file to be received, the file sequence number of the upgrade file to be received is initialized;
S4 sends the file sequence number to the upgrading source device;
S5 receives the control instruction of the upgrading source device, and the upgrade file to be received is performed according to the control instruction Associative operation.
CN201710158691.1A 2017-03-17 2017-03-17 Method for upgrading software and device based on Bluetooth electronic devices Pending CN107085525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710158691.1A CN107085525A (en) 2017-03-17 2017-03-17 Method for upgrading software and device based on Bluetooth electronic devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710158691.1A CN107085525A (en) 2017-03-17 2017-03-17 Method for upgrading software and device based on Bluetooth electronic devices

Publications (1)

Publication Number Publication Date
CN107085525A true CN107085525A (en) 2017-08-22

Family

ID=59614277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710158691.1A Pending CN107085525A (en) 2017-03-17 2017-03-17 Method for upgrading software and device based on Bluetooth electronic devices

Country Status (1)

Country Link
CN (1) CN107085525A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429979A (en) * 2018-06-15 2018-08-21 歌尔科技有限公司 A kind of charging box upgrade method, charging box, wireless headset and TWS earphones
CN108470436A (en) * 2018-05-24 2018-08-31 智恒科技股份有限公司 A kind of wireless data concentrator
CN108829428A (en) * 2018-07-25 2018-11-16 常州星宇车灯股份有限公司 Car lamp software concentrating type upgrading control system and the vehicle with the system
CN109445806A (en) * 2018-12-20 2019-03-08 歌尔科技有限公司 More device updating methods, device, system and terminal based on Ble
CN109857437A (en) * 2019-01-22 2019-06-07 安克创新科技股份有限公司 A kind of upgrade method and system of bluetooth equipment
CN109951842A (en) * 2019-03-19 2019-06-28 厦门市思芯微科技有限公司 A kind of bluetooth firmware method during upgrading for retaining BLE title and MAC Address
CN110659044A (en) * 2019-08-29 2020-01-07 广东思派康电子科技有限公司 Bluetooth device upgrading method
CN111078246A (en) * 2019-10-15 2020-04-28 苏州斯普锐智能系统有限公司 Software configuration system and method of Bluetooth scanning equipment
CN111095374A (en) * 2017-09-19 2020-05-01 Sei光学前沿株式会社 Theft tracking system and theft tracking method for optical fiber fusion splicing device
CN111399874A (en) * 2020-03-05 2020-07-10 Tcl移动通信科技(宁波)有限公司 System upgrading method and device, storage medium and intelligent wearable device
CN111752579A (en) * 2019-10-17 2020-10-09 北京沃东天骏信息技术有限公司 Bluetooth terminal upgrading method and device, storage medium and electronic equipment
CN112073875A (en) * 2020-08-31 2020-12-11 深圳市豪恩声学股份有限公司 Earphone software upgrading circuit, device and method
CN112799696A (en) * 2021-01-04 2021-05-14 展讯通信(上海)有限公司 Firmware upgrading method and related equipment
WO2021103258A1 (en) * 2019-11-29 2021-06-03 歌尔股份有限公司 Wristband device and upgrading method and system therefor
CN116132971A (en) * 2023-02-03 2023-05-16 深圳市卡思诺数码有限公司 OTA upgrading method and system for Bluetooth sound equipment
CN117272327A (en) * 2023-10-31 2023-12-22 深圳市巨诺电子有限公司 Set top box encryption upgrading method and set top box

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750515A (en) * 2015-03-03 2015-07-01 惠州Tcl移动通信有限公司 Firmware version upgrading method and system
CN104820611A (en) * 2015-05-22 2015-08-05 中国科学院上海高等研究院 Equipment software upgrade method based on Bluetooth and upgrade device
CN104915237A (en) * 2015-06-24 2015-09-16 深圳市兰丁科技有限公司 Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN105978937A (en) * 2016-04-26 2016-09-28 江苏惠通集团有限责任公司 Bluetooth slave device and upgrade method thereof
CN106210102A (en) * 2016-07-20 2016-12-07 广州小鸡快跑网络科技有限公司 The method and device of radio upgrade handle firmware based on bluetooth BLE

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750515A (en) * 2015-03-03 2015-07-01 惠州Tcl移动通信有限公司 Firmware version upgrading method and system
CN104820611A (en) * 2015-05-22 2015-08-05 中国科学院上海高等研究院 Equipment software upgrade method based on Bluetooth and upgrade device
CN104915237A (en) * 2015-06-24 2015-09-16 深圳市兰丁科技有限公司 Upgrading method and upgrading control method of Bluetooth device firmware program, and equipment
CN105978937A (en) * 2016-04-26 2016-09-28 江苏惠通集团有限责任公司 Bluetooth slave device and upgrade method thereof
CN106210102A (en) * 2016-07-20 2016-12-07 广州小鸡快跑网络科技有限公司 The method and device of radio upgrade handle firmware based on bluetooth BLE

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111095374A (en) * 2017-09-19 2020-05-01 Sei光学前沿株式会社 Theft tracking system and theft tracking method for optical fiber fusion splicing device
CN108470436A (en) * 2018-05-24 2018-08-31 智恒科技股份有限公司 A kind of wireless data concentrator
CN108429979A (en) * 2018-06-15 2018-08-21 歌尔科技有限公司 A kind of charging box upgrade method, charging box, wireless headset and TWS earphones
CN108829428A (en) * 2018-07-25 2018-11-16 常州星宇车灯股份有限公司 Car lamp software concentrating type upgrading control system and the vehicle with the system
CN109445806A (en) * 2018-12-20 2019-03-08 歌尔科技有限公司 More device updating methods, device, system and terminal based on Ble
CN109445806B (en) * 2018-12-20 2022-05-06 歌尔科技有限公司 Ble-based multi-device upgrading method, device, system and terminal
CN109857437A (en) * 2019-01-22 2019-06-07 安克创新科技股份有限公司 A kind of upgrade method and system of bluetooth equipment
CN109951842A (en) * 2019-03-19 2019-06-28 厦门市思芯微科技有限公司 A kind of bluetooth firmware method during upgrading for retaining BLE title and MAC Address
CN110659044A (en) * 2019-08-29 2020-01-07 广东思派康电子科技有限公司 Bluetooth device upgrading method
CN111078246A (en) * 2019-10-15 2020-04-28 苏州斯普锐智能系统有限公司 Software configuration system and method of Bluetooth scanning equipment
CN111752579A (en) * 2019-10-17 2020-10-09 北京沃东天骏信息技术有限公司 Bluetooth terminal upgrading method and device, storage medium and electronic equipment
WO2021103258A1 (en) * 2019-11-29 2021-06-03 歌尔股份有限公司 Wristband device and upgrading method and system therefor
CN111399874A (en) * 2020-03-05 2020-07-10 Tcl移动通信科技(宁波)有限公司 System upgrading method and device, storage medium and intelligent wearable device
CN112073875A (en) * 2020-08-31 2020-12-11 深圳市豪恩声学股份有限公司 Earphone software upgrading circuit, device and method
CN112799696A (en) * 2021-01-04 2021-05-14 展讯通信(上海)有限公司 Firmware upgrading method and related equipment
CN112799696B (en) * 2021-01-04 2023-02-28 展讯通信(上海)有限公司 Firmware upgrading method and related equipment
CN116132971A (en) * 2023-02-03 2023-05-16 深圳市卡思诺数码有限公司 OTA upgrading method and system for Bluetooth sound equipment
CN117272327A (en) * 2023-10-31 2023-12-22 深圳市巨诺电子有限公司 Set top box encryption upgrading method and set top box
CN117272327B (en) * 2023-10-31 2024-05-03 深圳市巨诺电子有限公司 Set top box encryption upgrading method and set top box

Similar Documents

Publication Publication Date Title
CN107085525A (en) Method for upgrading software and device based on Bluetooth electronic devices
KR100584443B1 (en) Component Download Manager for a Wireless Mobile Station and Method of Operation
KR100735364B1 (en) System and method for performing diagnostics on a mobile station using over-the-air transfer of interpreted byte-code program
CN104967971A (en) Method achieving bluetooth automatic return connection in Android system
CN101958799B (en) Method, device and system for updating terminal
KR101251439B1 (en) Automatical test system and method performance of smart phone using android debug bridge interface
CN107506647A (en) Leak self-repairing method and mobile terminal
CN107832065A (en) Firmware upgrade method, water purifier, upgrade-system and readable storage medium storing program for executing
CN104750515A (en) Firmware version upgrading method and system
CN103716901B (en) Method, system and the relevant device connected between equipment
CN107329865B (en) Method for opening adb function of debugging bridge, mobile terminal and computer readable medium
CN102185754B (en) Method for upgrading board card in switch system
CN102331946A (en) Method and system for installing application program
CN105517015A (en) Upgrading method, device of wifi product by over the air OTA and terminal
CN102799545A (en) Usb device remote control method and system
CN109857416A (en) A kind of application upgrade method, apparatus, equipment and storage medium
CN106201619A (en) A kind of method customizing management and control mobile phone
CN105263181B (en) A kind of document down loading method and system of the mobile terminal based on WIFI
CN107071765B (en) Data receiving method and data receiving terminal
CN109144537A (en) The method, apparatus that mobile terminal and wearable device upgrade automatically
CN107124714B (en) Data transmission method and data transmission terminal
CN105025467B (en) A kind of terminal control method and system based on MDM
CN107733974A (en) A kind of upgrade method of mobile terminal
CN108958785A (en) A kind of application program updating method and device
CN108449806B (en) Information processing method, terminal and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170822