An over-the-air download technology upgrade system and method for smart POS devices
By designing an over-the-air technology upgrade system on smart POS devices, using Android basic service units and secure firmware collections to automatically handle secure firmware upgrades, it solves the problem of device unusability caused by complex version management and achieves automated upgrades and stability of secure firmware. run.
Patent Information
- Application Number
- CN202011246825.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-10
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-11-10
AI Technical Summary
During the security firmware OTA upgrade process of smart POS devices, due to complex version management, configuration errors are prone to occur, rendering the device unusable. Moreover, existing technology does not support over-the-air download technology upgrades, requiring a lot of manual intervention to adapt the firmware of different hardware.
An over-the-air technology upgrade system is designed, including a security processing module and an Android processing module. It realizes automatic upgrade of security firmware through physical protocol communication. It uses the Android basic service unit and security firmware collection to automatically determine and upgrade the security firmware version, reducing manual labor. Configuration error.
It achieves OTA upgrade consistency of secure firmware, reduces manual intervention, automatically handles version correspondences, ensures the stable operation of smart POS devices, and supports runtime version checking and automatic upgrades.
Smart Images

Figure CN112394968B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of secure firmware upgrade, and in particular to an over-the-air download technology upgrade method for smart POS devices. Background Art
[0002] Smart POS based on Android system has been popularized in offline retail field, and its rich applications provide more and more convenience and benefits for merchants and consumers. In order to meet the security requirements of financial payment industry, smart POS mostly adopts dual CPU solution, general CPU and security CPU. The general CPU runs Android system, and the security CPU runs payment-related services, such as card processing, PIN processing, key management, etc. The general CPU and security CPU run independently, and they communicate with each other through physical communication protocols (such as RS232, USB) to complete specific tasks. Due to changes in customer needs, it is inevitable to perform OTA upgrade on the security firmware of smart POS security CPU to improve customer experience. Since the security firmware of security CPU is related to hardware, the security firmware of different models of machines is different, and even the hardware of the same model of machine is different, so there will be multiple firmwares adapted to different hardware. Even if the hardware is the same, the security firmware needs to correspond to a specific version of Android program to run completely, otherwise there may be a problem of incomplete functions caused by mismatch between the two versions, so even if the hardware is the same, the Android program and security firmware version correspondence.
[0003] The OTA upgrade function of the secure firmware of the smart POS requires the maintenance of a huge number of version management databases on the OTA server. The more complex the version correspondence is, the more likely it is that configuration errors will occur, causing security firmware upgrade errors for the smart POS, rendering the device unusable.
[0004] Patent application number 201611256735.6 discloses a firmware management method and device for embedded devices, which involves embedded technology. The method includes obtaining the hardware identification and module information of each module of the embedded device; judging whether the hardware identification is legal based on the hardware identification and the module information; when the hardware identification is legal, selecting the firmware file corresponding to the hardware identification from the set firmware file set; packaging the firmware file to generate a firmware file package matching the module of the embedded device for download by the embedded device. However, the patent does not support OTA upgrades, and the patent is only applicable to local download technology.
[0005] Technical terms: OTA: Over-the-air download technology POS: Point of sale terminal Summary of the invention
[0006] In view of the shortcomings of the prior art, the purpose of the present invention is to provide an over-the-air download technology upgrade method for smart POS devices, which is easy to operate, reduces manual intervention, and reduces version correspondence. In order to achieve the above-mentioned purpose and other advantages according to the present invention, an over-the-air download technology upgrade system for smart POS devices is provided, comprising:
[0007] A security processing module and an Android processing module connected to the security processing module through physical protocol communication, wherein the Android processing module is used to control the restart of the security processing module;
[0008] The Android processing module includes an Android application APP unit, an Android basic service unit and a security firmware set, and the security processing module is used to run the security firmware set.
[0009] Preferably, a method for upgrading the over-the-air download technology for a smart POS device comprises the following steps:
[0010] S1. Turn on the Android device, connect to the Android processing module through the network, check whether there is an Android basic service unit upgrade, if there is an update, update the Android basic service unit file, download and install the Android basic service unit, and restart the Android basic service unit;
[0011] S2, sending an information restart instruction to the Android processing module through physical protocol communication to restart the security processing module;
[0012] S3, obtaining security processing module information;
[0013] S4, determining whether the Android basic service unit versions are consistent, if determined to be consistent, upgrading the security firmware, if determined to be inconsistent, executing the next step;
[0014] S5. Start the BASE service.
[0015] Preferably, the secure firmware upgrade in step S4 includes the following steps:
[0016] S41, restarting the security processing module through the Android processing module;
[0017] S42, sending a "security processing module information acquisition instruction" through physical protocol communication;
[0018] S43, the security processing module receives the physical protocol communication data. If no data is returned within 10 milliseconds and the time from the Android processing module is less than 5 seconds, the previous step is executed; otherwise, step S41 is executed;
[0019] S44, if the received data is different from the original setting data of the security processing module, execute step S42;
[0020] S45. Find the corresponding security firmware from the firmware set according to the machine model and hardware version value;
[0021] S46. If the security firmware version number is equal to 0, execute the next step; if the security firmware version number is greater than or equal to the security firmware version number of the security firmware, exit;
[0022] S47, establishing "installation security firmware instructions";
[0023] S48, dividing the "install security firmware instruction" into several 2k-byte data, and sending them to the security processing module in sequence through physical protocol communication;
[0024] S49, the security processing module receives data. If there is no data for more than 10 seconds, the module returns to step S41;
[0025] S410: If the result is equal to 0, the upgrade is successful, otherwise, step S41 is executed after a delay of 10 seconds.
[0026] Preferably, it also includes an Android basic service code project unit, which includes multiple model code project blocks and a base block, each model code project block includes at least one hardware version and a compilation script, and the base block includes a source code directory and a compilation script.
[0027] Preferably, the Android basic service unit file generation step includes:
[0028] S11, start the compilation script, wherein the startup compilation script parameter is the version number of the security firmware;
[0029] S12, compile the security firmware and generate the security firmware;
[0030] S13, signing the security firmware file and returning the signature file;
[0031] S14, converting the security firmware into an array file;
[0032] S145, adding the conversion array file to the base project unit every day;
[0033] S146. Compile base using the compilation script in base to generate an Android basic service unit file.
[0034] Compared with the prior art, the present invention has the following beneficial effects: through the compiler characteristics of the security firmware, combined with the process of the application, the consistency of the security firmware OTA upgrade is achieved, the stable operation of the smart POS device is ensured, and the function of checking whether the version is consistent during runtime is supported, and the security firmware is automatically upgraded. When the project is compiled, the program is automatically compiled through scripting technology to automatically generate an Android basic service unit. The Android basic service unit integrates the Android program and the security firmware of the security CPU. And each Android processing module only needs to set up an Android basic service unit, and there is no need for manual participation in the configuration of complex version relationships, which reduces manual errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flowchart of the over-the-air download technology upgrade system and method for smart POS devices according to the present invention. DETAILED DESCRIPTION
[0036] 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.
[0037] Reference Figure 1 , an over-the-air download technology upgrade system for smart POS devices, comprising: a security processing module and an Android processing module connected to the security processing module through physical protocol communication, the Android processing module being used to control the restart of the security processing module;
[0038] The Android processing module includes an Android application APP unit, an Android basic service unit and a security firmware set, and the security processing module is used to run the security firmware set.
[0039] The Android basic service unit runs in the Android system and is a dynamic library program written in C language. It is connected to the security firmware through physical protocol communication and includes multiple security firmwares. According to the characteristics of the current security processing module, the security firmware is automatically selected and upgraded. Moreover, the Android basic service unit can be upgraded OTA without distinguishing between hardware. All models can share one Android basic service unit. The Android basic service unit provides interface functions for the functions of the security firmware.
[0040] Furthermore, a method for upgrading the over-the-air download technology for a smart POS device is characterized by comprising the following steps:
[0041] S1. Turn on the Android device, connect to the Android processing module through the network, check whether there is an Android basic service unit upgrade, if there is an update, update the Android basic service unit file, download and install the Android basic service unit, and restart the Android basic service unit;
[0042] S2, sending an information restart instruction to the Android processing module through physical protocol communication to restart the security processing module;
[0043] S3, obtaining security processing module information;
[0044] S4, determining whether the Android basic service unit versions are consistent, if determined to be consistent, upgrading the security firmware, if determined to be inconsistent, executing the next step;
[0045] S5. Start the BASE service.
[0046] Furthermore, the secure firmware upgrade in step S4 includes the following steps:
[0047] S41, restarting the security processing module through the Android processing module;
[0048] S42, sending an "obtain security processing module information instruction" through physical protocol communication;
[0049] S43, the security processing module receives the physical protocol communication data. If no data is returned within 10 milliseconds and the time from the Android processing module is less than 5 seconds, the previous step is executed; otherwise, step S41 is executed;
[0050] S44, if the received data is different from the original setting data of the security processing module, execute step S42;
[0051] S45. Find the corresponding security firmware from the firmware set according to the machine model and hardware version value;
[0052] S46. If the security firmware version number is equal to 0, execute the next step; if the security firmware version number is greater than or equal to the security firmware version number of the security firmware, exit;
[0053] S47, establishing "installation security firmware instructions";
[0054] S48, dividing the "install security firmware instruction" into several 2k-byte data, and sending them to the security processing module in sequence through physical protocol communication;
[0055] S49, the security processing module receives data. If there is no data for more than 10 seconds, the module returns to step S41;
[0056] S410: If the result is equal to 0, the upgrade is successful, otherwise, step S41 is executed after a delay of 10 seconds.
[0057] Furthermore, it also includes an Android basic service code project unit, which includes multiple model code project blocks and a base block, each model code project block includes at least one hardware version and a compilation script, and the base block includes a source code directory and a compilation script.
[0058] Furthermore, the Android basic service unit file generation step includes:
[0059] S11, start the compilation script, wherein the startup compilation script parameter is the version number of the security firmware;
[0060] S12, compile the security firmware and generate the security firmware;
[0061] S13, signing the security firmware file and returning the signature file;
[0062] S14, converting the security firmware into an array file;
[0063] S145, adding the conversion array file to the base project unit every day;
[0064] S146. Compile base using the compilation script in base to generate an Android basic service unit file.
[0065] The number of devices and processing scales described here are used to simplify the description of the present invention, and the application, modification and variation of the present invention will be obvious to those skilled in the art.
[0066] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
Claims
1. An over-the-air download technology upgrade method for a smart POS device, comprising an upgrade system, the upgrade system comprising A security processing module and an Android processing module connected to the security processing module through physical protocol communication, wherein the Android processing module is used to control the restart of the security processing module; The Android processing module includes an Android application APP unit, an Android basic service unit and a security firmware set, and the security processing module is used to run the security firmware set; It also includes an Android basic service code project unit, the Android basic service code project unit includes multiple model code project blocks and a base block, each model code project block includes at least one hardware version and a compilation script, and the base block includes a source code directory and a compilation script; The Android basic service unit runs in the Android system and is a dynamic library program written in C language. It is connected to the security firmware through physical protocol communication and includes multiple security firmwares. According to the characteristics of the current security processing module, the security firmware is automatically selected and upgraded. Moreover, the Android basic service unit can be upgraded OTA without distinguishing hardware. All models can share one Android basic service unit, which provides interface functions of the security firmware functions. It is characterized in that The upgrade method specifically includes the following steps: S1. Turn on the Android device, connect to the Android processing module through the network, check whether there is an Android basic service unit upgrade, and if there is an upgrade, update the Android basic service unit file, download and install the Android basic service unit, and restart the Android basic service unit; S2, sending an information restart instruction to the Android processing module through physical protocol communication to restart the security processing module; S3, obtaining security processing module information; S4, determine whether the Android basic service unit version is consistent, if it is determined to be consistent, upgrade the security firmware, if it is determined to be inconsistent, execute the next step; the security firmware upgrade in step S4 includes the following steps: S41, restarting the security processing module through the Android processing module; S42, sending "obtain security processing module information instruction" through physical protocol communication; S43, the security processing module receives the physical protocol communication data. If no data is returned within 10 milliseconds and the time from the Android processing module receiving the data is less than 5 seconds, the previous step is executed; otherwise, step S41 is executed; S44, if the received data is different from the original setting data of the security processing module, execute step S42; S45. Find the corresponding security firmware from the firmware set according to the machine model and hardware version value; S46. If the corresponding secure firmware is not found in the firmware set according to the machine model and the hardware version value, the next step is executed. If the secure firmware version number matching the machine model and the hardware version value is greater than or equal to the secure firmware version number in the firmware set, the process exits. S47, establish "install secure firmware instructions"; S48, dividing the "install security firmware instruction" into a plurality of 2k bytes of data, and sending them to the security processing module in sequence through physical protocol communication; S49, the security processing module receives the data. If no data is returned within 10 seconds, step S41 is executed; S410, if the result is equal to 0, the upgrade is successful, otherwise the process goes to step S41 after a delay of 10 seconds; S5. Start the BASE service; The steps to generate the Android basic service unit file include: S11, start the compilation script, wherein the startup compilation script parameter is the version number of the security firmware; S12, compile the security firmware and generate the security firmware; S13, signing the security firmware file and returning the signature file; S14, converting the security firmware into an array file; S145, adding the conversion array file to the base project unit; S146. Compile base by compiling the script to generate an Android basic service unit file.
Citation Information
Patent Citations
Firmware management method and device of embedded device
CN106815050A
Two-chip scheme firmware updating method for safety terminal
CN104090790A
POS upgrading method, apparatus and device based on OTA and storage medium
CN109165034A
Firmware upgrading method and system for POS equipment based on android system
CN111240709A
Secure operating system update method used in reliable execution environment
WO2016095796A1
