CN103500151B - A kind of method and apparatus changing peripheral equipment firmware - Google Patents

A kind of method and apparatus changing peripheral equipment firmware Download PDF

Info

Publication number
CN103500151B
CN103500151B CN201310447234.6A CN201310447234A CN103500151B CN 103500151 B CN103500151 B CN 103500151B CN 201310447234 A CN201310447234 A CN 201310447234A CN 103500151 B CN103500151 B CN 103500151B
Authority
CN
China
Prior art keywords
change
firmware
packet
peripheral equipment
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310447234.6A
Other languages
Chinese (zh)
Other versions
CN103500151A (en
Inventor
朱克锋
曾诚
李德灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Money Box Information Technology Co Ltd
Original Assignee
Shenzhen Money Box Information 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 Money Box Information Technology Co Ltd filed Critical Shenzhen Money Box Information Technology Co Ltd
Priority to CN201310447234.6A priority Critical patent/CN103500151B/en
Publication of CN103500151A publication Critical patent/CN103500151A/en
Application granted granted Critical
Publication of CN103500151B publication Critical patent/CN103500151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)

Abstract

The present invention is applicable to the communications field, provide a kind of method and apparatus changing peripheral equipment firmware, the method includes: terminal unit receives change peripheral equipment firmware instruction, it is packaged into packet, described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal; Described packet is encoded being converted to pulse signal by terminal unit, is sent to external equipment by audio interface; External equipment receives described packet, triggers the operation of change peripheral equipment firmware by reading described command id; The operation of response change peripheral equipment firmware, is decoded converting binary stream to described packet, changes corresponding data. Technical scheme provided by the invention overcomes and can only rely on USB interface in prior art and carry out the defect of firmware change, make firmware change more convenient, also change data are verified, accelerate the speed of firmware change further, enhance the accuracy of firmware change simultaneously.

Description

A kind of method and apparatus changing peripheral equipment firmware
Technical field
The invention belongs to the communications field, particularly relate to a kind of method and apparatus changing peripheral equipment firmware.
Background technology
Along with the intellectuality of mobile terminal, the external equipment communicated with mobile intelligent terminal also obtains breakthrough development, and the renewal of external equipment is very fast, it is necessary to be continuously updated firmware. The peripheral equipment firmware of current mobile intelligent terminal updates and is required for equipment is updated by USB interface connection computer or mobile intelligent terminal or is revised.
Renewal or the amendment of prior art peripheral equipment firmware are required for depending on the USB interface of terminal unit, mobile intelligent terminal is required for using USB interface when charging or data transmission, USB interface is made usually to be in occupied state, therefore by USB interface peripheral equipment firmware is modified and is inconvenient for, it is impossible to updated timely.
Summary of the invention
The purpose of the embodiment of the present invention is in that to provide a kind of method and apparatus changing peripheral equipment firmware, it is intended to solve to change peripheral equipment firmware only by USB interface in prior art, it is impossible to the problem using audio interface change peripheral equipment firmware.
Embodiments providing a kind of method changing peripheral equipment firmware, described method comprises the steps:
Terminal unit receives change peripheral equipment firmware instruction, is packaged into packet, and described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal;
Described packet is encoded being converted to pulse signal by terminal unit, is sent to external equipment by audio interface;
External equipment receives described packet, triggers the operation of change peripheral equipment firmware by reading described command id;
The operation of external-device response change peripheral equipment firmware, is decoded converting binary stream to described packet, changes corresponding data.
The another object of the embodiment of the present invention is in that to provide a kind of device changing peripheral equipment firmware based on audio interface, and described device includes:
Pre-procesor, is used for receiving change peripheral equipment firmware instruction, is packaged into packet, and described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal;
Dispensing device, for being encoded being converted to pulse signal to described packet, is sent to external equipment by audio interface;
Receive device, receive described packet, trigger the operation of change peripheral equipment firmware by reading described command id;
Process device, for responding the operation of change peripheral equipment firmware, be decoded converting binary stream to described packet, change corresponding data.
In embodiments of the present invention, technical scheme provided by the invention is when external equipment needs change firmware, the packet for changing after being processed to external equipment transmission by audio interface, in order to distinguish normal audio signal, after outer equipment receiving data bag, trigger change operation by reading order mark, overcome and prior art can only rely on USB interface carry out the defect of firmware change so that firmware is changed more easily.
It addition, technical scheme provided by the invention is after external equipment receives, decodes described packet, also it is verified, accelerate the speed of change firmware further, reduce the bit error rate, enhance the accuracy of change firmware simultaneously.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for change peripheral equipment firmware provided by the invention;
Fig. 2 is the theory diagram of change peripheral equipment firmware device provided by the invention.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated. Should be appreciated that specific embodiment described herein is only in order to explain the present invention, is not intended to limit the present invention.
A kind of method changing peripheral equipment firmware provided by the invention, the method realizes flow process as it is shown in figure 1, details are as follows:
Step S11, terminal unit receive change peripheral equipment firmware instruction, are packaged into packet, and described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal.
Further, when by terminal unit, user finds that external equipment has new upgrade data to issue, user chooses whether that needs are updated, when determine need update time, terminal unit receives the instruction of upgraded external equipment firmware, and required upgrade data is packaged into packet, during in order to make external equipment receive this packet, identify the packet that this packet is required upgrading exactly, but not general voice data, during encapsulation, described upgrade data is added command id, this upgrade data and other voice datas are effectively distinguished by adding command id, exclusive PCR, described command id can by adding the word string realization preset to upgrade data, for instance the lead code 020 default to the addition of upgrade data and rear leading code 040.
Wherein triggering the situation receiving change peripheral equipment firmware instruction and have a variety of, for instance when external equipment needs more news, now instruction includes the data of needs change and is specially upgrade data;Or external equipment starts a leak and needs to carry out situation about repairing, now instruction includes the data that needs change and is specially leak patch; Or need the authority of external equipment is modified, it is authority amendment data that now instruction includes the data of needs change.
Described packet is encoded being converted to pulse signal by step S12, terminal unit, is sent to external equipment by audio interface.
Step S13, external equipment receive described packet, trigger the operation of change peripheral equipment firmware by reading described command id.
Further, described external equipment reads the packet that audio interface sends in real time, if reading the packet of described transmission containing described command id, such as read current data packet when comprising default lead code 020 and rear leading code 040, then think that this packet is for change packet, triggers the operation of change peripheral equipment firmware; If external equipment does not read described command id, then it is not modified the operation of peripheral equipment firmware.
Wherein when receiving the packet that audio interface sends, in order to get rid of the interference signals such as voice data exactly, by the command id of the normal audio the distinguished information in read data packet, the packet sent is identified, effectively get rid of audio signal, accurately trigger the operation of change peripheral equipment firmware change.
The operation of step S14, external-device response change peripheral equipment firmware, is decoded converting binary stream to described packet, changes corresponding data.
As a preferred embodiment of the present invention, in order to accelerate firmware change efficiency, enable external equipment get more accurately simultaneously and effectively change data, the problem such as shortage of data that data are formed after coding transcoding can be repaired, reducing the data bit error rate in coding and decoding process, described method also comprises the steps:
Adding check information in described packet, described check information is the corresponding check information formed according to the described data needing change;
External equipment according to described check information, verification that described binary stream and check information are compared.
Specifically, in order to reduce the bit error rate further, enhance the accuracy of firmware change, described binary stream and check information are compared verification time, described binary stream can be sequentially carried out even-odd check, CRC check.
Fig. 2 illustrates the theory diagram of the change peripheral equipment firmware device that the embodiment of the present invention provides, and for the ease of illustrating, illustrate only embodiment of the present invention relevant portion. In the present embodiment, should include based on the device of audio interface change peripheral equipment firmware: pre-procesor 21, dispensing device 22, reception device 23, process device 24.
Wherein pre-procesor 21, are used for receiving change peripheral equipment firmware instruction, are packaged into packet, and described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal; Dispensing device 22, for being encoded being converted to pulse signal to described packet, is sent to external equipment by audio interface; Receive device 23, receive described packet, trigger the operation of change peripheral equipment firmware by reading described command id; Process device 24, for responding the operation of change peripheral equipment firmware, be decoded converting binary stream to described packet, change corresponding data, it is achieved that by the technical scheme that peripheral equipment firmware is modified by audio interface.
As a preferred embodiment of the present invention, in order to accelerate firmware change speed, reduce external equipment and carry out the time of firmware change, effective data can be got more accurately, described device also includes: calibration equipment, for according to the described data needing change, forming corresponding check information, and according to described check information, described binary stream is verified.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all any amendment, equivalent replacement and improvement etc. made within the spirit and principles in the present invention, should be included within protection scope of the present invention.

Claims (6)

1. the method changing peripheral equipment firmware, it is characterised in that described method comprises the steps:
Terminal unit receives change peripheral equipment firmware instruction, is packaged into packet, and described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal;
Described packet is encoded being converted to pulse signal by terminal unit, is sent to external equipment by audio interface;
External equipment receives described packet, triggers the operation of change peripheral equipment firmware by reading described command id;
The operation of external-device response change peripheral equipment firmware, is decoded converting binary stream to described packet, changes corresponding data.
2. method according to claim 1, it is characterised in that described command id is word string set in advance.
3. method according to claim 1, it is characterised in that the described operational approach triggering change peripheral equipment firmware by reading described command id, specifically includes following steps:
Described external equipment reads the packet that audio interface sends in real time, if reading the packet of described transmission containing described command id, then triggers the operation of change peripheral equipment firmware;
If external equipment does not read described command id, then it is not modified the operation of peripheral equipment firmware.
4. method according to claim 1, it is characterised in that described method also comprises the steps:
Adding check information in described packet, described check information is the corresponding check information formed according to the described data needing change;
External equipment according to described check information, verification that described binary stream and check information are compared.
5. the device changing peripheral equipment firmware based on audio interface, it is characterised in that described device includes:
Pre-procesor, is used for receiving change peripheral equipment firmware instruction, is packaged into packet, and described instruction includes the data of needs change, and described packet includes the command id that can distinguish audio signal;
Dispensing device, for being encoded being converted to pulse signal to described packet, is sent to external equipment by audio interface;
Receive device, receive described packet, trigger the operation of change peripheral equipment firmware by reading described command id;
Process device, for responding the operation of change peripheral equipment firmware, be decoded converting binary stream to described packet, change corresponding data.
6. device according to claim 5, it is characterised in that described device also includes: calibration equipment, for according to the described data needing change, forming corresponding check information, and according to described check information, described binary stream verified.
CN201310447234.6A 2013-09-27 2013-09-27 A kind of method and apparatus changing peripheral equipment firmware Active CN103500151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310447234.6A CN103500151B (en) 2013-09-27 2013-09-27 A kind of method and apparatus changing peripheral equipment firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310447234.6A CN103500151B (en) 2013-09-27 2013-09-27 A kind of method and apparatus changing peripheral equipment firmware

Publications (2)

Publication Number Publication Date
CN103500151A CN103500151A (en) 2014-01-08
CN103500151B true CN103500151B (en) 2016-06-08

Family

ID=49865365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310447234.6A Active CN103500151B (en) 2013-09-27 2013-09-27 A kind of method and apparatus changing peripheral equipment firmware

Country Status (1)

Country Link
CN (1) CN103500151B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373440A (en) * 2008-10-09 2009-02-25 北京飞天诚信科技有限公司 Method and device for processing firmware upgrading data
CN202075817U (en) * 2011-03-07 2011-12-14 深圳盒子支付信息技术有限公司 Multifunctional device and POS (point-of-sale) system
CN102752019A (en) * 2011-04-20 2012-10-24 深圳盒子支付信息技术有限公司 Data sending, receiving and transmitting method and system based on headset jack
CN103164244A (en) * 2013-03-15 2013-06-19 南京工业大学 Firmware system remote updating method based on universal extensible firmware interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1903437A3 (en) * 2006-07-31 2008-10-22 Seiko Epson Corporation Update data transmission method, firmware writing system, and update data transmission program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373440A (en) * 2008-10-09 2009-02-25 北京飞天诚信科技有限公司 Method and device for processing firmware upgrading data
CN202075817U (en) * 2011-03-07 2011-12-14 深圳盒子支付信息技术有限公司 Multifunctional device and POS (point-of-sale) system
CN102752019A (en) * 2011-04-20 2012-10-24 深圳盒子支付信息技术有限公司 Data sending, receiving and transmitting method and system based on headset jack
CN103164244A (en) * 2013-03-15 2013-06-19 南京工业大学 Firmware system remote updating method based on universal extensible firmware interface

Also Published As

Publication number Publication date
CN103500151A (en) 2014-01-08

Similar Documents

Publication Publication Date Title
CN103299366B (en) Devices for encoding and detecting a watermarked signal
EP2790361B1 (en) Usb device communication method, device and system
CN101963910A (en) General USB (Universal Serial Bus) based equipment firmware updating method
CN110058850B (en) Application development method and device and storage medium
CN103823835A (en) Method and device for processing e-book directory and terminal equipment
CN103873883B (en) Video playing method and device and terminal equipment
CN103686464B (en) Apparatus control method, device and electronic equipment
CN103702478A (en) Method, device and equipment for controlling breath lamp
CN103702028A (en) Method and device for controlling shooting and terminal equipment
WO2015055002A1 (en) Electronic book file processing method, terminal, and electronic device
CN102404366A (en) Method for achieving long-distance wireless file-upgrading system
CN103763112A (en) User identity protection method and apparatus
CN103699373A (en) Interface color display method, device and system
CN103713943A (en) Native terminal operating system based application function realization method and device
CN103686821A (en) Control method for application program traffic statistics according to unique identification of mobile terminal
CN103686791A (en) Terminal card using condition detection method and device
CN106413032A (en) Hotspot establishing method and terminal equipment
CN102999397A (en) Embedded software upgrading and checking method
CN103699577B (en) A kind of page display accelerated method, device and mobile terminal
CN103533534B (en) Firmware wireless upgrading method for DECT (Digital Enhanced Cordless Telecommunications) mobile phone
CN103500151B (en) A kind of method and apparatus changing peripheral equipment firmware
CN103634475B (en) The method of display network title and mobile terminal on mobile terminal
CN103077066A (en) Method and system for embedding product key information during compiling
CN102915290A (en) Method, adapter and system for realizing connection of mobile terminal with HID device (human interface device)
CN103369711A (en) Communication connection establishment method and terminal device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant