Wireless upgrading method and device for access control card reader
By establishing a wireless connection with a handheld terminal to upgrade the firmware of the access control card reader, the problem of inconvenient upgrades for traditional access control card readers is solved, improving both security and convenience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DAS IOT TECH CO LTD
- Filing Date
- 2022-12-20
- Publication Date
- 2026-07-24
AI Technical Summary
Traditional access control card readers lack network interfaces and waterproof/explosion-proof designs, making it impossible to perform convenient and safe program upgrades. Disassembling and upgrading is cumbersome and prone to damage.
By establishing a wireless connection with the handheld terminal, version information is sent to obtain pre-upgrade information, switching to program upgrade mode, and performing firmware upgrade, including security authentication and splitting upgrade data packets.
Wireless upgrades to access control card readers have been achieved, improving security and ease of operation while avoiding the cumbersome process of disassembling and upgrading.
Smart Images

Figure CN115951913B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of radio frequency identification technology, and in particular to a wireless upgrade method and apparatus for access control card readers. Background Technology
[0002] With the development of security technology and the increasing prevalence of smart hardware, some traditional access control card readers, in order to meet the requirements of high cost-effectiveness, low cost, and easy installation, are generally only equipped with a power cord, two Wiegand signal cables, and other input / output IO signal lines. They lack communication devices such as RS485 and network interfaces, making it impossible to upgrade the program in a timely manner via the network or dedicated upgrade equipment. This makes it difficult to cope with the ever-evolving intrusion methods of criminals. Moreover, to ensure good waterproof and explosion-proof performance, access control card readers are usually installed very securely, making disassembly and installation for upgrades cumbersome and prone to damage, creating a significant obstacle to upgrading the access control card reader. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and apparatus for wireless upgrading of access control card readers.
[0004] The technical solution adopted by this invention to solve its technical problem is: constructing a wireless upgrade method for access control card readers, including the following steps:
[0005] Establish a wireless connection with the handheld terminal;
[0006] Send version information to the handheld terminal to obtain pre-upgrade information from the handheld terminal;
[0007] The directory to be upgraded is determined based on the pre-upgrade information, and after the directory to be upgraded is sent to the handheld terminal, the program upgrade mode is switched.
[0008] Then, an initialization command is sent to the handheld terminal to obtain initialization information fed back by the handheld terminal;
[0009] After receiving the upgrade command sent by the handheld terminal, the firmware is upgraded according to the initialization information and the upgrade data sent by the handheld terminal.
[0010] Preferably, before the step of establishing a wireless connection with the handheld terminal, the method further includes:
[0011] Set the handheld terminal to card emulation mode.
[0012] Preferably, the wireless upgrade method for the access control card reader further includes:
[0013] The version information and upgrade catalog are displayed on the handheld terminal, and the pre-upgrade information, initialization information and upgrade instructions are generated and sent through the typing operation on the handheld terminal.
[0014] Preferably, after the step of sending the upgrade directory to the handheld terminal, the method further includes:
[0015] The device performs a security authentication process with the handheld terminal, and after passing the security authentication, it switches to the program upgrade mode.
[0016] Preferably, the step of performing security authentication with the handheld terminal includes:
[0017] Random data generated according to a set algorithm is sent to the handheld terminal to obtain authentication data generated by the handheld terminal according to the random number and the set algorithm. If the random data and the authentication data conform to a set pattern, the security authentication is determined to be successful.
[0018] Preferably, the upgrade data includes several upgrade packages; the initialization information includes package number data and address data;
[0019] The step of performing firmware upgrade based on the initialization information and the upgrade data sent by the handheld terminal includes:
[0020] The write address of each upgrade package is determined based on the address data, the write order of each upgrade package is determined based on the package number data, and each upgrade package is written sequentially according to the write address and the write order.
[0021] Preferably, the wireless upgrade method for the access control card reader further includes:
[0022] The upgrade data is unpacked using the handheld terminal to split it into several upgrade packages.
[0023] Preferably, the wireless upgrade method for the access control card reader further includes:
[0024] If the firmware upgrade fails, a failure message is sent to the handheld terminal, so that the user can choose to upgrade again or restore the firmware according to the operation instructions fed back by the handheld terminal.
[0025] Preferably, the wireless upgrade method for the access control card reader further includes:
[0026] If the connection to the handheld terminal is lost during the firmware upgrade process, a card search command is sent repeatedly to reconnect to the handheld terminal;
[0027] After reconnecting to the handheld terminal, the current upgrade location information is sent to the handheld terminal to continue the firmware upgrade from the interrupted location.
[0028] The present invention also constructs a wireless upgrade device for access control card readers, including a handheld terminal and an access control card reader;
[0029] The handheld terminal is wirelessly connected to the access control card reader;
[0030] The access control card reader is used to send version information to the handheld terminal to obtain pre-upgrade information from the handheld terminal; it also determines the upgrade directory based on the pre-upgrade information, and switches to program upgrade mode after sending the upgrade directory to the handheld terminal; then, it sends an initialization command to the handheld terminal to obtain initialization information from the handheld terminal; after obtaining the upgrade command sent by the handheld terminal, it performs firmware upgrade based on the initialization information and the upgrade data sent by the handheld terminal.
[0031] The technical solution of this invention establishes a wireless connection between an access control card reader and a handheld terminal. The access control card reader then sends its version information to the handheld terminal to obtain upgrade information from the handheld terminal, thereby determining the upgrade directory. After the upgrade directory is sent to the handheld terminal, the access control card reader switches to program upgrade mode to prepare for firmware upgrade. Then, an initialization command is sent to the handheld terminal to obtain initialization information. Finally, after receiving the upgrade command from the handheld terminal, the firmware is upgraded based on the initialization information and the upgrade data sent by the handheld terminal. This invention allows for wireless firmware upgrades of the access control card reader via a handheld terminal, improving the security performance of the access control card reader and offering advantages such as high operability and ease of operation. Attached Figure Description
[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0033] Figure 1 This is a flowchart of the wireless upgrade method for access control card readers in some embodiments of the present invention;
[0034] Figure 2 The diagram shown is a structural schematic of a wireless upgrade device for access control card readers in some embodiments of the present invention. Detailed Implementation
[0035] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0036] It should be noted that the flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0038] See Figure 1 The diagram shown is a flowchart of a wireless upgrade method for an access control card reader in some embodiments of the present invention. This wireless upgrade method is applied to the control module of the access control card reader. The wireless upgrade method includes steps S1, S2, S3, S4, and S5.
[0039] Step S1 includes: establishing a wireless connection with the handheld terminal;
[0040] Step S2 includes: sending version information to the handheld terminal to obtain pre-upgrade information from the handheld terminal;
[0041] Step S3 includes: determining the directory to be upgraded based on the pre-upgrade information, and switching to program upgrade mode after sending the directory to be upgraded to the handheld terminal;
[0042] Step S4 includes: sending an initialization command to the handheld terminal to obtain initialization information fed back by the handheld terminal;
[0043] Step S5 includes: after receiving the upgrade instruction sent by the handheld terminal, performing a firmware upgrade based on the initialization information and the upgrade data sent by the handheld terminal.
[0044] The version information includes the current firmware version of each application in the access control card reader.
[0045] The pre-upgrade information is used to determine the type and corresponding version of the application to be upgraded for the access control card reader. Users can display the current firmware version of each application through their handheld terminal. After confirming the version and the hardware performance of the access control card reader (such as memory size, peripheral configuration, etc.), users can select the type and corresponding version of the application to be upgraded by operating the handheld terminal, thereby generating the pre-upgrade information.
[0046] The upgrade directory contains the physical address information of the applications to be upgraded. After receiving the pre-upgrade information, the access control card reader determines the type of the application to be upgraded, thereby determining the physical address of the corresponding old version of the application, and then generates the upgrade directory.
[0047] The initialization command is used to request initialization information from the handheld terminal. Since the access control card reader can only perform erase-and-write operations on the control module's internal storage space (internal storage space refers to the non-volatile memory built into the microcontroller or microprocessor) in program upgrade mode (IAP upgrade mode), it will only send the initialization command to the handheld terminal when it is ready to enter program upgrade mode.
[0048] Initialization information is used to determine the order and physical address of the program data of the application to be upgraded being written to the internal storage space. After receiving the directory to be upgraded, the handheld terminal can determine the physical address of the old version of the application corresponding to the application to be upgraded. Generally, the data of the old version of the application can be replaced with the data of the application to be upgraded. However, in some embodiments, there is a difference in the data capacity between the version to be upgraded and the corresponding old version, making direct replacement impossible. Therefore, the user can operate the handheld terminal to select the writing order and physical address of the version to be upgraded according to the actual situation, such as writing some data to the remaining memory block of the internal storage space. This allows for more efficient use of the internal storage space in the access control card reader.
[0049] The upgrade command is the start command for the access control card reader to begin writing upgrade data.
[0050] In this embodiment, firstly, a wireless connection is established between the access control card reader and the handheld terminal. Then, the access control card reader sends its version information to the handheld terminal. Upon receiving the version information, the handheld terminal displays the current firmware version of the access control card reader. The handheld terminal also selects the version of the application to be upgraded based on the user's operation (the user can pre-store multiple application versions on the handheld terminal) to generate pre-upgrade information. The access control card reader obtains the pre-upgrade information to determine the upgrade directory. After sending the upgrade directory to the handheld terminal, it switches to application upgrade mode to prepare for firmware upgrade. Next, the access control card reader sends an initialization command to the handheld terminal. Upon receiving the initialization command, the handheld terminal generates and sends initialization information to the access control card reader based on the user's operation. Finally, the user can send an upgrade command to the access control card reader through the handheld terminal. Upon receiving the upgrade command, the access control card reader performs a firmware upgrade based on the initialization information and the upgrade data sent by the handheld terminal.
[0051] In a preferred embodiment, the access control card reader and the handheld terminal can establish a wireless connection in the following manner: the handheld terminal is set to card emulation mode (HCE mode), and then the access control card reader sends a card search command to wait for a response from the handheld terminal. After receiving the response, the access control card reader connects with the handheld terminal. Specifically, the handheld terminal can be a mobile phone or a dedicated upgrade device. Taking a mobile phone as an example, the NFC function of the mobile phone is used to switch the mobile phone to card emulation mode, and then information exchange with the access control card reader is achieved according to the ISO7816-3 or ISO1443-4 standard.
[0052] Furthermore, in a preferred embodiment, the wireless upgrade method for the access control card reader further includes: displaying version information and upgrade catalog through a handheld terminal, and generating and sending pre-upgrade information, initialization information and upgrade instructions through typing operations on the handheld terminal, so that the user can customize the upgrade settings for the access control card reader.
[0053] Furthermore, in a preferred embodiment, after the step of sending the upgrade directory to the handheld terminal, the method further includes: performing security authentication with the handheld terminal, and after passing the security authentication, switching to the program upgrade mode.
[0054] Understandably, security authentication can effectively prevent criminals from illegally intruding into or modifying the access control card reader's application, thereby improving the security of the access control card reader.
[0055] In one specific embodiment, security authentication with a handheld terminal can be performed in the following way: send random data generated according to a set algorithm to the handheld terminal to obtain authentication data generated by the handheld terminal according to the random number and the set algorithm. If the random data and the authentication data conform to the set pattern, the security authentication is deemed to be successful.
[0056] Specifically, the algorithm can be an existing encryption algorithm, such as 3DES or Diffie-Hellman. In this embodiment, the algorithm is set to 3DES, so when the random data and authentication data are consistent, it is determined that the random data and authentication data conform to the set rule.
[0057] Furthermore, in a preferred embodiment, the upgrade data includes several upgrade packages. Initialization information includes package number data and address data. The package number data includes a package number corresponding to each upgrade package; the address data includes the physical write address of each upgrade package.
[0058] In one specific embodiment, firmware upgrades can be performed as follows: determine the write address of each upgrade package based on address data, determine the write order of each upgrade package based on package number data, and write each upgrade package sequentially according to the write address and write order.
[0059] Specifically, the access control card reader determines the write address (i.e., physical write address) of the upgrade package based on the address data, and determines the write order of the upgrade packages based on the package number data (e.g., writing from smallest to largest package number). Then, it sends the package number of the first upgrade package to the sending handheld terminal, and erases a set length of storage space (consistent with the length of the upgrade package) based on the write address of the upgrade package to write the upgrade package data to be received. After the upgrade package is received, it sends a request for the package number of the next upgrade package to the handheld terminal to prepare for writing the next upgrade package. This process is repeated until all upgrade packages have been written.
[0060] Furthermore, in a preferred embodiment, the wireless upgrade method for the access control card reader further includes: unpacking the upgrade data using a handheld terminal to split the upgrade data into several upgrade packages.
[0061] In one specific embodiment, the unpacking process can be implemented as follows: the upgrade data is split into several upgrade packets according to a set length, such that the length (or capacity) of each upgrade packet is basically the same. The length of the last upgrade packet is the actual length of the remaining data (not greater than the set length). This reduces the probability of errors in the upgrade data transmission process. Furthermore, the user can set the set length by operating a handheld terminal.
[0062] Furthermore, in a preferred embodiment, after all upgrade packages have been written, the process further includes: switching to the upgraded mode and sending an upgrade completion command to the handheld terminal, and then running the upgraded application; if the operation is normal, switching to the normal operation mode; if the operation is abnormal, determining that the firmware upgrade has failed.
[0063] Furthermore, in a preferred embodiment, the initialization information also includes upgrade data capacity. Upgrade data capacity refers to the amount of storage space occupied by the upgrade data. Accordingly, the wireless upgrade method for the access control card reader further includes: if the upgrade data capacity is inconsistent with the actual capacity of the upgrade data written, then the firmware upgrade is determined to have failed.
[0064] Furthermore, in a preferred embodiment, the wireless upgrade method for the access control card reader further includes: if the firmware upgrade fails, sending a failure message to the handheld terminal, so as to select whether to re-upgrade or restore the firmware according to the operation instructions fed back by the handheld terminal.
[0065] Specifically, the user can choose to return to any of steps S1 to S5 via the handheld terminal to re-upgrade the firmware; or, the access control card reader can switch to restore mode to write the original firmware program of the storage chip (such as FLSAH or ROM) stored in the access control card reader into the internal storage space.
[0066] Furthermore, in a preferred embodiment, the wireless upgrade method for the access control card reader further includes: if the connection with the handheld terminal is lost during the firmware upgrade process, a card search command is sent cyclically to reconnect with the handheld terminal; after reconnecting with the handheld terminal, the current upgrade location information is sent to the handheld terminal to continue the firmware upgrade from the interrupted position. The current upgrade location information may be the packet number of the upgrade packet being transmitted when the access control card reader was disconnected from the handheld terminal.
[0067] See Figure 2 The diagram shown is a structural schematic of a wireless upgrade device for access control card readers in some embodiments of the present invention. The wireless upgrade device for access control card readers includes a handheld terminal and an access control card reader.
[0068] The handheld terminal and the access control card reader are wirelessly connected. The access control card reader sends version information to the handheld terminal to obtain pre-upgrade information from the handheld terminal; it also determines the upgrade directory based on the pre-upgrade information, and after sending the upgrade directory to the handheld terminal, switches to program upgrade mode; then, it sends an initialization command to the handheld terminal to obtain initialization information from the handheld terminal; after receiving the upgrade command sent by the handheld terminal, it performs a firmware upgrade based on the initialization information and the upgrade data sent by the handheld terminal.
[0069] The technical solution of this invention establishes a wireless connection between an access control card reader and a handheld terminal. The access control card reader then sends its version information to the handheld terminal to obtain upgrade information from the handheld terminal, thereby determining the upgrade directory. After the upgrade directory is sent to the handheld terminal, the access control card reader switches to program upgrade mode to prepare for firmware upgrade. Then, an initialization command is sent to the handheld terminal to obtain initialization information. Finally, after receiving the upgrade command from the handheld terminal, the firmware is upgraded based on the initialization information and the upgrade data sent by the handheld terminal. This invention allows for wireless firmware upgrades of the access control card reader via a handheld terminal, improving the security performance of the access control card reader and offering advantages such as high operability and ease of operation.
[0070] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0071] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0072] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0073] It is understood that the above embodiments only illustrate preferred embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. Therefore, all equivalent transformations and modifications made with respect to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A method for wirelessly upgrading an access control card reader, characterized in that, Includes the following steps: Set the handheld terminal to card emulation mode; The device sends out a card search command and waits for a response from the handheld terminal. After receiving the response, it establishes a wireless connection with the handheld terminal. Send version information to the handheld terminal to obtain pre-upgrade information from the handheld terminal; Based on the pre-upgrade information, the directory to be upgraded is determined, and after the directory to be upgraded is sent to the handheld terminal, the program upgrade mode is switched. Then, an initialization command is sent to the handheld terminal to obtain initialization information fed back by the handheld terminal; After receiving the upgrade command sent by the handheld terminal, the firmware is upgraded according to the initialization information and the upgrade data sent by the handheld terminal; If the connection to the handheld terminal is lost during the firmware upgrade process, a card search command is sent repeatedly to reconnect to the handheld terminal; After reconnecting to the handheld terminal, the current upgrade location information is sent to the handheld terminal to continue the firmware upgrade from the interrupted location.
2. The wireless upgrade method for access control card readers according to claim 1, characterized in that, Also includes: The version information and upgrade catalog are displayed on the handheld terminal, and the pre-upgrade information, initialization information and upgrade instructions are generated and sent through the typing operation on the handheld terminal.
3. The wireless upgrade method for access control card readers according to claim 1, characterized in that, After the step of sending the upgrade directory to the handheld terminal, the method further includes: The device performs a security authentication process with the handheld terminal, and after passing the security authentication, it switches to the program upgrade mode.
4. The wireless upgrade method for access control card readers according to claim 3, characterized in that, The step of performing security authentication with the handheld terminal includes: Random data generated according to a set algorithm is sent to the handheld terminal to obtain authentication data generated by the handheld terminal according to the random number and the set algorithm. If the random data and the authentication data conform to a set pattern, the security authentication is determined to be successful.
5. The wireless upgrade method for access control card readers according to claim 1, characterized in that, The upgrade data includes several upgrade packages; the initialization information includes package number data and address data. The step of performing firmware upgrade based on the initialization information and the upgrade data sent by the handheld terminal includes: The write address of each upgrade package is determined based on the address data, the write order of each upgrade package is determined based on the package number data, and each upgrade package is written sequentially according to the write address and the write order.
6. The wireless upgrade method for access control card readers according to claim 1, characterized in that, Also includes: The upgrade data is unpacked using the handheld terminal to split it into several upgrade packages.
7. The wireless upgrade method for access control card readers according to claim 1, characterized in that, Also includes: If the firmware upgrade fails, a failure message is sent to the handheld terminal, so that the user can choose to upgrade again or restore the firmware according to the operation instructions fed back by the handheld terminal.
8. A wireless upgrade device for an access control card reader, characterized in that, Including handheld terminals and access control card readers; The handheld terminal is set to card emulation mode; The access control card reader sends out a card search command and waits for a response from the handheld terminal. After receiving the response, the handheld terminal wirelessly connects to the access control card reader. The access control card reader is used to send version information to the handheld terminal to obtain pre-upgrade information fed back by the handheld terminal; it also determines the upgrade directory based on the pre-upgrade information, and switches to program upgrade mode after sending the upgrade directory to the handheld terminal; Then, an initialization command is sent to the handheld terminal to obtain initialization information fed back by the handheld terminal; After receiving the upgrade command sent by the handheld terminal, the firmware is upgraded according to the initialization information and the upgrade data sent by the handheld terminal; If the connection to the handheld terminal is lost during the firmware upgrade process, a card search command is sent repeatedly to reconnect to the handheld terminal; After reconnecting to the handheld terminal, the current upgrade location information is sent to the handheld terminal to continue the firmware upgrade from the interrupted location.