CN104346722B - A kind of Mobile payment terminal and its method of work for supporting bluetooth communication - Google Patents

A kind of Mobile payment terminal and its method of work for supporting bluetooth communication Download PDF

Info

Publication number
CN104346722B
CN104346722B CN201410581957.XA CN201410581957A CN104346722B CN 104346722 B CN104346722 B CN 104346722B CN 201410581957 A CN201410581957 A CN 201410581957A CN 104346722 B CN104346722 B CN 104346722B
Authority
CN
China
Prior art keywords
module
usb
bluetooth
mark
card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410581957.XA
Other languages
Chinese (zh)
Other versions
CN104346722A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201410581957.XA priority Critical patent/CN104346722B/en
Publication of CN104346722A publication Critical patent/CN104346722A/en
Application granted granted Critical
Publication of CN104346722B publication Critical patent/CN104346722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/16Payments 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

The present invention relates to a kind of Mobile payment terminal and its method of work for supporting bluetooth communication, the terminal includes:Usb interface module, battery module, power management module, card reading module, central control module, bluetooth module, interactive module.Wherein, usb interface module and bluetooth module are used to receive and dispatch transaction data for central control module;The power management module, for when getting usb bus input electricity, the usb bus input voltage that usb bus is inputted into electricity is converted to terminal works voltage, is that the card reading module, the central control module, the bluetooth module, the interactive module are powered with the terminal works voltage;When getting the battery electric quantity of the battery module, the cell voltage of battery electric quantity is converted into terminal works voltage, it is that the card reading module, the central control module, the bluetooth module, the interactive module are powered with the terminal works voltage, to ensure the Mobile payment terminal normal work.

Description

A kind of Mobile payment terminal and its method of work for supporting bluetooth communication
Technical field
The invention belongs to Mobile payment terminal field, more particularly to a kind of Mobile payment terminal for supporting bluetooth communication and its Method of work.
Background technology
With the development of mobile and Internet technology, and intelligent terminal, it is that consumer and trade company are provided with card to have expedited the emergence of On-line payment and the Mobile payment terminal of miniature several card device acquirer's cases.At present, above-mentioned Mobile payment terminal connection computer or After Intelligent mobile equipment, by reading fiscard relevant information, transaction is initiated, All Activity information is in Mobile payment terminal And handled between background server, transaction is landed not on computer or Intelligent mobile equipment, it is ensured that the peace of payment Quan Xing.But above-mentioned Mobile payment terminal is connected to computer by USB interface mostly at present or Intelligent mobile equipment is led to News, it is impossible to bluetooth communication is supported, thus from the development for largely limiting Mobile payment terminal.
The content of the invention
Instant invention overcomes in the prior art, Mobile payment terminal can not support the technical problem of bluetooth communication, the present invention A kind of Mobile payment terminal and its method of work for supporting bluetooth communication provided, the terminal includes:
Usb interface module, battery module, power management module, card reading module, central control module, bluetooth module, interaction Module;
The usb interface module, is connected with the battery module, the power management module, the central control module, For for the battery module provide usb bus input electricity, provides for the power management module usb bus input electricity, Transaction data is received and dispatched for the central control module;
The battery module, is connected with the usb interface module, the power management module, defeated for receiving usb bus Enter electricity to be charged, provide battery electric quantity for the power management module;
The power management module, and the usb interface module, the battery module, the card reading module, the center Control module, the bluetooth module, the interactive module are connected, for when getting usb bus input electricity, USB is total Line input voltage is converted to terminal works voltage, is the card reading module, the center control mould with the terminal works voltage Block, the bluetooth module, the interactive module are powered;
When getting battery electric quantity, terminal works voltage is converted battery voltage to, is with the terminal works voltage The card reading module, the central control module, the bluetooth module, the interactive module are powered;
The bluetooth module, is connected with the power management module, the central control module, for described when getting It is the central control module transmitting-receiving transaction data during terminal works voltage;
The card reading module, is connected with the power management module, the central control module, for described when getting It is that the central control module reads financial card information during terminal works voltage;
The interactive module, is connected with the power management module, the central control module, for described when getting It is that the central control module obtains user's input information during terminal works voltage;
The central control module, and it is the power management module, the usb interface module, the card reading module, described Bluetooth module, the interactive module are connected, for when getting the terminal works voltage, obtaining transaction data, obtaining gold Melt card information, obtain user's input information.
The method of work of the terminal, including:
Step s1:Power-up initializing, resets each mark, to electric on the bluetooth module, configures the bluetooth module, opens Communicating interrupt is serviced;
When detecting the usb interface module and host computer connection or disconnecting, USB communicating interrupt services are triggered, When whether the supply voltage for detecting the usb interface module is high level, if high level, then open in usb data reception Disconnected service, set USB communication symbols if low level, then reset USB communication symbols;When detect the bluetooth module and When host computer is connected or disconnected, bluetooth communication interrupts service and is triggered, detect the bluetooth module feedback voltage whether be Low level, if low level, then opens Bluetooth data reception and interrupts service, otherwise set bluetooth communication mark, resets bluetooth Communication symbol;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, USB numbers It is triggered according to interruption service is received, when getting requests transaction data, set USB receives mark, when not getting request During transaction data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, blue-teeth data Receive interruption service to be triggered, when getting requests transaction data, set Bluetooth receptions mark is handed over when not getting request During easy data, Bluetooth receptions mark is resetted;
Step s2:Open timing Card Reader and interrupt service, obtain card ident value;
Step s3:Check whether USB communication symbols are set, if USB communication symbols are set, check that USB is received Whether mark is set, if USB receives mark and is set, resets USB and receives mark, set USB Returning marks perform step Rapid s4, if USB receives mark and is not set, return to step s3, if USB communication symbols are not set, is checked Whether bluetooth communication mark is set, if bluetooth communication mark is set, and checks whether Bluetooth receptions mark is set, such as Fruit Bluetooth receptions mark is set, then resets Bluetooth receptions mark, and set bluetooth Returning mark performs step s4, if bluetooth Receive mark not to be set, then return to step s3, if bluetooth communication mark is not set, return to step s3;
Step s4:Result transaction data is obtained according to card ident value;
Step s5:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, pass through the USB Result transaction data is returned to the host computer by interface module, performs step s6, otherwise, check bluetooth Returning mark whether by Set, if it is, resetting bluetooth Returning mark, is returned to result transaction data by the bluetooth module described upper Machine, performs step s7, if bluetooth Returning mark is not set, and performs step s7;
Step s6:Check whether USB communication symbols are set, if it is, return to step s3, otherwise closes usb data The service of interruption is received, USB is resetted and respectively indicates, return to step s3;
Step s7:Check whether bluetooth communication mark is set, if it is, return to step s3, otherwise closes bluetooth number According to the service of interruption is received, reset bluetooth and respectively indicate, return to step s3.
Or the method for work of the terminal, including:
Step y1:Power-up initializing, resets each mark, controls electricity on the bluetooth module, configures the bluetooth module, beat Open communicating interrupt service;
When detecting the usb interface module and host computer connection or disconnecting, USB communicating interrupt services are triggered, When whether the supply voltage for detecting the usb interface module is high level, if high level, then open in usb data reception Disconnected service, set USB communication symbols if low level, then reset USB communication symbols;When detect the bluetooth module and When host computer is connected or disconnected, bluetooth communication interrupts service and is triggered, detect the bluetooth module feedback voltage whether be Low level, if low level, then opens Bluetooth data reception and interrupts service, otherwise set bluetooth communication mark, resets bluetooth Communication symbol;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, USB numbers It is triggered according to interruption service is received, when getting requests transaction data, set USB receives mark, when not getting request During transaction data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, blue-teeth data Receive interruption service to be triggered, when getting requests transaction data, set Bluetooth receptions mark is handed over when not getting request During easy data, Bluetooth receptions mark is resetted;
Step y2:Open timing Card Reader and interrupt service, obtain card ident value;
Step y3:Check that USB receives whether mark is set, if it is, resetting USB receives mark, set USB is returned Mark, performs step y4, otherwise checks whether Bluetooth receptions mark is set, if Bluetooth receptions mark is set, resets Bluetooth receptions mark, set bluetooth Returning mark performs step y4, if Bluetooth receptions mark is not set, and returns to step Rapid y3;
Step y4:Result transaction data is obtained according to card ident value;
Step y5:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, pass through the USB Result transaction data is returned to the host computer by interface module, performs step y6, otherwise, check bluetooth Returning mark whether by Set, if it is, resetting bluetooth Returning mark, is returned to result transaction data by the bluetooth module described upper Machine, performs step y7, if bluetooth Returning mark is not set, and performs step y7;
Step y6:Check whether USB communication symbols are set, if it is, return to step y3, otherwise closes usb data The service of interruption is received, USB is resetted and respectively indicates, return to step y3;
Step y7:Check whether bluetooth communication mark is set, if it is, return to step y3, otherwise closes bluetooth number According to the service of interruption is received, reset bluetooth and respectively indicate, return to step y3.
The beneficial effects of the invention are as follows:The present invention provides a kind of Mobile payment terminal for supporting bluetooth communication and its work side Method.The Mobile payment terminal includes bluetooth module, the Mobile payment terminal can be made to support bluetooth communication, while of the invention Electric power system to the Mobile payment terminal is improved, to ensure the Mobile payment terminal normal work.
Brief description of the drawings
Fig. 1 is a kind of structural representation for Mobile payment terminal for supporting bluetooth communication that the embodiment of the present invention 1 is provided;
Fig. 2 is a kind of concrete structure signal for Mobile payment terminal for supporting bluetooth communication that the embodiment of the present invention 2 is provided Figure;
Fig. 3 is a kind of concrete structure signal for Mobile payment terminal for supporting bluetooth communication that the embodiment of the present invention 3 is provided Figure;
Fig. 4 is a kind of concrete structure signal for Mobile payment terminal for supporting bluetooth communication that the embodiment of the present invention 4 is provided Figure;
Fig. 5 is a kind of stream of the method for work for Mobile payment terminal for supporting bluetooth communication that the embodiment of the present invention 5 is provided Cheng Tu;
Fig. 6 is a kind of stream of the method for work for Mobile payment terminal for supporting bluetooth communication that the embodiment of the present invention 7 is provided Cheng Tu.
Embodiment
Below in conjunction with the accompanying drawing of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, Obviously, described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based in the present invention Embodiment, the every other embodiment that those skilled in the art are obtained under the premise of creative work is not made all belongs to In the scope of protection of the invention.
Embodiment 1
The embodiment of the present invention 1 provides a kind of Mobile payment terminal for supporting bluetooth communication, as shown in figure 1, the terminal Including:Usb interface module 10, battery module 20, power management module 30, card reading module 40, central control module 50, bluetooth mould Block 60, interactive module 70;
Usb interface module 10, is connected with battery module 20, power management module 30, central control module 50, for when and It is that power management module and battery module provide usb bus input electricity when externally fed equipment is connected;
It is that power management module 30 and battery module 20 provide usb bus input electricity, in being when being connected with host computer Entreat the transmitting-receiving transaction data of control module 50.
In this implementation, when usb interface module 10 and externally fed equipment or host computer connection, the USB got is total The usb bus input voltage of line input electricity is 5V, when usb interface module 10 and without and during externally fed equipment or do not have When being connected with host computer, the usb bus got inputs the usb bus input voltage almost 0V of electricity.
Wherein, externally fed equipment can be portable power source, power supply base etc., and host computer can be computer or intelligence Mobile device etc..
Battery module 20, is connected with usb interface module 10, power management module 30, for receiving usb bus input electricity Charged, be that power management module 30 is powered.
In the present embodiment, the cell voltage for the battery electric quantity that battery module 20 is provided can be 4.2V.
Power management module 30, and usb interface module 10, battery module 20, card reading module 40, central control module 50, Bluetooth module 60, interactive module 70 are connected, for the usb bus got to be inputted into electricity or the battery electric quantity got turn Terminal works voltage is changed to, is card reading module 40, central control module 50, bluetooth module 60, interaction mould with terminal works voltage Block 70 provides power supply;
Specifically, when usb interface module 10 and externally fed equipment or host computer are connected, power management module 30 leads to Cross usb interface module 10 and get usb bus input electricity, usb bus input voltage is converted into terminal works voltage, with end End operating voltage is card reading module 40, central control module 50, bluetooth module 60, the offer power supply of interactive module 70, works as USB interface When module 10 and externally fed equipment or host computer are not connected, power management module 30 obtains the electricity that battery module 20 is provided Pond electricity, converts battery voltage to terminal works voltage, is card reading module 40, central control module with terminal works voltage 50th, bluetooth module 60, interactive module 70 provide power supply;
In the present embodiment, terminal works voltage can be 3.3V.
Card reading module 40, is connected with power management module 30, central control module 50, for being read for central control module 50 Take financial card information.
Central control module 50, and usb interface module 10, power management module 30, card reading module 40, bluetooth module 60, Interactive module 70 is connected, for obtaining transaction data, obtaining financial card information, acquisition user's input information;
Specifically, it is described when central control module 50 gets terminal works voltage, by usb interface module 10 or Bluetooth module 60 receives and dispatches transaction data, and financial card information is obtained by card reading module 40, and it is defeated to obtain user by interactive module 70 Enter information;
Bluetooth module 60, is connected with power management module 30, central control module 50, for electric when getting terminal works It is the transmitting-receiving transaction data of central control module 50 during pressure.
Interactive module 70, is connected with power management module 30, central control module 50, for electric when getting terminal works It is that central control module 50 provides user input information during pressure.
Embodiment 2
The embodiment of the present invention 2 provides a kind of Mobile payment terminal for supporting bluetooth communication, and embodiment 2 is embodiment 1 Specific implementation.Wherein, a kind of specific implementation, as shown in Fig. 2 the terminal includes:Usb interface module 10, battery Module 20, power management module 30, card reading module 40, central control module 50, bluetooth module 60, interactive module 70;
Wherein, battery module 20 includes:Charge Management unit 20-1-1, battery unit 20-1-2;
Power management module 30 includes:Power automatic switch unit 30-1-1, voltage conversion unit 30-1-2;
Card reading module 40 includes:Non-contact card power supply unit 40-1-1, non-contact card card reading unit 40-1-2, contact card are supplied Electric unit 40-1-3, contact card card reading unit 40-1-4;
Bluetooth module 60 includes:Bluetooth power supply unit 60-1-1, bluetooth unit 60-1-2;
Interactive module 70 includes:Display unit 70-1-1, input block 70-1-2;
Wherein, Charge Management unit 20-1-1, is connected with usb interface module 10, battery unit 20-1-2, for managing electricity Pool unit 20-1-2 charges;Battery unit 20-1-2, and Charge Management unit 20-1-1, power supply automatic switch unit 30-1-1 phases Even, for providing battery electric quantity to power supply automatic switch unit 30-1-1;
In the present embodiment, battery unit can be battery there is provided the cell voltage of battery electric quantity can be 4.2V.
Power automatic switch unit 30-1-1, and usb interface module 10, battery unit 20-1-2, voltage conversion unit 30- 1-2 is connected, and for comparing usb bus input voltage and cell voltage, when usb bus input voltage is higher than cell voltage, cuts Change usb bus input electricity be voltage conversion unit 30-1-2 power and isolate to battery unit 20-1-2 transmit usb bus Electricity is inputted, when usb bus input voltage is lower than cell voltage, switching battery electric quantity supplies for voltage conversion unit 30-1-2 Electricity, and isolate the battery electric quantity transmitted to usb interface module 10;Voltage conversion unit 30-1-2, and power supply automatic switch unit 30-1-1, non-contact card power supply unit 40-1-1, contact card power supply unit 40-1-3, bluetooth power supply unit 60-1-1, display are single First 70-1-1, input block 70-1-2, central control module 50 are connected, and usb bus input electricity or electricity are got for working as During the electricity of pond, usb bus input voltage or cell voltage are converted into terminal works voltage, connect with terminal works voltage to be non- Touch card power supply unit 40-1-1, it is contact card power supply unit 40-1-3, bluetooth power supply unit 60-1-1, display unit 70-1-1, defeated Enter unit 70-1-2, central control module 50 and power supply is provided;
In the present embodiment, terminal works voltage can be 3.3V.
In the present embodiment 2, the power management module 30 can also be specifically included:Power supply automatic switch unit 30-1-1, Voltage conversion unit 30-1-2, switch element;
Power automatic switch unit 30-1-1, is connected with usb interface module 10, battery unit 20-1-2, switch element, uses In the height for comparing usb bus input voltage and cell voltage, when usb bus input voltage is higher than cell voltage, switch USB Bus input electricity, which is powered to switch element and isolated to the usb bus of battery unit 20-1-2 transmission, inputs electricity, when USB is total When line input voltage is lower than cell voltage, switching battery electric quantity is powered and isolated to switch element to be transmitted to usb interface module 10 Battery electric quantity;
Voltage conversion unit 30-1-2, and switch element, non-contact 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 block 70-1-2, central control module 50 are connected, and use In when getting usb bus input electricity or battery electric quantity by switch element, by usb bus input voltage or battery Voltage conversion is terminal works voltage, is non-contact card power supply unit 40-1-1, contact card power supply unit with terminal works voltage 40-1-3, bluetooth power supply unit 60-1-1, display unit 70-1-1, input block 70-1-2, central control module 50 provide confession Electricity;
Switch element, is connected with power supply automatic switch unit 30-1-1, voltage conversion unit 30-1-2 units, for ought be by To during triggering, switch the off-state of circuit between power supply automatic switch unit 30-1-1 and voltage conversion unit 30-1-2 units And closure state.
For example, when switch element is toggled, by the automatic switch unit 30-1-1 and voltage conversion unit 30-1- that powers Circuit state is switched to closure state by off-state between Unit 2, when next toggled, by automatic switch unit of powering Circuit state is switched to off-state by closure state between 30-1-1 and voltage conversion unit 30-1-2 units.
In the present embodiment 2, the power management module 30 can also be specifically included:Power supply automatic switch unit 30-1-1, Voltage conversion unit 30-1-2, switch element, voltage isolated location;
Wherein, power automatic switch unit 30-1-1, and usb interface module 10, battery unit 20-1-2, voltage conversion list First 30-1-2, switch element are connected, for comparing usb bus input voltage and cell voltage, when usb bus input voltage is than electricity When cell voltage is high, switching usb bus input electricity is that voltage conversion unit 30-1-2 powers and powers and isolate to switch element Electricity is inputted to the battery unit 20-1-2 usb bus transmitted, when usb bus input voltage is lower than cell voltage, switching electricity Pond electricity be voltage conversion unit 30-1-2 power and powered to switch element and isolate to usb interface module 10 transmit battery Electricity;
Voltage conversion unit 30-1-2, and it is power supply automatic switch unit 30-1-1, switch element, voltage isolated location, non- Contact 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 block 70-1-2, central control module 50 are connected, for total when getting USB by the automatic switch unit 30-1-1 that powers When line inputs electricity, usb bus is inputted to electricity as USB powering quantities, isolated when by switch element or by voltage When unit gets usb bus input electricity, usb bus input electricity is enabled into electricity as USB or worked as by power supply certainly When dynamic switch unit 30-1-1 gets battery electric quantity, using battery electric quantity as battery powering quantity, obtained when by switch element When getting battery electric quantity, electricity is enabled using battery electric quantity as battery.When getting USB powering quantities and USB enables electricity Or when getting battery powering quantity and battery enables electricity, usb bus input voltage or cell voltage are converted to Terminal works voltage, is non-contact card power supply unit 40-1-1, contact card power supply unit 40-1-3, bluetooth with terminal works voltage Power supply unit 60-1-1, display unit 70-1-1, input block 70-1-2, central control module 50 provide power supply;
Switch element, and power supply automatic switch unit 30-1-1, voltage conversion unit 30-1-2, voltage isolated location phase Even, for when toggled, electricity between switching power supply automatic switch unit 30-1-1 and voltage conversion unit 30-1-2 units The off-state and closure state on road, when circuit state is closure state, isolate to voltage conversion unit 30-1-2 and voltage Unit transmission usb bus input electricity transmits battery electric quantity to voltage conversion unit 30-1-2 and voltage isolated location.
For example, when switch element is toggled, by the automatic switch unit 30-1-1 and voltage conversion unit 30-1- that powers Circuit state is switched to closure state by off-state between Unit 2, when circuit state is closure state, is voltage conversion list First 30-1-2 and voltage isolated location transmission is from the power supply automatic switch unit 30-1-1 usb bus input electricity transmitted or is The battery electric quantity that voltage conversion unit 30-1-2 and the transmission of voltage isolated location are transmitted from power supply automatic switch unit 30-1-1.When Next time it is toggled when, will power supply automatic switch unit 30-1-1 and voltage conversion unit 30-1-2 units between circuit state by Closure state is switched to off-state.
Voltage isolated location is connected with usb interface module 10, voltage conversion unit 30-1-2, switch element, for when logical When crossing switch element and obtaining battery electric quantity, isolation is by the way that switch element is to the battery electric quantity in the direction of usb interface module 10 or works as When obtaining usb bus input electricity by switch element, isolation is total by USB of the switch element to the direction of usb interface module 10 Line inputs electricity, when receiving usb bus input electricity by usb interface module 10, is passed to voltage conversion unit 30-1-2 Pass usb bus input electricity.
Non-contact card power supply unit 40-1-1, and voltage conversion unit 30-1-2, non-contact card card reading unit 40-1-2, in Control module 50 is entreated to be connected, for when getting the terminal works voltage of voltage conversion unit 30-1-2 offers, receiving center The control for the non-contact control signal that control module 50 is sent provides power supply to non-contact card card reading unit 40-1-2.Non-contact card Card reading unit 40-1-2, is connected with non-contact card power supply unit 40-1-1, central control module 50, is supplied for receiving non-contact card The power supply that electric unit 40-1-1 is provided, is that the reading of central control module 50 connects financial non-contact card information.Contact card power supply unit 40-1-3, is connected with voltage conversion unit 30-1-2, contact card card reading unit 40-1-4, central control module 50, is obtained for working as When the terminal works voltage of voltage conversion unit 30-1-2 offers is provided, receive the contact control letter of the transmission of central control module 50 Number control to contact card card reading unit 40-1-4 provide power supply.Contact card card reading unit 40-1-4, and contact card power supply unit 40-1-3, central control module 50 are connected, and the power supply for receiving contact card power supply unit 40-1-3, is central control module 50 Reading connects finance contact card information.
Bluetooth power supply unit 60-1-1, and voltage conversion unit 30-1-2, bluetooth unit 60-1-2, central control module 50 It is connected, for when getting the terminal works voltage of voltage conversion unit 30-1-2 offers, receiving central control module 50 and sending out The Bluetooth control signal sent provides power supply to bluetooth unit 60-1-2.Bluetooth unit 60-1-2, and bluetooth power supply unit 60-1-1, Central control module 50 is connected, and the power supply for receiving bluetooth power supply unit 60-1-1 offers, is that central control module 50 is received and dispatched Transaction data.
Display unit 70-1-1, is connected with voltage conversion unit 30-1-2, central control module 50, and electricity is got for working as During the terminal works voltage for pressing converting unit 30-1-2 to provide, receive the display control signal of the transmission of central control module 50 Control output information.Input block 70-1-2, is connected with voltage conversion unit 30-1-2, central control module 50, is obtained for working as When the terminal works voltage of voltage conversion unit 30-1-2 offers is provided, user's input information is sent to central control module 50.
It should be noted that terminal can also be specifically included described in this implementation 2:Usb interface module, battery module, electricity Source control module, card reading module, central control module, bluetooth module, interactive module;
Wherein, battery module includes:Charge Management unit, battery unit;
Wherein, power management module includes:Power supply automatic switch unit, voltage conversion unit;
Card reading module includes:Non-contact card card reading unit, contact card card reading unit;
Interactive module includes:Display unit, input block;
Wherein, Charge Management unit, is connected with usb interface module, battery unit, for managing battery unit charging;Electricity Pool unit, is connected with Charge Management unit, power supply automatic switch unit, for providing battery electricity to power supply automatic switch unit Amount;
Power supply automatic switch unit, is connected with usb interface module, battery unit, voltage conversion unit, for comparing USB Bus input voltage and cell voltage, when usb bus input voltage is higher than cell voltage, switching usb bus input electricity is The voltage conversion unit usb bus transmitted to battery unit of powering and isolate inputs electricity, when usb bus input voltage compares battery When voltage is low, switching battery electric quantity is that voltage conversion unit is powered and isolated the battery electric quantity transmitted to usb interface module;
Voltage conversion unit, and power supply automatic switch unit, non-contact card card reading unit, contact card card reading unit, bluetooth Module, display unit, input block, central control module are connected, for usb bus input voltage or cell voltage to be changed It is non-contact card card reading unit, contact card card reading unit, bluetooth module, display with terminal works voltage for terminal works voltage Unit, input block, central control module provide power supply;
Non-contact card card reading unit, is connected with voltage conversion unit, central control module, for being read for central control module Take and connect financial non-contact card information;Card card reading unit is contacted, is connected with voltage conversion unit, central control module, for in Centre control module, which is read, connects finance contact card information.
Bluetooth module, is connected with voltage conversion unit, central control module, and voltage conversion unit offer is got for working as Terminal works voltage when, be central control module transmitting-receiving transaction data.
Display unit, is connected with voltage conversion unit, central control module, the end provided for receiving voltage converting unit When holding operating voltage, receive the control output information of the display control signal of the transmission of central control module.Input block, and electricity Press converting unit, central control module be connected, for when get voltage conversion unit offer terminal works voltage when, Xiang Zhong Control module is entreated to send user's input information.
Embodiment 3
The embodiment of the present invention 3 provides a kind of Mobile payment terminal for supporting bluetooth communication, as shown in figure 3, the terminal Specifically include:Usb interface module 10, battery module 20, power management module 30, card reading module 40, central control module 50, indigo plant Tooth module 60, interactive module 70;
Wherein, battery module 20 includes:Charge Management unit 20-2-1, battery unit 20-2-2;
Power management module 30 includes:Power supply automatic switch unit 30-2-1, voltage conversion unit 30-2-2, start-up unit 30-2-3, voltage isolated location 30-2-4;
Card reading module 40 includes:Non-contact card power supply unit 40-2-1, non-contact card card reading unit 40-2-2, contact card are supplied Electric unit 40-2-3, contact card card reading unit 40-2-4;
Bluetooth module 60 includes:Bluetooth power supply unit 60-2-1, bluetooth unit 60-2-2;
Interactive module 70 includes:Display unit 70-2-1, input block 70-2-2;
Wherein, Charge Management unit 20-2-1, is connected with usb interface module 10, battery unit 20-2-2, for managing electricity Pool unit 20-2-2 charges;Battery unit 20-2-2, and Charge Management unit 20-2-1, power supply automatic switch unit 30-2-1 phases Even, for providing battery electric quantity to power supply automatic switch unit 30-2-1;
In the present embodiment, battery unit 20-2-2 can be battery there is provided the cell voltage of battery electric quantity can be 4.2V。
Power automatic switch unit 30-2-1, and usb interface module 10, battery unit 20-2-2, voltage conversion unit 30- 2-2, start-up unit 30-2-3 are connected, for comparing usb bus input voltage and cell voltage, when usb bus input voltage ratio When cell voltage is high, switching usb bus input electricity is that voltage conversion unit 30-2-2 powers and supplied to switch element 30-2-3 Electricity simultaneously isolates the usb bus input electricity transmitted to battery unit 20-2-2, when usb bus input voltage is lower than cell voltage When, switching battery electric quantity is that voltage conversion unit 30-2-2 powers and powers and isolate to USB interface to switch element 30-2-3 The battery electric quantity of 10 modules transmission;
Voltage conversion unit 30-2-2, and power supply automatic switch unit 30-2-1, start-up unit 30-2-3, voltage isolation list First 30-2-4, non-contact 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 block 70-2-2, central control module 50 are connected, and the automatic switch unit 30-2-1 that powers is passed through for working as When getting usb bus input electricity, usb bus is inputted to electricity as USB powering quantities, when passing through start-up unit 30-2-3 Or voltage isolated location 30-2-4 get usb bus input electricity when, using usb bus input electricity be used as USB enable electricity Amount or when getting battery electric quantity by the automatic switch unit 30-2-1 that powers, powers battery electric quantity as battery electricity Amount, when getting battery electric quantity by start-up unit 30-2-3, enables electricity, when passing through voltage using battery electric quantity as battery When isolated location 30-2-4 gets power supplying control signal, control power supply signal is regard as enable signal.Powered when getting USB Electricity and USB are when enabling electricity either when getting battery powering quantity or battery enables electricity or when getting electricity When pond powering quantity and enable signal, usb bus input voltage or cell voltage are converted into terminal works voltage, terminal is used Operating voltage is non-contact 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 block 70-2-2, central control module 50 provide power supply;
In the present embodiment, terminal works voltage can be 3.3V.
Start-up unit 30-2-3, and power supply automatic switch unit 30-2-1, voltage conversion unit 30-2-2, voltage isolation list First 30-2-4 is connected, for when toggled, power supply automatic switch unit 30-2-1 and voltage conversion unit 30-2-2 is mono- Circuit state is switched to closure state by off-state momentary recovery is to off-state again between member, when circuit state is closed form During state, transmitted to voltage conversion unit 30-2-2 and voltage isolated location 30-2-4 transmission from power supply automatic switch unit 30-2-1 Usb bus input electricity or to voltage conversion unit 30-2-2 and voltage isolated location 30-2-4 transmission from power supply cut automatically Change the battery electric quantity that unit 30-2-1 is transmitted.
For example, when switch element 30-2-3 receives triggering, by power supply automatic switch unit 30-2-1 and voltage conversion Circuit state is switched to closure state by off-state momentary recovery, to off-state, works as circuit again between unit 30-2-2 units When state is closure state, automatically switch to voltage conversion unit 30-2-2 and voltage isolated location 30-2-4 transmission from power supply single Usb bus input electricity or transmitted to voltage conversion unit 30-2-2 and voltage isolated location 30-2-4 that first 30-2-1 is transmitted The battery electric quantity transmitted from power supply automatic switch unit 30-2-1.When next toggled, by the automatic switch unit 30- that powers Between 2-1 and voltage conversion unit 30-2-2 units circuit state by off-state be switched to closure state again momentary recovery to disconnected Open state.
Voltage isolated location 30-2-4 and usb interface module 10, voltage conversion unit 30-2-2, switch element 30-2-3, Central control module 50 is connected, for when getting battery electric quantity by switch element 30-2-3, isolation to pass through switch element 30-2-3 is to the battery electric quantity in the direction of usb interface module 10 and the direction of central control module 50 or when passing through switch element 30- When 2-3 gets usb bus input electricity, isolation is controlled by switch element 30-2-3 to the direction of usb interface module 10 and center The usb bus input electricity in the direction of molding block 50, when receiving usb bus input electricity by usb interface module 10, to voltage Converting unit 30-2-2 transmission usb bus input electricity, sends when receiving central control module 50 by central control module 50 Power supplying control signal when, to voltage conversion unit 30-2-2 transmit power supplying control signal.
Non-contact card power supply unit 40-2-1, and voltage conversion unit 30-2-2, non-contact card card reading unit 40-2-2, in Control module 50 is entreated to be connected, for when getting the terminal works voltage of voltage conversion unit 30-2-2 offers, receiving center The control for the non-contact control signal that control module 50 is sent provides power supply to non-contact card card reading unit 40-2-2.Non-contact card Card reading unit 40-2-2, is connected with non-contact card power supply unit 40-2-1, central control module 50, is supplied for receiving non-contact card The power supply that electric unit 40-2-1 is provided, is that the reading of central control module 50 connects financial non-contact card information.Contact card power supply unit 40-2-3, is connected with voltage conversion unit 30-2-2, contact card card reading unit 40-2-4, central control module 50, is obtained for working as When the terminal works voltage of voltage conversion unit 30-2-2 offers is provided, receive the contact control letter of the transmission of central control module 50 Number control to contact card card reading unit 40-2-4 provide power supply.Contact card card reading unit 40-2-4, and contact card power supply unit 40-2-3, central control module 50 are connected, and the power supply for receiving contact card power supply unit 40-2-3, is central control module 50 Reading connects finance contact card information.
Bluetooth power supply unit 60-2-1, and voltage conversion unit 30-2-2, bluetooth unit 60-2-2, central control module 50 It is connected, for when getting the terminal works voltage of voltage conversion unit 30-2-2 offers, receiving central control module 50 and sending out The Bluetooth control signal sent provides power supply to bluetooth unit 60-2-2.Bluetooth unit 60-2-2, and bluetooth power supply unit 60-2-1, Central control module 50 is connected, and the power supply for receiving bluetooth power supply unit 60-2-1 offers, is that central control module 50 is received and dispatched Transaction data.
Display unit 70-2-1, is connected with voltage conversion unit 30-2-2, central control module 50, and electricity is got for working as During the terminal works voltage for pressing converting unit 30-2-2 to provide, the display control letter of the transmission for receiving central control module 50 Number control output information.Input block 70-2-2, is connected with voltage conversion unit 30-2-2, central control module 50, is used for It is defeated for sending user to central control module 50 when getting the terminal works voltage of voltage conversion unit 30-2-2 offers Enter information.
In this implementation 3, usb interface module 10, and battery module 20, power management module 30, the phase of central control module 50 Even, for when being connected with externally fed equipment, being that power management module and battery module provide usb bus input electricity;
When being connected with host computer, it is that power management module and battery module provide usb bus input electricity, is central control Molding block 50 receives and dispatches transaction data.
In this implementation, when usb interface module 10 and externally fed equipment or host computer connection, the USB got is total The usb bus input voltage of line input electricity is 5V, when usb interface module 10 and without and during externally fed equipment or do not have When being connected with host computer, the usb bus got inputs the usb bus input voltage almost 0V of electricity.
Wherein, externally fed equipment can be portable power source, power supply base etc., and host computer can be computer or intelligence Mobile device etc..
The receiving terminal operating voltage of central control module 50 is powered, specifically for for being obtained by usb interface module 10 Transaction data, the financial card information such as finance contact card information and financial non-contact card information obtained by card reading module, passes through and hands over Mutual module 70 obtains user's input information, and power supplying control signal, control fulgurite management module 30 are sent to power management module 30 Usb bus input voltage or cell voltage are converted into terminal works voltage, with terminal works voltage be card reading module 40, in Control module 50, bluetooth module 60, interactive module 70 is entreated to provide power supply;
Power management module 30 is specifically for when power management module 30 by usb interface module 10 gets usb bus Input electricity when, usb bus input voltage is converted into terminal works voltage, with terminal works voltage be card reading module 40, in Entreat control module 50, bluetooth module 60, interactive module 70 provide power supply, when usb interface module 10 and with externally fed equipment or When person's host computer is not connected, when power management module 30 gets the battery electric quantity of the offer of battery module 20, first by electricity Cell voltage is converted to terminal works voltage, is card reading module 40, central control module 50, bluetooth module with terminal works voltage 60th, interactive module 70 provides power supply, when power management module 30 also receives the power supply control letter of the transmission of central control module 50 Number when, the control for receiving central module 50 converts battery voltage to terminal works voltage, is Card Reader mould with terminal works voltage Block 40, central control module 50, bluetooth module 60, interactive module 70 provide power supply.
Embodiment 4
The embodiment of the present invention 4 provides a kind of Mobile payment terminal for supporting bluetooth communication, as shown in figure 4, the terminal Specifically include:Usb interface module 10, battery module 20, power management module 30, card reading module 40, central control module 50, indigo plant Tooth module 60, interactive module 70;
Wherein, battery module 20 includes:Charge Management unit 20-3-1, battery unit 20-3-2;
Power management module 30 includes:Power supply automatic switch unit 30-3-1, voltage conversion unit 30-3-2, start-up unit 30-3-3, voltage isolated location 30-3-4;
Card reading module 40 includes:Non-contact card power supply unit 40-3-1, non-contact card card reading unit 40-3-2, contact card are supplied Electric unit 40-3-3, contact card card reading unit 40-3-4;
Bluetooth module 60 includes:Bluetooth power supply unit 60-3-1, bluetooth unit 60-3-2;
Interactive module 70 includes:Display unit 70-3-1, input block 70-3-2;
Wherein, Charge Management unit 20-3-1, is connected with usb interface module 10, battery unit 20-3-2, for managing electricity Pool unit 20-3-2 charges;Battery unit 20-3-2, and Charge Management unit 20-3-1, power supply automatic switch unit 30-3-1 phases Even, for providing battery electric quantity to power supply automatic switch unit 30-3-1;
In the present embodiment, battery unit 20-3-2 can be battery there is provided the cell voltage of battery electric quantity can be 4.2V。
Power automatic switch unit 30-3-1, and usb interface module 10, battery unit 20-3-2, voltage conversion unit 30- 3-2, start-up unit 30-3-3 are connected, for comparing usb bus input voltage and cell voltage, when usb bus input voltage ratio When cell voltage is high, switching usb bus input electricity is that voltage conversion unit 30-3-2 powers and supplied to start-up unit 30-3-3 Electricity simultaneously isolates the usb bus input electricity transmitted to battery unit 20-3-2, when usb bus input voltage is lower than cell voltage When, switching battery electric quantity is that voltage conversion unit 30-3-2 powers and powers and isolate to USB interface to start-up unit 30-3-3 The battery electric quantity that module 10 is transmitted;
Voltage conversion unit 30-3-2, and power supply automatic switch unit 30-3-1, start-up unit 30-3-3, voltage isolation list First 30-3-4, non-contact card power supply unit 40-3-1, contact card power supply unit 40-3-3, bluetooth power supply unit 60-3-1, display Unit 70-3-1, input block 70-3-2, central control module 50 are connected, and the automatic switch unit 30-3-1 that powers is passed through for working as When getting usb bus input electricity, usb bus is inputted to electricity as USB powering quantities, when passing through start-up unit 30-3-3 When getting usb bus input electricity, usb bus is inputted into electricity as USB and enables electricity, when passing through voltage isolated location When 30-3-4 gets power supplying control signal, using power supplying control signal as enable signal, or work as by automatic switchover of powering When unit 30-3-1 gets battery electric quantity, using battery electric quantity as battery powering quantity, obtained when by start-up unit 30-3-3 When getting battery electric quantity, electricity is enabled using battery electric quantity as battery, when getting power supply by voltage isolated location 30-3-4 During control signal, power supplying control signal is regard as enable signal.When getting USB powering quantities and USB enables electricity, or When getting USB powering quantities and enabling signal, or when getting battery powering quantity or battery enables electricity, or Usb bus input voltage or cell voltage are converted to terminal work by person when getting battery powering quantity and enabling signal Make voltage, be that non-contact card power supply unit 40-3-1, contact card power supply unit 40-3-3, bluetooth are powered list with terminal works voltage First 60-3-1, display unit 70-3-1, input block 70-3-2, central control module 50 provide power supply;
In the present embodiment, terminal works voltage can be 3.3V.
Start-up unit 30-3-3, and power supply automatic switch unit 30-3-1, voltage conversion unit 30-3-2, voltage isolation list First 30-3-4 is connected, for when toggled, power supply automatic switch unit 30-3-1 and voltage conversion unit 30-3-2 is mono- Circuit state is switched to closure state by off-state momentary recovery is to off-state again between member, when circuit state is closed form During state, provide and transmitted from power supply automatic switch unit 30-3-1 for voltage conversion unit 30-3-2 and voltage isolated location 30-3-4 Usb bus input electricity or for voltage conversion unit 30-3-2 and voltage isolated location 30-3-4 provide from power cut automatically Change the battery electric quantity that unit 30-3-1 is transmitted.
For example, when start-up unit 30-3-3 receives triggering, by power supply automatic switch unit 30-3-1 and voltage conversion Circuit state is switched to closure state by off-state momentary recovery, to off-state, works as circuit again between unit 30-3-2 units When state is closure state, provide single from power supply automatic switchover for voltage conversion unit 30-3-2 and voltage isolated location 30-3-4 Usb bus input electricity or be that voltage conversion unit 30-3-2 and voltage isolated location 30-3-4 are provided that first 30-3-1 is transmitted The battery electric quantity transmitted from power supply automatic switch unit 30-3-1.When next toggled, by the automatic switch unit 30- that powers Between 3-1 and voltage conversion unit 30-3-2 units circuit state by off-state be switched to closure state again momentary recovery to disconnected Open state.
Voltage isolated location 30-3-4 and start-up unit 30-3-3, voltage conversion unit 30-3-2, central control module 50 It is connected, for when obtaining battery electric quantity by start-up unit 30-3-3, isolation to pass through start-up unit 30-3-3 to central control The battery electric quantity in the direction of module 50 or when obtaining usb bus by start-up unit 30-3-3 and inputting electricity, isolation is by opening Machine unit 30-3-3 inputs electricity to the usb bus in the direction of central control module 50, in being received by central control module 50 During the power supplying control signal for entreating control module 50 to send, power supplying control signal is transmitted to voltage conversion unit 30-3-2.
Non-contact card power supply unit 40-3-1, and voltage conversion unit 30-3-2, non-contact card card reading unit 40-3-2, in Control module 50 is entreated to be connected, for when getting the terminal works voltage of voltage conversion unit 30-3-2 offers, receiving center The control for the non-contact control signal that control module 50 is sent provides power supply to non-contact card card reading unit 40-3-2.Non-contact card Card reading unit 40-3-2, is connected with non-contact card power supply unit 40-3-1, central control module 50, is supplied for receiving non-contact card The power supply that electric unit 40-3-1 is provided, is that the reading of central control module 50 connects financial non-contact card information.Contact card power supply unit 40-3-3, is connected with voltage conversion unit 30-3-2, contact card card reading unit 40-3-4, central control module 50, is obtained for working as When the terminal works voltage of voltage conversion unit 30-3-2 offers is provided, receive the contact control letter of the transmission of central control module 50 Number control to contact card card reading unit 40-3-4 provide power supply.Contact card card reading unit 40-3-4, and contact card power supply unit 40-3-3, central control module 50 are connected, and the power supply for receiving contact card power supply unit 40-3-3, is central control module 50 Reading connects finance contact card information.
Bluetooth power supply unit 60-3-1, and voltage conversion unit 30-3-2, bluetooth unit 60-3-2, central control module 50 It is connected, for when getting the terminal works voltage of voltage conversion unit 30-3-2 offers, receiving central control module 50 and sending out The Bluetooth control signal sent provides power supply to bluetooth unit 60-3-2.Bluetooth unit 60-3-2, and bluetooth power supply unit 60-3-1, Central control module 50 is connected, and the power supply for receiving bluetooth power supply unit 60-3-1 offers, is that central control module 50 is received and dispatched Transaction data.
Display unit 70-3-1, is connected with voltage conversion unit 30-3-2, central control module 50, and electricity is got for working as During the terminal works voltage for pressing converting unit 30-3-2 to provide, receive the display control signal of the transmission of central control module 50 Control output information.Input block 70-3-2, is connected with voltage conversion unit 30-3-2, central control module 50, is obtained for working as When the terminal works voltage of voltage conversion unit 30-3-2 offers is provided, user's input information is sent to central control module 50.
In this implementation 4, usb interface module 10, and battery module 20, power management module 30, the phase of central control module 50 Even, for when being connected with externally fed equipment, being that power management module and battery module provide usb bus input electricity;
When being connected with host computer, it is that power management module and battery module provide usb bus input electricity, is central control Molding block 50 receives and dispatches transaction data.
In this implementation, when usb interface module 10 and externally fed equipment or host computer connection, the USB got is total The usb bus input voltage of line input electricity is 5V, when usb interface module 10 and without and during externally fed equipment or do not have When being connected with host computer, the usb bus got inputs the usb bus input voltage almost 0V of electricity.
Wherein, externally fed equipment can be portable power source, power supply base etc., and host computer can be computer or intelligence Mobile device etc..
The receiving terminal operating voltage of central control module 50 is powered, specifically for for being obtained by usb interface module 10 Transaction data, the financial card information such as finance contact card information and financial non-contact card information obtained by card reading module, passes through and hands over Mutual module 70 obtains user's input information, sends power supplying control signal to power management module 30, controls power management module 30 Usb bus input voltage or cell voltage are converted into terminal works voltage, with terminal works voltage be card reading module 40, in Control module 50, bluetooth module 60, interactive module 70 is entreated to provide power supply;
Power management module 30 is specifically for when power management module 30 by usb interface module 10 gets usb bus When inputting electricity, usb bus input voltage is converted into terminal works voltage first, is card reading module with terminal works voltage 40th, central control module 50, bluetooth module 60, interactive module 70 provide power supply, when power management module 30 also receives center During the power supplying control signal that control module 50 is sent, usb bus input voltage is changed in the control for receiving central control module 50 It is card reading module 40, central control module 50, bluetooth module 60, interactive module with terminal works voltage for terminal works voltage 70 provide power supplies, when usb interface module 10 and externally fed equipment or host computer are not connected, when power management module 30 When obtaining the battery electric quantity that battery module 20 is provided, power management module 30 converts battery voltage to terminal works electricity first Pressure, with terminal works voltage be card reading module 40, central control module 50, bluetooth module 60, interactive module 70 provide power supply, when When power management module 30 also receives the power supplying control signal of the transmission of central control module 50, also receive central control module 50 Control convert battery voltage to terminal works voltage, with terminal works voltage be card reading module 40, central control module 50, Bluetooth module 60, interactive module 70 provide power supply.
Embodiment 5
The embodiment of the present invention 5 provides a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, such as Fig. 5 institutes Show, the terminal performs following steps:
Step A101:Power-up initializing, resets each mark;
Specifically, power-up initializing, resets USB and respectively indicates, resets bluetooth and respectively indicates, resets the mark etc. that queries the balance.
Wherein, respectively mark includes USB communication symbols, USB enumeration mark, USB receptions mark, USB Returning marks etc. to USB.
Wherein, respectively mark includes bluetooth communication mark, Bluetooth receptions mark, bluetooth Returning mark etc. to bluetooth.
Step A102:To electric on bluetooth module, bluetooth module is configured;
Specifically, the bluetooth unit in bluetooth module is powered, configures bluetooth unit.
Step A103:Open communicating interrupt service;
Specifically, open the service of USB communicating interrupts, open bluetooth communication interruption service;
Specifically, when detecting usb interface module and host computer connection or disconnecting, the service of USB communicating interrupts is touched Hair, whether the supply voltage for checking usb interface module is high level, if high level, checks whether USB enumeration mark is set to Position, if USB enumeration mark is set, opens usb data and receives the service of interruption, the requests transaction for waiting host computer to be received to send Data, set USB communication symbols, if USB enumeration mark is not set, carry out USB enumeration, open usb data and receive Service is interrupted, the requests transaction data for waiting host computer to be received to send if low level, then reset USB communication symbols;Work as inspection When measuring bluetooth module and host computer connection or disconnecting, bluetooth communication interrupts service and is triggered, and checks the power supply of bluetooth module Whether voltage is low level, if low level, opens Bluetooth data reception and interrupts service, waits asking for host computer transmission to be received Transaction data is sought, set bluetooth communication mark if high level, then resets bluetooth communication mark;
Wherein, usb data receives interruption service and specifically included:When USB interface has packet incoming and packet form When meeting the regulation of usb protocol, usb data receives interruption service and is triggered, and receives interrupt processing flow into usb data, connects Packet is received, if packet is complete, the requests transaction data that the packet received is sent as host computer, set USB Mark is received, usb data is exited and receives interruption service processing flow, if packet is imperfect, USB is resetted and receives mark, move back Go out usb data and receive interruption service processing flow.
Bluetooth data reception interrupts service and specifically included:When bluetooth module has packet incoming and packet is legal, bluetooth Data receiver interrupts service and is triggered, and service processing flow, received data packet, if packet is complete are interrupted into Bluetooth data reception Requests transaction data that are whole, then sending the packet received as host computer, set Bluetooth receptions mark, exit bluetooth number Service processing flow is interrupted according to receiving, if packet is imperfect, Bluetooth receptions mark is resetted, Bluetooth data reception interruption is exited Handling process.
In this step, communicating interrupt service can also use timers trigger method, for example, it is fixed to open communicating interrupt service When device, when communicating interrupt service timer reaches 10ms, communicating interrupt service is triggered, perform corresponding operating.
Specifically, open the service of USB communicating interrupts, open USB communicating interrupt service timers;Bluetooth communication is opened to interrupt Service, unlatching bluetooth communication interrupt service timer.
Step A104:Open timing Card Reader and interrupt service, obtain card ident value;
Specifically, when Card Reader timer reaches Card Reader preset value, timing Card Reader is interrupted and is triggered, into timing Card Reader Disconnected service processing flow;Preferably, Card Reader preset value is 100 milliseconds;
Timing Card Reader interrupt processing service procedure is specifically included:
Step A1-1:To electric in card reading module;
This step A1-1 is specifically included:To in the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
Step A1-2:Contact card has been detected whether, if nothing, card ident value is set to the first preset value, step A1- is performed 3, if so, card ident value is set into the second preset value, perform step A1-4;
Step A1-3:Start card seeking, judge the response of non-contact card whether is received in preset time, if received, Card ident value is then set to the 3rd preset value, step A1-4 is performed, otherwise, step A1-4 is performed;
Step A1-4:To electric under card reading module, exit timing Card Reader and interrupt service;
This step A1-4 is specifically included:To under the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
It is preferred that, the first preset value is 0, and the second preset value is 1, and the 3rd preset value is 2.
Step A105:Check whether USB communication symbols are set, if USB communication symbols are set, perform step A106, otherwise, checks whether bluetooth communication mark is set, if bluetooth communication mark is set, performs step A107, such as Fruit bluetooth communication mark is not set, then return to step A105;
Step A106:Check that USB receives whether mark is set, returned if it is, resetting USB and receiving mark, set USB Mark is returned, step A108 is performed, otherwise return to step A105;
Step A107:Check whether Bluetooth receptions mark is set, if it is, resetting Bluetooth receptions mark, set indigo plant Tooth Returning mark, performs step A108, otherwise return to step A105;
Step A108:The result transaction data that fiscard is returned is obtained according to card ident value;
Specifically include, step A2-1:Check whether card ident value is the first preset value, if it is, step A2-6 is performed, Otherwise step A2-2 is performed;
This step A2-1 is specifically included:Card ident value is checked, if the first preset value, then step A2-6 is performed, if It is the second preset value, then performs step A2-2, if the 3rd preset value, then performs step A2-2;
Step A2-2:The requests transaction data got are sent to card reading module;
Specifically, requests transaction data are sent to contact card card reading unit or non-contact card card reading unit.
This step is specifically included:When card ident value is the second preset value, then requests transaction data are sent into contact card reads Requests transaction data when card ident value is the 3rd preset value, are then sent to non-contact card card reading unit by card unit.
Step A2-3:Judge the response message that card reading module is returned whether is received in preset time, if it is, performing Step A2-4, otherwise performs step A2-5;
Specifically, when requests transaction data are sent into contact card card reading unit, then judge whether received in preset time The response message returned to contact card card reading unit, when requests transaction data are sent into non-contact card card reading unit, then judges Whether the response message of non-contact card card reading unit return is received in preset time.
Preferably, preset time is 100 milliseconds.
Step A2-4:By the response message of card reading module transaction data as a result, step A109 is performed;
Step A2-5:The overtime information of card reading module transaction data as a result is will be prompted to, step A109 is performed;
Step A2-6:The information of no card be will be prompted to as returned data transaction data as a result, step A109 is performed;
Step A109:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, connect by USB Mouth mold block returning result transaction data, performs step A110, otherwise, checks whether bluetooth Returning mark is set, if it is, Bluetooth Returning mark is resetted, by bluetooth module returning result transaction data, step A111 is performed, if bluetooth Returning mark does not have It is set, then performs step A111;
Step A110:Check whether USB communication symbols are set, if be set, otherwise return to step A105 closes Usb data receives the service of interruption, resets USB and respectively indicates, return to step A105;
Step A111:Check whether bluetooth communication mark is set, if be set, otherwise return to step A105 closes Close Bluetooth data reception and interrupt service, reset bluetooth and respectively indicate, return to step A105.
In the present embodiment, in step A106, it is not set when inspection USB receives mark, in addition to:
Whether the inspection mark that queries the balance is set, if it is, return to step A105, otherwise obtains fiscard remaining sum, Fiscard balance amount information is exported, set queries the balance mark, return to step A105;
In step A107, when check Bluetooth receptions mark be not set, in addition to:
Whether the inspection mark that queries the balance is set, if it is, return to step A105, otherwise obtains fiscard remaining sum, Fiscard balance amount information is exported, set queries the balance mark, return to step A105.
Fiscard in the present embodiment can be finance contact card, financial non-contact card.
Embodiment 6
The embodiment of the present invention 6 provides a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, the terminal Perform following steps:
Step B101:Power-up initializing, sends on power supplying control signal, control power management module to power management module Electricity, resets each mark;
Specifically, power-up initializing, power supplying control signal is sent to power management module, and power management module receives power supply The control of control signal, is that central control module, card reading module, bluetooth module, display module are powered, resets USB and respectively indicate;It is multiple Position bluetooth respectively indicates, resets query the balance mark, timing shutdown mark etc..
Wherein, respectively mark includes USB communication symbols, USB enumeration mark, USB receptions mark, USB marks etc. to USB.
Wherein, respectively mark includes bluetooth communication mark, Bluetooth receptions mark, bluetooth mark etc. to bluetooth.
Step B102:To electric on bluetooth module, bluetooth module is configured;
Bluetooth unit in bluetooth module is powered, bluetooth unit is configured.
Step B103:Communicating interrupt service is opened, communicating interrupt service timer is opened;
Specifically, the service of USB communicating interrupts is opened, USB communicating interrupt service timers are opened;Bluetooth communication is opened to interrupt Service, opens bluetooth communication and interrupts service timer;
Specifically, when USB communicating interrupt service timers reach USB communication preset values, the service of USB communicating interrupts is touched Hair, whether the supply voltage for checking usb interface module is high level, if high level, checks whether USB enumeration mark is set to Position, if USB enumeration mark is set, opens usb data and receives the service of interruption, the requests transaction for waiting host computer to be received to send Data, set USB communication symbols, if USB enumeration mark is not set, carry out USB enumeration, open usb data and receive Service is interrupted, the requests transaction data for waiting host computer to be received to send if low level, then reset USB communication symbols, opened Timing shutdown interrupts service, opens shutdown timer;When bluetooth communication, which interrupts service timer, reaches bluetooth communication preset value, Bluetooth communication interrupts service and is triggered, and opens timing shutdown and interrupts, and opens shutdown timer, checks the supply voltage of bluetooth module Whether it is low level, if low level, opens Bluetooth data reception and interrupt service, the request for waiting host computer to be received to send is handed over Easy data, set bluetooth communication mark if high level, then resets bluetooth communication mark;
Wherein, it can be 10ms that USB communication presets value, which is, and bluetooth communication preset value can be 10ms.
Wherein, usb data receives interruption service and specifically included:When USB interface has packet incoming and packet form When meeting the regulation of usb protocol, usb data receives interruption service and is triggered, and is received into usb data and interrupts service processing stream Journey, received data packet, if packet is complete, the requests transaction data that the packet received is sent as host computer are put Position USB receives mark, exits usb data and receives interruption service processing flow, if packet is imperfect, resets USB and receives mark Will, exits usb data and receives interrupt processing flow.
Bluetooth data reception interrupts service and specifically included:When bluetooth module has packet incoming and packet is legal, bluetooth Data receiver interrupts service and is triggered, and service processing flow, received data packet, if packet is complete are interrupted into Bluetooth data reception Requests transaction data that are whole, then sending the packet received as host computer, set Bluetooth receptions mark, exit bluetooth number Service processing flow is interrupted according to receiving, if packet is imperfect, Bluetooth receptions mark is resetted, is exited in Bluetooth data reception Disconnected handling process.
Timing shutdown interrupts service and specifically included:When the timer that shuts down reaches default unlatching value, closed into timing prompting Machine handling process, is specifically included:Judge whether shutdown counter is more than default shutdown value, if it is, shutdown counter is set Initial value is set to, set timing shutdown mark exits timing shutdown and interrupts service, otherwise, exits timing shutdown interruption.
Wherein, shutdown counter initial value is 0, Jia 1 certainly every time.
It is preferred that, it is 1s to preset unlatching value, and it is 60 to preset shutdown value.
Step B104:Open timing Card Reader and interrupt service, obtain card ident value;
Specifically, when Card Reader timer reaches Card Reader preset value, timing Card Reader interrupts service and is triggered, and is read into timing Card interrupts service processing flow;Preferably, Card Reader preset value is 100 milliseconds;It is specific that its timing Card Reader interrupts service processing flow Including:
Step B1-1:To electric in card reading module;
This step B1-1 is specifically included:To in the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
Step B1-2:Contact card has been detected whether, if nothing, card ident value is set to the first preset value, step B1- is performed 3, if so, card ident value is set into the second preset value, perform step B1-4;
Step B1-3:Start card seeking, judge the response of non-contact card whether is received in preset time, if received, Card ident value is then set to the 3rd preset value, step B1-4 is performed, otherwise, step B1-4 is performed;
Step B1-4:To electric under card reading module, exit timing Card Reader and interrupt service;
This step B1-4 is specifically included:To under the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
It is preferred that, the first preset value is 0, and the second preset value is 1, and the 3rd preset value is 2.
Step B105:Check whether USB communication symbols are set, if USB communication symbols are set, perform step B106, otherwise, checks whether bluetooth communication mark is set, if bluetooth communication mark is set, performs step B107, such as Fruit bluetooth communication mark is not set, then checks whether timing shutdown mark is set, if timing shutdown is set, under Electricity shutdown, if timing shutdown mark is not set, return to step B105;
Step B106:Check that USB receives whether mark is set, if it is, service is interrupted in timeing closing shutdown, reset Timing shutdown mark, initial value is set to by shutdown counter, is resetted USB and is received mark, set USB Returning marks, performs step B108, otherwise return to step B105;
Step B107:Check whether Bluetooth receptions mark is set, if it is, service is interrupted in timeing closing shutdown, it is multiple Bit timing shutdown flag, is set to initial value by shutdown counter, resets Bluetooth receptions mark, set bluetooth Returning mark, perform Step B108, otherwise return to step B105;
Step B108:The result transaction data that fiscard is returned is obtained according to card ident value;
Specifically include, step B2-1:Check whether card ident value is the first preset value, if it is, step B2-6 is performed, Otherwise step B2-2 is performed;
This step B2-1 is specifically included:Card ident value is checked, if the first preset value, then step B2-6 is performed, if It is the second preset value, then performs step B2-2, if the 3rd preset value, then performs step B2-2;
Step B2-2:The requests transaction data got are sent to card reading module;
Specifically, requests transaction data are sent to contact card card reading unit or non-contact card card reading unit.
This step is specifically included:When card ident value is the second preset value, then requests transaction data are sent into contact card reads Requests transaction data when card ident value is the 3rd preset value, are then sent to non-contact card card reading unit by card unit.
Step B2-3:Judge the response message that card reading module is returned whether is received in preset time, if it is, performing Step B2-4, otherwise performs step B2-5;
Specifically, when requests transaction data are sent into contact card card reading unit, then judge whether received in preset time The response message returned to contact card card reading unit, when requests transaction data are sent into non-contact card card reading unit, then judges Whether the response message of non-contact card card reading unit return is received in preset time.
Preferably, preset time is 100 milliseconds.
Step B2-4:By the response message of card reading module transaction data as a result, step B109 is performed;
Step B2-5:The overtime information of card reading module transaction data as a result is will be prompted to, step B109 is performed;
Step B2-6:The information of no card be will be prompted to as returned data transaction data as a result, step B109 is performed;
Step B109:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, connect by USB Mouth mold block returning result transaction data, performs step B110, otherwise, checks whether bluetooth Returning mark is set, if it is, Bluetooth Returning mark is resetted, by bluetooth module returning result transaction data, step B111 is performed, if bluetooth Returning mark does not have It is set, then performs step B111;
Step B110:Check whether USB communication symbols are set, if be set, otherwise return to step B105 closes Usb data receives the service of interruption, resets USB and respectively indicates, return to step B105;
Step B111:Check whether bluetooth communication mark is set, if be set, otherwise return to step B105 closes Close Bluetooth data reception and interrupt service, reset bluetooth and respectively indicate, return to step B105.
In the present embodiment, in step B106, it is not set when inspection USB receives mark, in addition to:
Whether the inspection mark that queries the balance is set, if it is, return to step B105, otherwise obtains fiscard remaining sum, Fiscard balance amount information is exported, set queries the balance mark, return to step B105;
In step B107, when check Bluetooth receptions mark be not set, in addition to:
Whether the inspection mark that queries the balance is set, if it is, return to step B105, otherwise obtains fiscard remaining sum, Fiscard balance amount information is exported, set queries the balance mark, return to step B105.
Fiscard in the present embodiment can be finance contact card, financial non-contact card.
Embodiment 7
The present embodiment 7 provides a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, as shown in fig. 6, bag Include:
Step C101:Power-up initializing, resets each mark;
Specifically, power-up initializing, resets USB and respectively indicates, resets bluetooth and respectively indicates, resets the mark that queries the balance.
Wherein, respectively mark includes USB communication symbols, USB enumeration mark, USB receptions mark, USB Returning marks etc. to USB.
Wherein, respectively mark includes bluetooth communication mark, Bluetooth receptions mark, bluetooth Returning mark etc. to bluetooth.
Step C102:To electric on bluetooth module, bluetooth module is configured;
Specifically, the bluetooth unit in bluetooth module is powered, configures bluetooth unit.
Step C103:Open communicating interrupt service;
Specifically, the service of USB communicating interrupts is opened;Open bluetooth communication and interrupt service.
Specifically, when detecting usb interface module and host computer connection or disconnecting, the service of USB communicating interrupts is touched Hair, whether the supply voltage for checking usb interface module is high level, if high level, checks whether USB enumeration mark is set to Position, if USB enumeration mark is set, opens usb data and receives the service of interruption, the requests transaction for waiting host computer to be received to send Data, set USB communication symbols, if USB enumeration mark is not set, carry out USB enumeration, open usb data and receive Service is interrupted, the requests transaction data for waiting host computer to be received to send if low level, then reset USB communication symbols;Work as inspection When measuring bluetooth module and host computer connection or disconnecting, bluetooth communication interrupts service and is triggered, and checks the power supply of bluetooth module Whether voltage is low level, if low level, opens Bluetooth data reception and interrupts service, waits asking for host computer transmission to be received Transaction data is sought, set bluetooth communication mark if high level, then resets bluetooth communication mark;
Wherein, usb data receives interruption service and specifically included:When USB interface has packet incoming and packet form When meeting the regulation of usb protocol, usb data receives interruption service and is triggered, and receives interrupt processing flow into usb data, connects Packet is received, if packet is complete, the requests transaction data that the packet received is sent as host computer, set USB Mark is received, usb data is exited and receives interruption service processing flow, if packet is imperfect, USB is resetted and receives mark, move back Go out usb data and receive interruption service processing flow.
Bluetooth data reception interrupts service and specifically included:When bluetooth module has packet incoming and packet is legal, bluetooth Data receiver interrupts service and is triggered, and service processing flow, received data packet, if packet is complete are interrupted into Bluetooth data reception Requests transaction data that are whole, then sending the packet received as host computer, set Bluetooth receptions mark, exit bluetooth number Service processing flow is interrupted according to receiving, if packet is imperfect, Bluetooth receptions mark is resetted, Bluetooth data reception interruption is exited Handling process.
In this step, communicating interrupt service can also use timers trigger method, for example, it is fixed to open communicating interrupt service When device, when communicating interrupt service timer reaches 10ms, communicating interrupt service is triggered, perform corresponding operating.
Specifically, open the service of USB communicating interrupts, open USB communicating interrupt service timers;Bluetooth communication is opened to interrupt Service, unlatching bluetooth communication interrupt service timer.
Step C104:Open timing Card Reader and interrupt service, obtain card ident value;
Specifically, when Card Reader timer reaches Card Reader preset value, timing Card Reader is interrupted and is triggered, into timing Card Reader Disconnected service processing flow;Preferably, Card Reader preset value is 100 milliseconds;
Timing Card Reader interrupt processing flow is specifically included:
Step C1-1:To electric in card reading module;
This step C1-1 is specifically included:To in the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
Step C1-2:Contact card has been detected whether, if nothing, card ident value is set to the first preset value, step C1- is performed 3, if so, card ident value is set into the second preset value, perform step C1-4;
Step C1-3:Start card seeking, judge the response of non-contact card whether is received in preset time, if received, Card ident value is then set to the 3rd preset value, step C1-4 is performed, otherwise, step C1-4 is performed;
Step C1-4:To electric under card reading module, the interruption of timing Card Reader is exited;
This step C1-4 is specifically included:To under the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
It is preferred that, the first preset value is 0, and the second preset value is 1, and the 3rd preset value is 2.
Step C105:Check that USB receives whether mark is set, returned if it is, resetting USB and receiving mark, set USB Mark is returned, step C107 is performed, step C106 is otherwise performed;
Step C106:Check whether Bluetooth receptions mark is set, if it is, resetting Bluetooth receptions mark, set indigo plant Tooth Returning mark, performs step C107, otherwise return to step C105;
Step C107:The result transaction data that fiscard is returned is obtained according to card ident value;
Specifically include, step C2-1:Check whether card ident value is the first preset value, if it is, step C2-6 is performed, Otherwise step C2-2 is performed;
This step C2-1 is specifically included:Card ident value is checked, if the first preset value, then step C2-6 is performed, if It is the second preset value, then performs step C2-2, if the 3rd preset value, then performs step C2-2;
Step C2-2:The requests transaction data got are sent to card reading module;
Specifically, requests transaction data are sent to contact card card reading unit or non-contact card card reading unit.
This step is specifically included:When card ident value is the second preset value, then requests transaction data are sent into contact card reads Requests transaction data when card ident value is the 3rd preset value, are then sent to non-contact card card reading unit by card unit.
Step C2-3:Judge the response message that card reading module is returned whether is received in preset time, if it is, performing Step C2-4, otherwise performs step C2-5;
Specifically, when requests transaction data are sent into contact card card reading unit, then judge whether received in preset time The response message returned to contact card card reading unit, when requests transaction data are sent into non-contact card card reading unit, then judges Whether the response message of non-contact card card reading unit return is received in preset time.
Preferably, preset time is 100 milliseconds.
Step C2-4:By the response message of card reading module transaction data as a result, step C108 is performed;
Step C2-5:The overtime information of card reading module transaction data as a result is will be prompted to, step C108 is performed;
Step C2-6:The information of no card be will be prompted to as returned data transaction data as a result, step C108 is performed;
Step C108:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, connect by USB Mouth mold block returning result transaction data, performs step C109, otherwise, checks whether bluetooth Returning mark is set, if it is, Bluetooth Returning mark is resetted, by bluetooth module returning result transaction data, then step C110 is performed, if bluetooth Returning mark It is not set, then performs step C110;
Step C109:Check whether USB communication symbols are set, if be set, otherwise return to step C105 closes Usb data receives the service of interruption, resets USB and respectively indicates, return to step C105;
Step C110:Check whether bluetooth communication mark is set, if be set, otherwise return to step C105 closes Close Bluetooth data reception and interrupt service, reset bluetooth and respectively indicate, return to step C105;
In this implementation, in step C106, when check Bluetooth receptions mark be not set, in addition to:
Whether the inspection mark that queries the balance is set, if it is, return to step C105, otherwise obtains fiscard remaining sum, Fiscard balance amount information is exported, set queries the balance mark, return to step C105.
Fiscard in the present embodiment can be finance contact card, financial non-contact card.
Embodiment 8
The present embodiment 8 provides a kind of method of work for the Mobile payment terminal for supporting bluetooth communication.The terminal is performed Following steps:
Step D101:Power-up initializing, sends on power supplying control signal control power management module to power management module Electricity, resets each mark;
Specifically, power-up initializing, central control module sends power supplying control signal, power management to power management module Module receives the control of power supplying control signal, is that central control module, card reading module, bluetooth module, display module are powered;Reset USB respectively indicates, resets bluetooth and respectively indicates, resets query the balance mark, timing shutdown mark etc..
Wherein, respectively mark includes USB communication symbols, USB enumeration mark, USB receptions mark, USB Returning marks etc. to USB.
Wherein, respectively mark includes bluetooth communication mark, Bluetooth receptions mark, bluetooth Returning mark etc. to bluetooth.
Step D102:To electric on bluetooth module, bluetooth module is configured;
Specifically, the bluetooth unit in bluetooth module is powered, configures bluetooth unit.
Step D103:Communicating interrupt service is opened, starts communicating interrupt service timer;
Specifically, the service of USB communicating interrupts is opened, USB communicating interrupt service timers are opened;Bluetooth communication is opened to interrupt Service, opens bluetooth communication and interrupts service timer;
Specifically, when USB communicating interrupt service timers reach USB communication preset values, the service of USB communicating interrupts is touched Hair, whether the supply voltage for checking usb interface module is high level, if high level, checks whether USB enumeration mark is set to Position, if USB enumeration mark is set, opens usb data and receives the service of interruption, the requests transaction for waiting host computer to be received to send Data, set USB communication symbols, if USB enumeration mark is not set, carry out USB enumeration, open usb data and receive Service is interrupted, the requests transaction data for waiting host computer to be received to send if low level, then reset USB communication symbols, opened Timing shutdown interrupts service, opens shutdown timer;When bluetooth communication, which interrupts service timer, reaches bluetooth communication preset value, Bluetooth communication interrupts service and is triggered, and opens timing shutdown and interrupts, and opens shutdown timer, checks the supply voltage of bluetooth module Whether it is low level, if low level, opens Bluetooth data reception and interrupt service, the request for waiting host computer to be received to send is handed over Easy data, set bluetooth communication mark if high level, then resets bluetooth communication mark;
Wherein, it can be 10ms that USB communication presets value, which is, and bluetooth communication preset value can be 10ms.
Wherein, usb data receives interruption service and specifically included:When USB interface has packet incoming and packet form When meeting the regulation of usb protocol, usb data receives interruption service and is triggered, and is received into usb data and interrupts service processing stream Journey, received data packet, if packet is complete, the requests transaction data that the packet received is sent as host computer are put Position USB receives mark, exits usb data and receives interruption service processing flow, if packet is imperfect, resets USB and receives mark Will, exits usb data and receives interrupt processing flow.
Bluetooth data reception interrupts service and specifically included:When bluetooth module has packet incoming and packet is legal, bluetooth Data receiver interrupts service and is triggered, and service processing flow, received data packet, if packet is complete are interrupted into Bluetooth data reception Requests transaction data that are whole, then sending the packet received as host computer, set Bluetooth receptions mark, exit bluetooth number Service processing flow is interrupted according to receiving, if packet is imperfect, Bluetooth receptions mark is resetted, is exited in Bluetooth data reception Disconnected handling process.
Timing shutdown interrupts service and specifically included:When the timer that shuts down reaches default unlatching value, closed into timing prompting Machine handling process, is specifically included:Judge whether shutdown counter is more than default shutdown value, if it is, shutdown counter is set Initial value is set to, set timing shutdown mark exits timing shutdown and interrupts service, otherwise, exits timing shutdown interruption.
Wherein, shutdown counter initial value is 0, Jia 1 certainly every time.
It is preferred that, it is 1s to preset unlatching value, and it is 60 to preset shutdown value.
Step D104:Open timing Card Reader and interrupt service, obtain card ident value;
Specifically, when Card Reader timer reaches Card Reader preset value, timing Card Reader interrupts service and is triggered, and is read into timing Card interrupt processing flow;Preferably, Card Reader preset value is 100 milliseconds;
Timing Card Reader interrupt processing flow is specifically included:
Step D1-1:To electric in card reading module;
This step D1-1 is specifically included:To in the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
Step D1-2:Contact card has been detected whether, if nothing, card ident value is set to the first preset value, step D1- is performed 3, if so, card ident value is set into the second preset value, perform step D1-4;
Step D1-3:Start card seeking, judge the response of non-contact card whether is received in preset time, if received, Card ident value is then set to the 3rd preset value, step D1-4 is performed, otherwise, step D1-4 is performed;
Step D1-4:To electric under card reading module, exit timing Card Reader and interrupt service;
This step D1-4 is specifically included:To under the contact card card reading unit and non-contact card card reading unit in card reading module Electricity.
It is preferred that, the first preset value is 0, and the second preset value is 1, and the 3rd preset value is 2.
Step D105:Check that USB receives whether mark is set, if it is, service is interrupted in timeing closing shutdown, reset Timing shutdown mark, initial value is set to by shutdown counter, is resetted USB and is received mark, set USB Returning marks, performs step D107, otherwise performs step D106;
Step D106:Check whether Bluetooth receptions mark is set, if it is, service is interrupted in timeing closing shutdown, it is multiple Bit timing shutdown flag, is set to initial value by shutdown counter, resets Bluetooth receptions mark, set bluetooth Returning mark, perform Step D107, otherwise, checks whether timing shutdown mark is set, if timing shutdown is set, lower electricity shutdown, if fixed When shutdown flag be not set, then return to step D105;
Step D107:The result transaction data that fiscard is returned is obtained according to card ident value;
Specifically include, step D2-1:Check whether card ident value is the first preset value, if it is, step D2-6 is performed, Otherwise step D2-2 is performed;
This step D2-1 is specifically included:Card ident value is checked, if the first preset value, then step D2-6 is performed, if It is the second preset value, then performs step D2-2, if the 3rd preset value, then performs step D2-2;
Step D2-2:The requests transaction data got are sent to card reading module;
Specifically, requests transaction data are sent to contact card card reading unit or non-contact card card reading unit.
This step is specifically included:When card ident value is the second preset value, then requests transaction data are sent into contact card reads Requests transaction data when card ident value is the 3rd preset value, are then sent to non-contact card card reading unit by card unit.
Step D2-3:Judge the response message that card reading module is returned whether is received in preset time, if it is, performing Step D2-4, otherwise performs step D2-5;
Specifically, when requests transaction data are sent into contact card card reading unit, then judge whether received in preset time The response message returned to contact card card reading unit, when requests transaction data are sent into non-contact card card reading unit, then judges Whether the response message of non-contact card card reading unit return is received in preset time.
Preferably, preset time is 100 milliseconds.
Step D2-4:By the response message of card reading module transaction data as a result, step D108 is performed;
Step D2-5:The overtime information of card reading module transaction data as a result is will be prompted to, step D108 is performed;
Step D2-6:The information of no card be will be prompted to as returned data transaction data as a result, step D108 is performed;
Step D108:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, connect by USB Mouth mold block returning result transaction data, performs step D109, otherwise, checks whether bluetooth Returning mark is set, if it is, Bluetooth Returning mark is resetted, by bluetooth module returning result transaction data, then step D110 is performed, if bluetooth Returning mark It is not set, then performs step D110;
Step D109:Check whether USB communication symbols are set, if be set, otherwise return to step D105, closes Close usb data and receive the service of interruption, reset USB and respectively indicate, return to step D105;
Step D110:Check whether bluetooth communication mark is set, if be set, otherwise return to step D105 closes Close Bluetooth data reception and interrupt service, reset bluetooth and respectively indicate, return to step D105;
In this implementation, in step D106, when inspection Bluetooth receptions mark is not set, it can also include:Check inquiry Whether remaining sum mark is set, if it is, return to step D105, otherwise obtains fiscard remaining sum, output fiscard remaining sum letter Breath, set queries the balance mark, return to step D105.
Fiscard in the present embodiment can be finance contact card, financial non-contact card.

Claims (14)

1. a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, it is characterised in that the terminal includes:USB connects Mouth mold block, battery module, power management module, card reading module, central control module, bluetooth module, interactive module;
The usb interface module, is connected with the battery module, the power management module, the central control module, is used for Usb bus input electricity is provided for the battery module, usb bus input electricity is provided for the power management module, is institute State central control module transmitting-receiving transaction data;
The battery module, is connected with the usb interface module, the power management module, for receiving usb bus input electricity Amount is charged, provides battery electric quantity for the power management module;
The power management module, and the usb interface module, the battery module, the card reading module, the center control Module, the bluetooth module, the interactive module are connected, for when getting usb bus input electricity, usb bus is defeated Enter voltage conversion for terminal works voltage, with the terminal works voltage be the card reading module, the central control module, institute Bluetooth module, the interactive module is stated to power;
When getting battery electric quantity, terminal works voltage is converted battery voltage to, is described with the terminal works voltage Card reading module, the central control module, the bluetooth module, the interactive module are powered;
The bluetooth module, is connected with the power management module, the central control module, and the terminal is got for working as It is the central control module transmitting-receiving transaction data during operating voltage;
The card reading module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module reads financial card information during operating voltage;
The interactive module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module obtains user's input information during operating voltage;
The central control module, and the power management module, the usb interface module, the card reading module, the bluetooth Module, the interactive module are connected, for when getting the terminal works voltage, obtaining transaction data, obtaining fiscard Information, acquisition user's input information;
Methods described includes:
Step s1:Power-up initializing, resets each mark, to electric on the bluetooth module, configures the bluetooth module, opens communication Interrupt service;
When detecting the usb interface module and host computer connection or disconnecting, USB communicating interrupt services are triggered, detection When whether the supply voltage of the usb interface module is high level, if high level, then opens usb data and receive interruption clothes Business, set USB communication symbols if low level, then reset USB communication symbols;When detecting the bluetooth module and upper When machine is connected or disconnected, bluetooth communication interrupts service and is triggered, and whether the feedback voltage for detecting the bluetooth module is low electricity It is flat, if low level, then open Bluetooth data reception and interrupt service, otherwise set bluetooth communication mark, resets bluetooth communication Mark;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, usb data connects Receive interruption service to be triggered, when getting requests transaction data, set USB receives mark, when not getting requests transaction During data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, Bluetooth data reception Interruption service is triggered, when getting requests transaction data, set Bluetooth receptions mark, when not getting requests transaction number According to when, reset Bluetooth receptions mark;
Step s2:Open timing Card Reader and interrupt service, obtain card ident value;
Step s3:Check whether USB communication symbols are set, if USB communication symbols are set, check that USB receives mark Whether it is set, if USB receives mark and is set, resets USB and receive mark, set USB Returning marks perform step S4, if USB receives mark and is not set, return to step s3, if USB communication symbols are not set, checks blue Whether tooth communication symbol is set, if bluetooth communication mark is set, and checks whether Bluetooth receptions mark is set, if Bluetooth receptions mark is set, then resets Bluetooth receptions mark, and set bluetooth Returning mark performs step s4, if bluetooth connects Receive mark not to be set, then return to step s3, if bluetooth communication mark is not set, return to step s3;
Step s4:Result transaction data is obtained according to card ident value;
Step s5:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, pass through the USB interface Result transaction data is returned to the host computer by module, performs step s6, otherwise, checks whether bluetooth Returning mark is set to Position, if it is, resetting bluetooth Returning mark, the host computer is returned to by the bluetooth module by result transaction data, Step s7 is performed, if bluetooth Returning mark is not set, step s7 is performed;
Step s6:Check whether USB communication symbols are set, if it is, return to step s3, otherwise closes usb data and receive Service is interrupted, USB is resetted and respectively indicates, return to step s3;
Step s7:Check whether bluetooth communication mark is set, if it is, return to step s3, otherwise closes blue-teeth data and connect The service of interruption is received, bluetooth is resetted and respectively indicates, return to step s3.
2. the method as described in claim 1, it is characterised in that the step s2 is specifically included:Open timing Card Reader and interrupt clothes Business, obtains card ident value;
When Card Reader timer reaches Card Reader preset value, timing Card Reader interrupts service and is triggered, and contact card has been detected whether, if nothing Contact card, then be set to the first preset value by card ident value, starts card seeking, if the response of non-contact card is obtained, by card ident value It is set to the 3rd preset value;If there is contact to block, card ident value is set to the second preset value;
Step s4 is specifically included:Card ident value is checked, if the first preset value, the information that will be prompted to no card is merchandised as a result Requests transaction data, if the second preset value or the 3rd preset value, are sent to the card reading module by data, judge default Whether the response message of card reading module return is received in time, if receiving response message, by response message as a result Transaction data, if being not received by response message, will be prompted to the overtime information of card reading module transaction data as a result.
3. the method as described in claim 1, it is characterised in that in the step s3 when USB, which receives mark, not to be set, Also include:Whether the inspection mark that queries the balance is set, if it is, return to step s3, otherwise, display fiscard remaining sum letter Breath, set queries the balance mark, return to step s3;When Bluetooth receptions mark is not set, in addition to:Inspection queries the balance Whether mark is set, if it is, return to step s3, otherwise, shows fiscard balance amount information, and set queries the balance mark, Return to step s3.
4. a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, it is characterised in that the terminal includes:USB connects Mouth mold block, battery module, power management module, card reading module, central control module, bluetooth module, interactive module;
The usb interface module, is connected with the battery module, the power management module, the central control module, is used for Usb bus input electricity is provided for the battery module, usb bus input electricity is provided for the power management module, is institute State central control module transmitting-receiving transaction data;
The battery module, is connected with the usb interface module, the power management module, for receiving usb bus input electricity Amount is charged, provides battery electric quantity for the power management module;
The power management module, and the usb interface module, the battery module, the card reading module, the center control Module, the bluetooth module, the interactive module are connected, for when getting usb bus input electricity, usb bus is defeated Enter voltage conversion for terminal works voltage, with the terminal works voltage be the card reading module, the central control module, institute Bluetooth module, the interactive module is stated to power;
When getting battery electric quantity, terminal works voltage is converted battery voltage to, is described with the terminal works voltage Card reading module, the central control module, the bluetooth module, the interactive module are powered;
The bluetooth module, is connected with the power management module, the central control module, and the terminal is got for working as It is the central control module transmitting-receiving transaction data during operating voltage;
The card reading module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module reads financial card information during operating voltage;
The interactive module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module obtains user's input information during operating voltage;
The central control module, and the power management module, the usb interface module, the card reading module, the bluetooth Module, the interactive module are connected, for when getting the terminal works voltage, obtaining transaction data, obtaining fiscard Information, acquisition user's input information;
Methods described includes:
Step t1:Power-up initializing, resets each mark, to electric on the bluetooth module, configures the bluetooth module, opens communication Service is interrupted, communicating interrupt service timer is opened;
When USB communicating interrupt service timers reach USB communication preset values, USB communicating interrupt services are triggered, and detection is described When whether the supply voltage of usb interface module is high level, if high level, then opens usb data and receive the service of interruption, put Position USB communication symbols, if low level, then reset USB communication symbols;Bluetooth is reached when bluetooth communication interrupts service timer During communication preset value, bluetooth communication interrupts service and is triggered, and whether the feedback voltage for detecting the bluetooth module is low level, such as Fruit is low level, then opens Bluetooth data reception and interrupt service, otherwise set bluetooth communication mark, resets bluetooth communication mark;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, usb data connects Receive interruption service to be triggered, when getting requests transaction data, set USB receives mark, when not getting requests transaction During data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, Bluetooth data reception Interruption service is triggered, when getting requests transaction data, set Bluetooth receptions mark, when not getting requests transaction number According to when, reset Bluetooth receptions mark;
Step t2:Open timing Card Reader and interrupt service, obtain card ident value;
Step t3:Check whether USB communication symbols are set, if USB communication symbols are set, check that USB receives mark Whether it is set, if USB receives mark and is set, resets USB and receive mark, set USB Returning marks perform step T4, if USB receives mark and is not set, return to step t3, if USB communication symbols are not set, checks blue Whether tooth communication symbol is set, if bluetooth communication mark is set, and checks whether Bluetooth receptions mark is set, if Bluetooth receptions mark is set, then resets Bluetooth receptions mark, and set bluetooth Returning mark performs step t4, if bluetooth connects Receive mark not to be set, then return to step t3, if bluetooth communication mark is not set, return to step t3;
Step t4:Result transaction data is obtained according to card ident value;
Step t5:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, pass through the USB interface Result transaction data is returned to host computer by module, performs step t6, otherwise, checks whether bluetooth Returning mark is set, such as Fruit is then to reset bluetooth Returning mark, and result transaction data is returned into host computer by the bluetooth module, step is performed T7, if bluetooth Returning mark is not set, performs step t7;
Step t6:Check whether USB communication symbols are set, if it is, return to step t3, otherwise closes usb data and receive Service is interrupted, USB is resetted and respectively indicates, return to step t3;
Step t7:Check whether bluetooth communication mark is set, if it is, return to step t3, otherwise closes blue-teeth data and connect The service of interruption is received, bluetooth is resetted and respectively indicates, return to step t3.
5. method as claimed in claim 4, it is characterised in that the step t2 is specifically included:Open timing Card Reader and interrupt clothes Business, obtains card ident value;
When Card Reader timer reaches Card Reader preset value, timing Card Reader interrupts service and is triggered, and contact card has been detected whether, if nothing Contact card, then be set to the first preset value by card ident value, starts card seeking, if the response of non-contact card is obtained, by card ident value It is set to the 3rd preset value;If there is contact to block, card ident value is set to the second preset value;
Step t4 is specifically included:Card ident value is checked, if the first preset value, the information that will be prompted to no card is merchandised as a result Requests transaction data, if the second preset value or the 3rd preset value, are sent to the card reading module by data, judge default Whether the response message of card reading module return is received in time, if receiving response message, by response message as a result Transaction data, if being not received by response message, will be prompted to the overtime information of card reading module transaction data as a result.
6. method as claimed in claim 4, it is characterised in that the step t1 is specifically included:Power-up initializing, to the electricity Source control module sends power supplying control signal, controls electricity on the power management module, each mark is resetted, to the bluetooth module Upper electricity, configures the bluetooth module, opens communicating interrupt service, opens communicating interrupt service timer;
When USB communicating interrupt service timers reach USB communication preset values, USB communicating interrupt services are triggered, and detection is described When whether the supply voltage of usb interface module is high level, if high level, then opens usb data and receive the service of interruption, put Position USB communication symbols, if low level, reset USB communication symbols, open timing shutdown and interrupt service, open shutdown timing Device;When bluetooth communication, which interrupts service timer, reaches bluetooth communication preset value, bluetooth communication interrupts service and is triggered, and opens fixed Shi Guanji interrupts service, opens shutdown timer, and whether the feedback voltage for detecting the bluetooth module is low level, if low Level, then open Bluetooth data reception and interrupt service, otherwise set bluetooth communication mark, resets bluetooth communication mark;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, usb data connects Receive interruption service to be triggered, when getting requests transaction data, set USB receives mark, when not getting requests transaction During data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, Bluetooth data reception Interruption service is triggered, when getting requests transaction data, set Bluetooth receptions mark, when not getting requests transaction number According to when, reset Bluetooth receptions mark;
When the timer that shuts down reaches default unlatching value, timing shutdown interrupts service and is triggered, and judges whether shutdown counter is big In default shutdown value, if it is, shutdown counter is set into initial value, set timing shutdown mark exits timing shutdown Interrupt, otherwise, directly exit timing shutdown interruption;
In the step t3, when bluetooth communication mark is not set, in addition to:Check whether timing shutdown mark is set to Position, if timing shutdown is set, lower electricity shutdown, if timing shutdown mark is not set, return to step t3;Work as indigo plant When tooth reception mark is set, in addition to, service is interrupted in timeing closing shutdown, timing shutdown mark is resetted, by the counter that shuts down It is set to initial value;When USB, which receives mark, to be set, in addition to service is interrupted in timeing closing shutdown, resets timing shutdown mark, Shutdown counter is set to initial value.
7. the method as described in claim 4 or 6, it is characterised in that be not set in the step t3 when USB receives mark When, in addition to:Whether the inspection mark that queries the balance is set, if it is, return to step t3, otherwise, shows fiscard remaining sum Information, set queries the balance mark, return to step t3;When Bluetooth receptions mark is not set, in addition to:Check that inquiry is remaining Whether volume mark is set, if it is, return to step t3, otherwise, shows fiscard balance amount information, and set queries the balance mark Will, return to step t3.
8. a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, it is characterised in that the terminal includes:USB connects Mouth mold block, battery module, power management module, card reading module, central control module, bluetooth module, interactive module;
The usb interface module, is connected with the battery module, the power management module, the central control module, is used for Usb bus input electricity is provided for the battery module, usb bus input electricity is provided for the power management module, is institute State central control module transmitting-receiving transaction data;
The battery module, is connected with the usb interface module, the power management module, for receiving usb bus input electricity Amount is charged, provides battery electric quantity for the power management module;
The power management module, and the usb interface module, the battery module, the card reading module, the center control Module, the bluetooth module, the interactive module are connected, for when getting usb bus input electricity, usb bus is defeated Enter voltage conversion for terminal works voltage, with the terminal works voltage be the card reading module, the central control module, institute Bluetooth module, the interactive module is stated to power;
When getting battery electric quantity, terminal works voltage is converted battery voltage to, is described with the terminal works voltage Card reading module, the central control module, the bluetooth module, the interactive module are powered;
The bluetooth module, is connected with the power management module, the central control module, and the terminal is got for working as It is the central control module transmitting-receiving transaction data during operating voltage;
The card reading module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module reads financial card information during operating voltage;
The interactive module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module obtains user's input information during operating voltage;
The central control module, and the power management module, the usb interface module, the card reading module, the bluetooth Module, the interactive module are connected, for when getting the terminal works voltage, obtaining transaction data, obtaining fiscard Information, acquisition user's input information;
Methods described includes:
Step y1:Power-up initializing, resets each mark, controls electricity on the bluetooth module, configures the bluetooth module, opens logical News interrupt service;
When detecting the usb interface module and host computer connection or disconnecting, USB communicating interrupt services are triggered, detection When whether the supply voltage of the usb interface module is high level, if high level, then opens usb data and receive interruption clothes Business, set USB communication symbols if low level, then reset USB communication symbols;When detecting the bluetooth module and upper When machine is connected or disconnected, bluetooth communication interrupts service and is triggered, and whether the feedback voltage for detecting the bluetooth module is low electricity It is flat, if low level, then open Bluetooth data reception and interrupt service, otherwise set bluetooth communication mark, resets bluetooth communication Mark;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, usb data connects Receive interruption service to be triggered, when getting requests transaction data, set USB receives mark, when not getting requests transaction During data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, Bluetooth data reception Interruption service is triggered, when getting requests transaction data, set Bluetooth receptions mark, when not getting requests transaction number According to when, reset Bluetooth receptions mark;
Step y2:Open timing Card Reader and interrupt service, obtain card ident value;
Step y3:Check that USB receives whether mark is set, if it is, resetting USB receives mark, set USB returns to mark Will, performs step y4, otherwise checks whether Bluetooth receptions mark is set, if Bluetooth receptions mark is set, and resets blue Tooth receives mark, and set bluetooth Returning mark performs step y4, if Bluetooth receptions mark is not set, return to step y3;
Step y4:Result transaction data is obtained according to card ident value;
Step y5:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, pass through the USB interface Result transaction data is returned to the host computer by module, performs step y6, otherwise, checks whether bluetooth Returning mark is set to Position, if it is, resetting bluetooth Returning mark, the host computer is returned to by the bluetooth module by result transaction data, Step y7 is performed, if bluetooth Returning mark is not set, step y7 is performed;
Step y6:Check whether USB communication symbols are set, if it is, return to step y3, otherwise closes usb data and receive Service is interrupted, USB is resetted and respectively indicates, return to step y3;
Step y7:Check whether bluetooth communication mark is set, if it is, return to step y3, otherwise closes blue-teeth data and connect The service of interruption is received, bluetooth is resetted and respectively indicates, return to step y3.
9. method as claimed in claim 8, it is characterised in that the step y2 is specifically included:Open timing Card Reader and interrupt clothes Business, obtains card ident value;
When Card Reader timer reaches Card Reader preset value, timing Card Reader interrupts service and is triggered, and contact card has been detected whether, if nothing Contact card, then be set to the first preset value by card ident value, starts card seeking, if the response of non-contact card is obtained, by card ident value It is set to the 3rd preset value;If there is contact to block, card ident value is set to the second preset value;
Step y4 is specifically included:Card ident value is checked, if the first preset value, the information that will be prompted to no card is merchandised as a result Requests transaction data, if the second preset value or the 3rd preset value, are sent to the card reading module by data, judge default Whether the response message of card reading module return is received in time, if receiving response message, by response message as a result Transaction data, if being not received by response message, will be prompted to the overtime information of card reading module transaction data as a result.
10. method as claimed in claim 8, it is characterised in that when Bluetooth receptions mark is not set in the step y3 When, in addition to:Whether the inspection mark that queries the balance is set, if it is, return to step y3, otherwise, shows fiscard remaining sum Information, set queries the balance mark, return to step y3.
11. a kind of method of work for the Mobile payment terminal for supporting bluetooth communication, it is characterised in that the terminal includes:USB connects Mouth mold block, battery module, power management module, card reading module, central control module, bluetooth module, interactive module;
The usb interface module, is connected with the battery module, the power management module, the central control module, is used for Usb bus input electricity is provided for the battery module, usb bus input electricity is provided for the power management module, is institute State central control module transmitting-receiving transaction data;
The battery module, is connected with the usb interface module, the power management module, for receiving usb bus input electricity Amount is charged, provides battery electric quantity for the power management module;
The power management module, and the usb interface module, the battery module, the card reading module, the center control Module, the bluetooth module, the interactive module are connected, for when getting usb bus input electricity, usb bus is defeated Enter voltage conversion for terminal works voltage, with the terminal works voltage be the card reading module, the central control module, institute Bluetooth module, the interactive module is stated to power;
When getting battery electric quantity, terminal works voltage is converted battery voltage to, is described with the terminal works voltage Card reading module, the central control module, the bluetooth module, the interactive module are powered;
The bluetooth module, is connected with the power management module, the central control module, and the terminal is got for working as It is the central control module transmitting-receiving transaction data during operating voltage;
The card reading module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module reads financial card information during operating voltage;
The interactive module, is connected with the power management module, the central control module, and the terminal is got for working as It is that the central control module obtains user's input information during operating voltage;
The central control module, and the power management module, the usb interface module, the card reading module, the bluetooth Module, the interactive module are connected, for when getting the terminal works voltage, obtaining transaction data, obtaining fiscard Information, acquisition user's input information;
Methods described includes:
Step z1:Power-up initializing, resets each mark, controls electricity on the bluetooth module, configures the bluetooth module, opens logical News interrupt service;
When USB communicating interrupt service timers reach USB communication preset values, USB communicating interrupt services are triggered, and detection is described When whether the supply voltage of usb interface module is high level, if high level, then opens usb data and receive the service of interruption, put Position USB communication symbols, if low level, then reset USB communication symbols;Bluetooth is reached when bluetooth communication interrupts service timer During communication preset value, bluetooth communication interrupts service and is triggered, and whether the feedback voltage for detecting the bluetooth module is low level, such as Fruit is low level, then opens Bluetooth data reception and interrupt, and otherwise set bluetooth communication mark, resets bluetooth communication mark;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, usb data connects Receive interruption service to be triggered, when getting requests transaction data, set USB receives mark, when not getting requests transaction During data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, Bluetooth data reception Interruption service is triggered, when getting requests transaction data, set Bluetooth receptions mark, when not getting requests transaction number According to when, reset Bluetooth receptions mark;
Step z2:Open timing Card Reader and interrupt service, obtain card ident value;
Step z3:Check that USB receives whether mark is set, if it is, resetting USB receives mark, set USB returns to mark Will, performs step z4, otherwise checks whether Bluetooth receptions mark is set, if Bluetooth receptions mark is set, and resets blue Tooth receives mark, and set bluetooth Returning mark performs step z4, if Bluetooth receptions mark is not set, return to step z3;
Step z4:Result transaction data is obtained according to card ident value;
Step z5:Check whether USB Returning marks are set, if it is, resetting USB Returning marks, pass through the USB interface Result transaction data is returned to host computer by module, performs step z6, otherwise, checks whether bluetooth Returning mark is set, such as Fruit is then to reset bluetooth Returning mark, and result transaction data is returned into host computer by the bluetooth module, step is performed Z7, if bluetooth Returning mark is not set, performs step z7;
Step z6:Check whether USB communication symbols are set, if it is, return to step z3, otherwise closes usb data and receive Service is interrupted, USB is resetted and respectively indicates, return to step z3;
Step z7:Check whether bluetooth communication mark is set, if it is, return to step z3, otherwise closes blue-teeth data and connect The service of interruption is received, bluetooth is resetted and respectively indicates, return to step z3.
12. method as claimed in claim 11, it is characterised in that the step z2 is specifically included:Timing Card Reader is opened to interrupt Service, obtains card ident value;
When Card Reader timer reaches Card Reader preset value, timing Card Reader interrupts service and is triggered, and contact card has been detected whether, if nothing Contact card, then be set to the first preset value by card ident value, starts card seeking, if the response of non-contact card is obtained, by card ident value It is set to the 3rd preset value;If there is contact to block, card ident value is set to the second preset value;
Step z4 is specifically included:Card ident value is checked, if the first preset value, the information that will be prompted to no card is merchandised as a result Requests transaction data, if the second preset value or the 3rd preset value, are sent to the card reading module by data, judge default Whether the response message of card reading module return is received in time, if receiving response message, by response message as a result Transaction data, if being not received by response message, will be prompted to the overtime information of card reading module transaction data as a result.
13. method as claimed in claim 11, it is characterised in that the step z1 is specifically included:Power-up initializing, to described Power management module sends power supplying control signal, controls electricity on the power management module, each mark is resetted, to the bluetooth mould It is electric on block, the bluetooth module is configured, communicating interrupt service is opened;
When USB communicating interrupt service timers reach USB communication preset values, USB communicating interrupt services are triggered, and detection is described When whether the supply voltage of usb interface module is high level, if high level, then opens usb data and receive the service of interruption, put Position USB communication symbols, if low level, reset USB communication symbols, open timing shutdown and interrupt service, open shutdown timing Device;When bluetooth communication, which interrupts service timer, reaches bluetooth communication preset value, bluetooth communication interrupts service and is triggered, and opens fixed Shi Guanji interrupts service, opens shutdown timer, and whether the feedback voltage for detecting the bluetooth module is low level, if low Level, then open Bluetooth data reception and interrupt service, otherwise set bluetooth communication mark, resets bluetooth communication mark;
When the usb interface module has packet incoming and packet form meets the regulation of usb protocol, usb data connects Receive interruption service to be triggered, when getting requests transaction data, set USB receives mark, when not getting requests transaction During data, reset USB and receive mark;When the bluetooth module has packet incoming and during legal packet, Bluetooth data reception Interruption service is triggered, when getting requests transaction data, set Bluetooth receptions mark, when not getting requests transaction number According to when, reset Bluetooth receptions mark;
When the timer that shuts down reaches default unlatching value, timing shutdown interrupts service and is triggered, and judges whether shutdown counter is big In default shutdown value, if it is, shutdown counter is set into initial value, set timing shutdown mark exits timing shutdown Interrupt, otherwise, directly exit timing shutdown interruption;
In the step z3, when USB, which receives mark, to be set, in addition to service is interrupted in timeing closing shutdown, resets timed-shutoff Machine mark, initial value is set to by shutdown counter;When Bluetooth receptions mark is set, in addition to, timeing closing shutdown is interrupted Service, resets timing shutdown mark, and shutdown counter is set into initial value;When Bluetooth receptions mark is not set, also wrap Include:Check whether timing shutdown mark is set, if timing shutdown is set, lower electricity shutdown, if timing shutdown mark It is not set, then return to step z3.
14. the method as described in claim 11 or 13, it is characterised in that when Bluetooth receptions mark does not have in the step z3 When being set, in addition to:Whether the inspection mark that queries the balance is set, if it is, return to step z3, otherwise, display finance Card balance amount information, set queries the balance mark, return to step z3.
CN201410581957.XA 2014-10-27 2014-10-27 A kind of Mobile payment terminal and its method of work for supporting bluetooth communication Active CN104346722B (en)

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 CN104346722A (en) 2015-02-11
CN104346722B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105958986B (en) * 2016-05-30 2019-02-22 清华大学 A kind of electric power management circuit of double-interface IC card
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

Citations (4)

* Cited by examiner, † Cited by third party
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 비씨카드(주) Method for management of approval information and mobile communication thereof
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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 비씨카드(주) Method for management of approval information and mobile communication thereof
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

Also Published As

Publication number Publication date
CN104346722A (en) 2015-02-11

Similar Documents

Publication Publication Date Title
CN104346722B (en) A kind of Mobile payment terminal and its method of work for supporting bluetooth communication
JP2810774B2 (en) Data transmission method for portable terminal device, and portable terminal device
CN207068140U (en) A kind of barcode scanning charging equipment
CN110166994A (en) A kind of data time sharing transmissions mutually use method, system, mobile terminal and storage medium
CN204808478U (en) Realize intelligent water gauge controlling means of self -service service
CN110166328B (en) Testing device of demand response equipment
CN105119339A (en) Intelligent product-based power supply system and power supply method thereof
CN205453200U (en) Electric automobile fills electric pile and electric automobile controlling means that charges with acoustic control function
CN104427523A (en) Network connection method and device
CN206472269U (en) Bluetooth earphone
CN104317761B (en) Multi-interface mobile security equipment with power management and operation method of multi-interface mobile security equipment
CN207766012U (en) The direct-current charging post of electric vehicle
CN204304476U (en) A kind of multi-functional data portable power source
CN109728976A (en) A kind of SCD file Quadratic Imaginary circuit correctness automatic check method and tool
CN106972598A (en) The detection method and device of short circuit
CN203414587U (en) Portable equipment used for detecting infrared interface of intelligent electric energy meter
JP2009272047A (en) Charging device, electronic device, secondary battery pack, secondary battery pack security management system, and secondary battery pack security management method
CN206100083U (en) Mobile terminal
CN203039727U (en) Cloud terminal with multiple power supply modes and cloud computing system
CN207233105U (en) A kind of pre- fare payment system of electric power
CN207052023U (en) Shared supply unit
CN207264425U (en) A kind of bluetooth card apparatus
CN113448791A (en) Interface detection method and device
CN206442155U (en) A kind of electric automobile direct current quick charger
CN205354214U (en) Support payment terminal of mobile network access

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