A method and device for automatically updating multiple 4G modules of a terminal

By using the update package and HTTP protocol provided by the network management server on the terminal, the 4G module is automatically identified and updated, which solves the problem of low update efficiency of the 4G module in the existing technology, achieves fast and efficient module identification and update, and significantly improves improve production efficiency.

CN111708556BActive Publication Date: 2024-08-30GUANGZHOU LANGO ELECTRONICS TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202010456147.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-26
Publication Date
2024-08-30
Estimated Expiration
2040-05-26

AI Technical Summary

Technical Problem

Existing terminals have low efficiency in identifying and loading newly accessed 4G modules, which requires updating system firmware, resulting in low delivery efficiency and affecting rapid integration and deployment.

Method used

Access the 4G module through the USB interface, use the update package provided by the network management server, download and perform CRC-32 cyclic redundancy check based on the HTTP protocol, automatically identify and update the module, support breakpoint resume and real-time network status judgment, simplify Update process.

Benefits of technology

It achieves efficient automatic identification and update of 4G modules, reduces update time, supports the entire product life cycle, and downloads in less than 30 seconds, significantly improving production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111708556B
    Figure CN111708556B
Patent Text Reader

Abstract

The present invention discloses a method and device for automatically updating multiple 4G modules of a terminal, wherein the method comprises: after the terminal accesses the 4G module based on a USB interface, the terminal obtains the update package of the 4G module issued by a network management server; downloads the update package of the 4G module on the network management server based on the HTTP protocol; verifies the update package on the terminal based on the CRC‑32 cyclic redundancy check algorithm; after the verification passes, installs and deploys the update file of the 4G module based on the update package; and automatically identifies and updates the 4G module based on the installed and deployed update file. In an embodiment of the present invention, automatic identification and updating of the 4G module is realized, and the identification and updating efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of update identification of newly connected hardware of a terminal, and in particular to a method and device for automatically updating multiple 4G modules of a terminal. Background Art

[0002] The existing terminals' identification and loading methods for newly connected 4G modules are based on program solidification methods and can only support a single module. To select different 4G modules, the system firmware needs to be updated. Assuming a 2-minute flashing time for one terminal, 10,000 terminals will need 20,000 minutes of time cost. The disadvantage of this method is its low delivery efficiency, which has a great impact on the standard media terminal platform, which first produces standard terminal components and then selects 4G modules according to customer needs, as well as the rapid integration of production and deployment progress. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies of the prior art. The present invention provides a method and device for automatically updating multiple 4G modules of a terminal, which realize automatic identification and updating of 4G modules with high identification and updating efficiency.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for automatically updating multiple 4G modules of a terminal, wherein the method comprises:

[0005] After the terminal accesses the 4G module based on the USB interface, the terminal obtains an update package of the 4G module issued by the network management server;

[0006] Downloading the update package of the 4G module on the network management server based on the HTTP protocol;

[0007] Verifying the update package on the terminal based on a CRC-32 cyclic redundancy check algorithm;

[0008] After the verification is passed, installing and deploying the update file on the 4G module based on the update package;

[0009] The 4G module is automatically identified and updated based on the update file installed and deployed.

[0010] Optionally, the update package is a compressed file and includes 4GUpgrade, a version number and a CRC check code;

[0011] Calculate the update package based on the CRC-32 cyclic redundancy check algorithm to obtain the CRC check code, and concatenate it after the update package name;

[0012] The 4GUpgrade includes an update configuration file, which includes a 4G module model, VID, PID, SO library file, and other information.

[0013] Optionally, downloading the update package of the 4G module on the network management server based on the HTTP protocol includes:

[0014] When the terminal downloads the update package of the 4G module on the gateway management server based on the HTTP protocol, the terminal determines the current network status in real time,

[0015] When the current network status deteriorates, the terminal suspends downloading the update package of the 4G module;

[0016] When the current network status improves, the terminal initiates an HTTP breakpoint resume request to continue downloading the update package of the 4G module until the download is completed.

[0017] Optionally, the process of downloading the update package of the 4G module on the network management server based on the HTTP protocol further includes:

[0018] At each preset time interval, the terminal reports the download status of the update package of the 4G module to the network management server.

[0019] Optionally, the installing and deploying the update file for the 4G module based on the update package includes:

[0020] Decompressing the update package, presetting a corresponding directory in the decompressed update package to a first corresponding partition of the running system on the terminal, and presetting an update configuration file of the decompressed update package to a second corresponding partition of the running system on the terminal;

[0021] Parsing the update configuration file, and writing the 4G module information obtained in the update configuration file into a corresponding file;

[0022] The files in the etc directory in the update package are decompressed and stored in the / system / etc / directory under the running system of the terminal to complete the installation and deployment of the update files.

[0023] Optionally, writing the 4G module information obtained in the update configuration file into a corresponding file further includes:

[0024] The 4G module information is written in a separate line in the corresponding file, and the written information includes VID, PID and portMask.

[0025] Optionally, after completing the installation and deployment of the update file, the process further includes:

[0026] The terminal reports to the network management server the completion of the installation and deployment of the update file based on the HTTP message.

[0027] Optionally, the automatically identifying and updating the 4G module based on the installed and deployed update file includes:

[0028] The operating system of the terminal loads the port of the 4G module based on the corresponding driver information, and reads the written information in the corresponding file based on the corresponding driver information to automatically identify and update.

[0029] Optionally, the reading of written information in a corresponding file based on corresponding driver information to automatically identify and update includes:

[0030] Triggering a preset event based on the corresponding driving information, and reading the information written in the corresponding file based on the preset event;

[0031] The operating system of the terminal obtains device information in the 4G module based on a preset event, and indexes a corresponding configuration file based on the device information;

[0032] Determine whether the configuration information of the 4G module in the corresponding configuration file is consistent with the current configuration file in the terminal system;

[0033] When it is determined to be inconsistent, the driver of the 4G module is reloaded and automatically identified and updated.

[0034] In addition, an embodiment of the present invention further provides a device for automatically updating multiple 4G modules of a terminal, the device comprising:

[0035] Update package acquisition module: used for obtaining the update package of the 4G module issued by the network management server after the terminal accesses the 4G module based on the USB interface;

[0036] Update package download module: used to download the update package of the 4G module on the network management server based on the HTTP protocol;

[0037] Update package verification module: used for verifying the update package on the terminal based on the CRC-32 cyclic redundancy check algorithm;

[0038] Installation and deployment module: used to install and deploy update files for the 4G module based on the update package after verification;

[0039] Automatic identification and update module: used for automatically identifying and updating the 4G module based on the update file installed and deployed.

[0040] In the embodiment of the present invention, automatic identification and update are realized, and the deployment and update method is simple. It only needs to modify the update package according to the rules. The network is automatically updated, and there is no need to re-make the system firmware according to different CPU platforms. In addition, the identification and update efficiency is high, and the full life cycle of the product is supported. With an average of 200KB for all configurations and files of a 4G module and 2000KB for 10 4G module update packages, and a factory-produced wired LAN environment with a bandwidth of 100M, the download time is theoretically less than 1 second. Considering the server performance and batch upgrades, the update time for each terminal is less than 30 seconds, which is much faster than the system firmware update. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 4 is a flow chart of a method for automatically updating multiple 4G modules of a terminal in an embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of the structural composition of a multi-4G module automatic update device of a terminal in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] Example

[0046] The method for realizing automatic update of multiple 4G modules of a terminal involves a network management server, a terminal and a 4G module accessed to the terminal; the update package is published on the network management server, and after a 4G module is connected to the terminal through a USB interface, the terminal accesses the network management server through the HTTP protocol to find out whether there is an update package related to the 4G module and downloads it for corresponding identification and update.

[0047] The name of the update package includes 4gUpgrade, version and CRC check code, and it is a ZIP compressed file. The specific file name is: 4gUpgrade_Version V1.0_CRC check code.zip; data transmission between the network management server and the terminal supports breakpoint resumption.

[0048] See also Figure 1 , Figure 1 It is a flowchart of a method for automatically updating multiple 4G modules of a terminal in an embodiment of the present invention.

[0049] like Figure 1 As shown, a method for automatically updating multiple 4G modules of a terminal, the method comprising:

[0050] S11: After the terminal accesses the 4G module based on the USB interface, the terminal obtains an update package of the 4G module issued by the network management server;

[0051] In the specific implementation process of the present invention, the update package is a compressed file and includes 4GUpgrade, a version number and a CRC check code; the update package is calculated based on the CRC-32 cyclic redundancy check algorithm to obtain the CRC check code, and the CRC check code is spliced ​​after the update package name; the 4GUpgrade includes an update configuration file, and the update configuration file includes a 4G module model, VID, PID, SO library file and other information.

[0052] Specifically, the name of the update package includes 4gUpgrade, version and CRC check code, and is a ZIP compressed file. The specific file name is: 4gUpgrade_Version V1.0_CRC check code.zip.

[0053] The CRC check code is generated by using the CRC-32 cyclic redundancy check algorithm to calculate the zip update package. The CRC check code is spliced ​​after the update package name, that is, the "_CRC check code" part; the CRC check code is used by the terminal to check the integrity and security of the received update package to prevent the update package from being maliciously tampered with.

[0054] The content of the 4gUpgrade part in the update package involves updating the configuration file, which includes: 4G module model, VID, PID, SO library file name, and other information; taking the Android system as an example, the update configuration file is |--config.json configuration file; |--lib 4G module so library file; |---libxxx1.so; |---libxxx2.so; |---libxxxN.so; |--etc; |--init.gprs-ppp0; |--init.gprs-pppN; |--config.json configuration file, which is used to record the 4G module model, VID, PID, SO library file name, and other information.

[0055] After the corresponding 4G module is connected to the USB interface of the terminal, the terminal can access the update package of the 4G module published in the network management server according to the corresponding network connection, which can be a local area network connection or an Internet connection. The terminal can obtain the update package of the 4G module published in the network management server.

[0056] S12: Downloading the update package of the 4G module on the network management server based on the HTTP protocol;

[0057] In the specific implementation process of the present invention, the update package of the 4G module is downloaded on the network management server based on the HTTP protocol, including: when the terminal downloads the update package of the 4G module on the gateway management server based on the HTTP protocol, the terminal judges the current network status in real time, and when the current network status deteriorates, the terminal suspends downloading the update package of the 4G module; when the current network status improves, the terminal initiates an HTTP breakpoint resume request and continues to download the update package of the 4G module until the download is completed.

[0058] Furthermore, the process of downloading the update package of the 4G module on the network management server based on the HTTP protocol also includes: at each preset time interval, the terminal reports the download status of the update package of the 4G module to the network management server.

[0059] Specifically, the terminal and the network management server support breakpoint resumption. When the terminal downloads the update package of the 4G module on the gateway management server according to the HTTP protocol, the terminal will monitor the network status during downloading in real time. When the network status is poor, the terminal will suspend downloading the update package of the 4G module. When the current network status improves, the terminal will re-initiate the HTTP breakpoint resumption request and continue downloading the update package of the 4G module until the download is completed. During the process of downloading the update package of the 4G module, the terminal will report the download status of the update package of the 4G module to the network management server at each preset time interval.

[0060] Specifically, the preset time interval can be every 10 seconds, which can be set according to user needs. The download status of the update package of the 4G module is reported to the network management server. The download status of the update package of the 4G module can be reported to the network management server through {msgid=1, content=”MAC address: 00-25-B3-CD-23-00” download progress: 10}.

[0061] S13: verifying the update package on the terminal based on a CRC-32 cyclic redundancy check algorithm;

[0062] In the specific implementation process of the present invention, after the update package is downloaded, it needs to be verified. In this embodiment, the CRC-32 cyclic redundancy check algorithm is used to verify the update package. After the verification passes, the next step can be performed. The CRC-32 cyclic redundancy check algorithm can be used to ensure that the update package is not tampered with, thereby ensuring file security.

[0063] S14: After the verification is passed, installing and deploying the update file on the 4G module based on the update package;

[0064] In the specific implementation process of the present invention, the installation and deployment of the update file for the 4G module based on the update package includes: decompressing the update package, presetting the corresponding directory in the decompressed update package to the first corresponding partition of the running system on the terminal, and presetting the update configuration file of the decompressed update package to the second corresponding partition of the running system on the terminal; parsing the update configuration file, and writing the 4G module information obtained in the update configuration file into the corresponding file; decompressing the files under the etc directory in the update package, and storing them in the / system / etc / directory under the running system of the terminal to complete the installation and deployment of the update file.

[0065] Furthermore, the step of writing the 4G module information obtained in the update configuration file into the corresponding file further includes: writing the 4G module information in a separate line in the corresponding file, and the written information includes VID, PID and portMask.

[0066] Furthermore, after the installation and deployment of the update file is completed, the method further includes: the terminal reporting to the network management server based on an HTTP message that the installation and deployment of the update file is completed.

[0067] Specifically, in the present invention, the corresponding implementation description is performed using an Android system terminal. The implementation of other systems may have inconsistent file names or inconsistencies in some codes, but this should not affect the main core idea of ​​the present application.

[0068] The update package is decompressed using a zip decompression algorithm to obtain a decompressed update package, and the contents under the lib directory in the decompressed update package are preset to the system / lib partition of the Android system; the config.json update configuration file of the decompressed update package is preset to the system / etc partition of the system running on the terminal.

[0069] The design of config.json is as follows,

[0070]

[0071]

[0072] Then use the fastjoson tool to parse the config.json update configuration file to obtain the 4G module information and write it into the / system / etc / 4gInfo file; and write one line of 4G module information, including VID, PID and portMask.

[0073] Decompress the files in the etc directory in the update package and store them in the / system / etc / directory of the terminal's running system to complete the installation and deployment of the update files. These files are the configuration files that need to be loaded for the 4G module to work properly.

[0074] After completion, the installation and deployment completion is reported to the server through an HTTP message, specifically: {msgid=2, content=”MAC address: 00-25-B3-CD-23-00” result: success}.

[0075] S15: Automatically identify and update the 4G module based on the installed and deployed update file.

[0076] In the specific implementation process of the present invention, the update file based on the installation and deployment automatically identifies and updates the 4G module, including: the terminal's operating system loads the port of the 4G module based on the corresponding driver information, and reads the written information in the corresponding file based on the corresponding driver information for automatic identification and update.

[0077] Furthermore, the automatic identification and update of the written information in the corresponding file based on the corresponding driver information includes: triggering a preset event based on the corresponding driver information, and reading the written information in the corresponding file based on the preset event; the terminal's operating system obtains the device information in the 4G module based on the preset event, and indexes the corresponding configuration file based on the device information; judging whether the configuration information of the 4G module in the corresponding configuration file is consistent with the current configuration file in the terminal system; when it is judged to be inconsistent, reloading the driver of the 4G module and automatically identifying and updating it.

[0078] Specifically, the kernel in the running system on the terminal mainly loads the 4G module port through the usb-serial->option.c driver, reads the / system / etc / 4gInfo file by modifying option.c, and adds the 4G module VID and PID, as well as the portMask value.

[0079] The 4G module is connected to the Android system through the USB interface, triggering the UEVENT event, which is the preset event mentioned above. The device information in the 4G module is obtained through the UEVENT event. The device information includes VID and PID, and the device information of each 4G module has a unique VID and PID. The VID and PID are used as indexes to search in the config.json configuration file to find out the information of the 4G module, and compare whether the current setting value of the system is the same 4G module. If the comparison finds that it is different, it is set, and then the driver of the 4G module is reloaded and automatically identified and updated; specifically, the rild-daemon service can be restarted to restart the loading of the 4G module driver and automatically identify and update; in some models of 4G modules, it may be necessary to control the power off and power on of the USB port to achieve reloading of the driver and automatic identification and update.

[0080] In the embodiment of the present invention, automatic identification and update are realized, and the deployment and update method is simple. It only needs to modify the update package according to the rules. The network is automatically updated, and there is no need to re-make the system firmware according to different CPU platforms. In addition, the identification and update efficiency is high, and the full life cycle of the product is supported. With an average of 200KB for all configurations and files of a 4G module and 2000KB for 10 4G module update packages, and a factory-produced wired LAN environment with a bandwidth of 100M, the download time is theoretically less than 1 second. Considering the server performance and batch upgrades, the update time for each terminal is less than 30 seconds, which is much faster than the system firmware update.

[0081] Example

[0082] The method for realizing automatic update of multiple 4G modules of a terminal involves a network management server, a terminal and a 4G module accessed to the terminal; the update package is published on the network management server, and after a 4G module is connected to the terminal through a USB interface, the terminal accesses the network management server through the HTTP protocol to find out whether there is an update package related to the 4G module and downloads it for corresponding identification and update.

[0083] The name of the update package includes 4gUpgrade, version and CRC check code, and it is a ZIP compressed file. The specific file name is: 4gUpgrade_Version V1.0_CRC check code.zip; data transmission between the network management server and the terminal supports breakpoint resumption.

[0084] See also Figure 2 , Figure 2 It is a schematic diagram of the structural composition of a multi-4G module automatic update device of a terminal in an embodiment of the present invention.

[0085] like Figure 2 As shown, a terminal multi-4G module automatic update device, the device comprising:

[0086] Update package acquisition module 21: used for obtaining the update package of the 4G module issued by the network management server after the terminal accesses the 4G module based on the USB interface;

[0087] In the specific implementation process of the present invention, the update package is a compressed file and includes 4GUpgrade, a version number and a CRC check code; the update package is calculated based on the CRC-32 cyclic redundancy check algorithm to obtain the CRC check code, and the CRC check code is spliced ​​after the update package name; the 4GUpgrade includes an update configuration file, and the update configuration file includes a 4G module model, VID, PID, SO library file and other information.

[0088] Specifically, the name of the update package includes 4gUpgrade, version and CRC check code, and is a ZIP compressed file. The specific file name is: 4gUpgrade_Version V1.0_CRC check code.zip.

[0089] The CRC check code is generated by using the CRC-32 cyclic redundancy check algorithm to calculate the zip update package. The CRC check code is spliced ​​after the update package name, that is, the "_CRC check code" part; the CRC check code is used by the terminal to check the integrity and security of the received update package to prevent the update package from being maliciously tampered with.

[0090] The content of the 4gUpgrade part in the update package involves updating the configuration file, which includes: 4G module model, VID, PID, SO library file name, and other information; taking the Android system as an example, the update configuration file is |--config.json configuration file; |--lib 4G module so library file; |---libxxx1.so; |---libxxx2.so; |---libxxxN.so; |--etc; |--init.gprs-ppp0; |--init.gprs-pppN; |--config.json configuration file, which is used to record the 4G module model, VID, PID, SO library file name, and other information.

[0091] After the corresponding 4G module is connected to the USB interface of the terminal, the terminal can access the update package of the 4G module published in the network management server according to the corresponding network connection, which can be a local area network connection or an Internet connection. The terminal can obtain the update package of the 4G module published in the network management server.

[0092] Update package downloading module 22: used for downloading the update package of the 4G module on the network management server based on HTTP protocol;

[0093] In the specific implementation process of the present invention, the update package of the 4G module is downloaded on the network management server based on the HTTP protocol, including: when the terminal downloads the update package of the 4G module on the gateway management server based on the HTTP protocol, the terminal judges the current network status in real time, and when the current network status deteriorates, the terminal suspends downloading the update package of the 4G module; when the current network status improves, the terminal initiates an HTTP breakpoint resume request and continues to download the update package of the 4G module until the download is completed.

[0094] Furthermore, the process of downloading the update package of the 4G module on the network management server based on the HTTP protocol also includes: at each preset time interval, the terminal reports the download status of the update package of the 4G module to the network management server.

[0095] Specifically, the terminal and the network management server support breakpoint resumption. When the terminal downloads the update package of the 4G module on the gateway management server according to the HTTP protocol, the terminal will monitor the network status during downloading in real time. When the network status is poor, the terminal will suspend downloading the update package of the 4G module. When the current network status improves, the terminal will re-initiate the HTTP breakpoint resumption request and continue downloading the update package of the 4G module until the download is completed. During the process of downloading the update package of the 4G module, the terminal will report the download status of the update package of the 4G module to the network management server at each preset time interval.

[0096] Specifically, the preset time interval can be every 10 seconds, which can be set according to user needs. The download status of the update package of the 4G module is reported to the network management server. The download status of the update package of the 4G module can be reported to the network management server through {msgid=1, content=”MAC address: 00-25-B3-CD-23-00” download progress: 10}.

[0097] Update package verification module 23: used to verify the update package based on the CRC-32 cyclic redundancy check algorithm on the terminal;

[0098] In the specific implementation process of the present invention, after the update package is downloaded, it needs to be verified. In this embodiment, the CRC-32 cyclic redundancy check algorithm is used to verify the update package. After the verification passes, the next step can be performed. The CRC-32 cyclic redundancy check algorithm can be used to ensure that the update package is not tampered with, thereby ensuring file security.

[0099] Installation and deployment module 24: used for installing and deploying update files for the 4G module based on the update package after verification;

[0100] In the specific implementation process of the present invention, the installation and deployment of the update file for the 4G module based on the update package includes: decompressing the update package, presetting the corresponding directory in the decompressed update package to the first corresponding partition of the running system on the terminal, and presetting the update configuration file of the decompressed update package to the second corresponding partition of the running system on the terminal; parsing the update configuration file, and writing the 4G module information obtained in the update configuration file into the corresponding file; decompressing the files under the etc directory in the update package, and storing them in the / system / etc / directory under the running system of the terminal to complete the installation and deployment of the update file.

[0101] Furthermore, the step of writing the 4G module information obtained in the update configuration file into the corresponding file further includes: writing the 4G module information in a separate line in the corresponding file, and the written information includes VID, PID and portMask.

[0102] Furthermore, after the installation and deployment of the update file is completed, the method further includes: the terminal reporting to the network management server based on an HTTP message that the installation and deployment of the update file is completed.

[0103] Specifically, in the present invention, the corresponding implementation description is performed using an Android system terminal. The implementation of other systems may have inconsistent file names or inconsistencies in some codes, but this should not affect the main core idea of ​​the present application.

[0104] The update package is decompressed using a zip decompression algorithm to obtain a decompressed update package, and the contents under the lib directory in the decompressed update package are preset to the system / lib partition of the Android system; the config.json update configuration file of the decompressed update package is preset to the system / etc partition of the system running on the terminal.

[0105] The design of config.json is as follows,

[0106]

[0107]

[0108] Then use the fastjoson tool to parse the config.json update configuration file to obtain the 4G module information and write it into the / system / etc / 4gInfo file; and write one line of 4G module information, including VID, PID and portMask.

[0109] Decompress the files in the etc directory in the update package and store them in the / system / etc / directory of the terminal's running system to complete the installation and deployment of the update files. These files are the configuration files that need to be loaded for the 4G module to work properly.

[0110] After completion, the installation and deployment completion is reported to the server through an HTTP message, specifically: {msgid=2, content=”MAC address: 00-25-B3-CD-23-00” result: success}.

[0111] Automatic identification and updating module 25: used for automatically identifying and updating the 4G module based on the update file installed and deployed.

[0112] In the specific implementation process of the present invention, the update file based on the installation and deployment automatically identifies and updates the 4G module, including: the terminal's operating system loads the port of the 4G module based on the corresponding driver information, and reads the written information in the corresponding file based on the corresponding driver information for automatic identification and update.

[0113] Furthermore, the automatic identification and update of the written information in the corresponding file based on the corresponding driver information includes: triggering a preset event based on the corresponding driver information, and reading the written information in the corresponding file based on the preset event; the terminal's operating system obtains the device information in the 4G module based on the preset event, and indexes the corresponding configuration file based on the device information; judging whether the configuration information of the 4G module in the corresponding configuration file is consistent with the current configuration file in the terminal system; when it is judged to be inconsistent, reloading the driver of the 4G module and automatically identifying and updating it.

[0114] Specifically, the kernel in the running system on the terminal mainly loads the 4G module port through the usb-serial->option.c driver, reads the / system / etc / 4gInfo file by modifying option.c, and adds the 4G module VID and PID, as well as the portMask value.

[0115] The 4G module is connected to the Android system through the USB interface, triggering the UEVENT event, which is the preset event mentioned above. The device information in the 4G module is obtained through the UEVENT event. The device information includes VID and PID, and the device information of each 4G module has a unique VID and PID. The VID and PID are used as indexes to search in the config.json configuration file to find out the information of the 4G module, and compare whether the current setting value of the system is the same 4G module. If the comparison finds that it is different, it is set, and then the driver of the 4G module is reloaded and automatically identified and updated; specifically, the rild-daemon service can be restarted to restart the loading of the 4G module driver and automatically identify and update; in some models of 4G modules, it may be necessary to control the power off and power on of the USB port to achieve reloading of the driver and automatic identification and update.

[0116] In the embodiment of the present invention, automatic identification and update are realized, and the deployment and update method is simple. It only needs to modify the update package according to the rules. The network is automatically updated, and there is no need to re-make the system firmware according to different CPU platforms. In addition, the identification and update efficiency is high, and the full life cycle of the product is supported. With an average of 200KB for all configurations and files of a 4G module and 2000KB for 10 4G module update packages, and a factory-produced wired LAN environment with a bandwidth of 100M, the download time is theoretically less than 1 second. Considering the server performance and batch upgrades, the update time for each terminal is less than 30 seconds, which is much faster than the system firmware update.

[0117] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0118] In addition, the above is a detailed introduction to the multi-4G module automatic update method and device of a terminal provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for automatically updating multiple 4G modules of a terminal, characterized in that: The method comprises: After the terminal accesses the 4G module based on the USB interface, the terminal obtains an update package of the 4G module issued by the network management server; Downloading the update package of the 4G module on the network management server based on the HTTP protocol; Verifying the update package on the terminal based on a CRC-32 cyclic redundancy check algorithm; After the verification is passed, installing and deploying the update file on the 4G module based on the update package; Automatically identifying and updating the 4G module based on the installed and deployed update file; The step of installing and deploying an update file for the 4G module based on the update package includes: Decompressing the update package, presetting a corresponding directory in the decompressed update package to a first corresponding partition of the running system on the terminal, and presetting an update configuration file of the decompressed update package to a second corresponding partition of the running system on the terminal; Parsing the update configuration file, and writing the 4G module information obtained in the update configuration file into a corresponding file; Decompress the files in the etc directory in the update package and store them in the / system / etc / directory under the terminal's operating system to complete the installation and deployment of the update files; The step of obtaining the 4G module information in the update configuration file and writing it into the corresponding file further includes: The 4G module information is written in another line in the corresponding file, and the written information includes VID, PID and portMask; The automatic identification and updating of the 4G module based on the update file installed and deployed includes: The operating system of the terminal loads the port of the 4G module based on the corresponding driver information, and reads the written information in the corresponding file based on the corresponding driver information to automatically identify and update; The automatic identification and updating of the written information in the corresponding file based on the corresponding drive information includes: Triggering a preset event based on the corresponding driving information, and reading the information written in the corresponding file based on the preset event; The operating system of the terminal obtains device information in the 4G module based on a preset event, and indexes a corresponding configuration file based on the device information; Determine whether the configuration information of the 4G module in the corresponding configuration file is consistent with the current configuration file in the terminal system; When it is determined that there is inconsistency, the driver of the 4G module is reloaded and automatically identified and updated; The 4G module is connected to the Android system through the USB interface, triggering the UEVENT event. The device information in the 4G module is obtained through the UEVENT event. The device information includes VID and PID. The device information of each 4G module has a unique VID and PID. The VID and PID are used as indexes to search in the config.json configuration file to find out the information of the 4G module, and compare whether the current setting value of the system is the same 4G module. If the comparison finds a difference, it is set. After that, the driver of the 4G module is reloaded and automatically identified and updated; the rild-daemon service is restarted to restart the loading of the 4G module driver and automatically identify and update; for some models of 4G modules, it is necessary to control the power off and power on of the USB port to achieve reloading of the driver and automatic identification and update.

2. The multi-4G module automatic update method according to claim 1, characterized in that: The update package is a compressed file and includes 4GUpgrade, version number and CRC check code; Calculate the update package based on the CRC-32 cyclic redundancy check algorithm to obtain the CRC check code, and concatenate it after the update package name; The 4GUpgrade includes an update configuration file, which includes a 4G module model, VID, PID, SO library file, and other information.

3. The multi-4G module automatic update method according to claim 1, characterized in that: The step of downloading the update package of the 4G module on the network management server based on the HTTP protocol includes: When the terminal downloads the update package of the 4G module on the network management server based on the HTTP protocol, the terminal determines the current network status in real time, When the current network status deteriorates, the terminal suspends downloading the update package of the 4G module; When the current network status improves, the terminal initiates an HTTP breakpoint resume request to continue downloading the update package of the 4G module until the download is completed.

4. The multi-4G module automatic update method according to claim 3, characterized in that: The process of downloading the update package of the 4G module on the network management server based on the HTTP protocol also includes: At each preset time interval, the terminal reports the download status of the update package of the 4G module to the network management server.

5. The multi-4G module automatic update method according to claim 1, characterized in that: After the installation and deployment of the update file is completed, the following steps are also included: The terminal reports to the network management server the completion of the installation and deployment of the update file based on the HTTP message.

6. A terminal multi-4G module automatic update device, characterized in that: The device comprises: Update package acquisition module: used for obtaining the update package of the 4G module issued by the network management server after the terminal accesses the 4G module based on the USB interface; Update package download module: used to download the update package of the 4G module on the network management server based on the HTTP protocol; Update package verification module: used for verifying the update package on the terminal based on the CRC-32 cyclic redundancy check algorithm; Installation and deployment module: used to install and deploy update files for the 4G module based on the update package after verification; Automatic identification and updating module: used for automatically identifying and updating the 4G module based on the update file installed and deployed; The step of installing and deploying an update file for the 4G module based on the update package includes: Decompressing the update package, presetting a corresponding directory in the decompressed update package to a first corresponding partition of the running system on the terminal, and presetting an update configuration file of the decompressed update package to a second corresponding partition of the running system on the terminal; Parsing the update configuration file, and writing the 4G module information obtained in the update configuration file into a corresponding file; Decompress the files in the etc directory in the update package and store them in the / system / etc / directory under the terminal's operating system to complete the installation and deployment of the update files; The step of obtaining the 4G module information in the update configuration file and writing it into the corresponding file further includes: The 4G module information is written in another line in the corresponding file, and the written information includes VID, PID and portMask; The automatic identification and updating of the 4G module based on the update file installed and deployed includes: The operating system of the terminal loads the port of the 4G module based on the corresponding driver information, and reads the written information in the corresponding file based on the corresponding driver information to automatically identify and update; The automatic identification and updating of the written information in the corresponding file based on the corresponding drive information includes: Triggering a preset event based on the corresponding driving information, and reading the information written in the corresponding file based on the preset event; The operating system of the terminal obtains device information in the 4G module based on a preset event, and indexes a corresponding configuration file based on the device information; Determine whether the configuration information of the 4G module in the corresponding configuration file is consistent with the current configuration file in the terminal system; When it is determined that there is inconsistency, the driver of the 4G module is reloaded and automatically identified and updated; The 4G module is connected to the Android system through the USB interface, triggering the UEVENT event. The device information in the 4G module is obtained through the UEVENT event. The device information includes VID and PID. The device information of each 4G module has a unique VID and PID. The VID and PID are used as indexes to search in the config.json configuration file to find out the information of the 4G module, and compare whether the current setting value of the system is the same 4G module. If the comparison finds a difference, it is set. After that, the driver of the 4G module is reloaded and automatically identified and updated; the rild-daemon service is restarted to restart the loading of the 4G module driver and automatically identify and update; for some models of 4G modules, it is necessary to control the power off and power on of the USB port to achieve reloading of the driver and automatic identification and update.

Citation Information

Patent Citations

  • Intelligent version updating method and device for network terminal equipment

    CN102377821A

  • Method for updating driving program of equipment

    CN102739484A

  • One-key upgrading method and tool of wireless communication module

    CN105094911A

  • Android platform-based USB (Universal Serial Bus) port configurable method

    CN105389180A

  • USB-related computer system update method and apparatus

    CN105808464A