CN107818259B - A printing authorization control circuit and control method - Google Patents

A printing authorization control circuit and control method Download PDF

Info

Publication number
CN107818259B
CN107818259B CN201711220903.0A CN201711220903A CN107818259B CN 107818259 B CN107818259 B CN 107818259B CN 201711220903 A CN201711220903 A CN 201711220903A CN 107818259 B CN107818259 B CN 107818259B
Authority
CN
China
Prior art keywords
module
usb
main control
power supply
chip
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711220903.0A
Other languages
Chinese (zh)
Other versions
CN107818259A (en
Inventor
杨建章
贾昕悦
任安心
赵旭光
吴笛
黄历
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HUNAN GREATWALL MEDITECH CO Ltd
Original Assignee
HUNAN GREATWALL MEDITECH CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HUNAN GREATWALL MEDITECH CO Ltd filed Critical HUNAN GREATWALL MEDITECH CO Ltd
Priority to CN201711220903.0A priority Critical patent/CN107818259B/en
Publication of CN107818259A publication Critical patent/CN107818259A/en
Application granted granted Critical
Publication of CN107818259B publication Critical patent/CN107818259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1238Secure printing, e.g. user identification, user rights for device usage, unallowed content, blanking portions or fields of a page, releasing held jobs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1279Controller construction, e.g. aspects of the interface hardware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Power Sources (AREA)

Abstract

本发明公开了一种打印授权控制电路以及控制方法,电路包括供电模块、接口连接及保护模块、主控模块、存储模块及电平转换模块;供电模块的输入端连接USB5V电源,输出端连接存储模块、主控模块及电平转换模块;接口连接及保护模块包括依次串接的第一USB接口、USB控制芯片及第二USB接口,第一USB接口与计算机端连接,第二USB接口与打印机端连接;主控模块的PMOS管栅极与主控MCU连接,源极连接USB5V电源,漏极接地;主控MCU与USB控制芯片连接;电平转换模块与计算机串口连接,存储模块存储密钥,主控MCU的校验单元用于与计算机身份认证。本通过上述电路保障打印操作在应用授权环境下进行的。

The invention discloses a printing authorization control circuit and a control method. The circuit includes a power supply module, an interface connection and protection module, a main control module, a storage module and a level conversion module; the input end of the power supply module is connected to a USB 5V power supply, and the output end is connected to the storage module, main control module and level conversion module; the interface connection and protection module includes a first USB interface, a USB control chip and a second USB interface connected in series, the first USB interface is connected to the computer, and the second USB interface is connected to the printer terminal connection; the PMOS tube gate of the main control module is connected to the main control MCU, the source is connected to the USB5V power supply, and the drain is connected to ground; the main control MCU is connected to the USB control chip; the level conversion module is connected to the computer serial port, and the storage module stores the key , the verification unit of the main control MCU is used for identity authentication with the computer. This circuit uses the above circuit to ensure that the printing operation is performed in an application-authorized environment.

Description

一种打印授权控制电路以及控制方法A printing authorization control circuit and control method

技术领域Technical field

本发明属于打印机及打印内容安全管理领域,具体涉及一种打印授权控制电路以及控制方法。The invention belongs to the field of printers and printing content security management, and specifically relates to a printing authorization control circuit and a control method.

背景技术Background technique

随着打印形式的电子凭证的普及化,以前需要手写的很多文档都以打印的方式进行呈现,市面上现有的解决方案往往为通过应用软件对打印及机的调用进行管理,但因打印协议及打印机控制方法的通用性,导致存在跳过应用软件的授权管理而直接调用打印机或打印模块进行打印的情况出现,进而导致电子凭证可以虚假、伪造,给管理带来不便,因此有必要对打印授权进行控制,增加打印安全方面的防护措施。With the popularization of electronic vouchers in printed form, many documents that previously needed to be handwritten are presented in printed form. The existing solutions on the market often manage the calls to printers and machines through application software, but due to the printing protocol and the versatility of the printer control method, resulting in situations where the authorization management of the application software is skipped and the printer or printing module is directly called for printing, which in turn leads to the electronic vouchers being false and forged, causing inconvenience to the management. Therefore, it is necessary to print Empower control and add protective measures for printing security.

发明内容Contents of the invention

本发明的目的是提供一种打印授权控制电路以及控制方法,对USB打印机及打印模块进行授权控制,对打印安全授权进行控制,以保证安全打印。The purpose of the present invention is to provide a printing authorization control circuit and a control method, which can perform authorization control on USB printers and printing modules, and control printing security authorization to ensure safe printing.

一方面,本发明提供一种打印授权控制电路,包括供电模块、接口连接及保护模块、主控模块、存储模块以及电平转换模块;On the one hand, the present invention provides a printing authorization control circuit, including a power supply module, an interface connection and protection module, a main control module, a storage module and a level conversion module;

其中,所述供电模块的输入端连接USB5V电源,存储模块、主控模块以及电平转换模块均与供电模块的输出端连接;Wherein, the input end of the power supply module is connected to the USB5V power supply, and the storage module, main control module and level conversion module are all connected to the output end of the power supply module;

所述接口连接及保护模块包括依次串接的第一USB接口、USB控制芯片以及第二USB接口,其中,所述第一USB接口与计算机端连接,所述第二USB接口与打印机端连接;The interface connection and protection module includes a first USB interface, a USB control chip and a second USB interface connected in series, wherein the first USB interface is connected to the computer end, and the second USB interface is connected to the printer end;

主控模块包括主控MCU以及PMOS管,其中,所述PMOS管的栅极与所述主控MCU的PCON端连接,源极连接USB5V电源,漏极接地;所述主控MCU的使能端与所述USB控制芯片的使能端连接,所述主控MCU与存储模块、电平转换模块连接,所述电平转换模块与计算机串口连接,所述存储模块存储密钥;The main control module includes a main control MCU and a PMOS tube, wherein the gate of the PMOS tube is connected to the PCON terminal of the main control MCU, the source is connected to the USB5V power supply, and the drain is connected to ground; the enable terminal of the main control MCU It is connected to the enable end of the USB control chip, the main control MCU is connected to the storage module and the level conversion module, the level conversion module is connected to the computer serial port, and the storage module stores the key;

所述主控MCU包括校验单元,所述校验单元用于与计算机通过所述密钥进行身份认证。The main control MCU includes a verification unit, which is used to perform identity authentication with the computer through the key.

主控MCU与计算机之间通过电平转换模块串口通讯,进而通过密钥校验实现身份认证,若认证通过,授权控制电路正常工作;若校验失败超过预设次数而导致认证失败,授权控制电路中的主控MCU操作PMOS管导通使USB5V电源对地导通,进而使计算机至第一USB接口部分进入过电流保护状态,此时计算机的操作系统根据标准USB协议将计算机至打印授权控制电路的USB端口关闭,主控MCU通过使能端发送控制指令给USB控制芯片,USB控制芯片断开第一USB接口的硬件电源连接,避免硬件损伤。The main control MCU communicates with the computer through the serial port of the level conversion module, and then realizes identity authentication through key verification. If the authentication passes, the authorization control circuit works normally; if the verification fails more than the preset number of times, resulting in authentication failure, the authorization control The main control MCU in the circuit operates the PMOS tube to conduct the USB 5V power supply to the ground, thereby causing the computer to the first USB interface to enter an over-current protection state. At this time, the computer's operating system controls the computer to print authorization according to the standard USB protocol. The USB port of the circuit is closed, and the main control MCU sends control instructions to the USB control chip through the enable terminal. The USB control chip disconnects the hardware power supply of the first USB interface to avoid hardware damage.

优选地,所述接口连接及保护模块还包括USB保护芯片,所述第一USB接口、USB保护芯片和所述第二USB接口依次串接。Preferably, the interface connection and protection module further includes a USB protection chip, and the first USB interface, USB protection chip and second USB interface are connected in series in sequence.

USB保护芯片用于实现抗USB干扰功能。The USB protection chip is used to implement the anti-USB interference function.

优选地,所述供电模块包括线性稳压芯片以及三个电容,所述线性稳压芯片的电压输入端连接USB5V电源,所述三个电容并联于所述线性稳压芯片电压输入端和电压输出端之间。Preferably, the power supply module includes a linear voltage stabilizing chip and three capacitors. The voltage input terminal of the linear voltage stabilizing chip is connected to the USB5V power supply. The three capacitors are connected in parallel to the voltage input terminal and voltage output of the linear voltage stabilizing chip. between ends.

所述供电模块输出3.3V电压。The power supply module outputs 3.3V voltage.

优选地,所述主控MCU与所述PMOS管的栅极之间串联4.7K电阻,所述PMOS管的栅极与USB5V电源之间串联10K电阻。Preferably, a 4.7K resistor is connected in series between the main control MCU and the gate of the PMOS tube, and a 10K resistor is connected in series between the gate of the PMOS tube and the USB5V power supply.

优选地,所述存储模块连接所述主控MCU的SPI管脚。Preferably, the storage module is connected to the SPI pin of the main control MCU.

优选地,所述主控MCU的TX和RX管脚与所述电平转换模块的RX、TX管脚相对应连接。Preferably, the TX and RX pins of the main control MCU are connected correspondingly to the RX and TX pins of the level conversion module.

另一方面,本发明提供一种基于上述电路的控制方法,包括如下步骤:On the other hand, the present invention provides a control method based on the above circuit, including the following steps:

步骤1:所述主控MCU与计算机通过存储模块存储的密钥来进行身份认证,若通过身份认证,授权打印,若密钥校验失败超过预设次数,身份认证失败并执行步骤2;Step 1: The main control MCU and the computer perform identity authentication through the key stored in the storage module. If the identity authentication passes, printing is authorized. If the key verification fails for more than the preset number of times, the identity authentication fails and step 2 is performed;

步骤2:所述主控模块控制PMOS管导通使USB5V电源对地导通,并通过使能端发送控制指令给USB控制芯片;Step 2: The main control module controls the PMOS tube to conduct the USB 5V power supply to the ground, and sends control instructions to the USB control chip through the enable terminal;

其中,USB5V电源对地导通后,第一USB接口部分进入过电流保护状态;Among them, after the USB 5V power supply is connected to the ground, the first USB interface part enters the over-current protection state;

步骤3:所述USB控制芯片断开第一USB接口的硬件电源连接。Step 3: The USB control chip disconnects the hardware power supply of the first USB interface.

优选地,所述方法还包括:所述主控MCU检测到重新上电或异常断电后,将存储模块中存储的密钥进行擦除。Preferably, the method further includes: erasing the key stored in the storage module after the main control MCU detects power-on again or abnormal power-off.

提高安全性能,防止出现存储模块被拆卸而被用于反向读取机密信息。Improve security performance to prevent the storage module from being disassembled and used to reversely read confidential information.

有益效果beneficial effects

本发明提供了一种打印授权控制电路以及控制方法,通过供电模块、接口连接及保护模块、主控模块、存储模块以及电平转换模块之间的连接实现打印机与计算机之间打印操作的控制,其中,主控模块密钥校验失败超过预设次数后,主控模块的主控MCU通过控制主控模块的PMOS管导通使USB5V电源对地导通,进而使计算机与接口连接及保护模块中的第一USB接口之间进入过电流保护状态,促使接口连接及保护模块中USB控制芯片断开第一USB接口的硬件电源连接,防止硬件损伤,使得整个打印授权控制电路属于失电状态,认证未通过的前提下无法进行打印,提高打印的安全性,保障打印内容是在授权的应用环境下进行打印的;与此同时,主控MCU检测到重新上电或异常断电后,均擦除存储模块中存储的密钥,防止存储模块被拆卸而被用于反向读取机密信息。The invention provides a printing authorization control circuit and a control method, which realizes the control of the printing operation between the printer and the computer through the connection between the power supply module, the interface connection and protection module, the main control module, the storage module and the level conversion module. Among them, after the key verification of the main control module fails for more than the preset number of times, the main control MCU of the main control module controls the PMOS tube of the main control module to conduct the USB5V power supply to the ground, thereby connecting the computer to the interface and protecting the module. The first USB interface in the interface enters an over-current protection state, prompting the USB control chip in the interface connection and protection module to disconnect the hardware power supply of the first USB interface to prevent hardware damage, causing the entire print authorization control circuit to be in a power-off state. Printing cannot be performed without passing the authentication, which improves the security of printing and ensures that the printed content is printed in an authorized application environment; at the same time, the main control MCU detects that after power-on or abnormal power-off, all data will be erased. Remove the key stored in the storage module to prevent the storage module from being disassembled and used to reversely read confidential information.

附图说明Description of drawings

图1是本发明实施例提供的接口连接及保护模块的电路图;Figure 1 is a circuit diagram of an interface connection and protection module provided by an embodiment of the present invention;

图2是本发明实施例提供的供电模块的电路图;Figure 2 is a circuit diagram of a power supply module provided by an embodiment of the present invention;

图3是本发明实施例提供的主控模块的电路图;Figure 3 is a circuit diagram of a main control module provided by an embodiment of the present invention;

图4是本发明实施例提供的存储模块的电路图;Figure 4 is a circuit diagram of a memory module provided by an embodiment of the present invention;

图5是本发明实施例提供的电平转换模块的电路图。Figure 5 is a circuit diagram of a level conversion module provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合实施例对本发明做进一步的说明。The present invention will be further described below in conjunction with examples.

如图1-图5所示,本发明提供一种打印授权控制电路包括供电模块、接口连接及保护模块、主控模块、存储模块以及电平转换模块。其中图1所示为接口连接及保护模块的电路图,如图2所示为供电模块的电路图,如图3所示为主控模块的电路图,如图4所示为存储模块的电路图,如图5所示为电平转换模块的电路图。As shown in Figures 1 to 5, the present invention provides a printing authorization control circuit including a power supply module, an interface connection and protection module, a main control module, a storage module and a level conversion module. Figure 1 shows the circuit diagram of the interface connection and protection module, Figure 2 shows the circuit diagram of the power supply module, Figure 3 shows the circuit diagram of the main control module, Figure 4 shows the circuit diagram of the storage module, as shown in Figure 5 shows the circuit diagram of the level conversion module.

其中,如图1所示,接口连接及保护模块包括第一USB接口J1、USB控制芯片U3、第二USB接口J2以及USB保护芯片U4,其中第一USB接口J1、USB控制芯片U3、第二USB接口J2依次串接,第一USB接口J1、USB保护芯片U4和第二USB接口J2依次串接,第一USB接口J1与计算机端连接,第二USB接口J2与打印机端连接。具体的,第一USB接口J1的5V电压接口连接USB控制芯片U3的电源输入端IN,USB控制芯片U3的输出端连接第二USB接口J2的5V电压接口,第一USB接口J1、第二USB接口J2以及USB控制芯片U3的GND端接地;第一USB接口J1和第二USB接口J2的D+,D-两根数据线间串接USB保护芯片U4。本实施例中,USB控制芯片U3选用德州仪器的型号为LM3525M-H的芯片,USB保护芯片U4选用型号为IP4234CZ6的芯片。Among them, as shown in Figure 1, the interface connection and protection module includes a first USB interface J1, a USB control chip U3, a second USB interface J2 and a USB protection chip U4. The first USB interface J1, USB control chip U3, second The USB interface J2 is connected in series in sequence, the first USB interface J1, the USB protection chip U4 and the second USB interface J2 are connected in series in sequence. The first USB interface J1 is connected to the computer end, and the second USB interface J2 is connected to the printer end. Specifically, the 5V voltage interface of the first USB interface J1 is connected to the power input terminal IN of the USB control chip U3, and the output end of the USB control chip U3 is connected to the 5V voltage interface of the second USB interface J2. The first USB interface J1 and the second USB The GND end of the interface J2 and the USB control chip U3 is grounded; the D+ and D- data lines of the first USB interface J1 and the second USB interface J2 are connected in series with the USB protection chip U4. In this embodiment, the USB control chip U3 is a chip of Texas Instruments model LM3525M-H, and the USB protection chip U4 is a chip of IP4234CZ6.

如图2所示,供电模块的输入端连接USB5V电源,输出端输出3.3V电源,存储模块、主控模块以及电平转换模块均与输出端连接。其中,供电模块包括线性稳压芯片U1以及三个电容,如图所示,三个电容分别为电容C4,电容C5以及电容C6。线性稳压芯片U1的电压输入端连接USB5V电源,上述三个电容并联于线性稳压芯片U1电压输入端和电压输出端之间,其中电容C5以及电容C6用于滤波。本实施例中,线性稳压芯片U1选用型号为ASM117的芯片。As shown in Figure 2, the input end of the power supply module is connected to the USB 5V power supply, the output end outputs 3.3V power supply, and the storage module, main control module and level conversion module are all connected to the output end. Among them, the power supply module includes a linear voltage regulator chip U1 and three capacitors. As shown in the figure, the three capacitors are capacitor C4, capacitor C5 and capacitor C6. The voltage input terminal of the linear voltage regulator chip U1 is connected to the USB5V power supply. The above three capacitors are connected in parallel between the voltage input terminal and the voltage output terminal of the linear voltage regulator chip U1. Capacitors C5 and C6 are used for filtering. In this embodiment, the linear voltage regulator chip U1 is a chip of model ASM117.

如图3-图5所示,主控模块包括主控MCU U2以及PMOS管Q6,其中,PMOS管Q6的栅极与主控MCU U2的PCON端连接,源极连接USB5V电源,漏极接地;主控MCU U2与PMOS管Q6的栅极之间串联4.7K电阻,PMOS管Q6的栅极与USB5V电源之间串联10K电阻。其中,主控MCU U2通过控制PCON端输出电平来控制PMOS管Q6的通断,当PMOS管Q6导通时,USB5V电源将对地导通,使得计算机至第一USB接口部分进入过电流保护状态,此时计算机的操作系统根据标准USB协议将计算机至打印授权控制电路的USB端口关闭。此外,主控MCU U2的使能端EN与USB控制芯片U3的使能端EN连接,用于传输控制指令。计算机至第一USB接口部分进入过电流保护状态时,主控MCU U2通过使能端EN发送指令给USB控制芯片U3,促使USB控制芯片U3断开第一USB接口的硬件电源连接,避免硬件损伤,进而使得整个打印授权控制电路失电,打印无法被检测以及调用。此外,如图3和图4所示,主控MCU U2与存储模块U5连接,用于更新或删除存储模块存储的信息,如密钥;其中存储模块U5连接主控MCU U2的SPI管脚。此外,主控MCU U2与电平转换模块U6连接,电平转换模块U6与计算机串口连接,用于实现主控MCU U2与计算机之间电平的转换;其中,主控MCU U2的TX和RX管脚与电平转换模块U6的RX、TX管脚相对应连接,电平转换模块U6与计算机的RS232串口连接。本实施例中,主控MCU U2应当具有串口、掉电检测功能以及SPI接口,例如可以选用德州仪器的型号为MSP430的MCU;ST的型号为STM32的MCU,Dialog的型号为DA14580的MCU;存储模块U5选用华邦的型号为W25X20的芯片;电平转换模块U6选用型号为MAX232CSE的芯片。As shown in Figure 3 to Figure 5, the main control module includes the main control MCU U2 and the PMOS tube Q6. The gate of the PMOS tube Q6 is connected to the PCON terminal of the main control MCU U2, the source is connected to the USB5V power supply, and the drain is connected to ground; A 4.7K resistor is connected in series between the main control MCU U2 and the gate of PMOS tube Q6, and a 10K resistor is connected in series between the gate of PMOS tube Q6 and the USB5V power supply. Among them, the main control MCU U2 controls the on and off of the PMOS tube Q6 by controlling the output level of the PCON terminal. When the PMOS tube Q6 is turned on, the USB 5V power supply is conducted to the ground, causing the computer to the first USB interface to enter over-current protection. status, at this time the computer's operating system closes the USB port from the computer to the print authorization control circuit according to the standard USB protocol. In addition, the enable terminal EN of the main control MCU U2 is connected to the enable terminal EN of the USB control chip U3 for transmitting control instructions. When the computer to the first USB interface enters the overcurrent protection state, the main control MCU U2 sends an instruction to the USB control chip U3 through the enable terminal EN, prompting the USB control chip U3 to disconnect the hardware power supply of the first USB interface to avoid hardware damage. , which in turn causes the entire print authorization control circuit to lose power, and printing cannot be detected and called. In addition, as shown in Figures 3 and 4, the main control MCU U2 is connected to the storage module U5 for updating or deleting information stored in the storage module, such as keys; the storage module U5 is connected to the SPI pin of the main control MCU U2. In addition, the main control MCU U2 is connected to the level conversion module U6, and the level conversion module U6 is connected to the computer serial port to realize the level conversion between the main control MCU U2 and the computer; among them, the TX and RX of the main control MCU U2 The pins are connected correspondingly to the RX and TX pins of the level conversion module U6, and the level conversion module U6 is connected to the RS232 serial port of the computer. In this embodiment, the main control MCU U2 should have a serial port, a power-down detection function and an SPI interface. For example, the MCU model MSP430 from Texas Instruments, the MCU model STM32 from ST, and the MCU model DA14580 from Dialog can be used. Storage Module U5 uses the Winbond chip model W25X20; the level conversion module U6 uses the chip model MAX232CSE.

打印授权电路正常工作时,主控模块与计算机之间密钥校验正常,各个模块之间正常通信;主控模块与计算机之间密钥校验失败超过预设次数时,例如3次,在主控MCU U2控制PMOS管Q6导通的作用下,打印授权电路中第一USB接口与计算机部分进入过电流保护状态,USB控制芯片U3断开第一USB接口的硬件电源连接,打印无法被检测以及调用;若打印授权控制电路从授权异常状态恢复为正常状态时,打印授权控制电路的各个模块之间正常通讯。When the print authorization circuit works normally, the key verification between the main control module and the computer is normal, and the communication between each module is normal; when the key verification between the main control module and the computer fails more than the preset number of times, such as 3 times, in Under the influence of the main control MCU U2 controlling the conduction of PMOS tube Q6, the first USB interface and the computer part in the printing authorization circuit enter the over-current protection state. The USB control chip U3 disconnects the hardware power supply of the first USB interface, and the printing cannot be detected. And call; if the printing authorization control circuit returns to the normal state from the authorization abnormal state, the various modules of the printing authorization control circuit communicate normally.

本发明还提供一种基于上述电路的控制方法,所述方法包括如下步骤:The present invention also provides a control method based on the above circuit, which method includes the following steps:

步骤1:所述主控MCU与计算机通过密钥校验来进行身份认证,若通过身份认证,授权打印,若密钥校验失败超过预设次数,身份认证失败并执行步骤2;Step 1: The main control MCU and the computer perform identity authentication through key verification. If the identity authentication passes, printing is authorized. If the key verification fails for more than the preset number of times, the identity authentication fails and step 2 is performed;

步骤2:所述主控模块控制PMOS管导通使USB5V电源对地导通,并通过使能端发送控制指令给USB控制芯片;Step 2: The main control module controls the PMOS tube to conduct the USB 5V power supply to the ground, and sends control instructions to the USB control chip through the enable terminal;

其中,USB5V电源对地导通后,第一USB接口部分进入过电流保护状态;Among them, after the USB 5V power supply is connected to the ground, the first USB interface part enters the over-current protection state;

步骤3:所述USB控制芯片断开第一USB接口的硬件电源连接。Step 3: The USB control chip disconnects the hardware power supply of the first USB interface.

进一步地,所述方法还包括主控MCU检测到重新上电或异常断电后,将存储模块中存储的密钥进行擦除。用于防止出现存储密钥的芯片被拆卸而被用于反向读取机密信息。其中,存储模块存储的密钥由计算机发送过来并更新。其中存储模块存储的密钥的生成过程为:计算机通过指令+初始密钥的形式将密钥发送给主控MCU,主控MCU再发送给存储模块进行存储。此外,主控MCU接收到密钥后,在随机产生新密钥并发送给计算机,用于步骤1的校验过程。本发明提供的一种打印授权控制电路及控制方法是属于打印安全方面的防护措施,对打印操作进行授权认证,尤其是针对敏感内容或金融、医疗等凭证打印尤其重要。Further, the method also includes erasing the key stored in the storage module after the main control MCU detects re-powering or abnormal power-off. This prevents the chip storing the key from being disassembled and used to reversely read confidential information. Among them, the key stored in the storage module is sent by the computer and updated. The generation process of the key stored in the storage module is as follows: the computer sends the key to the main control MCU in the form of instructions + initial key, and the main control MCU then sends it to the storage module for storage. In addition, after receiving the key, the main control MCU randomly generates a new key and sends it to the computer for the verification process in step 1. The printing authorization control circuit and control method provided by the present invention are protective measures for printing security. It is particularly important to authorize and authenticate printing operations, especially for sensitive content or financial, medical and other voucher printing.

需要强调的是,本发明所述的实例是说明性的,而不是限定性的,因此本发明不限于具体实施方式中所述的实例,凡是由本领域技术人员根据本发明的技术方案得出的其他实施方式,不脱离本发明宗旨和范围的,不论是修改还是替换,同样属于本发明的保护范围。It should be emphasized that the examples described in the present invention are illustrative rather than restrictive. Therefore, the present invention is not limited to the examples described in the specific embodiments. All those obtained by those skilled in the art based on the technical solutions of the present invention Other embodiments, whether modified or replaced, which do not deviate from the spirit and scope of the present invention, also belong to the protection scope of the present invention.

Claims (8)

1.一种打印授权控制电路,其特征在于:包括供电模块、接口连接及保护模块、主控模块、存储模块以及电平转换模块;1. A printing authorization control circuit, characterized by: including a power supply module, an interface connection and protection module, a main control module, a storage module and a level conversion module; 其中,所述供电模块的输入端连接USB5V电源,存储模块、主控模块以及电平转换模块均与供电模块的输出端连接;Wherein, the input end of the power supply module is connected to the USB5V power supply, and the storage module, main control module and level conversion module are all connected to the output end of the power supply module; 所述接口连接及保护模块包括依次串接的第一USB接口、USB控制芯片以及第二USB接口,其中,所述第一USB接口与计算机端连接,所述第二USB接口与打印机端连接;The interface connection and protection module includes a first USB interface, a USB control chip and a second USB interface connected in series, wherein the first USB interface is connected to the computer end, and the second USB interface is connected to the printer end; 主控模块包括主控MCU以及PMOS管,其中,所述PMOS管的栅极与所述主控MCU的PCON端连接,源极连接USB5V电源,漏极接地;所述主控MCU的使能端与所述USB控制芯片的使能端连接,所述主控MCU与存储模块、电平转换模块连接,所述电平转换模块与计算机串口连接,所述存储模块存储密钥;The main control module includes a main control MCU and a PMOS tube, wherein the gate of the PMOS tube is connected to the PCON terminal of the main control MCU, the source is connected to the USB5V power supply, and the drain is connected to ground; the enable terminal of the main control MCU It is connected to the enable end of the USB control chip, the main control MCU is connected to the storage module and the level conversion module, the level conversion module is connected to the computer serial port, and the storage module stores the key; 所述主控MCU包括校验单元,所述校验单元用于与计算机通过所述密钥进行身份认证;The main control MCU includes a verification unit, which is used to perform identity authentication with the computer through the key; 所述主控模块,用于:在身份认证失败后控制PMOS管导通使USB5V电源对地导通,并通过使能端发送控制指令给USB控制芯片,使USB控制芯片断开第一USB接口的硬件电源连接;其中,USB5V电源对地导通后,第一USB接口部分进入过电流保护状态。The main control module is used to: after the identity authentication fails, control the PMOS tube to conduct the USB 5V power supply to the ground, and send control instructions to the USB control chip through the enable terminal to cause the USB control chip to disconnect the first USB interface. The hardware power supply connection; among them, after the USB5V power supply is connected to the ground, the first USB interface part enters the over-current protection state. 2.根据权利要求1所述的电路,其特征在于:所述接口连接及保护模块还包括USB保护芯片,所述第一USB接口、USB保护芯片和所述第二USB接口依次串接。2. The circuit according to claim 1, wherein the interface connection and protection module further includes a USB protection chip, and the first USB interface, USB protection chip and second USB interface are connected in series in sequence. 3.根据权利要求1所述的电路,其特征在于:所述供电模块包括线性稳压芯片以及三个电容,所述线性稳压芯片的电压输入端连接USB5V电源,所述三个电容并联于所述线性稳压芯片电压输入端和电压输出端之间。3. The circuit according to claim 1, characterized in that: the power supply module includes a linear voltage stabilizing chip and three capacitors, the voltage input end of the linear voltage stabilizing chip is connected to a USB5V power supply, and the three capacitors are connected in parallel. between the voltage input terminal and the voltage output terminal of the linear voltage regulator chip. 4.根据权利要求1所述的电路,其特征在于:所述主控MCU与所述PMOS管的栅极之间串联4.7K电阻,所述PMOS管的栅极与USB5V电源之间串联10K电阻。4. The circuit according to claim 1, characterized in that: a 4.7K resistor is connected in series between the main control MCU and the gate of the PMOS tube, and a 10K resistor is connected in series between the gate of the PMOS tube and the USB5V power supply. . 5.根据权利要求1所述的电路,其特征在于:所述存储模块连接所述主控MCU的SPI管脚。5. The circuit according to claim 1, characterized in that: the storage module is connected to the SPI pin of the main control MCU. 6.根据权利要求1所述的电路,其特征在于:所述主控MCU的TX和RX管脚与所述电平转换模块的RX、TX管脚相对应连接。6. The circuit according to claim 1, characterized in that: the TX and RX pins of the main control MCU are connected correspondingly to the RX and TX pins of the level conversion module. 7.基于上述权利要求1-6任一所述电路的控制方法,其特征在于:包括如下步骤:7. The control method based on the circuit of any one of the above claims 1-6, characterized in that: it includes the following steps: 步骤1:所述主控MCU与计算机通过存储模块存储的密钥来进行身份认证,若通过身份认证,授权打印,若密钥校验失败超过预设次数,身份认证失败并执行步骤2;Step 1: The main control MCU and the computer perform identity authentication through the key stored in the storage module. If the identity authentication passes, printing is authorized. If the key verification fails for more than the preset number of times, the identity authentication fails and step 2 is performed; 步骤2:所述主控模块控制PMOS管导通使USB5V电源对地导通,并通过使能端发送控制指令给USB控制芯片;Step 2: The main control module controls the PMOS tube to conduct the USB 5V power supply to the ground, and sends control instructions to the USB control chip through the enable terminal; 其中,USB5V电源对地导通后,第一USB接口部分进入过电流保护状态;Among them, after the USB 5V power supply is connected to the ground, the first USB interface part enters the over-current protection state; 步骤3:所述USB控制芯片断开第一USB接口的硬件电源连接。Step 3: The USB control chip disconnects the hardware power supply of the first USB interface. 8.根据权利要求7所述的方法,其特征在于:还包括:所述主控MCU检测到重新上电或异常断电后,将存储模块中存储的密钥进行擦除。8. The method according to claim 7, further comprising: erasing the key stored in the storage module after the main control MCU detects re-powering or abnormal power-off.
CN201711220903.0A 2017-11-29 2017-11-29 A printing authorization control circuit and control method Active CN107818259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711220903.0A CN107818259B (en) 2017-11-29 2017-11-29 A printing authorization control circuit and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711220903.0A CN107818259B (en) 2017-11-29 2017-11-29 A printing authorization control circuit and control method

Publications (2)

Publication Number Publication Date
CN107818259A CN107818259A (en) 2018-03-20
CN107818259B true CN107818259B (en) 2024-02-09

Family

ID=61604950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711220903.0A Active CN107818259B (en) 2017-11-29 2017-11-29 A printing authorization control circuit and control method

Country Status (1)

Country Link
CN (1) CN107818259B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766685A (en) * 2019-01-21 2019-05-17 安徽养和医疗器械设备有限公司 A kind of hardware digital authorization module and its authorization method realized by USB interface

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06168597A (en) * 1992-03-19 1994-06-14 Fujitsu Ltd Flash memory and level conversion circuit
CN1558828A (en) * 2001-08-06 2004-12-29 ��������³���о����޹�˾ Image printing device with microcontroller
CN203522947U (en) * 2013-08-23 2014-04-02 Tcl通力电子(惠州)有限公司 Multi-path HDMI (high-definition multimedia interface) signal source output circuit and HDMI signal source device
CN103842956A (en) * 2011-09-30 2014-06-04 英特尔公司 Secure printing between printer and print client device
CN103853684A (en) * 2014-03-18 2014-06-11 苏州大学 Serial bus communication bridging device
CN104181833A (en) * 2014-08-29 2014-12-03 长城信息产业股份有限公司 A low power consumption power supply control circuit and method
CN105335109A (en) * 2015-12-02 2016-02-17 天津光电安辰信息技术有限公司 File printing control system based on smart password keys and achieving method thereof
CN105511821A (en) * 2015-12-02 2016-04-20 天津光电安辰信息技术有限公司 Printing and recording control system and realizing method based on intelligent password keys
CN105681281A (en) * 2015-12-30 2016-06-15 北京金科联信数据科技有限公司 Password device based on embedded operating system
CN105991650A (en) * 2016-01-21 2016-10-05 李明 Secret key acquisition method and identity card information transmission method and system
CN206106387U (en) * 2016-10-27 2017-04-19 大连东软信息学院 A 3D printer based on Arduino development board
CN206110865U (en) * 2016-09-08 2017-04-19 深圳易通技术股份有限公司 Electronic lock system
CN206431467U (en) * 2017-02-16 2017-08-22 珠海澳米嘉电子有限公司 A kind of motor driver for automatic vending machine
CN206475763U (en) * 2017-01-09 2017-09-08 深圳市深泰明科技有限公司 A kind of power circuit and charging pile control system with super capacitor energy-storage circuit
CN206610191U (en) * 2016-12-26 2017-11-03 迈锐数据(北京)有限公司 The control circuit and control device of a kind of voltage break-make
CN207571742U (en) * 2017-11-29 2018-07-03 湖南长城医疗科技有限公司 A printing authorization control circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003216037A (en) * 2001-11-16 2003-07-30 Yazaki Corp Cipher key, enciphering device, enciphering/deciphering device, cipher key management device, and deciphering device

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06168597A (en) * 1992-03-19 1994-06-14 Fujitsu Ltd Flash memory and level conversion circuit
CN1558828A (en) * 2001-08-06 2004-12-29 ��������³���о����޹�˾ Image printing device with microcontroller
CN103842956A (en) * 2011-09-30 2014-06-04 英特尔公司 Secure printing between printer and print client device
CN203522947U (en) * 2013-08-23 2014-04-02 Tcl通力电子(惠州)有限公司 Multi-path HDMI (high-definition multimedia interface) signal source output circuit and HDMI signal source device
CN103853684A (en) * 2014-03-18 2014-06-11 苏州大学 Serial bus communication bridging device
CN104181833A (en) * 2014-08-29 2014-12-03 长城信息产业股份有限公司 A low power consumption power supply control circuit and method
CN105335109A (en) * 2015-12-02 2016-02-17 天津光电安辰信息技术有限公司 File printing control system based on smart password keys and achieving method thereof
CN105511821A (en) * 2015-12-02 2016-04-20 天津光电安辰信息技术有限公司 Printing and recording control system and realizing method based on intelligent password keys
CN105681281A (en) * 2015-12-30 2016-06-15 北京金科联信数据科技有限公司 Password device based on embedded operating system
CN105991650A (en) * 2016-01-21 2016-10-05 李明 Secret key acquisition method and identity card information transmission method and system
CN206110865U (en) * 2016-09-08 2017-04-19 深圳易通技术股份有限公司 Electronic lock system
CN206106387U (en) * 2016-10-27 2017-04-19 大连东软信息学院 A 3D printer based on Arduino development board
CN206610191U (en) * 2016-12-26 2017-11-03 迈锐数据(北京)有限公司 The control circuit and control device of a kind of voltage break-make
CN206475763U (en) * 2017-01-09 2017-09-08 深圳市深泰明科技有限公司 A kind of power circuit and charging pile control system with super capacitor energy-storage circuit
CN206431467U (en) * 2017-02-16 2017-08-22 珠海澳米嘉电子有限公司 A kind of motor driver for automatic vending machine
CN207571742U (en) * 2017-11-29 2018-07-03 湖南长城医疗科技有限公司 A printing authorization control circuit

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
3D打印机控制系统的设计;徐军;王天伦;;计算机测量与控制(第03期);51-54 *
移动产品USB电源接口保护解决方案;罗勇进;;集成电路应用(11);42-43+47 *
集成电路芯片安全隐患检测技术;罗宏伟;;半导体技术(12);1094-1097 *

Also Published As

Publication number Publication date
CN107818259A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
USRE47621E1 (en) Secure transaction microcontroller with secure boot loader
TWI405211B (en) Flash memory storage system, controller and data protecting method thereof
US20100088527A1 (en) Memory protection system and method
US20070288689A1 (en) USB apparatus and control method therein
US20100046015A1 (en) Methods and systems for controlled printing of documents including sensitive information
US8332915B2 (en) Information processing system, information processing apparatus, mobile terminal and access control method
CN102567235B (en) Intelligent active anti-virus U disk based on partition authentication and anti-virus method of U disk
CN101281570B (en) A Trusted Computing System
CN101770386A (en) Safe startup method for Linux embedded system
US10783088B2 (en) Systems and methods for providing connected anti-malware backup storage
CN201397508Y (en) Stand-alone terminal secure login and monitoring device
CN102324003A (en) Multi-strategy self-destruction method for high-trust embedded computer
CN104794388A (en) Application program access protection method and application program access protection device
CN102024115B (en) Computer with user security subsystem
CN107818259B (en) A printing authorization control circuit and control method
CN114546303B (en) Printer credible anti-counterfeiting method
CN204390239U (en) A kind of possess the intelligent secrecy system ruining key function
CN204463132U (en) An anti-stealing device for computer data information
KR102133806B1 (en) Permanent lockout attack detection
CN207571742U (en) A printing authorization control circuit
JP2016085520A (en) Portable electronic device
CN106446644A (en) Computer encryption/decryption device and method
CN201845340U (en) Safety computer provided with user safety subsystem
CN101051303A (en) Part protecting method and hard ware device
TWI405086B (en) Usb interface apparatus with security control and management function

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant