Disclosure of Invention
In order to solve the above problems, the present invention provides a method for resetting a memory chip, a resetting device and a resetting system using the method for resetting the memory chip, wherein the method for resetting the memory chip can reset the memory chip without cracking the encryption algorithm of the memory chip, so that the memory chip can be reset regardless of whether the encryption degree of the memory chip is high or low.
A memory chip reset method comprises the following steps:
the communication between the imaging equipment and the chip to be reset is cut off, and the imaging equipment and the functional chip are connected, so that the functional chip can communicate with the imaging equipment;
acquiring an instruction sent by imaging equipment;
judging whether the command is a command for writing data of consumable consumption;
if so, disconnecting the communication between the imaging equipment and the functional chip before the data of the consumable consumption is written into the functional chip;
sending a write failure instruction to the imaging device;
connecting the imaging equipment and the chip to be reset; and resetting the chip to be reset through the imaging equipment.
Preferably, the process of resetting the chip to be reset by the imaging device includes the following steps:
the imaging device receives a write failure instruction;
an instruction for instructing the image forming apparatus to retransmit the data of the write consumable consumption amount according to the write failure;
writing the data of the consumable consumption which is not written into the functional chip into the chip to be reset;
after the data of the consumable consumption are written into the chip to be reset, the chip to be reset sends a command of successful writing to the imaging equipment to realize resetting.
Preferably, the step of turning on the imaging device and the chip to be reset is performed before the step of instructing the imaging device to send the data of the consumption amount of the writing consumables again according to the instruction of the write failure, and after the step of turning off the communication of the imaging device and the functional chip.
Preferably, after the data of the consumable consumption amount is written into the chip to be reset, the step of sending a write-success instruction to the imaging device by the chip to be reset to realize the reset includes the following substeps:
after receiving the data of the consumable consumption, the chip to be reset judges whether the writing is successful;
if so, generating a command with successful writing, and sending the command to the imaging equipment to complete resetting;
otherwise, generating a write failure instruction, and sending the instruction to the imaging equipment, wherein the imaging equipment continuously sends the instruction for writing the data of the consumable consumption.
Preferably, the instructions include a write instruction and a read instruction.
Preferably, the consumption of consumables of the chip to be reset has reached a maximum threshold; the consumable consumption of the functional chip is greater than or equal to zero and less than a maximum threshold.
Preferably, after the step of switching on the imaging device and the functional chip and before the step of acquiring the instruction sent by the imaging device, the method further comprises the following steps:
the imaging equipment verifies the validity of the functional chip;
if the functional chip is a legal chip, the functional chip can pass the verification of the imaging equipment;
after the functional chip passes the verification, the imaging device uses the functional chip;
the imaging apparatus transmits an instruction to the functional chip according to an operation of using the functional chip.
The invention also provides a memory chip reset device, comprising: the monitoring module and the controller are connected with the monitoring module;
the monitoring module comprises an acquisition unit, a judgment unit and a sending unit;
the acquisition unit is used for acquiring an instruction sent by the imaging equipment;
the judging unit is used for judging whether the command is a command for writing data of consumable consumption;
the sending unit is used for sending a writing failure instruction to the imaging device after the imaging device is disconnected from the communication of the functional chip;
the controller is used for controlling the on-off of the functional chip and the chip to be reset and the imaging equipment respectively; when the reset is started, the communication between the imaging equipment and the chip to be reset is cut off, and the imaging equipment and the functional chip are connected, so that the functional chip can communicate with the imaging equipment; if the judgment result of the judgment unit is yes, the communication between the imaging equipment and the functional chip is disconnected; and switching on the imaging equipment and the chip to be reset before sending the instruction of write failure to the imaging equipment.
The invention also provides a memory chip resetting system, which comprises imaging equipment, a resetting device, a functional chip and a resetting chip;
the reset device is the memory chip reset device, and a monitoring module and a controller of the reset device are both connected with the imaging equipment; the function chip and the reset chip are respectively connected with the controller.
Preferably, the reset device, the functional chip and the reset chip are respectively connected with the imaging device through an IIC bus.
The invention has the beneficial effects that:
compared with the prior art, the invention firstly disconnects the communication between the imaging equipment and the chip to be reset and connects the imaging equipment and the functional chip, so that the functional chip can communicate with the imaging equipment; then disconnecting the communication between the imaging device and the functional chip according to an instruction for writing data of consumable consumption sent by the imaging device; sending a writing failure instruction to the imaging equipment; connecting the imaging equipment and the chip to be reset; and resetting the chip to be reset through the imaging equipment. In the resetting process, the imaging device writes consumable consumption data into the functional chip firstly, and the functional chip can communicate with the imaging device after being cut off, so that the consumable consumption data cannot be successfully written into the functional chip, at the moment, the resetting device can send a writing failure instruction to the imaging device, after the imaging device receives the writing failure instruction, the imaging device can handshake with the chip again and send the unwritten data to the chip again, at the moment, the imaging device communicates with the imaging device to be reset, and therefore the data of consumable capacity sent by the imaging device again is written into the chip to be reset. Therefore, the chip to be reset can be reset without cracking the encryption algorithm of the chip to be reset, the resetting method, the resetting device and the resetting system of the memory chip can be used for resetting no matter how high or low the encryption degree of the chip to be reset is, and the resetting efficiency is high.
Detailed Description
The invention will be further described with reference to the accompanying drawings and the detailed description below:
with reference to fig. 1, the present embodiment provides a method for resetting a memory chip, including the following steps:
and step S1, disconnecting the communication between the imaging device and the chip to be reset, and connecting the imaging device and the functional chip, so that the functional chip can communicate with the imaging device. The chip to be reset and the functional chip can be connected with the imaging equipment through the IIC bus. Whether the chip to be reset and the functional chip are communicated with the imaging device or not can be controlled by a resetting device. For example, before the chip to be reset is reset, the imaging device needs to communicate with the functional chip to generate reset data and cannot communicate with the reset chip, so that the imaging device is prevented from generating wrong reset data.
It should be noted that the consumption of consumables of the chip to be reset has reached a maximum threshold; the consumable consumption of the functional chip is greater than or equal to zero and less than a maximum threshold. For example: the functional chip can be a brand new chip and can be verified by the imaging equipment; the chip to be reset is a used chip, if the data of the chip to be reset representing the consumable material capacity is zero, and the chip to be reset can be verified by the imaging equipment.
In step S2, an instruction sent by the imaging device is acquired. The imaging device generates a read instruction or a write instruction in the communication process with the functional chip and sends the read instruction or the write instruction to the functional chip. At this time, the instruction sent by the imaging device may be acquired by the reset means before the instruction is sent to the functional chip, and step S3 is executed.
In step S3, it is determined whether or not the command is a command for writing data of consumable consumption. If yes, go to step S4; otherwise, the instruction is allowed to be written into the functional chip because the imaging device verifies one or more operations of the validity of the functional chip and the reading of the serial number of the chip before writing the data of the consumable consumption amount into the functional chip.
And step S4, if yes, disconnecting the communication between the imaging device and the functional chip before the data of the consumable consumption is written into the functional chip. This step can prevent data of consumable consumption from being written into the functional chip, thereby providing reset data for resetting the chip to be reset. Because the image forming apparatus transmits the data written in the consumable consumption amount to the functional chip again when the consumable consumption amount is not successfully written in the functional chip.
In step S5, an instruction of write failure is sent to the image forming apparatus. Step S5 may be performed before the data of the consumable consumption amount is written in the functional chip, or step S5 may be performed before the communication between the image forming apparatus and the functional chip is disconnected after the data of the consumable consumption amount is written in the functional chip. Step S5 may also be performed after disconnecting the imaging device from communication with the function chip. The instruction of write failure may be generated by the reset device, or may be generated by the functional chip, for example, the address of the data written into the functional chip by the imaging device may exceed the range through the reset device, and the functional chip may generate the instruction of write failure.
Step S6, the imaging device and the chip to be reset are connected, so that the imaging device and the chip to be reset are communicated; and resetting the chip to be reset through the imaging equipment. Since the imaging device generates the data of the consumable consumption according to the functional chips before communicating with the chip to be reset, and the data is not successfully written into any chip, after the imaging device and the chip to be reset are switched on, the data of the consumable consumption is successfully written into the chip to be reset, so that the reset is completed.
Preferably, the process of resetting the chip to be reset by the imaging device in step S6 includes the following steps:
in step S61, the image forming apparatus receives an instruction of write failure.
Step S62, the image forming apparatus resends the instruction of writing the data of the consumable consumption amount according to the instruction of the write failure.
Step S63, writing the data of the consumable consumption which is not written into the functional chip into the chip to be reset; since the communication of the functional chip with the imaging device has been disconnected and the chip to be reset communicates with the imaging device before step S63, the instruction to write the data of the consumable consumption amount, which is sent again by the imaging device, is written to the chip to be reset.
In step S64, after the data of the consumable consumption is written into the chip to be reset, the chip to be reset generates a command of successful writing, and sends the command of successful writing to the imaging device to implement resetting. The data of the consumable consumption received by the chip to be reset at this moment actually comes from the functional chip, if the functional chip is a brand new chip, the functional chip prints a page of paper after communicating with the imaging device, then the consumable consumption is one, the data of the consumable consumption written into the chip to be reset at this moment is 1, the consumable equivalent to the chip to be reset only uses one page, if a brand new chip can print 10000 pages, the consumable of the chip to be reset after reset still remains 9999 pages.
Preferably, the step of turning on the imaging device and the chip to be reset is performed before the step of instructing the imaging device to send the data of the consumption amount of the writing consumables again according to the instruction of the write failure, and after the step of turning off the communication between the imaging device and the functional chip.
As a preferred scheme, after writing data of consumable consumption into the chip to be reset, the step of sending a write-success instruction to the imaging device by the chip to be reset to realize reset includes the following substeps:
after receiving the data of the consumable consumption, the chip to be reset judges whether the writing is successful;
if so, generating a command with successful writing, and sending the command to the imaging equipment to complete resetting;
otherwise, generating a write failure instruction, and sending the instruction to the imaging equipment, wherein the imaging equipment continuously sends the instruction for writing the data of the consumable consumption. The chip to be reset may also perform the following steps after the failure of writing the data of the consumable consumption amount: the imaging device determines the chip as an illegal chip and prohibits the reset chip from communicating with the imaging device.
Preferably, after the step of turning on the imaging device and the functional chip and before the step of acquiring the instruction sent by the imaging device, the method further comprises the following steps:
the imaging equipment verifies the validity of the functional chip;
if the functional chip is a legal chip, the functional chip can pass the verification of the imaging equipment;
after the functional chip passes the verification, the imaging device uses the functional chip;
the imaging device sends an instruction to the functional chip according to an operation using the functional chip. The image forming apparatus may use the functional chip in such a manner that the image forming apparatus performs an image forming operation through the functional chip, consumes consumables at this time, and records a consumption amount of the consumables, for example, a printer may perform printing of a sheet of paper using the functional chip, and record a consumption amount of the consumables as 1.
In summary, the invention writes the data of the consumable consumption of the functional chip into the chip to be reset by monitoring the communication state and the sent data of the imaging device and the functional chip, so that the consumable consumption of the chip to be reset is the functional chip, the reset is completed, and the encryption algorithm of the chip to be reset is not required to be known in the reset process.
As another preferred embodiment, referring to fig. 2, the present invention further provides a memory chip reset apparatus 100, including: the monitoring system comprises a monitoring module 1 and a controller 2 connected with the monitoring module 1. The monitoring module 1 comprises an acquisition unit 11, a judgment unit 12 and a sending unit 13; the acquiring unit 11, the determining unit 12, and the transmitting unit 13 may be connected to the controller 2, respectively. The acquiring unit 11 may also be connected to the imaging device, and the acquiring unit 11 is configured to acquire an instruction sent by the imaging device. The judging unit 12 is configured to judge whether the instruction is an instruction to write data of consumable consumption. The transmission unit 13 may also be connected to the imaging device, and the transmission unit 13 is configured to transmit an instruction of write failure to the imaging device after the imaging device is disconnected from the communication with the functional chip 200. The controller 2 can be connected with both the functional chip 200 and the chip 300 to be reset, and the controller 2 is used for controlling the on-off of the functional chip 200 and the chip 300 to be reset with the imaging device respectively; when the reset is started, the communication between the imaging device and the chip 300 to be reset is cut off, and the imaging device and the functional chip 200 are connected, so that the functional chip 200 can communicate with the imaging device; if the judgment result of the judgment unit 12 is yes, the communication between the imaging device and the functional chip 200 is disconnected; the imaging device and the chip 300 to be reset are turned on before an instruction of write failure is sent to the imaging device.
As another preferred embodiment, referring to fig. 3, the present invention further provides a memory chip reset system, which includes an imaging device, a reset apparatus 100, a functional chip 200 and a reset chip;
the reset device is the memory chip reset device 100 described in the above embodiment, and the monitoring module 1 and the controller 2 of the reset device are both connected with the imaging device; the functional chip 200 and the reset chip are respectively connected to the controller 2. The reset device 100, the functional chip 200 and the reset chip are respectively connected with the imaging device through an IIC bus 400. The controller (a/B)2 is arranged on a line connecting the functional chip 200 and the imaging device; the controller (C/D)2 is arranged on a line connecting the chip 300 to be reset and the imaging device, so that the controller 2 can better control the on-off of the communication between the functional chip 200 and the chip 300 to be reset and the imaging device.
It should be noted that the memory chip reset device and the memory chip reset system of the present invention can both reset the chip 300 to be reset by using the memory chip reset method described in the above embodiments.
The working principle of the memory chip resetting method, the resetting device and the resetting system of the invention is explained by taking the following printer as an imaging device for resetting a chip to be reset, wherein the chip to be reset is a printed chip:
the functional chip is a brand new chip, that is, the functional chip has not been installed or has not been installed with the printer, so the value of the counting area for recording the consumption of the consumable supplies is zero, at this time, if the printer prints a piece of paper, the printer writes 1 in the counting area of the functional chip, that is, the consumption of the consumable supplies is 1. At this time, the communication between the functional chip and the imaging device is cut off, the chip to be reset is communicated with the imaging device, then an instruction that the functional chip fails to write the data 1 of the received consumable consumption into the counting area is sent to the imaging device through the resetting device, the printer is communicated with the functional chip again after receiving the instruction that the data 1 of the received consumable consumption is not successfully written into the counting area, namely, handshake is carried out again, at this time, the printer can continue to send the data of the consumable consumption which cannot be written into the functional chip last time again, and the imaging device is communicated with the chip to be reset, so that the data of the consumable consumption sent by the printer is actually sent to the chip to be reset to complete reset.
In summary, in the resetting process, after the imaging device writes the consumable consumption data into the functional chip, the resetting device may send a write failure instruction to the imaging device, after the imaging device receives the write failure instruction, the imaging device may handshake with the chip again and resend the unwritten data to the chip again, and at this time, the data of the consumable capacity unsuccessfully written, which is sent again by the imaging device, is received as the chip to be reset. It should be noted that the chip to be reset may be an old chip originally installed. The invention realizes the reset operation by switching the functional chip connected with the imaging equipment into the chip to be reset before the printer re-handshakes with the chip and re-sends the unwritten data to the chip. Therefore, the chip to be reset can be reset without cracking the encryption algorithm of the chip to be reset, the resetting method, the resetting device and the resetting system of the memory chip can be used for resetting no matter how high or low the encryption degree of the chip to be reset is, and the resetting efficiency is high.
Various other modifications and changes may be made by those skilled in the art based on the above-described technical solutions and concepts, and all such modifications and changes should fall within the scope of the claims of the present invention.
It should be noted that: the embodiments described above are only a part of the embodiments of the present invention, and not all of them. As used in the examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.