CN111930396A - 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 PDFInfo
- Publication number
- CN111930396A CN111930396A CN202010628914.8A CN202010628914A CN111930396A CN 111930396 A CN111930396 A CN 111930396A CN 202010628914 A CN202010628914 A CN 202010628914A CN 111930396 A CN111930396 A CN 111930396A
- Authority
- CN
- China
- Prior art keywords
- client
- upgrading
- server
- 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.)
- Granted
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
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 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
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 (7)
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;
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.
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 S2, a shared output directory is created in the server, the shared output directory is used as a monitoring object of Inotify, and a shared file mount point is created in the client.
3. The method for upgrading a communication module in a 4G router based on a notify mechanism as claimed in claim 2, wherein in step S3, the server downloads the upgrade file to the shared output directory, and at this time, triggers an notify monitoring event, and the server sends a message to the client.
4. The method for upgrading a communication module in a 4G router based on a notify mechanism as claimed in claim 3, 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.
5. The method for upgrading a communication module in a 4G router based on a notify mechanism of claim 4, wherein in the step S5, the client sends a notification of successful upgrade to the server.
6. The upgrading method for a communication module in a 4G router based on a notify mechanism of claim 4, wherein in the step S5, the client notifies the master NFS by changing an upgrade result file in the NFS shared directory.
7. The upgrading method of the communication module in the 4G router based on the notify mechanism as claimed in claim 2, wherein the server and the client are in communication connection through a socket network.
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 true CN111930396A (en) | 2020-11-13 |
CN111930396B 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) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112988198A (en) * | 2021-04-15 | 2021-06-18 | 深圳市共进电子股份有限公司 | mesh equipment multi-machine upgrading method and device and mesh equipment |
CN115617376A (en) * | 2022-11-10 | 2023-01-17 | 广州鲁邦通物联网科技股份有限公司 | Method for upgrading communication module in 4G router based on inotify mechanism |
WO2023151372A1 (en) * | 2022-02-14 | 2023-08-17 | 西安广和通无线软件有限公司 | Module upgrade method and system |
CN117768370A (en) * | 2024-02-22 | 2024-03-26 | 深圳市通恒伟创科技有限公司 | Upgrading method of communication module in 4G router |
Citations (14)
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 |
CN103858122A (en) * | 2011-08-03 | 2014-06-11 | 艾玛迪斯简易股份公司 | Method and system to maintain strong consistency of distributed replicated contents in a client/server system |
US20140280010A1 (en) * | 2013-03-15 | 2014-09-18 | Western Digital Technologies, Inc. | Shared media crawler database method and system |
CN104158886A (en) * | 2014-08-21 | 2014-11-19 | 中南大学 | Flow-type performing method for applications |
CN104885055A (en) * | 2014-03-19 | 2015-09-02 | 华为终端有限公司 | Method and device for application data synchronization |
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 |
CN106663033A (en) * | 2014-04-28 | 2017-05-10 | 甲骨文国际公司 | System and method for supporting bypass-domain model and proxy model and updating service information for across-domain messaging in transactional middleware machine environment |
CN110162377A (en) * | 2018-02-14 | 2019-08-23 | 华为技术有限公司 | A kind of communication means and logic processor |
CN111262883A (en) * | 2020-02-28 | 2020-06-09 | 浪潮软件股份有限公司 | CMSP-based file synchronization system, synchronization method and file system |
-
2020
- 2020-06-29 CN CN202010628914.8A patent/CN111930396B/en active Active
Patent Citations (14)
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 |
CN103858122A (en) * | 2011-08-03 | 2014-06-11 | 艾玛迪斯简易股份公司 | Method and system to maintain strong consistency of distributed replicated contents in a client/server system |
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 |
US20140280010A1 (en) * | 2013-03-15 | 2014-09-18 | Western Digital Technologies, Inc. | Shared media crawler database method and system |
CN104885055A (en) * | 2014-03-19 | 2015-09-02 | 华为终端有限公司 | Method and device for application data synchronization |
CN106663033A (en) * | 2014-04-28 | 2017-05-10 | 甲骨文国际公司 | System and method for supporting bypass-domain model and proxy model and updating service information for across-domain messaging in transactional middleware machine environment |
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 |
CN110162377A (en) * | 2018-02-14 | 2019-08-23 | 华为技术有限公司 | A kind of communication means and logic processor |
CN111262883A (en) * | 2020-02-28 | 2020-06-09 | 浪潮软件股份有限公司 | CMSP-based file synchronization system, synchronization method and file system |
Non-Patent Citations (3)
Title |
---|
USER: ""Rsync + inotify for data synchronization and FAQs"", 《HTTPS://TOPIC.ALIBABACLOUD.COM/A/FONT-COLORREDRSYNCFONT--INOTIFY-FOR-DATA-SYNCHRONIZATION-AND-FAQS_1_16_32858758.HTML》 * |
元气少女郭德纲!!: ""nfs共享存储+实时同步(结合rsync+inotify)"", 《HTTPS://WWW.CNBLOGS.COM/TCY1/P/12852099.HTML》 * |
李贞: ""基于Rsync算法的远程文件同步系统的设计与实现"", 《万方数据知识服务平台》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112988198A (en) * | 2021-04-15 | 2021-06-18 | 深圳市共进电子股份有限公司 | mesh equipment multi-machine upgrading method and device and mesh equipment |
CN112988198B (en) * | 2021-04-15 | 2023-12-08 | 深圳市共进电子股份有限公司 | Multi-machine upgrading method and device for mesh equipment and mesh equipment |
WO2023151372A1 (en) * | 2022-02-14 | 2023-08-17 | 西安广和通无线软件有限公司 | Module upgrade method and system |
CN115617376A (en) * | 2022-11-10 | 2023-01-17 | 广州鲁邦通物联网科技股份有限公司 | Method for upgrading communication module in 4G router based on inotify mechanism |
CN115617376B (en) * | 2022-11-10 | 2023-05-09 | 广州鲁邦通物联网科技股份有限公司 | Upgrading method of communication module in 4G router based on inotify mechanism |
CN117768370A (en) * | 2024-02-22 | 2024-03-26 | 深圳市通恒伟创科技有限公司 | Upgrading method of communication module in 4G router |
CN117768370B (en) * | 2024-02-22 | 2024-04-26 | 深圳市通恒伟创科技有限公司 | Upgrading method of communication module in 4G router |
Also Published As
Publication number | Publication date |
---|---|
CN111930396B (en) | 2021-05-11 |
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 | |
CN110908753B (en) | Intelligent fusion cloud desktop server, client and system | |
CN108958742A (en) | A kind of method of batch installing operating system, relevant device and system | |
CN109840096B (en) | Installation method and device of operating system | |
CN109587331B (en) | Method and system for automatically repairing cloud mobile phone fault | |
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 | |
CN111352700A (en) | Method, system, terminal and storage medium for online migration of virtual machine across clouds | |
CN105981332A (en) | Broadcasting management information using fountain codes | |
CN112948008B (en) | Method for managing physical bare machine based on Ironic | |
CN112764830B (en) | Data migration method and system applied to localization substitution | |
WO2024099274A1 (en) | Data processing method, device, and storage medium | |
CN116483468B (en) | Operating system installation method and device, computer equipment and storage medium | |
CN117155948A (en) | Cluster management method and device, electronic equipment and storage medium | |
CN115629777B (en) | BMC heterogeneous upgrading method, system, equipment and readable storage medium | |
US20150212866A1 (en) | Management system for service of multiple operating environments, and methods thereof | |
CN117193936A (en) | Virtual machine management method, device and equipment under super fusion architecture | |
CN113934437B (en) | Method and system for installing application on cloud mobile phone and client cloud mobile phone | |
CN112363737B (en) | System installation method and related device | |
CN106681771B (en) | System reinstallation method and device | |
CN113254051B (en) | Multi-terminal point-to-point pushing method | |
CN113900765A (en) | Cloud application starting method, equipment, terminal and computer readable storage medium | |
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 |
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. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |