CN111930396B - Upgrading method of communication module in 4G router based on notify mechanism - Google Patents

Upgrading method of communication module in 4G router based on notify mechanism Download PDF

Info

Publication number
CN111930396B
CN111930396B CN202010628914.8A CN202010628914A CN111930396B CN 111930396 B CN111930396 B CN 111930396B CN 202010628914 A CN202010628914 A CN 202010628914A CN 111930396 B CN111930396 B CN 111930396B
Authority
CN
China
Prior art keywords
client
server
upgrading
communication module
router
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
CN202010628914.8A
Other languages
Chinese (zh)
Other versions
CN111930396A (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.)
CHINA-ASEAN INFORMATION HARBOR Co.,Ltd.
Guangxi Dongxin Yilian Technology Co.,Ltd.
Original Assignee
China Asean Information Harbor Co ltd
Guangxi Dongxin Yilian 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 China Asean Information Harbor Co ltd, Guangxi Dongxin Yilian Technology Co ltd filed Critical China Asean Information Harbor Co ltd
Priority to CN202010628914.8A priority Critical patent/CN111930396B/en
Publication of CN111930396A publication Critical patent/CN111930396A/en
Application granted granted Critical
Publication of CN111930396B publication Critical patent/CN111930396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The invention discloses a method for upgrading a communication module in a 4G router based on a notify mechanism, and belongs to the technical field of data communication. The method comprises the following steps: creating a server of Inotify in a master control CPU of the router, creating a matched client of Inotify in a communication module CPU needing service upgrading, and connecting the server with the client; the client sends a registration request to the server, and the server provides a shared file mounting point for the client; when a user carries out upgrading operation, the server downloads a corresponding upgrading file from a corresponding upgrading server and sends a message to a client registered with Inotify; the client copies the upgrade file to a designated memory area through NFS technology; and after the client is upgraded successfully, the server controls the router to restart. The invention can realize the interaction of the upgrade file data between the master control CPU and the plurality of communication modules, and is convenient for upgrading the router communication modules.

Description

Upgrading method of communication module in 4G router based on notify mechanism
Technical Field
The invention belongs to the technical field of data communication, and particularly relates to a method for upgrading a communication module in a 4G router based on a notify mechanism.
Background
Currently, the 4G router and other products are in a form of a master CPU +4G communication module combination, the master CPU is a set of complete operating systems such as Linux, and the 4G communication module (having a complete CPU and a matched peripheral storage operation memory) is a set of complete systems, which are also Linux systems, and their respective upgrading modes are completed independently, that is, the master CPU can be made into a firmware package for upgrading, and the 4G communication module completes its OTA upgrading independently. The upgrade modes of the two and the corresponding servers or platforms are independent of each other. This has the following problems:
1. the steps caused by independent upgrading are not uniform, for an actual user, once a new function of the equipment is needed, the new function can be achieved only by being supported by a 4G router manufacturer and a module manufacturer, and the communication cost is high;
2. the technical requirement that a new function needs to be upgraded is high, a common user cannot finish the upgrading operation by himself, equipment needs to be sent to an equipment manufacturer or after-sales technicians to be operated on site, and the operation and maintenance cost is high for the equipment manufacturer;
3. software and hardware resources between the 4G main control CPU module and the 4G communication module cannot be shared, and once the software and hardware resources of one module are limited, independent upgrading capability cannot be realized possibly, for example, many 4G communication modules are cut according to the storage and running space of the modules due to cost, many modules do not support upgrading capability, once the modules are in commercial use, if new functions are developed, the capability of experiencing the new functions cannot be achieved through remote upgrading, the experience effect is poor for users, the effect can be achieved only by purchasing new equipment, and the cost is higher;
4. for many 4G routers, such as a router supporting multi-network switching, the internal structure of the router is a combination mode of a main control CPU and a plurality of communication modules, such upgrading is more troublesome, and the current upgrading mode is difficult to deal with such upgrading problems.
Disclosure of Invention
The invention aims to provide a notify mechanism-based method for upgrading a communication module in a 4G router, which can realize the interaction of upgrading file data between a master control CPU and a plurality of communication modules and is convenient for upgrading the communication module of the router.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a method for upgrading a communication module in a 4G router based on a notify mechanism comprises the following steps:
s1, creating a service end of Inotify in a master control CPU of the router, creating a matched client end of Inotify in a communication module CPU needing service upgrading, and connecting the service end with the client end;
s2, the client sends a registration request to the server, and the server provides a shared file mounting point to the client;
s3, when the user carries out upgrading operation, the server downloads a corresponding upgrading file from a corresponding upgrading server and sends a message to the client registered with the Inotify;
s4, copying the upgrade file to a specified memory area by the client through NFS technology;
and S5, after the client is upgraded successfully, the server controls the router to restart.
Further, in step S2, a shared output directory is created in the server, where the shared output directory is used as a monitoring object of Inotify, and a shared file mount point is created in the client.
Further, in step S3, the server downloads the upgrade file to the shared output directory, at this time, an Inotify monitoring event is triggered, and the server sends a message to the client.
Further, in step S4, when the memory in the memory area is insufficient, the upgrade file is directly burned into the flash nonvolatile rom.
Further, in step S5, the client sends a notification of successful upgrade to the server.
Further, in step S5, the client notifies the master NFS by changing the upgrade result file in the NFS shared directory.
Furthermore, the server and the client are in communication connection through a socket network.
Due to the adoption of the technical scheme, the invention has the following beneficial effects:
1. the invention realizes the sharing of software and hardware resources of the 4G router CPU control module system and the 4G communication module, and particularly can solve the problems that the hardware resources of the 4G communication module are limited and cannot be upgraded at present; the CPU control module of the 4G router or the firmware of the 4G communication module can be upgraded only through one upgrading server without being connected with a plurality of upgrading servers of a plurality of manufacturers.
2. The invention improves the real-time communication capability and data interaction capability between the 4G router main control CPU and the 4G communication module based on the cooperation of the Inotify mechanism and the NFS file system function, and the Inotify mechanism is a system-level service, so that the set of mechanism is simpler to realize, has low system consumption, and provides conditions for upgrading the function and subsequent function expansion; the scheme can support the upgrading of equipment in a combined form of the main CPU and the plurality of sub CPUs, for example, the 4G routers are in a form of the main control CPU and the plurality of communication modules, and each communication module is the combination of the plurality of sub CPUs.
Drawings
FIG. 1 is a flow chart of the architecture of the present invention;
FIG. 2 is a flow chart showing the structure of example 1 of the present invention;
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
A method for upgrading a communication module in a 4G router based on a notify mechanism comprises the following steps:
s1, creating a service end of Inotify in a master control CPU of the router, creating a matched client end of Inotify in a communication module CPU needing service upgrading, and connecting the service end with the client end;
s2, the client sends a registration request to the server, and the server provides a shared file mounting point to the client; and creating a shared output directory in the server, wherein the shared output directory is used as a monitoring object of Inotify, and a shared file mounting point is created in the client.
And S3, when the user performs upgrading operation, the server downloads the corresponding upgrading file from the corresponding upgrading server, the server downloads the upgrading file to the shared output directory, at the moment, an Inotify monitoring event is triggered, and the server sends a message to the client registered with Inotify.
And S4, copying the upgrade file to a designated memory area by the client through NFS technology, and directly burning the upgrade file into a flash nonvolatile rom when the memory of the memory area is insufficient.
And S5, after the client is upgraded successfully, the client sends a notification of successful upgrade to the server or the client notifies the main control NFS server to control the router to restart by changing the upgrade result file in the NFS shared directory. The server side is in communication connection with the client side through a socket network.
Inotify is a mechanism of a Linux system, and systems with Linux kernel version not lower than 2.6.13 generally support Inotify and are used for informing a user space program of a file system change by the kernel. The set mechanism is only used for simply monitoring files or directories, and when the corresponding monitored target file is changed, corresponding event information is triggered to be sent to the application program, so that the purpose of monitoring is achieved.
The NFS technology referred to in this document:
that is, through the network shared directory, other servers on the network can mount and access data in the shared directory. The method is characterized in that (video, picture and other static data are shared generally), the method is equivalent to a shared file in windows, and then other hosts map the shared file to be used by a local disk. The NFS in the document provides a technical basis for sharing files between the main control CPU and the communication module CPU, well realizes the upgrading mode of the communication module by combining modes such as Inotify and socket, and can support the upgrading mode of solving 4G router + a plurality of communication modules.
Taking embodiment 1 as an example, the router of the 4G EC20 communication module is shown in fig. 2:
1. work to complete initialization
Loading a network file system: mount NFS (for example, the master CPU in the 4G router/var/tmp/fwdownload/as the shared output directory, the CPU in the 4G communication module/mnt/tmp/fwdownload as the Mount point, so as to put the img _ xxx mv in the master CPU in the 4G router into the communication module CPU);
initializing Inotify: init Inotify-agent. (note: the CPU in the communication module is used as the client end of Inotify in the system, and is registered with Inotify-Server end of the main control CPU in the 4G router, and is realized through network socket)
The master control CPU in the 2.4G router applies for adding events to the kernel:
the communication module CPU in the 4G router adds a watch event for registering the Inotify-event to the Inotify Server through a socket network:
when a main control CPU in a 4G router stores wifi.img _ xxx to a/var/tmp/fwdownload/. directory, an inotify event is triggered, a kernel reminds an inotify-server end, and then the inotify-server end sends the inotify event to a communication module CPU in the 4G router serving as an Iotify-client end; and then, the communication module CPU in the 4G router analyzes and processes the event.
The communication module CPU in the 3.4G router copies wifi.img _ xxx from the main control CPU to the local by NFS technology, and if the local running memory is insufficient, the next processing such as processing can be temporarily not performed.
4. Writing the mirror image into the flash:
in the step, the communication module writes the upgrade file into the flash through the interface, and then establishes a pipeline and the like to output the processing result for subsequent work.
5. Reading the processing result (namely, information whether wifi. img is successfully written into flash) in the step 4, analyzing and processing, and then writing the processing result into the NFS file system, namely, the directory file of the main control CPU, wherein the step may be sending the result information through socket, but it is suggested that the result information is simpler through an Inotify mechanism; and then, the main control CPU reads the content of the upgrading result file, knows the specific situation of writing in the flash, executes the restarting process if the specific situation is successful, and finishes the whole process of upgrading the file.
The above description is directed to the preferred embodiments of the present invention, but the embodiments are not intended to limit the scope of the claims of the present invention, and all equivalent changes and modifications made within the technical spirit of the present invention should fall within the scope of the claims of the present invention.

Claims (5)

1. A method for upgrading a communication module in a 4G router based on a notify mechanism is characterized by comprising the following steps:
s1, creating a service end of Inotify in a master control CPU of the router, creating a matched client end of Inotify in a communication module CPU needing service upgrading, and connecting the service end with the client end;
s2, the client sends a registration request to the server, and the server provides a shared file mounting point to the client; creating a shared output directory in a server, wherein the shared output directory is used as a monitoring object of Inotify, and creating a shared file mount point in a client;
s3, when the user carries out upgrading operation, the server downloads a corresponding upgrading file from a corresponding upgrading server and sends a message to the client registered with the Inotify; the server side downloads the upgrade file to a shared output directory, at the moment, an Inotify monitoring event is triggered, and the server side sends a message to the client side;
s4, copying the upgrade file to a specified memory area by the client through NFS technology;
and S5, after the client is upgraded successfully, the server controls the router to restart.
2. The method for upgrading a communication module in a 4G router based on a notify mechanism as claimed in claim 1, wherein in step S4, when the memory of the memory area is insufficient, the upgrade file is directly burned into the flash non-volatile rom.
3. The method for upgrading a communication module in a 4G router based on a notify mechanism of claim 2, wherein in step S5, the client sends a notification of successful upgrade to the server.
4. The upgrading method for a communication module in a 4G router based on a notify mechanism of claim 2, wherein in step S5, the client notifies the master NFS by changing an upgrade result file in the NFS shared directory.
5. The upgrading method of the communication module in the 4G router based on the notify mechanism as claimed in claim 1, wherein the server and the client are in communication connection through a socket network.
CN202010628914.8A 2020-06-29 2020-06-29 Upgrading method of communication module in 4G router based on notify mechanism Active CN111930396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010628914.8A CN111930396B (en) 2020-06-29 2020-06-29 Upgrading method of communication module in 4G router based on notify mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010628914.8A CN111930396B (en) 2020-06-29 2020-06-29 Upgrading method of communication module in 4G router based on notify mechanism

Publications (2)

Publication Number Publication Date
CN111930396A CN111930396A (en) 2020-11-13
CN111930396B true CN111930396B (en) 2021-05-11

Family

ID=73317776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010628914.8A Active CN111930396B (en) 2020-06-29 2020-06-29 Upgrading method of communication module in 4G router based on notify mechanism

Country Status (1)

Country Link
CN (1) CN111930396B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988198B (en) * 2021-04-15 2023-12-08 深圳市共进电子股份有限公司 Multi-machine upgrading method and device for mesh equipment and mesh equipment
CN114640584B (en) * 2022-02-14 2023-11-24 西安广和通无线软件有限公司 Module upgrading method and system
CN115617376B (en) * 2022-11-10 2023-05-09 广州鲁邦通物联网科技股份有限公司 Upgrading method of communication module in 4G router based on inotify mechanism

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010000319A1 (en) * 2008-07-03 2010-01-07 Telefonaktiebolaget Lm Ericsson (Publ) Communicating configuration information in a communications network
CN101702708A (en) * 2009-10-30 2010-05-05 华南理工大学 Management method of media server applied to digital home
CN103581008A (en) * 2012-08-07 2014-02-12 杭州华三通信技术有限公司 Router and software upgrading method thereof
CN104158886A (en) * 2014-08-21 2014-11-19 中南大学 Flow-type performing method for applications
CN104885431A (en) * 2012-12-13 2015-09-02 华为技术有限公司 Content based traffic engineering in software defined information centric networks
CN105743933A (en) * 2014-12-08 2016-07-06 Tcl集团股份有限公司 Router module updating method and system
CN105786542A (en) * 2014-12-26 2016-07-20 乐视致新电子科技(天津)有限公司 Intelligent device and system update method of the intelligent device
CN105812435A (en) * 2014-12-30 2016-07-27 腾讯科技(深圳)有限公司 Application upgrading data package processing method and device, electronic equipment, and system
CN111262883A (en) * 2020-02-28 2020-06-09 浪潮软件股份有限公司 CMSP-based file synchronization system, synchronization method and file system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2555129B1 (en) * 2011-08-03 2019-02-06 Amadeus S.A.S. Method and system to maintain strong consistency of distributed replicated contents in a client/server system
US9171003B2 (en) * 2013-03-15 2015-10-27 Western Digital Technologies, Inc. Shared media crawler database method and system
EP3012744B1 (en) * 2014-03-19 2022-12-21 Huawei Device Co., Ltd. Method and device for synchronizing application data
US9749445B2 (en) * 2014-04-28 2017-08-29 Oracle International Corporation System and method for updating service information for across-domain messaging in a transactional middleware machine environment
CN110162377A (en) * 2018-02-14 2019-08-23 华为技术有限公司 A kind of communication means and logic processor

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010000319A1 (en) * 2008-07-03 2010-01-07 Telefonaktiebolaget Lm Ericsson (Publ) Communicating configuration information in a communications network
CN101702708A (en) * 2009-10-30 2010-05-05 华南理工大学 Management method of media server applied to digital home
CN103581008A (en) * 2012-08-07 2014-02-12 杭州华三通信技术有限公司 Router and software upgrading method thereof
CN104885431A (en) * 2012-12-13 2015-09-02 华为技术有限公司 Content based traffic engineering in software defined information centric networks
CN104158886A (en) * 2014-08-21 2014-11-19 中南大学 Flow-type performing method for applications
CN105743933A (en) * 2014-12-08 2016-07-06 Tcl集团股份有限公司 Router module updating method and system
CN105786542A (en) * 2014-12-26 2016-07-20 乐视致新电子科技(天津)有限公司 Intelligent device and system update method of the intelligent device
CN105812435A (en) * 2014-12-30 2016-07-27 腾讯科技(深圳)有限公司 Application upgrading data package processing method and device, electronic equipment, and system
CN111262883A (en) * 2020-02-28 2020-06-09 浪潮软件股份有限公司 CMSP-based file synchronization system, synchronization method and file system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"nfs共享存储+实时同步(结合rsync+inotify)";元气少女郭德纲!!;《https://www.cnblogs.com/tcy1/p/12852099.html》;20200508;第1-7页 *
"Rsync + inotify for data synchronization and FAQs";User;《https://topic.alibabacloud.com/a/font-colorredrsyncfont--inotify-for-data-synchronization-and-faqs_1_16_32858758.html》;20160810;第1-6页 *
"基于Rsync算法的远程文件同步系统的设计与实现";李贞;《万方数据知识服务平台》;20101222;第二章、第三章 *

Also Published As

Publication number Publication date
CN111930396A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111930396B (en) Upgrading method of communication module in 4G router based on notify mechanism
CN101571809B (en) Implementation method of plug-in registration and device thereof
CN105765526A (en) Bootstrapping from a remote disk image via a network
US20070245134A1 (en) Testing device and testing method for computer
CN109840096B (en) Installation method and device of operating system
US20050160150A1 (en) Apparatus and method for managing and transporting virtual disks over a network to networked stations
US20090210871A1 (en) System and method for software application migration
CN109587331B (en) Method and system for automatically repairing cloud mobile phone fault
CN110908753B (en) Intelligent fusion cloud desktop server, client and system
JP2017513098A (en) Broadcast management information using fountain codes
CN111352700A (en) Method, system, terminal and storage medium for online migration of virtual machine across clouds
CN106547645B (en) Method for automatically restoring image file and server system
CN112948008B (en) Method for managing physical bare machine based on Ironic
CN112764830B (en) Data migration method and system applied to localization substitution
CN116521209B (en) Upgrading method and device of operating system, storage medium and electronic equipment
CN112199099A (en) Application updating method, device, server and storage medium
CN113934437B (en) Method and system for installing application on cloud mobile phone and client cloud mobile phone
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
CN113422791B (en) Cloud service configuration method and device, electronic equipment and computer readable storage medium
CN106681771B (en) System reinstallation method and device
CN112363737A (en) System installation method and related device
CN113900765A (en) Cloud application starting method, equipment, terminal and computer readable storage medium
CN110830550A (en) Computer cluster and diskless starting method thereof
CN113254051B (en) Multi-terminal point-to-point pushing method
CN113407220B (en) Updating method and device for mirror image pushing local terminal

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201222

Address after: No.18 Pingle Avenue, Liangqing District, Nanning City, Guangxi Zhuang Autonomous Region, 530200

Applicant after: Guangxi Dongxin Yilian Technology Co.,Ltd.

Applicant after: CHINA-ASEAN INFORMATION HARBOR Co.,Ltd.

Address before: No.18 Pingle Avenue, Liangqing District, Nanning City, Guangxi Zhuang Autonomous Region

Applicant before: Guangxi Dongxin Yilian Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant