CN110647342A - Gateway upgrading method and system based on USB - Google Patents
Gateway upgrading method and system based on USB Download PDFInfo
- Publication number
- CN110647342A CN110647342A CN201910906076.3A CN201910906076A CN110647342A CN 110647342 A CN110647342 A CN 110647342A CN 201910906076 A CN201910906076 A CN 201910906076A CN 110647342 A CN110647342 A CN 110647342A
- Authority
- CN
- China
- Prior art keywords
- usb
- upgrading
- upgrade
- file
- storage device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Abstract
The invention discloses a gateway upgrading method and a system based on USB, comprising the following steps: s1: the terminal software automatically pulls up the USB upgrading monitoring process and detects USB interface events; s2: the upgrading process is matched with the file with the specific name, and whether a directory for storing the upgrading exists is judged; s3: the upgrading process checks the suffix format of the file in the USB storage device and judges whether the USB storage device has the upgraded file or not; s4: judging whether a version number field in an upgrade file name of the USB storage device is the same as the current terminal software version number; s5: the invention provides a convenient local upgrading mode by carrying out cyclic redundancy check or MD5 check on the upgrading file loaded into the terminal memory, and only small-sized USB storage equipment which is convenient to carry is used for completing the upgrading of the terminal.
Description
Technical Field
The invention relates to the field of terminal upgrading, in particular to a gateway upgrading method and system based on a USB.
Background
With the development of broadband network construction, the use of gateway products is more and more popular, and the corresponding maintenance requirements are more and more. Local upgrading is the most common maintenance means, and generally a computer needs to be connected, and a browser logs in a gateway web page to load an upgrading file for upgrading. However, for some scenes where it is inconvenient to carry the computer, such as outdoor high-place distribution boxes or indoor narrow drop boxes, it is not very convenient to connect the computer for upgrading. Considering that most gateway products integrate the USB interface at present, the traditional upgrading method is not very convenient and the cost is high, and the software upgrading can not be completed by using the USB storage tool such as a USB disk, a mobile hard disk, and the like.
Disclosure of Invention
The invention aims to provide a gateway upgrading method and system based on USB aiming at the problems, provides a convenient local upgrading mode, and only uses portable small-sized USB storage equipment to complete the upgrading of a terminal.
The gateway upgrading method based on the USB comprises the following steps:
s1: the terminal software automatically pulls up the USB upgrading monitoring process and detects USB interface events;
s2: the upgrading process is matched with the file with the specific name, and whether a directory for storing the upgrading exists is judged;
s3: the upgrading process checks the suffix format of the file in the USB storage device and judges whether the USB storage device has the upgraded file or not;
s4: judging whether a version number field in an upgrade file name of the USB storage device is the same as the current terminal software version number;
s5: and performing cyclic redundancy check or MD5 check on the upgrade file loaded into the terminal memory.
Further, the S1 includes the following steps:
establishing a file directory with a specific name in a root directory of the USB storage device, and placing an upgrade file in the directory;
the USB storage equipment is accessed to a USB interface of a running terminal to be upgraded;
detecting a USB interface event by a terminal software upgrading monitoring process;
the upgrade process traverses the USB storage device directory, trying to match a specific name character.
Further, the S2 includes:
if the specific name file directory does not exist in the USB storage equipment, the upgrading process is ended, and the USB equipment is only used as normal storage;
if the specific name file directory exists in the USB storage device, the process proceeds to step S3.
Further, the S4 includes:
if the version number field in the extracted upgrade file name is the same as the current terminal software version number, the upgrade process is ended, and the USB equipment is only used as normal storage;
and if the version number field in the extracted upgrade file name is different from the current terminal software version number, loading the upgrade file into the terminal memory.
Further, the step S5 includes:
if the upgrade file passes the cyclic redundancy check or the MD5 check, the upgrade software is written into the flash, and the success of the upgrade is indicated by the photoelectricity provided by the terminal indicator light;
if the upgrade file does not pass the cyclic redundancy check or the MD5 check, the upgrade flow is stopped, the USB device is only used as normal storage, and the terminal indicator lamp table provides photoelectric indication for upgrade failure.
The gateway upgrading system based on the USB comprises:
a monitoring module: monitoring a USB interface event;
a detection module: detecting whether a directory for storing the upgrade exists in the USB storage equipment;
a searching module: searching a version number field in an upgrade file name of the USB storage device;
a checking module: performing cyclic redundancy check or MD5 check on the upgrade file;
an upgrading module: and writing the upgrading software into the upgrading terminal.
The invention has the beneficial effects that: the invention provides a convenient local upgrading mode, only small-size USB storage equipment which is convenient to carry is used for completing the upgrading of the terminal, a computer and a network cable are not needed to be additionally used, only the portable USB storage equipment is needed, and the maintenance cost is saved; the upgrading mode is simpler and more convenient, and plug-and-play to provide photoelectric indication, the personnel who do not know operation technique can both use, reduced and maintained the threshold.
Drawings
FIG. 1 is a flow chart of a USB based gateway upgrade method;
FIG. 2 is a schematic diagram of a USB memory device connected to a terminal;
fig. 3 is a schematic diagram of a USB based gateway upgrade system.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the invention, specific embodiments thereof will now be described with reference to the accompanying drawings.
In this embodiment, as shown in fig. 1, a gateway upgrading method based on USB includes the following steps:
s1: the terminal software automatically pulls up the USB upgrading monitoring process and detects USB interface events;
s2: the upgrading process is matched with the file with the specific name, and whether a directory for storing the upgrading exists is judged;
s3: the upgrading process checks the suffix format of the file in the USB storage device and judges whether the USB storage device has the upgraded file or not;
s4: judging whether a version number field in an upgrade file name of the USB storage device is the same as the current terminal software version number;
s5: and performing cyclic redundancy check or MD5 check on the upgrade file loaded into the terminal memory.
Further, the S1 includes the following steps:
establishing a file directory with a specific name in a root directory of the USB storage device, and placing an upgrade file in the directory;
the USB storage equipment is accessed to a USB interface of a running terminal to be upgraded;
detecting a USB interface event by a terminal software upgrading monitoring process;
the upgrade process traverses the USB storage device directory, trying to match a specific name character.
Further, the S2 includes:
if the specific name file directory does not exist in the USB storage equipment, the upgrading process is ended, and the USB equipment is only used as normal storage;
if the specific name file directory exists in the USB storage device, the process proceeds to step S3.
Further, the S4 includes:
if the version number field in the extracted upgrade file name is the same as the current terminal software version number, the upgrade process is ended, and the USB equipment is only used as normal storage;
and if the version number field in the extracted upgrade file name is different from the current terminal software version number, loading the upgrade file into the terminal memory.
Further, the step S5 includes:
if the upgrade file passes the cyclic redundancy check or the MD5 check, the upgrade software is written into the flash, and the success of the upgrade is indicated by the photoelectricity provided by the terminal indicator light;
if the upgrade file does not pass the cyclic redundancy check or the MD5 check, the upgrade flow is stopped, the USB device is only used as normal storage, and the terminal indicator lamp table provides photoelectric indication for upgrade failure.
As shown in fig. 2, most gateway terminals integrate a USB interface and can read and write an accessed USB storage device. Based on the characteristic, an upgrading program can be integrated in gateway software, and the software upgrading program can directly operate a USB storage device connected with a terminal, wherein the USB storage device comprises but is not limited to a U disk, a mobile hard disk and a storage device with a USB interface.
As shown in fig. 3, the USB based gateway upgrade system includes: a monitoring module: monitoring a USB interface event; a detection module: detecting whether a directory for storing the upgrade exists in the USB storage equipment; a searching module: searching a version number field in an upgrade file name of the USB storage device; a checking module: performing cyclic redundancy check or MD5 check on the upgrade file; an upgrading module: and writing the upgrading software into the upgrading terminal.
The foregoing shows and describes the general principles and features of the invention, together with the advantages thereof. It will be understood by those skilled in the art that the invention is not limited to the embodiments described above, which are given by way of illustration of the principles of the invention, but that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (6)
1. The gateway upgrading method based on the USB is characterized by comprising the following steps:
s1: the terminal software automatically pulls up the USB upgrading monitoring process and detects USB interface events;
s2: the upgrading process is matched with the file with the specific name, and whether a directory for storing the upgrading exists is judged;
s3: the upgrading process checks the suffix format of the file in the USB storage device and judges whether the USB storage device has the upgraded file or not;
s4: judging whether a version number field in an upgrade file name of the USB storage device is the same as the current terminal software version number;
s5: and performing cyclic redundancy check or MD5 check on the upgrade file loaded into the terminal memory.
2. The USB based gateway upgrade method according to claim 1, wherein said S1 comprises the following steps:
establishing a file directory with a specific name in a root directory of the USB storage device, and placing an upgrade file in the directory;
the USB storage equipment is accessed to a USB interface of a running terminal to be upgraded;
detecting a USB interface event by a terminal software upgrading monitoring process;
the upgrade process traverses the USB storage device directory, trying to match a specific name character.
3. The USB-based gateway upgrade method according to claim 1, wherein said S2 comprises:
if the specific name file directory does not exist in the USB storage equipment, the upgrading process is ended, and the USB equipment is only used as normal storage;
if the specific name file directory exists in the USB storage device, the process proceeds to step S3.
4. The USB-based gateway upgrade method according to claim 1, wherein said S4 comprises:
if the version number field in the extracted upgrade file name is the same as the current terminal software version number, the upgrade process is ended, and the USB equipment is only used as normal storage;
and if the version number field in the extracted upgrade file name is different from the current terminal software version number, loading the upgrade file into the terminal memory.
5. The USB-based gateway upgrade method according to claim 1, wherein said step S5 comprises:
if the upgrade file passes the cyclic redundancy check or the MD5 check, the upgrade software is written into the flash, and the success of the upgrade is indicated by the photoelectricity provided by the terminal indicator light;
if the upgrade file does not pass the cyclic redundancy check or the MD5 check, the upgrade flow is stopped, the USB device is only used as normal storage, and the terminal indicator lamp table provides photoelectric indication for upgrade failure.
6. The USB based gateway upgrade system according to any of claims 1-5, comprising:
a monitoring module: monitoring a USB interface event;
a detection module: detecting whether a directory for storing the upgrade exists in the USB storage equipment;
a searching module: searching a version number field in an upgrade file name of the USB storage device;
a checking module: performing cyclic redundancy check or MD5 check on the upgrade file;
an upgrading module: and writing the upgrading software into the upgrading terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910906076.3A CN110647342A (en) | 2019-09-24 | 2019-09-24 | Gateway upgrading method and system based on USB |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910906076.3A CN110647342A (en) | 2019-09-24 | 2019-09-24 | Gateway upgrading method and system based on USB |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110647342A true CN110647342A (en) | 2020-01-03 |
Family
ID=68992480
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910906076.3A Pending CN110647342A (en) | 2019-09-24 | 2019-09-24 | Gateway upgrading method and system based on USB |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110647342A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111581027A (en) * | 2020-05-11 | 2020-08-25 | 珠海迈科智能科技股份有限公司 | Method for forcibly updating system by using USB flash disk |
CN115242633A (en) * | 2022-06-23 | 2022-10-25 | 惠州华阳通用电子有限公司 | Vehicle-mounted equipment upgrading method and device based on USB Ethernet |
CN115334358A (en) * | 2022-08-18 | 2022-11-11 | 武汉烽火技术服务有限公司 | Automatic software modification method for convergence gateway and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101163313A (en) * | 2007-11-27 | 2008-04-16 | 华为技术有限公司 | Method and equipment for updating automatically near-end software |
US20080134165A1 (en) * | 2006-12-01 | 2008-06-05 | Lori Anderson | Methods and apparatus for software provisioning of a network device |
CN102436386A (en) * | 2011-11-21 | 2012-05-02 | 北京赛科世纪数码科技有限公司 | Software upgrading method |
-
2019
- 2019-09-24 CN CN201910906076.3A patent/CN110647342A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080134165A1 (en) * | 2006-12-01 | 2008-06-05 | Lori Anderson | Methods and apparatus for software provisioning of a network device |
CN101163313A (en) * | 2007-11-27 | 2008-04-16 | 华为技术有限公司 | Method and equipment for updating automatically near-end software |
CN102436386A (en) * | 2011-11-21 | 2012-05-02 | 北京赛科世纪数码科技有限公司 | Software upgrading method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111581027A (en) * | 2020-05-11 | 2020-08-25 | 珠海迈科智能科技股份有限公司 | Method for forcibly updating system by using USB flash disk |
CN115242633A (en) * | 2022-06-23 | 2022-10-25 | 惠州华阳通用电子有限公司 | Vehicle-mounted equipment upgrading method and device based on USB Ethernet |
CN115242633B (en) * | 2022-06-23 | 2024-04-09 | 惠州华阳通用电子有限公司 | Vehicle-mounted equipment upgrading method and device based on USB Ethernet |
CN115334358A (en) * | 2022-08-18 | 2022-11-11 | 武汉烽火技术服务有限公司 | Automatic software modification method for convergence gateway and storage medium |
CN115334358B (en) * | 2022-08-18 | 2023-08-22 | 烽火通信科技股份有限公司 | Fusion gateway automation software remanufacturing method and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102736978B (en) | A kind of method and device detecting the installment state of application program | |
CN110647342A (en) | Gateway upgrading method and system based on USB | |
US7743292B2 (en) | Apparatus and method for memory card testing | |
CN104166561B (en) | Electronic apparatus system starts method and electronic equipment | |
CN103150231A (en) | Computer booting method and computer system | |
CN102662701A (en) | Online CPLD (Complex Programmable Logic Devices) upgrading method, device and business veneer | |
CN104063305A (en) | Pressure testing method, device and system for intelligent terminal software | |
US20110035179A1 (en) | System and method for testing electronic device | |
CN101163050A (en) | Equipment near-end maintenance method, system and equipment | |
US20060195833A1 (en) | Data-burning method and system thereof based on auto-detection of computer platform | |
CN103593281A (en) | Test system and test method | |
CN1996262A (en) | Mainboard testing program processing system and method therefor | |
CN103777971A (en) | Electronic device, method for updating firmware, and recording medium capable of being read by computer | |
CN105022949A (en) | Handheld device for evidence fixing of Android phones and fixing method | |
CN103678053A (en) | Computer self-check method and system | |
CN107798064A (en) | Page processing method, electronic equipment and computer-readable recording medium | |
CN113384896A (en) | Unity-based resource packaging method, device, equipment and medium | |
CN104484211A (en) | Method and device for sharing mirror image document | |
CN115422091B (en) | Firmware debugging method and device, electronic equipment and storage medium | |
CN104063306A (en) | Automatic login method, device and system in intelligent terminal software testing | |
CN109144586A (en) | A kind of driving adaptation method, device, computer equipment and storage medium | |
US8984176B2 (en) | SATA/eSATA port configuration | |
CN104636228A (en) | Electronic device convenient to test and testing method | |
CN106897045B (en) | Audio frequency playing method, device and computer equipment | |
CN112667545A (en) | Server asset information query management method |
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: 20200103 |