CN104346722A - Mobile payment terminal supporting Bluetooth communication and work method of mobile payment terminal - Google Patents
Mobile payment terminal supporting Bluetooth communication and work method of mobile payment terminal Download PDFInfo
- Publication number
- CN104346722A CN104346722A CN201410581957.XA CN201410581957A CN104346722A CN 104346722 A CN104346722 A CN 104346722A CN 201410581957 A CN201410581957 A CN 201410581957A CN 104346722 A CN104346722 A CN 104346722A
- Authority
- CN
- China
- Prior art keywords
- usb
- module
- bluetooth
- mark
- voltage
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 205
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000006243 chemical reaction Methods 0.000 claims description 139
- 230000001960 triggered effect Effects 0.000 claims description 67
- 230000005611 electricity Effects 0.000 claims description 56
- 230000002452 interceptive effect Effects 0.000 claims description 38
- 230000008676 import Effects 0.000 claims 12
- 238000011084 recovery Methods 0.000 claims 2
- 230000005540 biological transmission Effects 0.000 claims 1
- 230000003993 interaction Effects 0.000 abstract description 19
- 238000012545 processing Methods 0.000 description 29
- 238000002955 isolation Methods 0.000 description 28
- 238000012546 transfer Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/32—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
- G06Q20/327—Short range or proximity payments by means of M-devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/16—Payments settled via telecommunication systems
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Finance (AREA)
- Power Sources (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明涉及一种支持蓝牙通讯的移动支付终端及其工作方法,所述终端包括:USB接口模块、电池模块、电源管理模块、读卡模块、中央控制模块、蓝牙模块、交互模块。其中,USB接口模块和蓝牙模块用于为中央控制模块收发交易数据;所述电源管理模块,用于当获取到USB总线输入电量时,将USB总线输入电量的USB总线输入电压转换为终端工作电压,用所述终端工作电压为所述读卡模块、所述中央控制模块、所述蓝牙模块、所述交互模块供电;当获取到所述电池模块的电池电量时,将电池电量的电池电压转换为终端工作电压,用所述终端工作电压为所述读卡模块、所述中央控制模块、所述蓝牙模块、所述交互模块供电,用以保证所述移动支付终端正常工作。
The invention relates to a mobile payment terminal supporting bluetooth communication and its working method. The terminal includes: a USB interface module, a battery module, a power management module, a card reading module, a central control module, a bluetooth module and an interaction module. Wherein, the USB interface module and the Bluetooth module are used to send and receive transaction data for the central control module; the power management module is used to convert the USB bus input voltage of the USB bus input power into a terminal working voltage when the USB bus input power is obtained , using the terminal working voltage to supply power to the card reading module, the central control module, the Bluetooth module, and the interaction module; when the battery power of the battery module is obtained, the battery voltage of the battery power is converted The terminal working voltage is used to supply power to the card reading module, the central control module, the bluetooth module and the interaction module, so as to ensure the normal operation of the mobile payment terminal.
Description
技术领域technical field
本发明属于移动支付终端领域,尤其涉及一种支持蓝牙通讯的移动支付终端及其工作方法。The invention belongs to the field of mobile payment terminals, and in particular relates to a mobile payment terminal supporting bluetooth communication and a working method thereof.
背景技术Background technique
随着移动和互联网技术,以及智能终端的发展,催生了为消费者和商户提供有卡在线支付和微型数卡器收单方案的移动支付终端。目前,上述移动支付终端连接计算机或智能移动设备之后,通过读取金融卡相关信息,发起交易,所有交易信息均在移动支付终端及后台服务器之间进行处理,交易不在计算机或者智能移动设备上落地,保证了支付的安全性。但是目前上述移动支付终端大多通过USB接口连接到计算机或智能移动设备进行通讯,不能支持蓝牙通讯,这样就从很大程度上限制了移动支付终端的发展。With the development of mobile and Internet technology, as well as smart terminals, mobile payment terminals that provide consumers and merchants with card online payment and micro-card counter acquiring solutions have emerged. At present, after the above-mentioned mobile payment terminal is connected to a computer or a smart mobile device, it reads the relevant information of the financial card and initiates a transaction. All transaction information is processed between the mobile payment terminal and the background server, and the transaction does not land on the computer or smart mobile device. , to ensure the security of payment. However, at present, most of the above-mentioned mobile payment terminals are connected to computers or smart mobile devices for communication through USB interfaces, and cannot support Bluetooth communication, which limits the development of mobile payment terminals to a large extent.
发明内容Contents of the invention
本发明克服了现有技术中,移动支付终端不能支持蓝牙通讯的技术问题,本发明提供的一种支持蓝牙通讯的移动支付终端及其工作方法,所述终端包括:The present invention overcomes the technical problem that the mobile payment terminal cannot support Bluetooth communication in the prior art. The present invention provides a mobile payment terminal supporting Bluetooth communication and its working method. The terminal includes:
USB接口模块、电池模块、电源管理模块、读卡模块、中央控制模块、蓝牙模块、交互模块;USB interface module, battery module, power management module, card reader module, central control module, Bluetooth module, interactive module;
所述USB接口模块,和所述电池模块、所述电源管理模块、所述中央控制模块相连,用于为所述电池模块提供USB总线输入电量、为所述电源管理模块提供USB总线输入电量、为所述中央控制模块收发交易数据;The USB interface module is connected to the battery module, the power management module, and the central control module, and is used to provide USB bus input power for the battery module, provide USB bus input power for the power management module, sending and receiving transaction data for the central control module;
所述电池模块,和所述USB接口模块、所述电源管理模块相连,用于接收USB总线输入电量进行充电、为所述电源管理模块提供电池电量;The battery module is connected to the USB interface module and the power management module, and is used to receive the input power of the USB bus for charging and provide battery power for the power management module;
所述电源管理模块,和所述USB接口模块、所述电池模块、所述读卡模块、所述中央控制模块、所述蓝牙模块、所述交互模块相连,用于当获取到USB总线输入电量时,将USB总线输入电压转换为终端工作电压,用所述终端工作电压为所述读卡模块、所述中央控制模块、所述蓝牙模块、所述交互模块供电;The power management module is connected to the USB interface module, the battery module, the card reader module, the central control module, the Bluetooth module, and the interaction module, and is used to obtain the input power of the USB bus , the USB bus input voltage is converted into a terminal operating voltage, and the terminal operating voltage is used to supply power for the card reading module, the central control module, the Bluetooth module, and the interactive module;
当获取到电池电量时,将电池电压转换为终端工作电压,用所述终端工作电压为所述读卡模块、所述中央控制模块、所述蓝牙模块、所述交互模块供电;When the battery power is obtained, the battery voltage is converted into a terminal operating voltage, and the terminal operating voltage is used to supply power to the card reading module, the central control module, the Bluetooth module, and the interactive module;
所述蓝牙模块,和所述电源管理模块、所述中央控制模块相连,用于当获取到所述终端工作电压时,为所述中央控制模块收发交易数据;The Bluetooth module is connected to the power management module and the central control module, and is used to send and receive transaction data for the central control module when the terminal working voltage is obtained;
所述读卡模块,和所述电源管理模块、所述中央控制模块相连,用于当获取到所述终端工作电压时,为所述中央控制模块读取金融卡信息;The card reading module is connected to the power management module and the central control module, and is used to read financial card information for the central control module when the terminal working voltage is obtained;
所述交互模块,和所述电源管理模块、所述中央控制模块相连,用于当获取到所述终端工作电压时,为所述中央控制模块获取用户输入信息;The interaction module is connected to the power management module and the central control module, and is used to obtain user input information for the central control module when the terminal working voltage is obtained;
所述中央控制模块,和所述电源管理模块、所述USB接口模块、所述读卡模块、所述蓝牙模块、所述交互模块相连,用于当获取到所述终端工作电压时,获取交易数据、获取金融卡信息、获取用户输入信息。The central control module is connected to the power management module, the USB interface module, the card reader module, the Bluetooth module, and the interaction module, and is used to obtain the transaction when the operating voltage of the terminal is obtained. data, obtain financial card information, and obtain user input information.
所述终端的工作方法,包括:The working method of the terminal includes:
步骤s1:上电初始化,复位各标志,对所述蓝牙模块上电,配置所述蓝牙模块,打开通讯中断服务;Step s1: Power on and initialize, reset each flag, power on the Bluetooth module, configure the Bluetooth module, and enable the communication interruption service;
当检测到所述USB接口模块和上位机连接或者断开时,USB通讯中断服务被触发,检测所述USB接口模块的供电电压是否为高电平时,如果是高电平,则打开USB数据接收中断服务,置位USB通讯标志,如果是低电平,则复位USB通讯标志;当检测到所述蓝牙模块和上位机连接或者断开时,蓝牙通讯中断服务被触发,检测所述蓝牙模块的反馈电压是否为低电平,如果是低电平,则打开蓝牙数据接收中断服务,置位蓝牙通讯标志,否则,复位蓝牙通讯标志;When it is detected that the USB interface module is connected or disconnected from the host computer, the USB communication interruption service is triggered, and when detecting whether the power supply voltage of the USB interface module is high level, if it is high level, then open the USB data receiving Interrupt service, set USB communication flag, if it is low level, then reset USB communication flag; Whether the feedback voltage is low level, if it is low level, turn on the bluetooth data receiving interrupt service, set the bluetooth communication flag, otherwise, reset the bluetooth communication flag;
当所述USB接口模块有数据包传入且数据包的格式符合USB协议的规定时,USB数据接收中断服务被触发,当获取到请求交易数据时,置位USB接收标志,当没有获取到请求交易数据时,复位USB接收标志;当所述蓝牙模块有数据包传入且数据包合法时,蓝牙数据接收中断服务被触发,当获取到请求交易数据时,置位蓝牙接收标志,当没有获取到请求交易数据时,复位蓝牙接收标志;When the USB interface module has a data packet incoming and the format of the data packet conforms to the provisions of the USB protocol, the USB data receiving interrupt service is triggered, and when the request transaction data is obtained, the USB receiving flag is set, and when the request is not obtained When trading data, reset the USB receiving flag; when the Bluetooth module has a data packet incoming and the data packet is legal, the Bluetooth data receiving interrupt service is triggered, when the request transaction data is obtained, the Bluetooth receiving flag is set, and when the data packet is not obtained When requesting transaction data, reset the Bluetooth receiving flag;
步骤s2:打开定时读卡中断服务,获取卡标识值;Step s2: Open the scheduled card reading interrupt service to obtain the card identification value;
步骤s3:检查USB通讯标志是否被置位,如果USB通讯标志被置位,则检查USB接收标志是否被置位,如果USB接收标志被置位,则复位USB接收标志,置位USB返回标志,执行步骤s4,如果USB接收标志没有被置位,则返回步骤s3,如果USB通讯标志没有被置位,则检查蓝牙通讯标志是否被置位,如果蓝牙通讯标志被置位,则检查蓝牙接收标志是否被置位,如果蓝牙接收标志被置位,则复位蓝牙接收标志,置位蓝牙返回标志,执行步骤s4,如果蓝牙接收标志没有被置位,则返回步骤s3,如果蓝牙通讯标志没有被置位,则返回步骤s3;Step s3: check whether the USB communication flag is set, if the USB communication flag is set, check whether the USB receive flag is set, if the USB receive flag is set, reset the USB receive flag, set the USB return flag, Execute step s4, if the USB receiving flag is not set, then return to step s3, if the USB communication flag is not set, then check whether the Bluetooth communication flag is set, if the Bluetooth communication flag is set, then check the Bluetooth receiving flag Whether it is set, if the bluetooth receiving flag is set, reset the bluetooth receiving flag, set the bluetooth return flag, execute step s4, if the bluetooth receiving flag is not set, return to step s3, if the bluetooth communication flag is not set bit, return to step s3;
步骤s4:根据卡标识值获取结果交易数据;Step s4: Obtain the resulting transaction data according to the card identification value;
步骤s5:检查USB返回标志是否被置位,如果是,则复位USB返回标志,通过所述USB接口模块将结果交易数据返回给所述上位机,执行步骤s6,否则,检查蓝牙返回标志是否被置位,如果是,则复位蓝牙返回标志,通过所述蓝牙模块将结果交易数据返回给所述上位机,执行步骤s7,如果蓝牙返回标志没有被置位,则执行步骤s7;Step s5: Check whether the USB return flag is set, if so, reset the USB return flag, return the result transaction data to the host computer through the USB interface module, and perform step s6, otherwise, check whether the Bluetooth return flag is set Setting, if yes, then reset the bluetooth return sign, return the result transaction data to the host computer by the bluetooth module, perform step s7, if the bluetooth return sign is not set, then perform step s7;
步骤s6:检查USB通讯标志是否被置位,如果是,则返回步骤s3,否则关闭USB数据接收中断服务,复位USB各标志,返回步骤s3;Step s6: Check whether the USB communication flag is set, if yes, return to step s3, otherwise close the USB data receiving interrupt service, reset the USB flags, and return to step s3;
步骤s7:检查蓝牙通讯标志是否被置位,如果是,则返回步骤s3,否则关闭蓝牙数据接收中断服务,复位蓝牙各标志,返回步骤s3。Step s7: Check whether the bluetooth communication flag is set, if yes, return to step s3, otherwise close the bluetooth data receiving interrupt service, reset the bluetooth flags, and return to step s3.
或者所述终端的工作方法,包括:Or the working method of the terminal, including:
步骤y1:上电初始化,复位各标志,控制所述蓝牙模块上电,配置所述蓝牙模块,打开通讯中断服务;Step y1: Power-on initialization, reset each flag, control the Bluetooth module to be powered on, configure the Bluetooth module, and enable the communication interruption service;
当检测到所述USB接口模块和上位机连接或者断开时,USB通讯中断服务被触发,检测所述USB接口模块的供电电压是否为高电平时,如果是高电平,则打开USB数据接收中断服务,置位USB通讯标志,如果是低电平,则复位USB通讯标志;当检测到所述蓝牙模块和上位机连接或者断开时,蓝牙通讯中断服务被触发,检测所述蓝牙模块的反馈电压是否为低电平,如果是低电平,则打开蓝牙数据接收中断服务,置位蓝牙通讯标志,否则,复位蓝牙通讯标志;When it is detected that the USB interface module is connected or disconnected from the host computer, the USB communication interruption service is triggered, and when detecting whether the power supply voltage of the USB interface module is high level, if it is high level, then open the USB data receiving Interrupt service, set USB communication flag, if it is low level, then reset USB communication flag; Whether the feedback voltage is low level, if it is low level, turn on the bluetooth data receiving interrupt service, set the bluetooth communication flag, otherwise, reset the bluetooth communication flag;
当所述USB接口模块有数据包传入且数据包的格式符合USB协议的规定时,USB数据接收中断服务被触发,当获取到请求交易数据时,置位USB接收标志,当没有获取到请求交易数据时,复位USB接收标志;当所述蓝牙模块有数据包传入且数据包合法时,蓝牙数据接收中断服务被触发,当获取到请求交易数据时,置位蓝牙接收标志,当没有获取到请求交易数据时,复位蓝牙接收标志;When the USB interface module has a data packet incoming and the format of the data packet conforms to the provisions of the USB protocol, the USB data receiving interrupt service is triggered, and when the request transaction data is obtained, the USB receiving flag is set, and when the request is not obtained When trading data, reset the USB receiving flag; when the Bluetooth module has a data packet incoming and the data packet is legal, the Bluetooth data receiving interrupt service is triggered, when the request transaction data is obtained, the Bluetooth receiving flag is set, and when the data packet is not obtained When requesting transaction data, reset the Bluetooth receiving flag;
步骤y2:打开定时读卡中断服务,获取卡标识值;Step y2: Open the scheduled card reading interrupt service to obtain the card identification value;
步骤y3:检查USB接收标志是否被置位,如果是,则复位USB接收标志,置位USB返回标志,执行步骤y4,否则检查蓝牙接收标志是否被置位,如果蓝牙接收标志被置位,则复位蓝牙接收标志,置位蓝牙返回标志,执行步骤y4,如果蓝牙接收标志没有被置位,则返回步骤y3;Step y3: Check whether the USB receiving flag is set, if yes, reset the USB receiving flag, set the USB return flag, and execute step y4, otherwise check whether the Bluetooth receiving flag is set, if the Bluetooth receiving flag is set, then Reset the bluetooth receive flag, set the bluetooth return flag, execute step y4, if the bluetooth receive flag is not set, return to step y3;
步骤y4:根据卡标识值获取结果交易数据;Step y4: Obtain the resulting transaction data according to the card identification value;
步骤y5:检查USB返回标志是否被置位,如果是,则复位USB返回标志,通过所述USB接口模块将结果交易数据返回给所述上位机,执行步骤y6,否则,检查蓝牙返回标志是否被置位,如果是,则复位蓝牙返回标志,通过所述蓝牙模块将结果交易数据返回给所述上位机,执行步骤y7,如果蓝牙返回标志没有被置位,则执行步骤y7;Step y5: Check whether the USB return flag is set, if so, reset the USB return flag, return the result transaction data to the host computer through the USB interface module, and execute step y6, otherwise, check whether the Bluetooth return flag is set Setting, if yes, then reset the bluetooth return sign, return the result transaction data to the host computer by the bluetooth module, perform step y7, if the bluetooth return sign is not set, then perform step y7;
步骤y6:检查USB通讯标志是否被置位,如果是,则返回步骤y3,否则关闭USB数据接收中断服务,复位USB各标志,返回步骤y3;Step y6: Check whether the USB communication flag is set, if yes, return to step y3, otherwise close the USB data receiving interrupt service, reset the USB flags, and return to step y3;
步骤y7:检查蓝牙通讯标志是否被置位,如果是,则返回步骤y3,否则关闭蓝牙数据接收中断服务,复位蓝牙各标志,返回步骤y3。Step y7: Check whether the bluetooth communication flag is set, if yes, return to step y3, otherwise close the bluetooth data receiving interrupt service, reset the bluetooth flags, and return to step y3.
本发明的有益效果是:本发明提供一种支持蓝牙通讯的移动支付终端及其工作方法。所述移动支付终端包括蓝牙模块,能够使所述移动支付终端支持蓝牙通讯,同时本发明对所述移动支付终端的供电系统做了改进,用以保证所述移动支付终端正常工作。The beneficial effects of the present invention are: the present invention provides a mobile payment terminal supporting bluetooth communication and its working method. The mobile payment terminal includes a Bluetooth module, which enables the mobile payment terminal to support Bluetooth communication. Meanwhile, the present invention improves the power supply system of the mobile payment terminal to ensure the normal operation of the mobile payment terminal.
附图说明Description of drawings
图1为本发明实施例1提供的一种支持蓝牙通讯的移动支付终端的结构示意图;FIG. 1 is a schematic structural diagram of a mobile payment terminal supporting Bluetooth communication provided by Embodiment 1 of the present invention;
图2为本发明实施例2提供的一种支持蓝牙通讯的移动支付终端的具体结构示意图;FIG. 2 is a schematic structural diagram of a mobile payment terminal supporting Bluetooth communication provided by Embodiment 2 of the present invention;
图3为本发明实施例3提供的一种支持蓝牙通讯的移动支付终端的具体结构示意图;FIG. 3 is a schematic structural diagram of a mobile payment terminal supporting Bluetooth communication provided by Embodiment 3 of the present invention;
图4为本发明实施例4提供的一种支持蓝牙通讯的移动支付终端的具体结构示意图;FIG. 4 is a schematic structural diagram of a mobile payment terminal supporting Bluetooth communication provided by Embodiment 4 of the present invention;
图5为本发明实施例5提供的一种支持蓝牙通讯的移动支付终端的工作方法的流程图;5 is a flowchart of a working method of a mobile payment terminal supporting Bluetooth communication provided by Embodiment 5 of the present invention;
图6为本发明实施例7提供的一种支持蓝牙通讯的移动支付终端的工作方法的流程图。FIG. 6 is a flowchart of a working method of a mobile payment terminal supporting Bluetooth communication provided by Embodiment 7 of the present invention.
具体实施方式Detailed ways
下面将结合本发明的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.
实施例1Example 1
本发明实施例1提供了一种支持蓝牙通讯的移动支付终端,如图1所示,所述终端包括:USB接口模块10、电池模块20、电源管理模块30、读卡模块40、中央控制模块50、蓝牙模块60、交互模块70;Embodiment 1 of the present invention provides a mobile payment terminal supporting Bluetooth communication. As shown in FIG. 50. Bluetooth module 60, interactive module 70;
USB接口模块10,和电池模块20、电源管理模块30、中央控制模块50相连,用于当和外部供电设备连接时,为电源管理模块和电池模块提供USB总线输入电量;The USB interface module 10 is connected to the battery module 20, the power management module 30, and the central control module 50, and is used to provide USB bus input power for the power management module and the battery module when connected to an external power supply device;
当和上位机连接时,为电源管理模块30和电池模块20提供USB总线输入电量,为中央控制模块50收发交易数据。When connected to the host computer, it provides USB bus input power for the power management module 30 and the battery module 20 , and sends and receives transaction data for the central control module 50 .
本实施中,当USB接口模块10和外部供电设备或者上位机连接时,获取到的USB总线输入电量的USB总线输入电压是5V,当USB接口模块10和没有和外部供电设备时或者没有和上位机连接时,获取到的USB总线输入电量的USB总线输入电压几乎为0V。In this implementation, when the USB interface module 10 is connected to an external power supply device or a host computer, the USB bus input voltage of the obtained USB bus input power is 5V. When the USB interface module 10 is not connected to an external power supply device or is not connected to a host computer When connected to a computer, the USB bus input voltage of the obtained USB bus input power is almost 0V.
其中,外部供电设备可以是移动电源,供电插座等,上位机可以是计算机或者智能移动设备等。Wherein, the external power supply device may be a mobile power supply, a power supply socket, etc., and the upper computer may be a computer or an intelligent mobile device, etc.
电池模块20,和USB接口模块10、电源管理模块30相连,用于接受USB总线输入电量进行充电,为电源管理模块30供电。The battery module 20 is connected to the USB interface module 10 and the power management module 30 , and is used to receive the power input from the USB bus for charging and supply power to the power management module 30 .
本实施例中,电池模块20提供的电池电量的电池电压可以是4.2V。In this embodiment, the battery voltage of the battery power provided by the battery module 20 may be 4.2V.
电源管理模块30,和USB接口模块10、电池模块20、读卡模块40、中央控制模块50、蓝牙模块60、交互模块70相连,用于将获取到的USB总线输入电量或者获取到的电池电量转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电;The power management module 30 is connected with the USB interface module 10, the battery module 20, the card reader module 40, the central control module 50, the bluetooth module 60, and the interaction module 70, and is used to input the obtained USB bus power or the obtained battery power Convert to the terminal operating voltage, and use the terminal operating voltage to provide power supply for the card reading module 40, the central control module 50, the Bluetooth module 60, and the interactive module 70;
具体地,当USB接口模块10和外部供电设备或者上位机连接时,电源管理模块30通过USB接口模块10获取到USB总线输入电量,将USB总线输入电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电,当USB接口模块10和外部供电设备或者上位机没有连接时,电源管理模块30获取电池模块20提供的电池电量,将电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电;Specifically, when the USB interface module 10 is connected to an external power supply device or a host computer, the power management module 30 obtains the USB bus input power through the USB interface module 10, converts the USB bus input voltage into a terminal operating voltage, and uses the terminal operating voltage as The card reading module 40, the central control module 50, the bluetooth module 60, and the interactive module 70 provide power supply. When the USB interface module 10 is not connected to the external power supply device or the host computer, the power management module 30 obtains the battery power provided by the battery module 20, and the The battery voltage is converted into the terminal operating voltage, and the terminal operating voltage is used to provide power supply for the card reading module 40, the central control module 50, the Bluetooth module 60, and the interactive module 70;
本实施例中,终端工作电压可以是3.3V。In this embodiment, the terminal operating voltage may be 3.3V.
读卡模块40,和电源管理模块30、中央控制模块50相连,用于为中央控制模块50读取金融卡信息。The card reading module 40 is connected with the power management module 30 and the central control module 50 for reading financial card information for the central control module 50 .
中央控制模块50,和USB接口模块10、电源管理模块30、读卡模块40、蓝牙模块60、交互模块70相连,用于获取交易数据、获取金融卡信息、获取用户输入信息;The central control module 50 is connected to the USB interface module 10, the power management module 30, the card reading module 40, the bluetooth module 60, and the interaction module 70, and is used to obtain transaction data, obtain financial card information, and obtain user input information;
具体地,所述当中央控制模块50获取到终端工作电压时,通过USB接口模块10或者蓝牙模块60收发交易数据,通过读卡模块40获取金融卡信息,通过交互模块70获取用户输入信息;Specifically, when the central control module 50 obtains the terminal operating voltage, it sends and receives transaction data through the USB interface module 10 or the Bluetooth module 60, obtains financial card information through the card reading module 40, and obtains user input information through the interaction module 70;
蓝牙模块60,和电源管理模块30、中央控制模块50相连,用于当获取到终端工作电压时,为中央控制模块50收发交易数据。The bluetooth module 60 is connected with the power management module 30 and the central control module 50, and is used for sending and receiving transaction data for the central control module 50 when the terminal working voltage is obtained.
交互模块70,和电源管理模块30、中央控制模块50相连,用于当获取到终端工作电压时,为中央控制模块50提供用户输入信息。The interaction module 70 is connected with the power management module 30 and the central control module 50, and is used to provide the central control module 50 with user input information when the terminal operating voltage is obtained.
实施例2Example 2
本发明实施例2提供了一种支持蓝牙通讯的移动支付终端,实施例2是实施例1的具体实现方式。其中,一种具体实现方式,如图2所示,所述终端包括:USB接口模块10、电池模块20、电源管理模块30、读卡模块40、中央控制模块50、蓝牙模块60、交互模块70;Embodiment 2 of the present invention provides a mobile payment terminal supporting Bluetooth communication, and Embodiment 2 is a specific implementation of Embodiment 1. Wherein, a specific implementation manner, as shown in FIG. 2, the terminal includes: a USB interface module 10, a battery module 20, a power management module 30, a card reading module 40, a central control module 50, a Bluetooth module 60, and an interaction module 70 ;
其中,电池模块20包括:充电管理单元20-1-1、电池单元20-1-2;Wherein, the battery module 20 includes: a charging management unit 20-1-1, a battery unit 20-1-2;
电源管理模块30包括:供电自动切换单元30-1-1、电压转换单元30-1-2;The power management module 30 includes: a power supply automatic switching unit 30-1-1, a voltage conversion unit 30-1-2;
读卡模块40包括:非接触卡供电单元40-1-1、非接触卡读卡单元40-1-2、接触卡供电单元40-1-3、接触卡读卡单元40-1-4;The card reading module 40 includes: a contactless card power supply unit 40-1-1, a contactless card reading unit 40-1-2, a contact card power supply unit 40-1-3, and a contact card reading unit 40-1-4;
蓝牙模块60包括:蓝牙供电单元60-1-1、蓝牙单元60-1-2;Bluetooth module 60 includes: Bluetooth power supply unit 60-1-1, Bluetooth unit 60-1-2;
交互模块70包括:显示单元70-1-1、输入单元70-1-2;The interaction module 70 includes: a display unit 70-1-1, an input unit 70-1-2;
其中,充电管理单元20-1-1,和USB接口模块10、电池单元20-1-2相连,用于管理电池单元20-1-2充电;电池单元20-1-2,和充电管理单元20-1-1、供电自动切换单元30-1-1相连,用于向供电自动切换单元30-1-1提供电池电量;Wherein, the charging management unit 20-1-1 is connected with the USB interface module 10 and the battery unit 20-1-2, and is used to manage the charging of the battery unit 20-1-2; the battery unit 20-1-2, and the charging management unit 20-1-1. The automatic power supply switching unit 30-1-1 is connected to provide battery power to the automatic power supply switching unit 30-1-1;
本实施例中,电池单元可以是蓄电池,提供的电池电量的电池电压可以是4.2V。In this embodiment, the battery unit may be a storage battery, and the battery voltage of the battery power provided may be 4.2V.
供电自动切换单元30-1-1,和USB接口模块10、电池单元20-1-2、电压转换单元30-1-2相连,用于比较USB总线输入电压和电池电压,当USB总线输入电压比电池电压高时,切换USB总线输入电量为电压转换单元30-1-2供电并隔离向电池单元20-1-2传递的USB总线输入电量,当USB总线输入电压比电池电压低时,切换电池电量为电压转换单元30-1-2供电,并隔离向USB接口模块10传递的电池电量;电压转换单元30-1-2,和供电自动切换单元30-1-1、非接触卡供电单元40-1-1、接触卡供电单元40-1-3、蓝牙供电单元60-1-1、显示单元70-1-1、输入单元70-1-2、中央控制模块50相连,用于当获取到USB总线输入电量或者电池电量时,将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为非接触卡供电单元40-1-1、接触卡供电单元40-1-3、蓝牙供电单元60-1-1、显示单元70-1-1、输入单元70-1-2、中央控制模块50提供供电;The power supply automatic switching unit 30-1-1 is connected with the USB interface module 10, the battery unit 20-1-2, and the voltage conversion unit 30-1-2, and is used to compare the USB bus input voltage and the battery voltage. When the USB bus input voltage When it is higher than the battery voltage, switch the USB bus input power to supply power to the voltage conversion unit 30-1-2 and isolate the USB bus input power delivered to the battery unit 20-1-2; when the USB bus input voltage is lower than the battery voltage, switch The battery power supplies power for the voltage conversion unit 30-1-2, and isolates the battery power delivered to the USB interface module 10; the voltage conversion unit 30-1-2, and the power supply automatic switching unit 30-1-1, and the contactless card power supply unit 40-1-1, contact card power supply unit 40-1-3, Bluetooth power supply unit 60-1-1, display unit 70-1-1, input unit 70-1-2, and central control module 50 are connected for when When the USB bus input power or battery power is obtained, the USB bus input voltage or battery voltage is converted into a terminal operating voltage, and the terminal operating voltage is used for the contactless card power supply unit 40-1-1 and the contact card power supply unit 40-1-3 , Bluetooth power supply unit 60-1-1, display unit 70-1-1, input unit 70-1-2, and central control module 50 provide power supply;
本实施例中,终端工作电压可以是3.3V。In this embodiment, the terminal operating voltage may be 3.3V.
本实施例2中,所述电源管理模块30还可以具体包括:供电自动切换单元30-1-1、电压转换单元30-1-2、开关单元;In Embodiment 2, the power management module 30 may specifically include: an automatic power supply switching unit 30-1-1, a voltage conversion unit 30-1-2, and a switching unit;
供电自动切换单元30-1-1,和USB接口模块10、电池单元20-1-2、开关单元相连,用于比较USB总线输入电压和电池电压的高低,当USB总线输入电压比电池电压高时,切换USB总线输入电量向开关单元供电并隔离向电池单元20-1-2传递的USB总线输入电量,当USB总线输入电压比电池电压低时,切换电池电量向开关单元供电并隔离向USB接口模块10传递的电池电量;The power supply automatic switching unit 30-1-1 is connected with the USB interface module 10, the battery unit 20-1-2, and the switch unit, and is used to compare the USB bus input voltage and the battery voltage. When the USB bus input voltage is higher than the battery voltage , switch the USB bus input power to supply power to the switch unit and isolate the USB bus input power delivered to the battery unit 20-1-2; when the USB bus input voltage is lower than the battery voltage, switch the battery power to supply power to the switch unit and isolate the USB The battery power delivered by the interface module 10;
电压转换单元30-1-2,和开关单元、非接触卡供电单元40-1-1、接触卡供电单元40-1-3、蓝牙供电单元60-1-1、显示单元70-1-1、输入单元70-1-2、中央控制模块50相连,用于当通过开关单元获取到USB总线输入电量或者电池电量时,将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为非接触卡供电单元40-1-1、接触卡供电单元40-1-3、蓝牙供电单元60-1-1、显示单元70-1-1、输入单元70-1-2、中央控制模块50提供供电;Voltage conversion unit 30-1-2, and switch unit, contactless card power supply unit 40-1-1, contact card power supply unit 40-1-3, Bluetooth power supply unit 60-1-1, display unit 70-1-1 , the input unit 70-1-2, and the central control module 50 are connected, and are used to convert the USB bus input voltage or the battery voltage into the terminal operating voltage when the USB bus input power or battery power is obtained through the switch unit, and use the terminal working voltage It is the contactless card power supply unit 40-1-1, the contact card power supply unit 40-1-3, the Bluetooth power supply unit 60-1-1, the display unit 70-1-1, the input unit 70-1-2, and the central control module 50 provides power supply;
开关单元,和供电自动切换单元30-1-1、电压转换单元30-1-2单元相连,用于当受到触发时,切换供电自动切换单元30-1-1和电压转换单元30-1-2单元之间电路的断开状态和闭合状态。The switch unit is connected to the power supply automatic switching unit 30-1-1 and the voltage conversion unit 30-1-2, and is used to switch the power supply automatic switching unit 30-1-1 and the voltage conversion unit 30-1-2 when triggered. Open state and closed state of the circuit between 2 units.
例如,当开关单元受到触发时,将供电自动切换单元30-1-1和电压转换单元30-1-2单元之间电路状态由断开状态切换到闭合状态,当下次受到触发时,将供电自动切换单元30-1-1和电压转换单元30-1-2单元之间电路状态由闭合状态切换到断开状态。For example, when the switch unit is triggered, the circuit state between the power supply automatic switching unit 30-1-1 and the voltage conversion unit 30-1-2 is switched from an open state to a closed state. The state of the circuit between the automatic switching unit 30-1-1 and the voltage conversion unit 30-1-2 is switched from a closed state to an open state.
本实施例2中,所述电源管理模块30还可以具体包括:供电自动切换单元30-1-1、电压转换单元30-1-2、开关单元、电压隔离单元;In Embodiment 2, the power management module 30 may specifically include: a power supply automatic switching unit 30-1-1, a voltage conversion unit 30-1-2, a switch unit, and a voltage isolation unit;
其中,供电自动切换单元30-1-1,和USB接口模块10、电池单元20-1-2、电压转换单元30-1-2、开关单元相连,用于比较USB总线输入电压和电池电压,当USB总线输入电压比电池电压高时,切换USB总线输入电量为电压转换单元30-1-2供电并向开关单元供电并隔离向电池单元20-1-2传递的USB总线输入电量,当USB总线输入电压比电池电压低时,切换电池电量为电压转换单元30-1-2供电并向开关单元供电并隔离向USB接口模块10传递的电池电量;Wherein, the power supply automatic switching unit 30-1-1 is connected with the USB interface module 10, the battery unit 20-1-2, the voltage conversion unit 30-1-2, and the switch unit, and is used to compare the USB bus input voltage and the battery voltage, When the USB bus input voltage is higher than the battery voltage, switch the USB bus input power to supply power to the voltage conversion unit 30-1-2 and supply power to the switch unit and isolate the USB bus input power delivered to the battery unit 20-1-2, when the USB When the bus input voltage is lower than the battery voltage, switch the battery power to supply power to the voltage conversion unit 30-1-2 and supply power to the switching unit and isolate the battery power delivered to the USB interface module 10;
电压转换单元30-1-2,和供电自动切换单元30-1-1、开关单元、电压隔离单元、非接触卡供电单元40-1-1、接触卡供电单元40-1-3、蓝牙供电单元60-1-1、显示单元70-1-1、输入单元70-1-2、中央控制模块50相连,用于当通过供电自动切换单元30-1-1获取到USB总线输入电量时,将USB总线输入电量作为USB供电电量,当通过开关单元或者通过电压隔离单元获取到USB总线输入电量时,将USB总线输入电量作为USB使能电量或者当通过供电自动切换单元30-1-1获取到电池电量时,将电池电量作为电池供电电量,当通过开关单元获取到电池电量时,将电池电量作为电池使能电量。当获取到USB供电电量和USB使能电量时或者当获取到电池供电电量和电池使能电量时,将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为非接触卡供电单元40-1-1、接触卡供电单元40-1-3、蓝牙供电单元60-1-1、显示单元70-1-1、输入单元70-1-2、中央控制模块50提供供电;Voltage conversion unit 30-1-2, and power supply automatic switching unit 30-1-1, switch unit, voltage isolation unit, contactless card power supply unit 40-1-1, contact card power supply unit 40-1-3, Bluetooth power supply The unit 60-1-1, the display unit 70-1-1, the input unit 70-1-2, and the central control module 50 are connected to each other, and are used to obtain the input power of the USB bus through the power supply automatic switching unit 30-1-1, The USB bus input power is used as the USB power supply power. When the USB bus input power is obtained through the switch unit or through the voltage isolation unit, the USB bus input power is used as the USB enabled power or when it is obtained through the power supply automatic switching unit 30-1-1 When the battery power is obtained, the battery power is used as the battery power supply power, and when the battery power is obtained through the switch unit, the battery power is used as the battery enabling power. When the USB power supply power and USB enable power are obtained or when the battery power supply and battery enable power are obtained, the USB bus input voltage or the battery voltage is converted into a terminal working voltage, and the terminal working voltage is used as the contactless card power supply unit 40-1-1, contact card power supply unit 40-1-3, Bluetooth power supply unit 60-1-1, display unit 70-1-1, input unit 70-1-2, and central control module 50 provide power supply;
开关单元,和供电自动切换单元30-1-1、电压转换单元30-1-2、电压隔离单元相连,用于当受到触发时,切换供电自动切换单元30-1-1和电压转换单元30-1-2单元之间电路的断开状态和闭合状态,当电路状态是闭合状态时,向电压转换单元30-1-2和电压隔离单元传递USB总线输入电量或者向电压转换单元30-1-2和电压隔离单元传递电池电量。The switch unit is connected to the power supply automatic switching unit 30-1-1, the voltage conversion unit 30-1-2, and the voltage isolation unit, and is used to switch the power supply automatic switching unit 30-1-1 and the voltage conversion unit 30 when triggered -The disconnected state and closed state of the circuit between the 1-2 units, when the circuit state is a closed state, transfer the USB bus input power to the voltage conversion unit 30-1-2 and the voltage isolation unit or to the voltage conversion unit 30-1 -2 and voltage isolation unit pass battery power.
例如,当开关单元受到触发时,将供电自动切换单元30-1-1和电压转换单元30-1-2单元之间电路状态由断开状态切换到闭合状态,当电路状态是闭合状态时,为电压转换单元30-1-2和电压隔离单元传递从供电自动切换单元30-1-1传来的USB总线输入电量或者为电压转换单元30-1-2和电压隔离单元传递从供电自动切换单元30-1-1传来的电池电量。当下次受到触发时,将供电自动切换单元30-1-1和电压转换单元30-1-2单元之间电路状态由闭合状态切换到断开状态。For example, when the switch unit is triggered, the circuit state between the power supply automatic switching unit 30-1-1 and the voltage conversion unit 30-1-2 is switched from an open state to a closed state, and when the circuit state is a closed state, Transfer the USB bus input power from the power supply automatic switching unit 30-1-1 to the voltage conversion unit 30-1-2 and the voltage isolation unit or transfer the automatic switching from the power supply to the voltage conversion unit 30-1-2 and the voltage isolation unit Battery level from unit 30-1-1. When triggered next time, the state of the circuit between the automatic power supply switching unit 30-1-1 and the voltage conversion unit 30-1-2 is switched from the closed state to the open state.
电压隔离单元和USB接口模块10、电压转换单元30-1-2、开关单元相连,用于当通过开关单元得到电池电量时,隔离通过开关单元向USB接口模块10方向的电池电量或者当通过开关单元得到USB总线输入电量时,隔离通过开关单元向USB接口模块10方向的USB总线输入电量,当通过USB接口模块10接收到USB总线输入电量时,向电压转换单元30-1-2传递USB总线输入电量。The voltage isolation unit is connected to the USB interface module 10, the voltage conversion unit 30-1-2, and the switch unit, and is used to isolate the battery power from the switch unit to the USB interface module 10 when the battery power is obtained through the switch unit or when the battery power is obtained through the switch unit. When the unit obtains the USB bus input power, it isolates the USB bus input power in the direction of the USB interface module 10 through the switch unit, and when receiving the USB bus input power through the USB interface module 10, transfers the USB bus to the voltage conversion unit 30-1-2 Enter power.
非接触卡供电单元40-1-1,和电压转换单元30-1-2、非接触卡读卡单元40-1-2、中央控制模块50相连,用于当获取到电压转换单元30-1-2提供的终端工作电压时,接受中央控制模块50发送的非接触控制信号的控制对非接触卡读卡单元40-1-2提供供电。非接触卡读卡单元40-1-2,和非接触卡供电单元40-1-1、中央控制模块50相连,用于接收非接触卡供电单元40-1-1提供的供电,为中央控制模块50读取接金融非接触卡信息。接触卡供电单元40-1-3,和电压转换单元30-1-2、接触卡读卡单元40-1-4、中央控制模块50相连,用于当获取到电压转换单元30-1-2提供的终端工作电压时,接受中央控制模块50发送的接触控制信号的控制对接触卡读卡单元40-1-4提供供电。接触卡读卡单元40-1-4,和接触卡供电单元40-1-3、中央控制模块50相连,用于接受接触卡供电单元40-1-3的供电,为中央控制模块50读取接金融接触卡信息。The contactless card power supply unit 40-1-1 is connected to the voltage conversion unit 30-1-2, the contactless card reader unit 40-1-2, and the central control module 50, for when the voltage conversion unit 30-1 is obtained When the terminal operating voltage is provided by -2, it accepts the control of the non-contact control signal sent by the central control module 50 to provide power to the non-contact card reading unit 40-1-2. The contactless card reading unit 40-1-2 is connected with the contactless card power supply unit 40-1-1 and the central control module 50, and is used to receive the power supply provided by the contactless card power supply unit 40-1-1 for the central control The module 50 reads the information of the contactless financial card. The contact card power supply unit 40-1-3 is connected with the voltage conversion unit 30-1-2, the contact card reader unit 40-1-4, and the central control module 50, for when the voltage conversion unit 30-1-2 is obtained When the terminal working voltage is provided, it accepts the control of the contact control signal sent by the central control module 50 to supply power to the contact card reading unit 40-1-4. The contact card reading unit 40-1-4 is connected with the contact card power supply unit 40-1-3 and the central control module 50, and is used to accept the power supply of the contact card power supply unit 40-1-3 for the central control module 50 to read Receive financial contact card information.
蓝牙供电单元60-1-1,和电压转换单元30-1-2、蓝牙单元60-1-2、中央控制模块50相连,用于当获取到电压转换单元30-1-2提供的终端工作电压时,接受中央控制模块50发送的蓝牙控制信号对蓝牙单元60-1-2提供供电。蓝牙单元60-1-2,和蓝牙供电单元60-1-1、中央控制模块50相连,用于接收蓝牙供电单元60-1-1提供的供电,为中央控制模块50收发交易数据。The Bluetooth power supply unit 60-1-1 is connected to the voltage conversion unit 30-1-2, the Bluetooth unit 60-1-2, and the central control module 50, and is used for terminal work provided by the voltage conversion unit 30-1-2 voltage, accept the Bluetooth control signal sent by the central control module 50 to provide power to the Bluetooth unit 60-1-2. The bluetooth unit 60-1-2 is connected with the bluetooth power supply unit 60-1-1 and the central control module 50, and is used to receive the power provided by the bluetooth power supply unit 60-1-1, and send and receive transaction data for the central control module 50.
显示单元70-1-1,和电压转换单元30-1-2、中央控制模块50相连,用于当获取到电压转换单元30-1-2提供的终端工作电压时,接受中央控制模块50的发送的显示控制信号的控制输出信息。输入单元70-1-2,和电压转换单元30-1-2、中央控制模块50相连,用于当获取到电压转换单元30-1-2提供的终端工作电压时,向中央控制模块50发送用户输入信息。The display unit 70-1-1 is connected to the voltage conversion unit 30-1-2 and the central control module 50, and is used to receive the input from the central control module 50 when the terminal operating voltage provided by the voltage conversion unit 30-1-2 is obtained. The control output information sent by the display control signal. The input unit 70-1-2 is connected to the voltage conversion unit 30-1-2 and the central control module 50, and is used to send the terminal operating voltage to the central control module 50 when the terminal operating voltage provided by the voltage conversion unit 30-1-2 is obtained. User enters information.
需要说明的是,本实施2中所述终端还可以具体包括:USB接口模块、电池模块、电源管理模块、读卡模块、中央控制模块、蓝牙模块、交互模块;It should be noted that the terminal described in Embodiment 2 may also specifically include: a USB interface module, a battery module, a power management module, a card reading module, a central control module, a Bluetooth module, and an interactive module;
其中,电池模块包括:充电管理单元、电池单元;Wherein, the battery module includes: a charging management unit and a battery unit;
其中,电源管理模块包括:供电自动切换单元、电压转换单元;Among them, the power management module includes: a power supply automatic switching unit and a voltage conversion unit;
读卡模块包括:非接触卡读卡单元、接触卡读卡单元;The card reading module includes: non-contact card reading unit, contact card reading unit;
交互模块包括:显示单元、输入单元;The interactive module includes: display unit, input unit;
其中,充电管理单元,和USB接口模块、电池单元相连,用于管理电池单元充电;电池单元,和充电管理单元、供电自动切换单元相连,用于向供电自动切换单元提供电池电量;Wherein, the charging management unit is connected with the USB interface module and the battery unit, and is used to manage the charging of the battery unit; the battery unit is connected with the charging management unit, and the automatic power supply switching unit, and is used for providing battery power to the automatic power supply switching unit;
供电自动切换单元,和USB接口模块、电池单元、电压转换单元相连,用于比较USB总线输入电压和电池电压,当USB总线输入电压比电池电压高时,切换USB总线输入电量为电压转换单元供电并隔离向电池单元传递的USB总线输入电量,当USB总线输入电压比电池电压低时,切换电池电量为电压转换单元供电并隔离向USB接口模块传递的电池电量;The power supply automatic switching unit is connected with the USB interface module, the battery unit and the voltage conversion unit, and is used to compare the USB bus input voltage and the battery voltage. When the USB bus input voltage is higher than the battery voltage, switch the USB bus input power to supply power for the voltage conversion unit And isolate the USB bus input power delivered to the battery unit, when the USB bus input voltage is lower than the battery voltage, switch the battery power to supply power to the voltage conversion unit and isolate the battery power delivered to the USB interface module;
电压转换单元,和供电自动切换单元、非接触卡读卡单元、接触卡读卡单元、蓝牙模块、显示单元、输入单元、中央控制模块相连,用于将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为非接触卡读卡单元、接触卡读卡单元、蓝牙模块、显示单元、输入单元、中央控制模块提供供电;The voltage conversion unit is connected with the power supply automatic switching unit, the contactless card reading unit, the contact card reading unit, the Bluetooth module, the display unit, the input unit, and the central control module, and is used to convert the USB bus input voltage or battery voltage to the terminal Working voltage, use terminal working voltage to provide power supply for contactless card reading unit, contact card reading unit, bluetooth module, display unit, input unit and central control module;
非接触卡读卡单元,和电压转换单元、中央控制模块相连,用于为中央控制模块读取接金融非接触卡信息;接触卡读卡单元,和电压转换单元、中央控制模块相连,用于为中央控制模块读取接金融接触卡信息。The non-contact card reading unit is connected with the voltage conversion unit and the central control module, and is used to read the financial non-contact card information for the central control module; the contact card reading unit is connected with the voltage conversion unit and the central control module, and is used for Read the financial contact card information for the central control module.
蓝牙模块,和电压转换单元、中央控制模块相连,用于当获取到电压转换单元提供的终端工作电压时,为中央控制模块收发交易数据。The Bluetooth module is connected with the voltage conversion unit and the central control module, and is used for sending and receiving transaction data for the central control module when the terminal working voltage provided by the voltage conversion unit is obtained.
显示单元,和电压转换单元、中央控制模块相连,用于接收电压转换单元提供的终端工作电压时,接受中央控制模块的发送的显示控制信号的控制输出信息。输入单元,和电压转换单元、中央控制模块相连,用于当获取到电压转换单元提供的终端工作电压时,向中央控制模块发送用户输入信息。The display unit is connected with the voltage conversion unit and the central control module, and is used for receiving the control output information of the display control signal sent by the central control module when receiving the terminal working voltage provided by the voltage conversion unit. The input unit is connected to the voltage conversion unit and the central control module, and is used to send user input information to the central control module when the terminal operating voltage provided by the voltage conversion unit is acquired.
实施例3Example 3
本发明实施例3提供了一种支持蓝牙通讯的移动支付终端,如图3所示,所述终端具体包括:USB接口模块10、电池模块20、电源管理模块30、读卡模块40、中央控制模块50、蓝牙模块60、交互模块70;Embodiment 3 of the present invention provides a mobile payment terminal supporting Bluetooth communication. As shown in FIG. Module 50, bluetooth module 60, interactive module 70;
其中,电池模块20包括:充电管理单元20-2-1、电池单元20-2-2;Wherein, the battery module 20 includes: a charging management unit 20-2-1, a battery unit 20-2-2;
电源管理模块30包括:供电自动切换单元30-2-1、电压转换单元30-2-2、开机单元30-2-3、电压隔离单元30-2-4;The power management module 30 includes: a power supply automatic switching unit 30-2-1, a voltage conversion unit 30-2-2, a boot unit 30-2-3, and a voltage isolation unit 30-2-4;
读卡模块40包括:非接触卡供电单元40-2-1、非接触卡读卡单元40-2-2、接触卡供电单元40-2-3、接触卡读卡单元40-2-4;The card reading module 40 includes: a contactless card power supply unit 40-2-1, a contactless card reading unit 40-2-2, a contact card power supply unit 40-2-3, and a contact card reading unit 40-2-4;
蓝牙模块60包括:蓝牙供电单元60-2-1、蓝牙单元60-2-2;Bluetooth module 60 includes: Bluetooth power supply unit 60-2-1, Bluetooth unit 60-2-2;
交互模块70包括:显示单元70-2-1、输入单元70-2-2;The interaction module 70 includes: a display unit 70-2-1, an input unit 70-2-2;
其中,充电管理单元20-2-1,和USB接口模块10、电池单元20-2-2相连,用于管理电池单元20-2-2充电;电池单元20-2-2,和充电管理单元20-2-1、供电自动切换单元30-2-1相连,用于向供电自动切换单元30-2-1提供电池电量;Wherein, the charging management unit 20-2-1 is connected with the USB interface module 10 and the battery unit 20-2-2, and is used to manage the charging of the battery unit 20-2-2; the battery unit 20-2-2, and the charging management unit 20-2-1. The automatic power supply switching unit 30-2-1 is connected to provide battery power to the automatic power supply switching unit 30-2-1;
本实施例中,电池单元20-2-2可以是蓄电池,提供的电池电量的电池电压可以是4.2V。In this embodiment, the battery unit 20-2-2 may be a battery, and the battery voltage of the battery power provided may be 4.2V.
供电自动切换单元30-2-1,和USB接口模块10、电池单元20-2-2、电压转换单元30-2-2、开机单元30-2-3相连,用于比较USB总线输入电压和电池电压,当USB总线输入电压比电池电压高时,切换USB总线输入电量为电压转换单元30-2-2供电并向开关单元30-2-3供电并隔离向电池单元20-2-2传递的USB总线输入电量,当USB总线输入电压比电池电压低时,切换电池电量为电压转换单元30-2-2供电并向开关单元30-2-3供电并隔离向USB接口10模块传递的电池电量;The power supply automatic switching unit 30-2-1 is connected with the USB interface module 10, the battery unit 20-2-2, the voltage conversion unit 30-2-2, and the boot unit 30-2-3, and is used to compare the USB bus input voltage and Battery voltage, when the USB bus input voltage is higher than the battery voltage, switch the USB bus input power to supply power to the voltage conversion unit 30-2-2 and supply power to the switch unit 30-2-3 and isolate and transmit to the battery unit 20-2-2 When the USB bus input voltage is lower than the battery voltage, switch the battery power to supply power to the voltage conversion unit 30-2-2 and supply power to the switch unit 30-2-3 and isolate the battery delivered to the USB interface 10 module electricity;
电压转换单元30-2-2,和供电自动切换单元30-2-1、开机单元30-2-3、电压隔离单元30-2-4、非接触卡供电单元40-2-1、接触卡供电单元40-2-3、蓝牙供电单元60-2-1、显示单元70-2-1、输入单元70-2-2、中央控制模块50相连,用于当通过供电自动切换单元30-2-1获取到USB总线输入电量时,将USB总线输入电量作为USB供电电量,当通过开机单元30-2-3或者电压隔离单元30-2-4获取到USB总线输入电量时,将USB总线输入电量作为USB使能电量或者当通过供电自动切换单元30-2-1获取到电池电量时,将电池电量作为电池供电电量,当通过开机单元30-2-3获取到电池电量时,将电池电量作为电池使能电量,当通过电压隔离单元30-2-4获取到供电控制信号时,将控制供电信号作为使能信号。当获取到USB供电电量和USB使能电量时或者当获取到电池供电电量或者电池使能电量时,或者当获取到电池供电电量和使能信号时,将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为非接触卡供电单元40-2-1、接触卡供电单元40-2-3、蓝牙供电单元60-2-1、显示单元70-2-1、输入单元70-2-2、中央控制模块50提供供电;Voltage conversion unit 30-2-2, and power supply automatic switching unit 30-2-1, boot unit 30-2-3, voltage isolation unit 30-2-4, contactless card power supply unit 40-2-1, contact card The power supply unit 40-2-3, the bluetooth power supply unit 60-2-1, the display unit 70-2-1, the input unit 70-2-2, and the central control module 50 are connected to each other for automatically switching the unit 30-2 through power supply -1 When the USB bus input power is obtained, use the USB bus input power as the USB power supply power; when the USB bus input power is obtained through the boot unit 30-2-3 or the voltage isolation unit 30-2-4, use the USB bus input power The power is used as the USB enabled power or when the battery power is obtained by the power supply automatic switching unit 30-2-1, the battery power is used as the battery power supply power, and when the battery power is obtained by the power-on unit 30-2-3, the battery power is used as the battery power. As the enabling quantity of the battery, when the power supply control signal is obtained through the voltage isolation unit 30-2-4, the control power supply signal is used as the enabling signal. Convert the USB bus input voltage or battery voltage to terminal Working voltage, terminal working voltage is contactless card power supply unit 40-2-1, contact card power supply unit 40-2-3, bluetooth power supply unit 60-2-1, display unit 70-2-1, input unit 70- 2-2. The central control module 50 provides power supply;
本实施例中,终端工作电压可以是3.3V。In this embodiment, the terminal operating voltage may be 3.3V.
开机单元30-2-3,和供电自动切换单元30-2-1、电压转换单元30-2-2、电压隔离单元30-2-4相连,用于当受到触发时,将供电自动切换单元30-2-1和电压转换单元30-2-2单元之间电路状态由断开状态切换到闭合状态再瞬间恢复至断开状态,当电路状态是闭合状态时,向电压转换单元30-2-2和电压隔离单元30-2-4传递从供电自动切换单元30-2-1传来的USB总线输入电量或者向电压转换单元30-2-2和电压隔离单元30-2-4传递从供电自动切换单元30-2-1传来的电池电量。The power-on unit 30-2-3 is connected to the power supply automatic switching unit 30-2-1, the voltage conversion unit 30-2-2, and the voltage isolation unit 30-2-4, and is used to automatically switch the power supply unit when triggered The state of the circuit between 30-2-1 and the voltage conversion unit 30-2-2 is switched from the disconnected state to the closed state and then restored to the disconnected state instantaneously. When the circuit state is in the closed state, the voltage conversion unit 30-2 -2 and the voltage isolation unit 30-2-4 transfer the USB bus input power from the power supply automatic switching unit 30-2-1 or transfer the power from the USB bus to the voltage conversion unit 30-2-2 and the voltage isolation unit 30-2-4. The battery power delivered by the automatic switching unit 30-2-1 for power supply.
例如,当开关单元30-2-3接收到触发时,将供电自动切换单元30-2-1和电压转换单元30-2-2单元之间电路状态由断开状态切换到闭合状态再瞬间恢复至断开状态,当电路状态是闭合状态时,向电压转换单元30-2-2和电压隔离单元30-2-4传递从供电自动切换单元30-2-1传来的USB总线输入电量或者向电压转换单元30-2-2和电压隔离单元30-2-4传递从供电自动切换单元30-2-1传来的电池电量。当下次受到触发时,将供电自动切换单元30-2-1和电压转换单元30-2-2单元之间电路状态由断开状态切换到闭合状态再瞬间恢复至断开状态。For example, when the switch unit 30-2-3 receives the trigger, the circuit state between the power supply automatic switching unit 30-2-1 and the voltage conversion unit 30-2-2 is switched from the open state to the closed state and then restored instantaneously To the disconnected state, when the circuit state is a closed state, the USB bus input power transmitted from the power supply automatic switching unit 30-2-1 or The battery power transmitted from the automatic power supply switching unit 30-2-1 is transmitted to the voltage conversion unit 30-2-2 and the voltage isolation unit 30-2-4. When triggered next time, the state of the circuit between the automatic power supply switching unit 30-2-1 and the voltage conversion unit 30-2-2 is switched from the disconnected state to the closed state and then restored to the disconnected state instantaneously.
电压隔离单元30-2-4和USB接口模块10、电压转换单元30-2-2、开关单元30-2-3、中央控制模块50相连,用于当通过开关单元30-2-3获取到电池电量时,隔离通过开关单元30-2-3向USB接口模块10方向和中央控制模块50方向的电池电量或者当通过开关单元30-2-3获取到USB总线输入电量时,隔离通过开关单元30-2-3向USB接口模块10方向和中央控制模块50方向的USB总线输入电量,当通过USB接口模块10接收USB总线输入电量时,向电压转换单元30-2-2传递USB总线输入电量,当通过中央控制模块50接收中央控制模块50发送的供电控制信号时,向电压转换单元30-2-2传递供电控制信号。The voltage isolation unit 30-2-4 is connected with the USB interface module 10, the voltage conversion unit 30-2-2, the switch unit 30-2-3, and the central control module 50, and is used for obtaining the When the battery power is in use, isolate the battery power in the direction of the USB interface module 10 and the central control module 50 through the switch unit 30-2-3 or when the USB bus input power is obtained through the switch unit 30-2-3, isolate the battery power through the switch unit 30-2-3 30-2-3 Input power to the USB bus in the direction of the USB interface module 10 and the direction of the central control module 50, when receiving the USB bus input power through the USB interface module 10, transfer the USB bus input power to the voltage conversion unit 30-2-2 , when the central control module 50 receives the power supply control signal sent by the central control module 50, the power supply control signal is transmitted to the voltage conversion unit 30-2-2.
非接触卡供电单元40-2-1,和电压转换单元30-2-2、非接触卡读卡单元40-2-2、中央控制模块50相连,用于当获取到电压转换单元30-2-2提供的终端工作电压时,接受中央控制模块50发送的非接触控制信号的控制对非接触卡读卡单元40-2-2提供供电。非接触卡读卡单元40-2-2,和非接触卡供电单元40-2-1、中央控制模块50相连,用于接收非接触卡供电单元40-2-1提供的供电,为中央控制模块50读取接金融非接触卡信息。接触卡供电单元40-2-3,和电压转换单元30-2-2、接触卡读卡单元40-2-4、中央控制模块50相连,用于当获取到电压转换单元30-2-2提供的终端工作电压时,接受中央控制模块50发送的接触控制信号的控制对接触卡读卡单元40-2-4提供供电。接触卡读卡单元40-2-4,和接触卡供电单元40-2-3、中央控制模块50相连,用于接受接触卡供电单元40-2-3的供电,为中央控制模块50读取接金融接触卡信息。The contactless card power supply unit 40-2-1 is connected to the voltage conversion unit 30-2-2, the contactless card reader unit 40-2-2, and the central control module 50, for when the voltage conversion unit 30-2 is obtained When the terminal operating voltage provided by -2, accept the control of the contactless control signal sent by the central control module 50 to provide power supply to the contactless card reading unit 40-2-2. The contactless card reading unit 40-2-2 is connected with the contactless card power supply unit 40-2-1 and the central control module 50, and is used to receive the power supply provided by the contactless card power supply unit 40-2-1 for the central control The module 50 reads the information of the contactless financial card. The contact card power supply unit 40-2-3 is connected to the voltage conversion unit 30-2-2, the contact card reader unit 40-2-4, and the central control module 50, for when the voltage conversion unit 30-2-2 is obtained When the terminal working voltage is provided, it accepts the control of the contact control signal sent by the central control module 50 to supply power to the contact card reading unit 40-2-4. The contact card reading unit 40-2-4 is connected with the contact card power supply unit 40-2-3 and the central control module 50, and is used to accept the power supply of the contact card power supply unit 40-2-3 for the central control module 50 to read Receive financial contact card information.
蓝牙供电单元60-2-1,和电压转换单元30-2-2、蓝牙单元60-2-2、中央控制模块50相连,用于当获取到电压转换单元30-2-2提供的终端工作电压时,接受中央控制模块50发送的蓝牙控制信号对蓝牙单元60-2-2提供供电。蓝牙单元60-2-2,和蓝牙供电单元60-2-1、中央控制模块50相连,用于接收蓝牙供电单元60-2-1提供的供电,为中央控制模块50收发交易数据。The Bluetooth power supply unit 60-2-1 is connected to the voltage conversion unit 30-2-2, the Bluetooth unit 60-2-2, and the central control module 50, and is used for terminal work provided by the voltage conversion unit 30-2-2. voltage, accept the Bluetooth control signal sent by the central control module 50 to provide power to the Bluetooth unit 60-2-2. The bluetooth unit 60-2-2 is connected with the bluetooth power supply unit 60-2-1 and the central control module 50, and is used to receive the power provided by the bluetooth power supply unit 60-2-1, and send and receive transaction data for the central control module 50.
显示单元70-2-1,和电压转换单元30-2-2、中央控制模块50相连,用于当获取到电压转换单元30-2-2提供的终端工作电压时,用于接受中央控制模块50的发送的显示控制信号的控制输出信息。输入单元70-2-2,和电压转换单元30-2-2、中央控制模块50相连,用于当获取到电压转换单元30-2-2提供的终端工作电压时,用于向中央控制模块50发送用户输入信息。The display unit 70-2-1 is connected to the voltage conversion unit 30-2-2 and the central control module 50, and is used to accept the central control module when the terminal operating voltage provided by the voltage conversion unit 30-2-2 is obtained. 50 of the sent display control signal control output information. The input unit 70-2-2 is connected to the voltage conversion unit 30-2-2 and the central control module 50, and is used to provide the central control module with the terminal operating voltage provided by the voltage conversion unit 30-2-2. 50 Send user input information.
本实施3中,USB接口模块10,和电池模块20、电源管理模块30、中央控制模块50相连,用于当和外部供电设备连接时,为电源管理模块和电池模块提供USB总线输入电量;In Embodiment 3, the USB interface module 10 is connected to the battery module 20, the power management module 30, and the central control module 50, and is used to provide USB bus input power for the power management module and the battery module when connected to an external power supply device;
当和上位机连接时,为电源管理模块和电池模块提供USB总线输入电量,为中央控制模块50收发交易数据。When connected to the host computer, it provides USB bus input power for the power management module and the battery module, and sends and receives transaction data for the central control module 50 .
本实施中,当USB接口模块10和外部供电设备或者上位机连接时,获取到的USB总线输入电量的USB总线输入电压是5V,当USB接口模块10和没有和外部供电设备时或者没有和上位机连接时,获取到的USB总线输入电量的USB总线输入电压几乎为0V。In this implementation, when the USB interface module 10 is connected to an external power supply device or a host computer, the USB bus input voltage of the obtained USB bus input power is 5V. When the USB interface module 10 is not connected to an external power supply device or is not connected to a host computer When connected to the computer, the USB bus input voltage of the obtained USB bus input power is almost 0V.
其中,外部供电设备可以是移动电源,供电插座等,上位机可以是计算机或者智能移动设备等。Wherein, the external power supply device may be a mobile power supply, a power supply socket, etc., and the upper computer may be a computer or an intelligent mobile device, etc.
中央控制模块50接受终端工作电压供电,具体用于,用于通过USB接口模块10获取交易数据、通过读卡模块获取金融接触卡信息和金融非接触卡信息等金融卡信息、通过交互模块70获取用户输入信息,向电源管理模块30发送供电控制信号,控制电管管理模块30将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电;The central control module 50 accepts the power supply of the terminal working voltage, and is specifically used for acquiring transaction data through the USB interface module 10, acquiring financial card information such as financial contact card information and financial non-contact card information through the card reading module, and acquiring financial card information through the interaction module 70. The user inputs information, sends a power supply control signal to the power management module 30, and controls the power management module 30 to convert the USB bus input voltage or the battery voltage into a terminal operating voltage, and uses the terminal operating voltage as a power supply for the card reader module 40, the central control module 50, and the Bluetooth terminal. Module 60 and interactive module 70 provide power supply;
电源管理模块30具体用于,当电源管理模块30通过USB接口模块10获取到USB总线输入电量时,将USB总线输入电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电,当USB接口模块10和和外部供电设备或者上位机没有连接时,当电源管理模块30获取到电池模块20提供的电池电量时,首先将电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电,当电源管理模块30还接收到中央控制模块50发送的供电控制信号时,接受中央模块50的控制将电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电。The power management module 30 is specifically used for, when the power management module 30 obtains the USB bus input power through the USB interface module 10, converts the USB bus input voltage into a terminal operating voltage, and uses the terminal operating voltage as the card reading module 40 and the central control module. 50. The Bluetooth module 60 and the interactive module 70 provide power supply. When the USB interface module 10 is not connected to the external power supply device or the host computer, when the power management module 30 obtains the battery power provided by the battery module 20, it first converts the battery voltage For the terminal operating voltage, use the terminal operating voltage to provide power supply for the card reading module 40, the central control module 50, the Bluetooth module 60, and the interactive module 70. When the power management module 30 also receives the power supply control signal sent by the central control module 50, accept The control of the central module 50 converts the battery voltage into a terminal operating voltage, and uses the terminal operating voltage to provide power for the card reading module 40, the central control module 50, the Bluetooth module 60, and the interactive module 70.
实施例4Example 4
本发明实施例4提供了一种支持蓝牙通讯的移动支付终端,如图4所示,所述终端具体包括:USB接口模块10、电池模块20、电源管理模块30、读卡模块40、中央控制模块50、蓝牙模块60、交互模块70;Embodiment 4 of the present invention provides a mobile payment terminal supporting Bluetooth communication. As shown in FIG. Module 50, bluetooth module 60, interactive module 70;
其中,电池模块20包括:充电管理单元20-3-1、电池单元20-3-2;Wherein, the battery module 20 includes: a charging management unit 20-3-1, a battery unit 20-3-2;
电源管理模块30包括:供电自动切换单元30-3-1、电压转换单元30-3-2、开机单元30-3-3、电压隔离单元30-3-4;The power management module 30 includes: a power supply automatic switching unit 30-3-1, a voltage conversion unit 30-3-2, a boot unit 30-3-3, and a voltage isolation unit 30-3-4;
读卡模块40包括:非接触卡供电单元40-3-1、非接触卡读卡单元40-3-2、接触卡供电单元40-3-3、接触卡读卡单元40-3-4;The card reading module 40 includes: a contactless card power supply unit 40-3-1, a contactless card reading unit 40-3-2, a contact card power supply unit 40-3-3, and a contact card reading unit 40-3-4;
蓝牙模块60包括:蓝牙供电单元60-3-1、蓝牙单元60-3-2;Bluetooth module 60 includes: Bluetooth power supply unit 60-3-1, Bluetooth unit 60-3-2;
交互模块70包括:显示单元70-3-1、输入单元70-3-2;The interaction module 70 includes: a display unit 70-3-1, an input unit 70-3-2;
其中,充电管理单元20-3-1,和USB接口模块10、电池单元20-3-2相连,用于管理电池单元20-3-2充电;电池单元20-3-2,和充电管理单元20-3-1、供电自动切换单元30-3-1相连,用于向供电自动切换单元30-3-1提供电池电量;Wherein, the charging management unit 20-3-1 is connected with the USB interface module 10 and the battery unit 20-3-2, and is used to manage the charging of the battery unit 20-3-2; the battery unit 20-3-2, and the charging management unit 20-3-1. The automatic power supply switching unit 30-3-1 is connected to provide battery power to the automatic power supply switching unit 30-3-1;
本实施例中,电池单元20-3-2可以是蓄电池,提供的电池电量的电池电压可以是4.2V。In this embodiment, the battery unit 20-3-2 may be a storage battery, and the battery voltage of the battery power provided may be 4.2V.
供电自动切换单元30-3-1,和USB接口模块10、电池单元20-3-2、电压转换单元30-3-2、开机单元30-3-3相连,用于比较USB总线输入电压和电池电压,当USB总线输入电压比电池电压高时,切换USB总线输入电量为电压转换单元30-3-2供电并向开机单元30-3-3供电并隔离向电池单元20-3-2传递的USB总线输入电量,当USB总线输入电压比电池电压低时,切换电池电量为电压转换单元30-3-2供电并向开机单元30-3-3供电并隔离向USB接口模块10传递的电池电量;The power supply automatic switching unit 30-3-1 is connected with the USB interface module 10, the battery unit 20-3-2, the voltage conversion unit 30-3-2, and the boot unit 30-3-3, and is used to compare the USB bus input voltage and Battery voltage, when the USB bus input voltage is higher than the battery voltage, switch the USB bus input power to supply power to the voltage conversion unit 30-3-2 and supply power to the boot unit 30-3-3 and isolate and transmit to the battery unit 20-3-2 When the USB bus input voltage is lower than the battery voltage, switch the battery power to supply power to the voltage conversion unit 30-3-2 and supply power to the boot unit 30-3-3 and isolate the battery delivered to the USB interface module 10 electricity;
电压转换单元30-3-2,和供电自动切换单元30-3-1、开机单元30-3-3、电压隔离单元30-3-4、非接触卡供电单元40-3-1、接触卡供电单元40-3-3、蓝牙供电单元60-3-1、显示单元70-3-1、输入单元70-3-2、中央控制模块50相连,用于当通过供电自动切换单元30-3-1获取到USB总线输入电量时,将USB总线输入电量作为USB供电电量,当通过开机单元30-3-3获取到USB总线输入电量时,将USB总线输入电量作为USB使能电量,当通过电压隔离单元30-3-4获取到供电控制信号时,将供电控制信号作为使能信号,或者当通过供电自动切换单元30-3-1获取到电池电量时,将电池电量作为电池供电电量,当通过开机单元30-3-3获取到电池电量时,将电池电量作为电池使能电量,当通过电压隔离单元30-3-4获取到供电控制信号时,将供电控制信号作为使能信号。当获取到USB供电电量和USB使能电量时,或者当获取到USB供电电量和使能信号时,或者当获取到电池供电电量或者电池使能电量时,或者当获取到电池供电电量和使能信号时,将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为非接触卡供电单元40-3-1、接触卡供电单元40-3-3、蓝牙供电单元60-3-1、显示单元70-3-1、输入单元70-3-2、中央控制模块50提供供电;Voltage conversion unit 30-3-2, and power supply automatic switching unit 30-3-1, boot unit 30-3-3, voltage isolation unit 30-3-4, contactless card power supply unit 40-3-1, contact card The power supply unit 40-3-3, the bluetooth power supply unit 60-3-1, the display unit 70-3-1, the input unit 70-3-2, and the central control module 50 are connected, and are used to automatically switch the unit 30-3 when the power supply is passed. -1 When the USB bus input power is obtained, the USB bus input power is used as the USB power supply power; when the USB bus input power is obtained through the boot unit 30-3-3, the USB bus input power is used as the USB enabling power; When the voltage isolation unit 30-3-4 obtains the power supply control signal, the power supply control signal is used as the enabling signal, or when the battery power is obtained through the power supply automatic switching unit 30-3-1, the battery power is used as the battery power supply power, When the battery power is obtained through the boot unit 30-3-3, the battery power is used as the battery enable power, and when the power supply control signal is obtained through the voltage isolation unit 30-3-4, the power supply control signal is used as the enable signal. When the USB power supply power and the USB enable power are obtained, or when the USB power supply power and the enable signal are obtained, or when the battery power supply power or the battery enable power is obtained, or when the battery power supply power and the enable signal are obtained signal, the USB bus input voltage or battery voltage is converted into the terminal operating voltage, and the terminal operating voltage is used as the contactless card power supply unit 40-3-1, the contact card power supply unit 40-3-3, and the Bluetooth power supply unit 60-3- 1. The display unit 70-3-1, the input unit 70-3-2, and the central control module 50 provide power supply;
本实施例中,终端工作电压可以是3.3V。In this embodiment, the terminal operating voltage may be 3.3V.
开机单元30-3-3,和供电自动切换单元30-3-1、电压转换单元30-3-2、电压隔离单元30-3-4相连,用于当受到触发时,将供电自动切换单元30-3-1和电压转换单元30-3-2单元之间电路状态由断开状态切换到闭合状态再瞬间恢复至断开状态,当电路状态是闭合状态时,为电压转换单元30-3-2和电压隔离单元30-3-4提供从供电自动切换单元30-3-1传来的USB总线输入电量或者为电压转换单元30-3-2和电压隔离单元30-3-4提供从供电自动切换单元30-3-1传来的电池电量。The power-on unit 30-3-3 is connected to the power supply automatic switching unit 30-3-1, the voltage conversion unit 30-3-2, and the voltage isolation unit 30-3-4, and is used to automatically switch the power supply unit when triggered The state of the circuit between 30-3-1 and the voltage conversion unit 30-3-2 is switched from the disconnected state to the closed state and then restored to the disconnected state instantaneously. When the circuit state is in the closed state, it is the voltage conversion unit 30-3 -2 and the voltage isolation unit 30-3-4 provide the USB bus input power from the power supply automatic switching unit 30-3-1 or provide the voltage conversion unit 30-3-2 and the voltage isolation unit 30-3-4 from the The battery power delivered by the automatic switching unit 30-3-1 for power supply.
例如,当开机单元30-3-3接收到触发时,将供电自动切换单元30-3-1和电压转换单元30-3-2单元之间电路状态由断开状态切换到闭合状态再瞬间恢复至断开状态,当电路状态是闭合状态时,为电压转换单元30-3-2和电压隔离单元30-3-4提供从供电自动切换单元30-3-1传来的USB总线输入电量或者为电压转换单元30-3-2和电压隔离单元30-3-4提供从供电自动切换单元30-3-1传来的电池电量。当下次受到触发时,将供电自动切换单元30-3-1和电压转换单元30-3-2单元之间电路状态由断开状态切换到闭合状态再瞬间恢复至断开状态。For example, when the power-on unit 30-3-3 receives the trigger, the circuit state between the power supply automatic switching unit 30-3-1 and the voltage conversion unit 30-3-2 is switched from the disconnected state to the closed state and then restored instantaneously To the disconnected state, when the circuit state is a closed state, the voltage conversion unit 30-3-2 and the voltage isolation unit 30-3-4 are provided with the USB bus input power transmitted from the power supply automatic switching unit 30-3-1 or The battery power transmitted from the automatic power supply switching unit 30-3-1 is provided for the voltage conversion unit 30-3-2 and the voltage isolation unit 30-3-4. When triggered next time, the state of the circuit between the automatic power supply switching unit 30-3-1 and the voltage conversion unit 30-3-2 is switched from the disconnected state to the closed state and then restored to the disconnected state instantaneously.
电压隔离单元30-3-4和开机单元30-3-3、电压转换单元30-3-2、中央控制模块50相连,用于当通过开机单元30-3-3得到电池电量时,隔离通过开机单元30-3-3向中央控制模块50方向的电池电量或者当通过开机单元30-3-3得到USB总线输入电量时,隔离通过开机单元30-3-3向中央控制模块50方向的USB总线输入电量,当通过中央控制模块50接收中央控制模块50发送的供电控制信号时,向电压转换单元30-3-2传递供电控制信号。The voltage isolation unit 30-3-4 is connected to the boot unit 30-3-3, the voltage conversion unit 30-3-2, and the central control module 50, and is used to isolate the The battery power of the boot unit 30-3-3 to the direction of the central control module 50 or when the USB bus input power is obtained by the boot unit 30-3-3, isolate the USB from the boot unit 30-3-3 to the direction of the central control module 50 The bus input power, when receiving the power supply control signal sent by the central control module 50 through the central control module 50, transmits the power supply control signal to the voltage conversion unit 30-3-2.
非接触卡供电单元40-3-1,和电压转换单元30-3-2、非接触卡读卡单元40-3-2、中央控制模块50相连,用于当获取到电压转换单元30-3-2提供的终端工作电压时,接受中央控制模块50发送的非接触控制信号的控制对非接触卡读卡单元40-3-2提供供电。非接触卡读卡单元40-3-2,和非接触卡供电单元40-3-1、中央控制模块50相连,用于接收非接触卡供电单元40-3-1提供的供电,为中央控制模块50读取接金融非接触卡信息。接触卡供电单元40-3-3,和电压转换单元30-3-2、接触卡读卡单元40-3-4、中央控制模块50相连,用于当获取到电压转换单元30-3-2提供的终端工作电压时,接受中央控制模块50发送的接触控制信号的控制对接触卡读卡单元40-3-4提供供电。接触卡读卡单元40-3-4,和接触卡供电单元40-3-3、中央控制模块50相连,用于接受接触卡供电单元40-3-3的供电,为中央控制模块50读取接金融接触卡信息。The contactless card power supply unit 40-3-1 is connected to the voltage conversion unit 30-3-2, the contactless card reader unit 40-3-2, and the central control module 50, for when the voltage conversion unit 30-3 is obtained When the terminal operating voltage is provided by -2, it accepts the control of the contactless control signal sent by the central control module 50 to provide power to the contactless card reading unit 40-3-2. The contactless card reading unit 40-3-2 is connected with the contactless card power supply unit 40-3-1 and the central control module 50 for receiving the power supply provided by the contactless card power supply unit 40-3-1 for the central control The module 50 reads the information of the contactless financial card. The contact card power supply unit 40-3-3 is connected to the voltage conversion unit 30-3-2, the contact card reader unit 40-3-4, and the central control module 50, for when the voltage conversion unit 30-3-2 is obtained When the terminal working voltage is provided, it accepts the control of the contact control signal sent by the central control module 50 to supply power to the contact card reading unit 40-3-4. The contact card reading unit 40-3-4 is connected with the contact card power supply unit 40-3-3 and the central control module 50, and is used to accept the power supply of the contact card power supply unit 40-3-3 for the central control module 50 to read Receive financial contact card information.
蓝牙供电单元60-3-1,和电压转换单元30-3-2、蓝牙单元60-3-2、中央控制模块50相连,用于当获取到电压转换单元30-3-2提供的终端工作电压时,接受中央控制模块50发送的蓝牙控制信号对蓝牙单元60-3-2提供供电。蓝牙单元60-3-2,和蓝牙供电单元60-3-1、中央控制模块50相连,用于接收蓝牙供电单元60-3-1提供的供电,为中央控制模块50收发交易数据。The Bluetooth power supply unit 60-3-1 is connected to the voltage conversion unit 30-3-2, the Bluetooth unit 60-3-2, and the central control module 50, and is used for terminal work provided by the voltage conversion unit 30-3-2. voltage, accept the Bluetooth control signal sent by the central control module 50 to provide power to the Bluetooth unit 60-3-2. The bluetooth unit 60-3-2 is connected with the bluetooth power supply unit 60-3-1 and the central control module 50, and is used to receive the power provided by the bluetooth power supply unit 60-3-1, and send and receive transaction data for the central control module 50.
显示单元70-3-1,和电压转换单元30-3-2、中央控制模块50相连,用于当获取到电压转换单元30-3-2提供的终端工作电压时,接受中央控制模块50的发送的显示控制信号的控制输出信息。输入单元70-3-2,和电压转换单元30-3-2、中央控制模块50相连,用于当获取到电压转换单元30-3-2提供的终端工作电压时,向中央控制模块50发送用户输入信息。The display unit 70-3-1 is connected to the voltage conversion unit 30-3-2 and the central control module 50, and is used to receive the input from the central control module 50 when the terminal operating voltage provided by the voltage conversion unit 30-3-2 is obtained. The control output information sent by the display control signal. The input unit 70-3-2 is connected to the voltage conversion unit 30-3-2 and the central control module 50, and is used to send the terminal operating voltage provided by the voltage conversion unit 30-3-2 to the central control module 50. User enters information.
本实施4中,USB接口模块10,和电池模块20、电源管理模块30、中央控制模块50相连,用于当和外部供电设备连接时,为电源管理模块和电池模块提供USB总线输入电量;In this implementation 4, the USB interface module 10 is connected to the battery module 20, the power management module 30, and the central control module 50, and is used to provide USB bus input power for the power management module and the battery module when connected to an external power supply device;
当和上位机连接时,为电源管理模块和电池模块提供USB总线输入电量,为中央控制模块50收发交易数据。When connected to the host computer, it provides USB bus input power for the power management module and the battery module, and sends and receives transaction data for the central control module 50 .
本实施中,当USB接口模块10和外部供电设备或者上位机连接时,获取到的USB总线输入电量的USB总线输入电压是5V,当USB接口模块10和没有和外部供电设备时或者没有和上位机连接时,获取到的USB总线输入电量的USB总线输入电压几乎为0V。In this implementation, when the USB interface module 10 is connected to an external power supply device or a host computer, the USB bus input voltage of the obtained USB bus input power is 5V. When the USB interface module 10 is not connected to an external power supply device or is not connected to a host computer When connected to a computer, the USB bus input voltage of the obtained USB bus input power is almost 0V.
其中,外部供电设备可以是移动电源,供电插座等,上位机可以是计算机或者智能移动设备等。Wherein, the external power supply device may be a mobile power supply, a power supply socket, etc., and the upper computer may be a computer or an intelligent mobile device, etc.
中央控制模块50接受终端工作电压供电,具体用于,用于通过USB接口模块10获取交易数据、通过读卡模块获取金融接触卡信息和金融非接触卡信息等金融卡信息、通过交互模块70获取用户输入信息,向电源管理模块30发送供电控制信号,控制电源管理模块30将USB总线输入电压或者电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电;The central control module 50 accepts the power supply of the terminal working voltage, and is specifically used for acquiring transaction data through the USB interface module 10, acquiring financial card information such as financial contact card information and financial non-contact card information through the card reading module, and acquiring financial card information through the interaction module 70. The user inputs the information, sends the power supply control signal to the power management module 30, controls the power management module 30 to convert the USB bus input voltage or the battery voltage into the terminal operating voltage, and uses the terminal operating voltage as the card reading module 40, the central control module 50, and the bluetooth module. 60. The interaction module 70 provides power supply;
电源管理模块30具体用于,当电源管理模块30通过USB接口模块10获取到USB总线输入电量时,首先将USB总线输入电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电,当电源管理模块30还接收到中央控制模块50发送的供电控制信号时,接受中央控制模块50的控制将USB总线输入电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电,当USB接口模块10和外部供电设备或者上位机没有连接时,当电源管理模块30获取电池模块20提供的电池电量时,电源管理模块30首先将电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电,当电源管理模块30还接收到中央控制模块50发送的供电控制信号时,还接受中央控制模块50的控制将电池电压转换为终端工作电压,用终端工作电压为读卡模块40、中央控制模块50、蓝牙模块60、交互模块70提供供电。The power management module 30 is specifically used for, when the power management module 30 obtains the USB bus input power through the USB interface module 10, first converts the USB bus input voltage into a terminal operating voltage, and uses the terminal operating voltage as the card reader module 40, central control The module 50, the bluetooth module 60, and the interactive module 70 provide power supply. When the power management module 30 also receives the power supply control signal sent by the central control module 50, it accepts the control of the central control module 50 to convert the USB bus input voltage into a terminal operating voltage. Use the terminal operating voltage to provide power for the card reader module 40, the central control module 50, the Bluetooth module 60, and the interaction module 70. When the battery power provided, the power management module 30 first converts the battery voltage to the terminal operating voltage, and uses the terminal operating voltage to provide power for the card reading module 40, the central control module 50, the bluetooth module 60, and the interactive module 70. When the power management module 30 When also receiving the power supply control signal sent by the central control module 50, the control of the central control module 50 is also accepted to convert the battery voltage to the terminal operating voltage, and the terminal operating voltage is used for the card reader module 40, the central control module 50, the bluetooth module 60, The interaction module 70 provides power.
实施例5Example 5
本发明实施例5提供了一种支持蓝牙通讯的移动支付终端的工作方法,如图5所示,所述终端执行如下步骤:Embodiment 5 of the present invention provides a working method of a mobile payment terminal supporting Bluetooth communication. As shown in FIG. 5, the terminal performs the following steps:
步骤A101:上电初始化,复位各标志;Step A101: power-on initialization, reset each flag;
具体地,上电初始化,复位USB各标志,复位蓝牙各标志,复位查询余额标志等。Specifically, power-on initialization, reset USB flags, reset Bluetooth flags, reset balance query flags, and the like.
其中,USB各标志包括USB通讯标志、USB枚举标志、USB接收标志、USB返回标志等。Wherein, the USB flags include a USB communication flag, a USB enumeration flag, a USB receiving flag, a USB return flag, and the like.
其中,蓝牙各标志包括蓝牙通讯标志、蓝牙接收标志、蓝牙返回标志等。Wherein, each mark of Bluetooth includes a mark of bluetooth communication, mark of receiving bluetooth, mark of return of bluetooth and so on.
步骤A102:对蓝牙模块上电,配置蓝牙模块;Step A102: power on the bluetooth module, and configure the bluetooth module;
具体地,对蓝牙模块中的蓝牙单元供电,配置蓝牙单元。Specifically, power is supplied to the Bluetooth unit in the Bluetooth module, and the Bluetooth unit is configured.
步骤A103:打开通讯中断服务;Step A103: Open the communication interruption service;
具体地,打开USB通讯中断服务、打开蓝牙通讯中断服务;Specifically, open the USB communication interruption service, open the Bluetooth communication interruption service;
具体地,当检测到USB接口模块和上位机连接或者断开时,USB通讯中断服务被触发,检查USB接口模块的供电电压是否是高电平,如果是高电平,检查USB枚举标志是否被置位,如果USB枚举标志被置位,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,置位USB通讯标志,如果USB枚举标志没有被置位,则进行USB枚举,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,如果是低电平,则复位USB通讯标志;当检测到蓝牙模块和上位机连接或者断开时,蓝牙通讯中断服务被触发,检查蓝牙模块的供电电压是否是低电平,如果是低电平,打开蓝牙数据接收中断服务,等待接收上位机发送的请求交易数据,置位蓝牙通讯标志,如果是高电平,则复位蓝牙通讯标志;Specifically, when it is detected that the USB interface module is connected or disconnected from the host computer, the USB communication interrupt service is triggered to check whether the power supply voltage of the USB interface module is at a high level, and if it is at a high level, check whether the USB enumeration flag is is set, if the USB enumeration flag is set, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, set the USB communication flag, if the USB enumeration flag is not set, then perform USB enumeration For example, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, if it is low, reset the USB communication flag; when it is detected that the Bluetooth module is connected or disconnected from the host computer, the Bluetooth communication interrupt service is disabled Trigger, check whether the power supply voltage of the Bluetooth module is low level, if it is low level, open the Bluetooth data receiving interrupt service, wait for the request transaction data sent by the host computer, set the Bluetooth communication flag, if it is high level, then Reset the Bluetooth communication flag;
其中,USB数据接收中断服务具体包括:当USB接口有数据包传入且数据包的格式符合USB协议的规定时,USB数据接收中断服务被触发,进入USB数据接收中断处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位USB接收标志,退出USB数据接收中断服务处理流程,若数据包不完整,则复位USB接收标志,退出USB数据接收中断服务处理流程。Among them, the USB data receiving interrupt service specifically includes: when the USB interface has a data packet incoming and the format of the data packet conforms to the provisions of the USB protocol, the USB data receiving interrupt service is triggered, enters the USB data receiving interrupt processing flow, receives the data packet, If the data packet is complete, the received data packet will be used as the request transaction data sent by the host computer, the USB receiving flag will be set, and the USB data receiving interrupt service process will exit. If the data packet is incomplete, the USB receiving flag will be reset and the USB will be exited. Data receiving interrupt service processing flow.
蓝牙数据接收中断服务具体包括:当蓝牙模块有数据包传入且数据包合法,蓝牙数据接收中断服务被触发,进入蓝牙数据接收中断服务处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位蓝牙接收标志,退出蓝牙数据接收中断服务处理流程,若数据包不完整,则复位蓝牙接收标志,退出蓝牙数据接收中断处理流程。The bluetooth data reception interruption service specifically includes: when the bluetooth module has a data packet incoming and the data packet is legal, the bluetooth data reception interruption service is triggered, enters the bluetooth data reception interruption service processing flow, receives the data packet, and if the data packet is complete, it will receive The received data packet is used as the request transaction data sent by the host computer, the Bluetooth receiving flag is set, and the Bluetooth data receiving interrupt service processing flow is exited. If the data packet is incomplete, the Bluetooth receiving flag is reset, and the Bluetooth data receiving interrupt processing flow is exited.
本步骤中,通讯中断服务也可以采用定时器触发方法,例如,开启通讯中断服务定时器,当通讯中断服务定时器达到10ms时,通讯中断服务被触发,执行相应操作。In this step, the communication interruption service may also be triggered by a timer, for example, the communication interruption service timer is enabled, and when the communication interruption service timer reaches 10 ms, the communication interruption service is triggered and corresponding operations are performed.
具体地,打开USB通讯中断服务、开启USB通讯中断服务定时器;打开蓝牙通讯中断服务、开启蓝牙通讯中断服务定时器。Specifically, enable the USB communication interruption service, enable the USB communication interruption service timer; enable the Bluetooth communication interruption service, and enable the Bluetooth communication interruption service timer.
步骤A104:打开定时读卡中断服务,获取卡标识值;Step A104: Open the scheduled card reading interrupt service to obtain the card identification value;
具体地,当读卡定时器达到读卡预设值时,定时读卡中断被触发,进入定时读卡中断服务处理流程;优选地,读卡预设值为100毫秒;Specifically, when the card reading timer reaches the card reading preset value, the timing card reading interrupt is triggered and enters the timing card reading interrupt service processing flow; preferably, the card reading preset value is 100 milliseconds;
定时读卡中断处理服务流程具体包括:The timing card reading interrupt processing service process specifically includes:
步骤A1-1:对读卡模块上电;Step A1-1: Power on the card reader module;
本步骤A1-1具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元上电。This step A1-1 specifically includes: powering on the contact card reading unit and the non-contact card reading unit in the card reading module.
步骤A1-2:检测是否有接触卡,若无,将卡标识值设置为第一预设值,执行步骤A1-3,若有,将卡标识值设置为第二预设值,执行步骤A1-4;Step A1-2: Detect whether there is a contact card, if not, set the card identification value to the first preset value, perform step A1-3, if yes, set the card identification value to the second preset value, and perform step A1 -4;
步骤A1-3:开始寻卡,判断预设时间内是否接收到非接触卡的应答,如果接收到,则将卡标识值设置为第三预设值,执行步骤A1-4,否则,执行步骤A1-4;Step A1-3: Start searching for the card, judge whether the response from the contactless card is received within the preset time, if so, set the card identification value to the third preset value, and execute step A1-4, otherwise, execute step A1-4;
步骤A1-4:对读卡模块下电,退出定时读卡中断服务;Step A1-4: Power off the card reader module and exit the scheduled card reader interrupt service;
本步骤A1-4具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元下电。This step A1-4 specifically includes: powering off the contact card reading unit and the non-contact card reading unit in the card reading module.
优选的,第一预设值为0,第二预设值为1,第三预设值为2。Preferably, the first preset value is 0, the second preset value is 1, and the third preset value is 2.
步骤A105:检查USB通讯标志是否被置位,如果USB通讯标志被置位,则执行步骤A106,否则,检查蓝牙通讯标志是否被置位,如果蓝牙通讯标志被置位,则执行步骤A107,如果蓝牙通讯标志没有被置位,则返回步骤A105;Step A105: Check whether the USB communication flag is set, if the USB communication flag is set, then execute step A106, otherwise, check whether the Bluetooth communication flag is set, if the Bluetooth communication flag is set, then execute step A107, if If the bluetooth communication flag is not set, return to step A105;
步骤A106:检查USB接收标志是否被置位,如果是,则复位USB接收标志、置位USB返回标志,执行步骤A108,否则返回步骤A105;Step A106: Check whether the USB receiving flag is set, if yes, reset the USB receiving flag, set the USB return flag, execute step A108, otherwise return to step A105;
步骤A107:检查蓝牙接收标志是否被置位,如果是,则复位蓝牙接收标志、置位蓝牙返回标志,执行步骤A108,否则返回步骤A105;Step A107: Check whether the bluetooth receive flag is set, if so, reset the bluetooth receive flag, set the bluetooth return flag, execute step A108, otherwise return to step A105;
步骤A108:根据卡标识值获取金融卡返回的结果交易数据;Step A108: Obtain the result transaction data returned by the financial card according to the card identification value;
具体包括,步骤A2-1:检查卡标识值是否是第一预设值,如果是,则执行步骤A2-6,否则执行步骤A2-2;Specifically, step A2-1: check whether the card identification value is the first preset value, if yes, execute step A2-6, otherwise execute step A2-2;
本步骤A2-1具体包括:检查卡标识值,如果是第一预设值,则执行步骤A2-6,如果是第二预设值,则执行步骤A2-2,如果是第三预设值,则执行步骤A2-2;This step A2-1 specifically includes: checking the card identification value, if it is the first preset value, then execute step A2-6, if it is the second preset value, then execute step A2-2, if it is the third preset value , execute step A2-2;
步骤A2-2:将获取到的请求交易数据发送给读卡模块;Step A2-2: Send the obtained requested transaction data to the card reading module;
具体地,将请求交易数据发送给接触卡读卡单元或者非接触卡读卡单元。Specifically, the request transaction data is sent to the contact card reading unit or the non-contact card reading unit.
本步骤具体包括:当卡标识值是第二预设值,则将请求交易数据发送给接触卡读卡单元,当卡标识值是第三预设值,则将请求交易数据发送给非接触卡读卡单元。This step specifically includes: when the card identification value is the second preset value, the request transaction data is sent to the contact card reader unit; when the card identification value is the third preset value, the request transaction data is sent to the contactless card card reader unit.
步骤A2-3:判断预设时间内是否接收到读卡模块返回的应答信息,如果是,则执行步骤A2-4,否则执行步骤A2-5;Step A2-3: Judging whether the response information returned by the card reading module is received within the preset time, if yes, execute step A2-4, otherwise execute step A2-5;
具体地,当将请求交易数据发送给接触卡读卡单元,则判断预设时间内是否接收到接触卡读卡单元返回的应答信息,当将请求交易数据发送给非接触卡读卡单元,则判断预设时间内是否接收到非接触卡读卡单元返回的应答信息。Specifically, when the request transaction data is sent to the contact card reader unit, it is judged whether the response information returned by the contact card reader unit is received within the preset time, and when the request transaction data is sent to the contactless card reader unit, then It is judged whether the response information returned by the non-contact card reading unit is received within the preset time.
优选地,预设时间为100毫秒。Preferably, the preset time is 100 milliseconds.
步骤A2-4:将读卡模块的应答信息作为结果交易数据,执行步骤A109;Step A2-4: take the response information of the card reading module as the result transaction data, and execute step A109;
步骤A2-5:将提示读卡模块超时的信息作为结果交易数据,执行步骤A109;Step A2-5: Use the information prompting that the card reader module times out as the result transaction data, and execute step A109;
步骤A2-6:将提示无卡的信息作为返回数据作为结果交易数据,执行步骤A109;Step A2-6: Take the information indicating that there is no card as the returned data as the result transaction data, and execute step A109;
步骤A109:检查USB返回标志是否被置位,如果是,则复位USB返回标志,通过USB接口模块返回结果交易数据,执行步骤A110,否则,检查蓝牙返回标志是否被置位,如果是,则复位蓝牙返回标志,通过蓝牙模块返回结果交易数据,执行步骤A111,如果蓝牙返回标志没有被置位,则执行步骤A111;Step A109: Check whether the USB return flag is set, if yes, reset the USB return flag, return the result transaction data through the USB interface module, execute step A110, otherwise, check whether the Bluetooth return flag is set, if yes, reset Bluetooth return flag, return the result transaction data through the Bluetooth module, execute step A111, if the bluetooth return flag is not set, then execute step A111;
步骤A110:检查USB通讯标志是否被置位,如果被置位,则返回步骤A105,否则关闭USB数据接收中断服务,复位USB各标志,返回步骤A105;Step A110: check whether the USB communication flag is set, if it is set, then return to step A105, otherwise close the USB data receiving interrupt service, reset the USB flags, and return to step A105;
步骤A111:检查蓝牙通讯标志是否被置位,如果被置位,则返回步骤A105,否则关闭蓝牙数据接收中断服务,复位蓝牙各标志,返回步骤A105。Step A111: Check whether the Bluetooth communication flag is set, if it is set, return to step A105, otherwise disable the Bluetooth data receiving interrupt service, reset the Bluetooth flags, and return to step A105.
本实施例中,步骤A106中,当检查USB接收标志没有被置位,还包括:In this embodiment, in step A106, when checking that the USB receiving flag is not set, it also includes:
检查查询余额标志是否被置位,如果是,则返回步骤A105,否则获取金融卡余额,输出金融卡余额信息,置位查询余额标志,返回步骤A105;Check whether the query balance flag is set, if yes, return to step A105, otherwise obtain the financial card balance, output the financial card balance information, set the query balance flag, and return to step A105;
步骤A107中,当检查蓝牙接收标志没有被置位,还包括:In step A107, when checking that the bluetooth receiving flag is not set, it also includes:
检查查询余额标志是否被置位,如果是,则返回步骤A105,否则获取金融卡余额,输出金融卡余额信息,置位查询余额标志,返回步骤A105。Check whether the query balance flag is set, if yes, return to step A105, otherwise obtain the financial card balance, output the financial card balance information, set the query balance flag, and return to step A105.
本实施例中的金融卡可以是金融接触卡、金融非接触卡。The financial card in this embodiment may be a financial contact card or a financial non-contact card.
实施例6Example 6
本发明实施例6提供了一种支持蓝牙通讯的移动支付终端的工作方法,所述终端执行如下步骤:Embodiment 6 of the present invention provides a working method of a mobile payment terminal supporting Bluetooth communication, and the terminal performs the following steps:
步骤B101:上电初始化,向电源管理模块发送供电控制信号,控制电源管理模块上电,复位各标志;Step B101: Power-on initialization, send a power supply control signal to the power management module, control the power management module to power on, and reset each flag;
具体地,上电初始化,向电源管理模块发送供电控制信号,电源管理模块接受供电控制信号的控制,为中央控制模块、读卡模块、蓝牙模块、显示模块供电,复位USB各标志;复位蓝牙各标志,复位查询余额标志、定时关机标志等。Specifically, power-on initialization sends a power supply control signal to the power management module, and the power management module accepts the control of the power supply control signal to supply power to the central control module, card reader module, Bluetooth module, and display module, and resets USB signs; flag, reset query balance flag, timer shutdown flag, etc.
其中,USB各标志包括USB通讯标志、USB枚举标志、USB接收标志、USB标志等。Wherein, the USB signs include a USB communication sign, a USB enumeration sign, a USB receiving sign, a USB sign and the like.
其中,蓝牙各标志包括蓝牙通讯标志、蓝牙接收标志、蓝牙标志等。Wherein, each logo of Bluetooth includes a Bluetooth communication logo, a Bluetooth receiving logo, a Bluetooth logo and the like.
步骤B102:对蓝牙模块上电,配置蓝牙模块;Step B102: power on the bluetooth module, and configure the bluetooth module;
对蓝牙模块中的蓝牙单元供电,配置蓝牙单元。Power the Bluetooth unit in the Bluetooth module and configure the Bluetooth unit.
步骤B103:打开通讯中断服务,开启通讯中断服务定时器;Step B103: Turn on the communication interruption service, and start the communication interruption service timer;
具体地,打开USB通讯中断服务,开启USB通讯中断服务定时器;打开蓝牙通讯中断服务,开启蓝牙通讯中断服务定时器;Specifically, open the USB communication interruption service, open the USB communication interruption service timer; open the Bluetooth communication interruption service, and open the Bluetooth communication interruption service timer;
具体地,当USB通讯中断服务定时器达到USB通讯预设值时,USB通讯中断服务被触发,检查USB接口模块的供电电压是否是高电平,如果是高电平,检查USB枚举标志是否被置位,如果USB枚举标志被置位,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,置位USB通讯标志,如果USB枚举标志没有被置位,则进行USB枚举,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,如果是低电平,则复位USB通讯标志,打开定时关机中断服务,开启关机定时器;当蓝牙通讯中断服务定时器达到蓝牙通讯预设值时,蓝牙通讯中断服务被触发,打开定时关机中断,开启关机定时器,检查蓝牙模块的供电电压是否是低电平,如果是低电平,打开蓝牙数据接收中断服务,等待接收上位机发送的请求交易数据,置位蓝牙通讯标志,如果是高电平,则复位蓝牙通讯标志;Specifically, when the USB communication interrupt service timer reaches the USB communication preset value, the USB communication interrupt service is triggered, and checks whether the power supply voltage of the USB interface module is at a high level, and if it is at a high level, checks whether the USB enumeration flag is is set, if the USB enumeration flag is set, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, set the USB communication flag, if the USB enumeration flag is not set, then perform USB enumeration For example, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, if it is low, reset the USB communication flag, open the scheduled shutdown interrupt service, and start the shutdown timer; when the Bluetooth communication interrupt service timer reaches When the bluetooth communication preset value is set, the bluetooth communication interrupt service is triggered, turn on the timer shutdown interrupt, turn on the shutdown timer, check whether the power supply voltage of the bluetooth module is low level, if it is low level, turn on the bluetooth data receiving interrupt service, wait Receive the request transaction data sent by the host computer, set the Bluetooth communication flag, if it is high level, reset the Bluetooth communication flag;
其中,USB通讯预设值是可以是10ms,蓝牙通讯预设值可以是10ms。Wherein, the default value of USB communication may be 10ms, and the default value of Bluetooth communication may be 10ms.
其中,USB数据接收中断服务具体包括:当USB接口有数据包传入且数据包的格式符合USB协议的规定时,USB数据接收中断服务被触发,进入USB数据接收中断服务处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位USB接收标志,退出USB数据接收中断服务处理流程,若数据包不完整,则复位USB接收标志,退出USB数据接收中断处理流程。Among them, the USB data receiving interrupt service specifically includes: when the USB interface has a data packet incoming and the format of the data packet conforms to the provisions of the USB protocol, the USB data receiving interrupt service is triggered, enters the USB data receiving interrupt service processing flow, and receives the data packet , if the data packet is complete, the received data packet will be used as the request transaction data sent by the host computer, the USB receiving flag will be set, and the USB data receiving interrupt service process will be exited; if the data packet is incomplete, the USB receiving flag will be reset and the exit USB data receiving interrupt processing flow.
蓝牙数据接收中断服务具体包括:当蓝牙模块有数据包传入且数据包合法,蓝牙数据接收中断服务被触发,进入蓝牙数据接收中断服务处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位蓝牙接收标志,退出蓝牙数据接收中断服务处理流程,若数据包不完整,则,复位蓝牙接收标志,退出蓝牙数据接收中断处理流程。The bluetooth data reception interruption service specifically includes: when the bluetooth module has a data packet incoming and the data packet is legal, the bluetooth data reception interruption service is triggered, enters the bluetooth data reception interruption service processing flow, receives the data packet, and if the data packet is complete, it will receive The received data packet is used as the request transaction data sent by the host computer, and the bluetooth receiving flag is set to exit the bluetooth data receiving interrupt service processing flow. If the data packet is incomplete, the bluetooth receiving flag is reset and the bluetooth data receiving interrupt processing flow is exited.
定时关机中断服务具体包括:当关机定时器达到预设开启值时,进入定时提示关机处理流程,具体包括:判断关机计数器是否大于预设关机值,如果是,则将关机计数器设置为初始值,置位定时关机标志,退出定时关机中断服务,否则,退出定时关机中断。The scheduled shutdown interrupt service specifically includes: when the shutdown timer reaches the preset opening value, enter the timing prompt shutdown processing flow, specifically including: judging whether the shutdown counter is greater than the preset shutdown value, if so, setting the shutdown counter to the initial value, Set the timer shutdown flag to exit the timer shutdown interrupt service, otherwise, exit the timer shutdown interrupt.
其中,关机计数器初始值为0,每次自加1。Wherein, the shutdown counter has an initial value of 0 and increments by 1 each time.
优选的,预设开启值为1s,预设关机值为60。Preferably, the preset on value is 1s, and the preset off value is 60.
步骤B104:打开定时读卡中断服务,获取卡标识值;Step B104: Open the scheduled card reading interrupt service to obtain the card identification value;
具体地,当读卡定时器达到读卡预设值时,定时读卡中断服务被触发,进入定时读卡中断服务处理流程;优选地,读卡预设值为100毫秒;其定时读卡中断服务处理流程具体包括:Specifically, when the card-reading timer reaches the card-reading preset value, the timing card-reading interrupt service is triggered and enters the timing card-reading interrupt service processing flow; preferably, the card-reading preset value is 100 milliseconds; its timing card-reading interrupt The service process specifically includes:
步骤B1-1:对读卡模块上电;Step B1-1: Power on the card reader module;
本步骤B1-1具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元上电。This step B1-1 specifically includes: powering on the contact card reading unit and the non-contact card reading unit in the card reading module.
步骤B1-2:检测是否有接触卡,若无,将卡标识值设置为第一预设值,执行步骤B1-3,若有,将卡标识值设置为第二预设值,执行步骤B1-4;Step B1-2: Detect whether there is a contact card, if not, set the card identification value to the first preset value, execute step B1-3, if yes, set the card identification value to the second preset value, and execute step B1 -4;
步骤B1-3:开始寻卡,判断预设时间内是否接收到非接触卡的应答,如果接收到,则将卡标识值设置为第三预设值,执行步骤B1-4,否则,执行步骤B1-4;Step B1-3: Start searching for a card, and judge whether a response from the contactless card is received within the preset time, if so, set the card identification value to the third preset value, and execute step B1-4, otherwise, execute step B1-4 B1-4;
步骤B1-4:对读卡模块下电,退出定时读卡中断服务;Step B1-4: Power off the card reader module and exit the scheduled card reader interrupt service;
本步骤B1-4具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元下电。This step B1-4 specifically includes: powering off the contact card reading unit and the non-contact card reading unit in the card reading module.
优选的,第一预设值为0,第二预设值为1,第三预设值为2。Preferably, the first preset value is 0, the second preset value is 1, and the third preset value is 2.
步骤B105:检查USB通讯标志是否被置位,如果USB通讯标志被置位,则执行步骤B106,否则,检查蓝牙通讯标志是否被置位,如果蓝牙通讯标志被置位,则执行步骤B107,如果蓝牙通讯标志没有被置位,则检查定时关机标志是否被置位,如果定时关机被置位,则下电关机,如果定时关机标志没有被置位,则返回步骤B105;Step B105: Check whether the USB communication flag is set, if the USB communication flag is set, then execute step B106, otherwise, check whether the Bluetooth communication flag is set, if the Bluetooth communication flag is set, then execute step B107, if If the bluetooth communication flag is not set, then check whether the timer shutdown flag is set, if the timer shutdown is set, then power off and shut down, if the timer shutdown flag is not set, then return to step B105;
步骤B106:检查USB接收标志是否被置位,如果是,则关闭定时关机中断服务,复位定时关机标志,将关机计数器置为初始值,复位USB接收标志、置位USB返回标志,执行步骤B108,否则返回步骤B105;Step B106: check whether the USB receiving flag is set, if yes, then close the timer shutdown interrupt service, reset the timer shutdown flag, set the shutdown counter to the initial value, reset the USB receiving flag, set the USB return flag, and execute step B108, Otherwise return to step B105;
步骤B107:检查蓝牙接收标志是否被置位,如果是,则关闭定时关机中断服务,复位定时关机标志,将关机计数器置为初始值,复位蓝牙接收标志、置位蓝牙返回标志,执行步骤B108,否则返回步骤B105;Step B107: check whether the bluetooth receive flag is set, if yes, then close the timer shutdown interrupt service, reset the timer shutdown flag, set the shutdown counter to the initial value, reset the bluetooth receive flag, set the bluetooth return flag, and execute step B108, Otherwise return to step B105;
步骤B108:根据卡标识值获取金融卡返回的结果交易数据;Step B108: Obtain the result transaction data returned by the financial card according to the card identification value;
具体包括,步骤B2-1:检查卡标识值是否是第一预设值,如果是,则执行步骤B2-6,否则执行步骤B2-2;Specifically, step B2-1: check whether the card identification value is the first preset value, if yes, execute step B2-6, otherwise execute step B2-2;
本步骤B2-1具体包括:检查卡标识值,如果是第一预设值,则执行步骤B2-6,如果是第二预设值,则执行步骤B2-2,如果是第三预设值,则执行步骤B2-2;This step B2-1 specifically includes: checking the card identification value, if it is the first preset value, then execute step B2-6, if it is the second preset value, then execute step B2-2, if it is the third preset value , then perform step B2-2;
步骤B2-2:将获取到的请求交易数据发送给读卡模块;Step B2-2: Send the obtained requested transaction data to the card reading module;
具体地,将请求交易数据发送给接触卡读卡单元或者非接触卡读卡单元。Specifically, the request transaction data is sent to the contact card reading unit or the non-contact card reading unit.
本步骤具体包括:当卡标识值是第二预设值,则将请求交易数据发送给接触卡读卡单元,当卡标识值是第三预设值,则将请求交易数据发送给非接触卡读卡单元。This step specifically includes: when the card identification value is the second preset value, the request transaction data is sent to the contact card reader unit; when the card identification value is the third preset value, the request transaction data is sent to the contactless card card reader unit.
步骤B2-3:判断预设时间内是否接收到读卡模块返回的应答信息,如果是,则执行步骤B2-4,否则执行步骤B2-5;Step B2-3: Judging whether the response information returned by the card reading module is received within the preset time, if yes, execute step B2-4, otherwise execute step B2-5;
具体地,当将请求交易数据发送给接触卡读卡单元,则判断预设时间内是否接收到接触卡读卡单元返回的应答信息,当将请求交易数据发送给非接触卡读卡单元,则判断预设时间内是否接收到非接触卡读卡单元返回的应答信息。Specifically, when the request transaction data is sent to the contact card reader unit, it is judged whether the response information returned by the contact card reader unit is received within the preset time, and when the request transaction data is sent to the contactless card reader unit, then It is judged whether the response information returned by the non-contact card reading unit is received within the preset time.
优选地,预设时间为100毫秒。Preferably, the preset time is 100 milliseconds.
步骤B2-4:将读卡模块的应答信息作为结果交易数据,执行步骤B109;Step B2-4: take the response information of the card reading module as the result transaction data, and execute step B109;
步骤B2-5:将提示读卡模块超时的信息作为结果交易数据,执行步骤B109;Step B2-5: Use the information indicating that the card reading module has timed out as the result transaction data, and execute step B109;
步骤B2-6:将提示无卡的信息作为返回数据作为结果交易数据,执行步骤B109;Step B2-6: Take the information indicating that there is no card as the returned data as the result transaction data, and execute step B109;
步骤B109:检查USB返回标志是否被置位,如果是,则复位USB返回标志,通过USB接口模块返回结果交易数据,执行步骤B110,否则,检查蓝牙返回标志是否被置位,如果是,则复位蓝牙返回标志,通过蓝牙模块返回结果交易数据,执行步骤B111,如果蓝牙返回标志没有被置位,则执行步骤B111;Step B109: Check whether the USB return flag is set, if yes, reset the USB return flag, return the result transaction data through the USB interface module, execute step B110, otherwise, check whether the Bluetooth return flag is set, if yes, reset Bluetooth return flag, return the result transaction data through the Bluetooth module, execute step B111, if the bluetooth return flag is not set, then execute step B111;
步骤B110:检查USB通讯标志是否被置位,如果被置位,则返回步骤B105,否则关闭USB数据接收中断服务,复位USB各标志,返回步骤B105;Step B110: check whether the USB communication flag is set, if it is set, then return to step B105, otherwise close the USB data receiving interrupt service, reset the USB flags, and return to step B105;
步骤B111:检查蓝牙通讯标志是否被置位,如果被置位,则返回步骤B105,否则关闭蓝牙数据接收中断服务,复位蓝牙各标志,返回步骤B105。Step B111: Check whether the bluetooth communication flag is set, if set, return to step B105, otherwise close the bluetooth data receiving interrupt service, reset the bluetooth flags, return to step B105.
本实施例中,步骤B106中,当检查USB接收标志没有被置位,还包括:In this embodiment, in step B106, when checking that the USB receiving flag is not set, it also includes:
检查查询余额标志是否被置位,如果是,则返回步骤B105,否则获取金融卡余额,输出金融卡余额信息,置位查询余额标志,返回步骤B105;Check whether the query balance flag is set, if yes, return to step B105, otherwise obtain the financial card balance, output the financial card balance information, set the query balance flag, and return to step B105;
步骤B107中,当检查蓝牙接收标志没有被置位,还包括:In step B107, when checking that the bluetooth receiving flag is not set, it also includes:
检查查询余额标志是否被置位,如果是,则返回步骤B105,否则获取金融卡余额,输出金融卡余额信息,置位查询余额标志,返回步骤B105。Check whether the query balance flag is set, if yes, return to step B105, otherwise obtain the financial card balance, output the financial card balance information, set the query balance flag, and return to step B105.
本实施例中的金融卡可以是金融接触卡、金融非接触卡。The financial card in this embodiment may be a financial contact card or a financial non-contact card.
实施例7Example 7
本实施例7提供了一种支持蓝牙通讯的移动支付终端的工作方法,如图6所示,包括:Embodiment 7 provides a working method of a mobile payment terminal supporting Bluetooth communication, as shown in FIG. 6 , including:
步骤C101:上电初始化,复位各标志;Step C101: power-on initialization, reset each flag;
具体地,上电初始化,复位USB各标志,复位蓝牙各标志、复位查询余额标志。Specifically, power-on initialization, reset the USB flags, reset the Bluetooth flags, and reset the balance query flag.
其中,USB各标志包括USB通讯标志、USB枚举标志、USB接收标志、USB返回标志等。Wherein, the USB flags include a USB communication flag, a USB enumeration flag, a USB receiving flag, a USB return flag, and the like.
其中,蓝牙各标志包括蓝牙通讯标志、蓝牙接收标志、蓝牙返回标志等。Wherein, each mark of Bluetooth includes a mark of bluetooth communication, mark of receiving bluetooth, mark of return of bluetooth and so on.
步骤C102:对蓝牙模块上电,配置蓝牙模块;Step C102: power on the bluetooth module, and configure the bluetooth module;
具体地,对蓝牙模块中的蓝牙单元供电,配置蓝牙单元。Specifically, power is supplied to the Bluetooth unit in the Bluetooth module, and the Bluetooth unit is configured.
步骤C103:打开通讯中断服务;Step C103: Open the communication interruption service;
具体地,打开USB通讯中断服务;打开蓝牙通讯中断服务。Specifically, the USB communication interruption service is enabled; the Bluetooth communication interruption service is enabled.
具体地,当检测到USB接口模块和上位机连接或者断开时,USB通讯中断服务被触发,检查USB接口模块的供电电压是否是高电平,如果是高电平,检查USB枚举标志是否被置位,如果USB枚举标志被置位,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,置位USB通讯标志,如果USB枚举标志没有被置位,则进行USB枚举,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,如果是低电平,则复位USB通讯标志;当检测到蓝牙模块和上位机连接或者断开时,蓝牙通讯中断服务被触发,检查蓝牙模块的供电电压是否是低电平,如果是低电平,打开蓝牙数据接收中断服务,等待接收上位机发送的请求交易数据,置位蓝牙通讯标志,如果是高电平,则复位蓝牙通讯标志;Specifically, when it is detected that the USB interface module is connected or disconnected from the host computer, the USB communication interrupt service is triggered to check whether the power supply voltage of the USB interface module is at a high level, and if it is at a high level, check whether the USB enumeration flag is is set, if the USB enumeration flag is set, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, set the USB communication flag, if the USB enumeration flag is not set, then perform USB enumeration For example, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, if it is low, reset the USB communication flag; when it is detected that the Bluetooth module is connected or disconnected from the host computer, the Bluetooth communication interrupt service is disabled Trigger, check whether the power supply voltage of the Bluetooth module is low level, if it is low level, open the Bluetooth data receiving interrupt service, wait for the request transaction data sent by the host computer, set the Bluetooth communication flag, if it is high level, then Reset the Bluetooth communication flag;
其中,USB数据接收中断服务具体包括:当USB接口有数据包传入且数据包的格式符合USB协议的规定时,USB数据接收中断服务被触发,进入USB数据接收中断处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位USB接收标志,退出USB数据接收中断服务处理流程,若数据包不完整,则复位USB接收标志,退出USB数据接收中断服务处理流程。Among them, the USB data receiving interrupt service specifically includes: when the USB interface has a data packet incoming and the format of the data packet conforms to the provisions of the USB protocol, the USB data receiving interrupt service is triggered, enters the USB data receiving interrupt processing flow, receives the data packet, If the data packet is complete, the received data packet will be used as the request transaction data sent by the host computer, the USB receiving flag will be set, and the USB data receiving interrupt service process will exit. If the data packet is incomplete, the USB receiving flag will be reset and the USB will be exited. Data receiving interrupt service processing flow.
蓝牙数据接收中断服务具体包括:当蓝牙模块有数据包传入且数据包合法,蓝牙数据接收中断服务被触发,进入蓝牙数据接收中断服务处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位蓝牙接收标志,退出蓝牙数据接收中断服务处理流程,若数据包不完整,则复位蓝牙接收标志,退出蓝牙数据接收中断处理流程。The bluetooth data reception interruption service specifically includes: when the bluetooth module has a data packet incoming and the data packet is legal, the bluetooth data reception interruption service is triggered, enters the bluetooth data reception interruption service processing flow, receives the data packet, and if the data packet is complete, it will receive The received data packet is used as the request transaction data sent by the host computer, the Bluetooth receiving flag is set, and the Bluetooth data receiving interrupt service processing flow is exited. If the data packet is incomplete, the Bluetooth receiving flag is reset, and the Bluetooth data receiving interrupt processing flow is exited.
本步骤中,通讯中断服务也可以采用定时器触发方法,例如,开启通讯中断服务定时器,当通讯中断服务定时器达到10ms时,通讯中断服务被触发,执行相应操作。In this step, the communication interruption service may also be triggered by a timer, for example, the communication interruption service timer is enabled, and when the communication interruption service timer reaches 10 ms, the communication interruption service is triggered and corresponding operations are performed.
具体地,打开USB通讯中断服务、开启USB通讯中断服务定时器;打开蓝牙通讯中断服务、开启蓝牙通讯中断服务定时器。Specifically, enable the USB communication interruption service, enable the USB communication interruption service timer; enable the Bluetooth communication interruption service, and enable the Bluetooth communication interruption service timer.
步骤C104:打开定时读卡中断服务,获取卡标识值;Step C104: Open the scheduled card reading interrupt service to obtain the card identification value;
具体地,当读卡定时器达到读卡预设值时,定时读卡中断被触发,进入定时读卡中断服务处理流程;优选地,读卡预设值为100毫秒;Specifically, when the card reading timer reaches the card reading preset value, the timing card reading interrupt is triggered and enters the timing card reading interrupt service processing flow; preferably, the card reading preset value is 100 milliseconds;
定时读卡中断处理流程具体包括:The timing card reading interrupt processing flow specifically includes:
步骤C1-1:对读卡模块上电;Step C1-1: Power on the card reader module;
本步骤C1-1具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元上电。This step C1-1 specifically includes: powering on the contact card reading unit and the non-contact card reading unit in the card reading module.
步骤C1-2:检测是否有接触卡,若无,将卡标识值设置为第一预设值,执行步骤C1-3,若有,将卡标识值设置为第二预设值,执行步骤C1-4;Step C1-2: Detect whether there is a contact card, if not, set the card identification value as the first preset value, and execute step C1-3, if yes, set the card identification value as the second preset value, and execute step C1 -4;
步骤C1-3:开始寻卡,判断预设时间内是否接收到非接触卡的应答,如果接收到,则将卡标识值设置为第三预设值,执行步骤C1-4,否则,执行步骤C1-4;Step C1-3: Start searching for a card, and judge whether a response from the contactless card is received within the preset time, if so, set the card identification value to the third preset value, and execute step C1-4, otherwise, execute step C1-4 C1-4;
步骤C1-4:对读卡模块下电,退出定时读卡中断;Step C1-4: Power off the card reader module and exit the scheduled card reader interrupt;
本步骤C1-4具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元下电。This step C1-4 specifically includes: powering off the contact card reading unit and the non-contact card reading unit in the card reading module.
优选的,第一预设值为0,第二预设值为1,第三预设值为2。Preferably, the first preset value is 0, the second preset value is 1, and the third preset value is 2.
步骤C105:检查USB接收标志是否被置位,如果是,则复位USB接收标志、置位USB返回标志,执行步骤C107,否则执行步骤C106;Step C105: Check whether the USB receiving flag is set, if so, reset the USB receiving flag, set the USB return flag, and execute step C107, otherwise execute step C106;
步骤C106:检查蓝牙接收标志是否被置位,如果是,则复位蓝牙接收标志、置位蓝牙返回标志,执行步骤C107,否则返回步骤C105;Step C106: check whether the bluetooth receiving flag is set, if so, reset the bluetooth receiving flag, set the bluetooth return flag, execute step C107, otherwise return to step C105;
步骤C107:根据卡标识值获取金融卡返回的结果交易数据;Step C107: Obtain the result transaction data returned by the financial card according to the card identification value;
具体包括,步骤C2-1:检查卡标识值是否是第一预设值,如果是,则执行步骤C2-6,否则执行步骤C2-2;Specifically, step C2-1: check whether the card identification value is the first preset value, if yes, execute step C2-6, otherwise execute step C2-2;
本步骤C2-1具体包括:检查卡标识值,如果是第一预设值,则执行步骤C2-6,如果是第二预设值,则执行步骤C2-2,如果是第三预设值,则执行步骤C2-2;This step C2-1 specifically includes: checking the card identification value, if it is the first preset value, then execute step C2-6, if it is the second preset value, then execute step C2-2, if it is the third preset value , then execute step C2-2;
步骤C2-2:将获取到的请求交易数据发送给读卡模块;Step C2-2: Send the obtained requested transaction data to the card reading module;
具体地,将请求交易数据发送给接触卡读卡单元或者非接触卡读卡单元。Specifically, the request transaction data is sent to the contact card reading unit or the non-contact card reading unit.
本步骤具体包括:当卡标识值是第二预设值,则将请求交易数据发送给接触卡读卡单元,当卡标识值是第三预设值,则将请求交易数据发送给非接触卡读卡单元。This step specifically includes: when the card identification value is the second preset value, the request transaction data is sent to the contact card reader unit; when the card identification value is the third preset value, the request transaction data is sent to the contactless card card reader unit.
步骤C2-3:判断预设时间内是否接收到读卡模块返回的应答信息,如果是,则执行步骤C2-4,否则执行步骤C2-5;Step C2-3: Judging whether the response information returned by the card reading module is received within the preset time, if yes, execute step C2-4, otherwise execute step C2-5;
具体地,当将请求交易数据发送给接触卡读卡单元,则判断预设时间内是否接收到接触卡读卡单元返回的应答信息,当将请求交易数据发送给非接触卡读卡单元,则判断预设时间内是否接收到非接触卡读卡单元返回的应答信息。Specifically, when the request transaction data is sent to the contact card reader unit, it is judged whether the response information returned by the contact card reader unit is received within the preset time, and when the request transaction data is sent to the contactless card reader unit, then It is judged whether the response information returned by the non-contact card reading unit is received within the preset time.
优选地,预设时间为100毫秒。Preferably, the preset time is 100 milliseconds.
步骤C2-4:将读卡模块的应答信息作为结果交易数据,执行步骤C108;Step C2-4: take the response information of the card reading module as the result transaction data, and execute step C108;
步骤C2-5:将提示读卡模块超时的信息作为结果交易数据,执行步骤C108;Step C2-5: Use the information prompting that the card reader module times out as the result transaction data, and execute step C108;
步骤C2-6:将提示无卡的信息作为返回数据作为结果交易数据,执行步骤C108;Step C2-6: Take the information indicating that there is no card as the returned data as the result transaction data, and execute step C108;
步骤C108:检查USB返回标志是否被置位,如果是,则复位USB返回标志,通过USB接口模块返回结果交易数据,执行步骤C109,否则,检查蓝牙返回标志是否被置位,如果是,则复位蓝牙返回标志,通过蓝牙模块返回结果交易数据,则执行步骤C110,如果蓝牙返回标志没有被置位,则执行步骤C110;Step C108: Check whether the USB return flag is set, if yes, reset the USB return flag, return the result transaction data through the USB interface module, execute step C109, otherwise, check whether the Bluetooth return flag is set, if yes, reset The bluetooth return flag returns the result transaction data through the bluetooth module, then executes step C110, if the bluetooth return flag is not set, then executes step C110;
步骤C109:检查USB通讯标志是否被置位,如果被置位,则返回步骤C105,否则关闭USB数据接收中断服务,复位USB各标志,返回步骤C105;Step C109: Check whether the USB communication flag is set, if it is set, then return to step C105, otherwise close the USB data receiving interrupt service, reset the USB flags, and return to step C105;
步骤C110:检查蓝牙通讯标志是否被置位,如果被置位,则返回步骤C105,否则关闭蓝牙数据接收中断服务,复位蓝牙各标志,返回步骤C105;Step C110: check whether the bluetooth communication flag is set, if set, then return to step C105, otherwise close the bluetooth data receiving interrupt service, reset the bluetooth flags, and return to step C105;
本实施中,步骤C106中,当检查蓝牙接收标志没有被置位,还包括:In this implementation, in step C106, when checking that the bluetooth receiving flag is not set, it also includes:
检查查询余额标志是否被置位,如果是,则返回步骤C105,否则获取金融卡余额,输出金融卡余额信息,置位查询余额标志,返回步骤C105。Check whether the query balance flag is set, if yes, return to step C105, otherwise obtain the financial card balance, output the financial card balance information, set the query balance flag, and return to step C105.
本实施例中的金融卡可以是金融接触卡、金融非接触卡。The financial card in this embodiment may be a financial contact card or a financial non-contact card.
实施例8Example 8
本实施例8提供了一种支持蓝牙通讯的移动支付终端的工作方法。所述终端执行如下步骤:Embodiment 8 provides a working method of a mobile payment terminal supporting Bluetooth communication. The terminal performs the following steps:
步骤D101:上电初始化,向电源管理模块发送供电控制信号控制电源管理模块上电,复位各标志;Step D101: Power-on initialization, sending a power supply control signal to the power management module to control the power management module to power on, and resetting each flag;
具体地,上电初始化,中央控制模块向电源管理模块发送供电控制信号,电源管理模块接受供电控制信号的控制,为中央控制模块、读卡模块、蓝牙模块、显示模块供电;复位USB各标志,复位蓝牙各标志,复位查询余额标志、定时关机标志等。Specifically, power-on initialization, the central control module sends a power supply control signal to the power management module, and the power management module accepts the control of the power supply control signal to supply power to the central control module, card reader module, Bluetooth module, and display module; resets the USB signs, Reset the Bluetooth logos, reset the balance query logo, timer shutdown logo, etc.
其中,USB各标志包括USB通讯标志、USB枚举标志、USB接收标志、USB返回标志等。Wherein, the USB flags include a USB communication flag, a USB enumeration flag, a USB receiving flag, a USB return flag, and the like.
其中,蓝牙各标志包括蓝牙通讯标志、蓝牙接收标志、蓝牙返回标志等。Wherein, each mark of Bluetooth includes a mark of bluetooth communication, mark of receiving bluetooth, mark of return of bluetooth and so on.
步骤D102:对蓝牙模块上电,配置蓝牙模块;Step D102: power on the bluetooth module, and configure the bluetooth module;
具体地,对蓝牙模块中的蓝牙单元供电,配置蓝牙单元。Specifically, power is supplied to the Bluetooth unit in the Bluetooth module, and the Bluetooth unit is configured.
步骤D103:打开通讯中断服务,开始通讯中断服务定时器;Step D103: Turn on the communication interruption service and start the communication interruption service timer;
具体地,打开USB通讯中断服务,开启USB通讯中断服务定时器;打开蓝牙通讯中断服务,开启蓝牙通讯中断服务定时器;Specifically, open the USB communication interruption service, open the USB communication interruption service timer; open the Bluetooth communication interruption service, and open the Bluetooth communication interruption service timer;
具体地,当USB通讯中断服务定时器达到USB通讯预设值时,USB通讯中断服务被触发,检查USB接口模块的供电电压是否是高电平,如果是高电平,检查USB枚举标志是否被置位,如果USB枚举标志被置位,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,置位USB通讯标志,如果USB枚举标志没有被置位,则进行USB枚举,打开USB数据接收中断服务,等待接收上位机发送的请求交易数据,如果是低电平,则复位USB通讯标志,打开定时关机中断服务,开启关机定时器;当蓝牙通讯中断服务定时器达到蓝牙通讯预设值时,蓝牙通讯中断服务被触发,打开定时关机中断,开启关机定时器,检查蓝牙模块的供电电压是否是低电平,如果是低电平,打开蓝牙数据接收中断服务,等待接收上位机发送的请求交易数据,置位蓝牙通讯标志,如果是高电平,则复位蓝牙通讯标志;Specifically, when the USB communication interrupt service timer reaches the USB communication preset value, the USB communication interrupt service is triggered, and checks whether the power supply voltage of the USB interface module is at a high level, and if it is at a high level, checks whether the USB enumeration flag is is set, if the USB enumeration flag is set, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, set the USB communication flag, if the USB enumeration flag is not set, then perform USB enumeration For example, open the USB data receiving interrupt service, wait to receive the request transaction data sent by the host computer, if it is low, reset the USB communication flag, open the scheduled shutdown interrupt service, and start the shutdown timer; when the Bluetooth communication interrupt service timer reaches When the bluetooth communication preset value is set, the bluetooth communication interrupt service is triggered, turn on the timer shutdown interrupt, turn on the shutdown timer, check whether the power supply voltage of the bluetooth module is low level, if it is low level, turn on the bluetooth data receiving interrupt service, wait Receive the request transaction data sent by the host computer, set the Bluetooth communication flag, if it is high level, reset the Bluetooth communication flag;
其中,USB通讯预设值是可以是10ms,蓝牙通讯预设值可以是10ms。Wherein, the default value of USB communication may be 10ms, and the default value of Bluetooth communication may be 10ms.
其中,USB数据接收中断服务具体包括:当USB接口有数据包传入且数据包的格式符合USB协议的规定时,USB数据接收中断服务被触发,进入USB数据接收中断服务处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位USB接收标志,退出USB数据接收中断服务处理流程,若数据包不完整,则复位USB接收标志,退出USB数据接收中断处理流程。Among them, the USB data receiving interrupt service specifically includes: when the USB interface has a data packet incoming and the format of the data packet conforms to the provisions of the USB protocol, the USB data receiving interrupt service is triggered, enters the USB data receiving interrupt service processing flow, and receives the data packet , if the data packet is complete, the received data packet will be used as the request transaction data sent by the host computer, the USB receiving flag will be set, and the USB data receiving interrupt service process will be exited; if the data packet is incomplete, the USB receiving flag will be reset and the exit USB data receiving interrupt processing flow.
蓝牙数据接收中断服务具体包括:当蓝牙模块有数据包传入且数据包合法,蓝牙数据接收中断服务被触发,进入蓝牙数据接收中断服务处理流程,接收数据包,若数据包完整,则将接收到的数据包作为上位机发送的请求交易数据,置位蓝牙接收标志,退出蓝牙数据接收中断服务处理流程,若数据包不完整,则,复位蓝牙接收标志,退出蓝牙数据接收中断处理流程。The bluetooth data reception interruption service specifically includes: when the bluetooth module has a data packet incoming and the data packet is legal, the bluetooth data reception interruption service is triggered, enters the bluetooth data reception interruption service processing flow, receives the data packet, and if the data packet is complete, it will receive The received data packet is used as the request transaction data sent by the host computer, and the bluetooth receiving flag is set to exit the bluetooth data receiving interrupt service processing flow. If the data packet is incomplete, the bluetooth receiving flag is reset and the bluetooth data receiving interrupt processing flow is exited.
定时关机中断服务具体包括:当关机定时器达到预设开启值时,进入定时提示关机处理流程,具体包括:判断关机计数器是否大于预设关机值,如果是,则将关机计数器设置为初始值,置位定时关机标志,退出定时关机中断服务,否则,退出定时关机中断。The scheduled shutdown interrupt service specifically includes: when the shutdown timer reaches the preset opening value, enter the timing prompt shutdown processing flow, specifically including: judging whether the shutdown counter is greater than the preset shutdown value, if so, setting the shutdown counter to the initial value, Set the timer shutdown flag to exit the timer shutdown interrupt service, otherwise, exit the timer shutdown interrupt.
其中,关机计数器初始值为0,每次自加1。Wherein, the shutdown counter has an initial value of 0 and increments by 1 each time.
优选的,预设开启值为1s,预设关机值为60。Preferably, the preset on value is 1s, and the preset off value is 60.
步骤D104:打开定时读卡中断服务,获取卡标识值;Step D104: Open the scheduled card reading interrupt service to obtain the card identification value;
具体地,当读卡定时器达到读卡预设值时,定时读卡中断服务被触发,进入定时读卡中断处理流程;优选地,读卡预设值为100毫秒;Specifically, when the card reading timer reaches the card reading preset value, the timing card reading interrupt service is triggered and enters the timing card reading interrupt processing flow; preferably, the card reading preset value is 100 milliseconds;
定时读卡中断处理流程具体包括:The timing card reading interrupt processing flow specifically includes:
步骤D1-1:对读卡模块上电;Step D1-1: Power on the card reader module;
本步骤D1-1具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元上电。This step D1-1 specifically includes: powering on the contact card reading unit and the non-contact card reading unit in the card reading module.
步骤D1-2:检测是否有接触卡,若无,将卡标识值设置为第一预设值,执行步骤D1-3,若有,将卡标识值设置为第二预设值,执行步骤D1-4;Step D1-2: Detect whether there is a contact card, if not, set the card identification value to the first preset value, execute step D1-3, if yes, set the card identification value to the second preset value, and execute step D1 -4;
步骤D1-3:开始寻卡,判断预设时间内是否接收到非接触卡的应答,如果接收到,则将卡标识值设置为第三预设值,执行步骤D1-4,否则,执行步骤D1-4;Step D1-3: Start searching for the card, judge whether the response from the contactless card is received within the preset time, if so, set the card identification value to the third preset value, and execute step D1-4, otherwise, execute step D1-4 D1-4;
步骤D1-4:对读卡模块下电,退出定时读卡中断服务;Step D1-4: Power off the card reader module and exit the scheduled card reader interrupt service;
本步骤D1-4具体包括:对读卡模块中的接触卡读卡单元和非接触卡读卡单元下电。This step D1-4 specifically includes: powering off the contact card reading unit and the non-contact card reading unit in the card reading module.
优选的,第一预设值为0,第二预设值为1,第三预设值为2。Preferably, the first preset value is 0, the second preset value is 1, and the third preset value is 2.
步骤D105:检查USB接收标志是否被置位,如果是,则关闭定时关机中断服务,复位定时关机标志,将关机计数器置为初始值,复位USB接收标志、置位USB返回标志,执行步骤D107,否则执行步骤D106;Step D105: Check whether the USB receiving flag is set, if so, turn off the scheduled shutdown interrupt service, reset the timing shutdown flag, set the shutdown counter to the initial value, reset the USB receiving flag, set the USB return flag, and execute step D107, Otherwise execute step D106;
步骤D106:检查蓝牙接收标志是否被置位,如果是,则关闭定时关机中断服务,复位定时关机标志,将关机计数器置为初始值,复位蓝牙接收标志、置位蓝牙返回标志,执行步骤D107,否则,检查定时关机标志是否被置位,如果定时关机被置位,则下电关机,如果定时关机标志没有被置位,则返回步骤D105;Step D106: Check whether the bluetooth receive flag is set, if so, turn off the timer shutdown interrupt service, reset the timer shutdown flag, set the shutdown counter to the initial value, reset the bluetooth receive flag, set the bluetooth return flag, and execute step D107, Otherwise, check whether the timing shutdown flag is set, if the timing shutdown is set, then power off and shut down, if the timing shutdown flag is not set, then return to step D105;
步骤D107:根据卡标识值获取金融卡返回的结果交易数据;Step D107: Obtain the result transaction data returned by the financial card according to the card identification value;
具体包括,步骤D2-1:检查卡标识值是否是第一预设值,如果是,则执行步骤D2-6,否则执行步骤D2-2;Specifically, step D2-1: check whether the card identification value is the first preset value, if yes, execute step D2-6, otherwise execute step D2-2;
本步骤D2-1具体包括:检查卡标识值,如果是第一预设值,则执行步骤D2-6,如果是第二预设值,则执行步骤D2-2,如果是第三预设值,则执行步骤D2-2;This step D2-1 specifically includes: checking the card identification value, if it is the first preset value, then execute step D2-6, if it is the second preset value, then execute step D2-2, if it is the third preset value , then execute step D2-2;
步骤D2-2:将获取到的请求交易数据发送给读卡模块;Step D2-2: Send the obtained requested transaction data to the card reading module;
具体地,将请求交易数据发送给接触卡读卡单元或者非接触卡读卡单元。Specifically, the request transaction data is sent to the contact card reading unit or the non-contact card reading unit.
本步骤具体包括:当卡标识值是第二预设值,则将请求交易数据发送给接触卡读卡单元,当卡标识值是第三预设值,则将请求交易数据发送给非接触卡读卡单元。This step specifically includes: when the card identification value is the second preset value, the request transaction data is sent to the contact card reader unit; when the card identification value is the third preset value, the request transaction data is sent to the contactless card card reader unit.
步骤D2-3:判断预设时间内是否接收到读卡模块返回的应答信息,如果是,则执行步骤D2-4,否则执行步骤D2-5;Step D2-3: Judging whether the response information returned by the card reading module is received within the preset time, if yes, execute step D2-4, otherwise execute step D2-5;
具体地,当将请求交易数据发送给接触卡读卡单元,则判断预设时间内是否接收到接触卡读卡单元返回的应答信息,当将请求交易数据发送给非接触卡读卡单元,则判断预设时间内是否接收到非接触卡读卡单元返回的应答信息。Specifically, when the request transaction data is sent to the contact card reader unit, it is judged whether the response information returned by the contact card reader unit is received within the preset time, and when the request transaction data is sent to the contactless card reader unit, then It is judged whether the response information returned by the non-contact card reading unit is received within the preset time.
优选地,预设时间为100毫秒。Preferably, the preset time is 100 milliseconds.
步骤D2-4:将读卡模块的应答信息作为结果交易数据,执行步骤D108;Step D2-4: take the response information of the card reading module as the result transaction data, and execute step D108;
步骤D2-5:将提示读卡模块超时的信息作为结果交易数据,执行步骤D108;Step D2-5: Use the information indicating that the card reading module has timed out as the result transaction data, and execute step D108;
步骤D2-6:将提示无卡的信息作为返回数据作为结果交易数据,执行步骤D108;Step D2-6: Take the information indicating that there is no card as the returned data as the result transaction data, and execute step D108;
步骤D108:检查USB返回标志是否被置位,如果是,则复位USB返回标志,通过USB接口模块返回结果交易数据,执行步骤D109,否则,检查蓝牙返回标志是否被置位,如果是,则复位蓝牙返回标志,通过蓝牙模块返回结果交易数据,则执行步骤D110,如果蓝牙返回标志没有被置位,则执行步骤D110;Step D108: Check whether the USB return flag is set, if yes, reset the USB return flag, return the result transaction data through the USB interface module, execute step D109, otherwise, check whether the Bluetooth return flag is set, if yes, reset The bluetooth return flag returns the result transaction data through the bluetooth module, then executes step D110, if the bluetooth return flag is not set, then executes step D110;
步骤D109:检查USB通讯标志是否被置位,如果被置位,则返回步骤D105,否则,关闭USB数据接收中断服务,复位USB各标志,返回步骤D105;Step D109: Check whether the USB communication flag is set, if it is set, then return to step D105, otherwise, close the USB data receiving interrupt service, reset the USB flags, and return to step D105;
步骤D110:检查蓝牙通讯标志是否被置位,如果被置位,则返回步骤D105,否则关闭蓝牙数据接收中断服务,复位蓝牙各标志,返回步骤D105;Step D110: check whether the bluetooth communication flag is set, if it is set, then return to step D105, otherwise close the bluetooth data receiving interrupt service, reset the bluetooth flags, and return to step D105;
本实施中,步骤D106中,当检查蓝牙接收标志没有被置位,还可以包括:检查查询余额标志是否被置位,如果是,则返回步骤D105,否则获取金融卡余额,输出金融卡余额信息,置位查询余额标志,返回步骤D105。In this implementation, in step D106, when checking that the bluetooth receiving flag is not set, it may also include: checking whether the query balance flag is set, if yes, then return to step D105, otherwise obtain the financial card balance, and output the financial card balance information , set the query balance flag, and return to step D105.
本实施例中的金融卡可以是金融接触卡、金融非接触卡。The financial card in this embodiment may be a financial contact card or a financial non-contact card.
Claims (23)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410581957.XA CN104346722B (en) | 2014-10-27 | 2014-10-27 | A kind of Mobile payment terminal and its method of work for supporting bluetooth communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410581957.XA CN104346722B (en) | 2014-10-27 | 2014-10-27 | A kind of Mobile payment terminal and its method of work for supporting bluetooth communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104346722A true CN104346722A (en) | 2015-02-11 |
CN104346722B CN104346722B (en) | 2017-10-31 |
Family
ID=52502276
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410581957.XA Active CN104346722B (en) | 2014-10-27 | 2014-10-27 | A kind of Mobile payment terminal and its method of work for supporting bluetooth communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104346722B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105958986A (en) * | 2016-05-30 | 2016-09-21 | 清华大学 | Power source management circuit of double-interface IC card |
CN106301488A (en) * | 2016-09-29 | 2017-01-04 | 飞天诚信科技股份有限公司 | A kind of Bluetooth adapter and method of work thereof |
CN108960816A (en) * | 2018-07-03 | 2018-12-07 | 四川科道芯国智能技术股份有限公司 | Application switching method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2657319Y (en) * | 2003-11-27 | 2004-11-17 | 上海维华信息技术有限公司 | Hand-held mobile communication terminal equipment |
KR20110119964A (en) * | 2010-04-28 | 2011-11-03 | 비씨카드(주) | How to manage payment information and mobile terminal for it |
CN102289257A (en) * | 2011-08-15 | 2011-12-21 | 上海新虹伟信息技术有限公司 | Main board interface circuit of police identity recognizer |
CN103092802A (en) * | 2013-02-07 | 2013-05-08 | 飞天诚信科技股份有限公司 | Method of communication of card reader and upper computer |
-
2014
- 2014-10-27 CN CN201410581957.XA patent/CN104346722B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2657319Y (en) * | 2003-11-27 | 2004-11-17 | 上海维华信息技术有限公司 | Hand-held mobile communication terminal equipment |
KR20110119964A (en) * | 2010-04-28 | 2011-11-03 | 비씨카드(주) | How to manage payment information and mobile terminal for it |
CN102289257A (en) * | 2011-08-15 | 2011-12-21 | 上海新虹伟信息技术有限公司 | Main board interface circuit of police identity recognizer |
CN103092802A (en) * | 2013-02-07 | 2013-05-08 | 飞天诚信科技股份有限公司 | Method of communication of card reader and upper computer |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105958986A (en) * | 2016-05-30 | 2016-09-21 | 清华大学 | Power source management circuit of double-interface IC card |
CN105958986B (en) * | 2016-05-30 | 2019-02-22 | 清华大学 | A power management circuit for dual interface IC card |
CN106301488A (en) * | 2016-09-29 | 2017-01-04 | 飞天诚信科技股份有限公司 | A kind of Bluetooth adapter and method of work thereof |
CN106301488B (en) * | 2016-09-29 | 2018-11-20 | 飞天诚信科技股份有限公司 | A kind of Bluetooth adapter and its working method |
CN108960816A (en) * | 2018-07-03 | 2018-12-07 | 四川科道芯国智能技术股份有限公司 | Application switching method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104346722B (en) | 2017-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9059906B1 (en) | Data communication interface | |
US9501134B2 (en) | Remotely controllable electrical sockets with plugged appliance detection and identification | |
US8138722B2 (en) | Activating an information handling system battery from a ship mode | |
US11463955B2 (en) | Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device | |
US10743258B2 (en) | Method of Bluetooth communication giving consideration to both communication speed and power consumption and a terminal thereof | |
CN110166994B (en) | Data time-sharing transmission interoperability method, system, mobile terminal and storage medium | |
US11349330B2 (en) | Electronic device for charging batteries of a plurality of portions | |
CN106464163B (en) | System for implementing modular mobile electronic devices | |
CN109921481A (en) | To the OTG equipment and method of supplying power to of communication object power supply when USB is communicated | |
CN104283284A (en) | Multifunctional data portable power source and charging method | |
CN104716750A (en) | Low-energy-consumption wireless power supply method and relevant device and system | |
CN108038532B (en) | Intelligent card and control method thereof | |
CN105119339A (en) | Intelligent product-based power supply system and power supply method thereof | |
CN104346722B (en) | A kind of Mobile payment terminal and its method of work for supporting bluetooth communication | |
US11942800B2 (en) | Method for wireless power transfer and electronic device thereof | |
CN207834791U (en) | A kind of Multifunctional data line | |
CN104317761B (en) | Multi-interface mobile security equipment with power management and operation method of multi-interface mobile security equipment | |
JP5254655B2 (en) | Charging device, electronic device, secondary battery pack, secondary battery pack security management system, and secondary battery pack security management method | |
CN102779109A (en) | I/O module with power-uninterruptible USB port | |
CN114037445B (en) | A hardware wallet and processing method thereof | |
EP3629428B1 (en) | Method and apparatus for changing impedance of terminal included in connector | |
US20170061554A1 (en) | Device for powering an electrical appliance | |
JP2011520413A (en) | Charging interruption function for portable devices | |
CN103914120A (en) | Power management method and power management system for external module of hand-held device | |
CN106127281A (en) | A kind of Bluetooth intelligent card and charging method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
OL01 | Intention to license declared | ||
OL01 | Intention to license declared |