CN103279723B - A kind of card reader and its communication means - Google Patents

A kind of card reader and its communication means Download PDF

Info

Publication number
CN103279723B
CN103279723B CN201310143023.3A CN201310143023A CN103279723B CN 103279723 B CN103279723 B CN 103279723B CN 201310143023 A CN201310143023 A CN 201310143023A CN 103279723 B CN103279723 B CN 103279723B
Authority
CN
China
Prior art keywords
communication module
communication
data
module
memory
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
CN201310143023.3A
Other languages
Chinese (zh)
Other versions
CN103279723A (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.)
XINCHUANHUI ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
XINCHUANHUI ELECTRONIC TECHNOLOGY 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 XINCHUANHUI ELECTRONIC TECHNOLOGY Co Ltd filed Critical XINCHUANHUI ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201310143023.3A priority Critical patent/CN103279723B/en
Publication of CN103279723A publication Critical patent/CN103279723A/en
Application granted granted Critical
Publication of CN103279723B publication Critical patent/CN103279723B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention belongs to sensor network technology field, a kind of card reader is particularly disclosed, including:First communication module and connected second communication module;The first communication module, for entering row data communication with upper layer device, and receives bottom layer node information using the first wireless channel;The second communication module, for continuing to send broadcast message to bottom layer node using second wireless channel.And the communication mode of the card reader.By the card reader, it is ensured that the timely transmission on upper strata and information, and the information of underlying device transmission is avoided to a certain extent will not lose.

Description

A kind of card reader and its communication means
Technical field
The application is related to radio network technique field, card reader and communication in more particularly to a kind of wireless sensor network Method.
Background technology
Wireless sensor network, the data acquisition of bottom is widely used in due to the characteristic of low power consumption and low cost.Generally The bottom-up information node of wireless sensor network is powered frequently with battery, for control node power consumption, is often closed using idle Wireless data transceiving, with the low-power consumption long-play of guarantee information node.Which results in each information node cannot real-time Communication for Power, Also limit the information transmit-receive mode of information node.The presence of this distributed way of wireless sensor network, simultaneously because respectively The time of individual node is unable to precise synchronization, leads to not accurate decision node and wakes up, so that the reliability of communication cannot Ensure.
In order to solve the above problems, generally using the data after collection, sending method periodically sends from bottom to up at present, this The mode of kind avoids the wake-up work of dormancy node, realizes effectively collection transmission.But it has substantially in actual use Shortcoming, i.e., it upper layer device cannot be realized to the transmission of the effective information of bottom dormancy node.Once upper strata needs to do bottom Operation, transmission data when, because upper layer device cannot know when when dormancy wakes up underlying device, this communication mode just without Method is performed or extremely unreliable.Especially when emergency is met, it is impossible to ensure timely communication of the upper layer device to underlying device, Great property and personal casualty loss will be caused.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of card reader, it is ensured that with upper layer device and to underlying device and Shi Tongxin.
In order to solve the above-mentioned technical problem, the present invention proposes a kind of card reader, and it includes:First communication module and phase Second communication module even;
The first communication module, for entering row data communication with upper layer device, and is received using the first wireless channel Bottom layer node information;
The second communication module, for continuing to send broadcast message to bottom layer node using second wireless channel.
Wherein, the first communication module and the second communication module include the first toggle switch, the second dial-up respectively Switch;
First toggle switch, the device number for indicating the first communication module;
Second toggle switch, for demarcating the second communication module region.
It is preferred that the first communication module and the second communication module are respectively comprising first memory, the second storage Device;
The first memory, for storing the data processed needed for the first communication module;
The second memory, for storing the broadcast data for sending.
It is preferred that the first communication module contains real-time clock, the specific time for identifying the information that receives.
It is preferred that also include the data processing module that is connected with the first communication module, and with the data processing mould The connected display module of block;
The data processing module, for processing the data that the first communication module is received, bottom is set Standby message loop is sent to the display module;
The display module, for circulating display underlying device information.
Present invention also offers a kind of communication means of card reader, comprise the following steps:
Step A, first communication module receives the data message of upper layer device, and intercepts bottom using first communication channel The data message of equipment, the data message that will be received is stored in first memory;Process described by the way of poll Data in first memory;
Step B, second communication module continues to send broadcast message to underlying device using the second communication channel;
Wherein first communication channel and the second communication channel are communication, and the two channel is different.
Wherein, the step A is specifically included:
The first communication module processes the upper layer device data letter for receiving respectively by the way of recursive call treatment Breath and underlying device data message, until the data message of first memory module and the second memory module has all been processed Finish;
Meanwhile, the data message of upper layer device is intercepted using wired connection mode, and bottom is intercepted using first communication channel The data message of layer equipment;
When receiving any data information, then current treatment operation is temporarily interrupted, by the data information memory first After memory, the treatment operation before return.
It is preferred that when the first communication module processes the data message of the upper layer device, comprising the following steps:
The first communication module reads the toggle switch of itself, and destination host is determined whether according to toggle switch value;
It is then to receive the data message, after the completion of receiving and processing, is completed to the upper layer device feedback reception;
It is no, then abandon the data message.
It is preferred that when the second communication module sends broadcast message to the underlying device, second group according to itself Code switch, region is identified in the broadcast message for sending, and region is recognized for the underlying device.
If it is preferred that the first communication module receive be the upper layer device control underlying device broadcast letter Breath, then be switched to the first communication channel and the second communication channel identical radio communication by the first communication module Channel, the broadcast message is sent to the second communication module, after sending successfully, is immediately switched to the first communication channel Original wireless communication channel.
It is preferred that the step A also includes, the data letter of the underlying device that the first communication module will be received Breath is sent to the upper layer device;
And/or the data message in the first memory is called by the data processing module, by after processing locality, Data output is carried out by display module.
It is preferred that the step A also includes, the first communication module is received according to internal real-time clock, mark The underlying device data message, carry out selective reception according to Preset Time rule.
The present invention provide card reader and communication means, make full use of the binary channels of card reader to set, with upper layer device and Underlying device communicates, and communication channel does not interfere with each other, and improves the accuracy rate of communication.And underlying device can be ensured extreme Wakeup time in can carry out data exchange with card reader, it is to avoid the transmission stability of underlying device information.
Brief description of the drawings
Fig. 1 is the card reader and external connection schematic diagram of the embodiment of the present invention;
Fig. 2 is the card reader structure schematic diagram of another embodiment of the present invention;
Fig. 3 is the flow chart of embodiment of the present invention second communication module;
Fig. 4 is the flow chart of embodiment of the present invention first communication module.
Specific embodiment
It is below in conjunction with the accompanying drawings and specific real to enable above-mentioned purpose, the feature and advantage of the application more obvious understandable Mode is applied to be described in further detail the application.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be with The difference of other embodiment, between each embodiment identical similar part mutually referring to.For device embodiment For, because it is substantially similar to embodiment of the method, so description is fairly simple, referring to the portion of embodiment of the method in place of correlation Defend oneself bright.
Reference picture 1, Fig. 2 and Fig. 3, a kind of communication means of card reader, comprise the following steps:
Step A, first communication module receives the data message of upper layer device, and intercepts bottom using first communication channel The data message of equipment, the data message that will be received is stored in first memory;Process described by the way of poll Data in first memory.
Specifically, the first communication module uses wired connection mode, for example with RS485 wired communication protocols, detects The data message of upper layer device is listened, and intercepts the data message of underlying device using first communication channel simultaneously, below by first Communication channel is represented with CH1.
Wherein, the first communication module processes the upper layer device number for receiving respectively by the way of recursive call treatment It is believed that breath and underlying device data message, until the data message in first memory module is all disposed.It is preferred that Different data areas can be distinguished in the first memory according to specifically used rule, for example, can be divided into upper layer device Buffer queue region, and underlying device buffer queue region, and set up respectively accordingly according to various data categories Storage region etc..Subregion for memory belongs to prior art, will not be repeated here.
In data processing, if receive any data information, current treatment operation is temporarily interrupted, by this After first memory, the treatment before return is operated data information memory.
When carrying out upper layer device processing data information such as recursive call to wired connection mode, system can be deposited to described first The buffer queue of the wire communication in storage module is detected, if there is data, then by its dissection process, until knot Beam.
When intercepting operation such as recursive call to first communication channel, system can be to channel sense in first memory module Buffer queue detected, if there is data, then by its dissection process, and is added into the first storage according to classification In device.
If current first communication module processes the upper layer device data message by the way of recursive call, Listen to underlying device and have sent a data information, then place of the now first communication module pause to first volume device data information Reason, first receives the data message of the underlying device, and is temporarily stored into the first memory module, then recovers originally to set upper strata again The processing procedure of standby data message, the situation of missing data information is avoided so as to reach.When in Treated Base number of devices it is believed that When breath, similarly, current operation can be also interrupted, first carry out the reception work of upper layer device, will not be repeated here.
Wherein, when the data message of the first communication module treatment upper layer device, comprise the following steps:
The first communication module reads the toggle switch of itself, for example, the toggle switch of itself is four, is shown as 0001, then it represents that this card reader is the card reader marked as 1, if the data that upper layer device sends are to the Card Reader marked as 3 The data that device sends, the then data that first communication module sends the upper layer device are abandoned, if if the number of upper layer device transmission It is anti-to the upper layer device after finishing receiving according to being to the data of the card reader transmission marked as 1, then to receive the data message Feedback is finished receiving.By the setting of toggle switch in the first communication module, upper layer device hair data by mistake can be avoided, reached Card reader can be to the accurate treatment of upper layer data.
Additionally, when the second communication module sends broadcast message to the underlying device, the second dial-up according to itself Switch, identifies the region of this card reader in the broadcast message for sending, and card reader is recognized for the underlying device Region, prevent underlying device in a short time, repeat to send identical information, it is to avoid a large amount of identical letters of card reader treatment Breath, improves the treatment effeciency of card reader.
Step B, second communication module persistently thinks that underlying device sends broadcast message using the second communication channel, below by the Two communication channels are represented with CH2.Second communication module is continual to send broadcast message to underlying device, when underlying device is called out When waking up, the broadcast message of card reader can be received with the very first time, and then the data message of underlying device is sent to institute in time State first communication module, it is to avoid when underlying device wakes up, it is impossible to which data are uploaded to the problem of card reader in time.
Another embodiment, the broadcast letter of underlying device need to be updated when the first communication module of card reader receives upper layer device During breath, its wireless channel CH1 can be immediately switched to the first communication module CH2 wireless communications of the second communication module Road, the broadcast message of the renewal is sent to the second communication module, and the second communication module has correctly received the wide of renewal After broadcasting information, store into second memory, continue to send the broadcast message of the renewal to the underlying device, and described first Communication module then switches back immediately to wireless channel CH1 originally.Communicated above by first communication module in card reader and second The communication mode of module, it is ensured that the timely transmission of information, and avoid to a certain extent underlying device transmission information not Can lose.
Another embodiment, reference picture 2, the step A also includes, the bottom that the first communication module will be received The data message of equipment is sent to the upper layer device;
And/or the data message in the first memory is called by the data processing module, by after processing locality, Data output is carried out by display module.
Additionally, the step A also includes, the first communication module identifies what is received according to internal real-time clock The data message of the underlying device, carries out data message and selectively receives according to Preset Time rule.For example, card reader first Secondary when receiving underlying device information, the real-time clock identified time according to first communication module is 17:00:00, the information is filled out It is charged in the bottom data information for receiving, and the information is preserved to first memory.
If receive underlying device information for the second time, the real-time clock identified time according to first communication module is 17:00: 30.If card reader is no longer preserved according to the information received in Preset Time rule regulation same minute, the first communication mould Block can be information in same minute due to the information, and data message is abandoned, and no longer preserve to the described first storage Device.
If third time receives underlying device information, the time is 17:01:30, meet depositing for card reader Preset Time rule Storage setting, then by this information Store.
Set by this, card reader can be avoided to receive too many identical underlying device information, saved storage empty Between.
Referring to Figures 1 and 2, a kind of card reader, including:First communication module and connected second communication module;
The first communication module, for entering row data communication with upper layer device, and is received using the first wireless channel Bottom layer node information;
The second communication module, for continuing to send broadcast message to bottom layer node using second wireless channel.
Wherein, the first communication module and the second communication module include the first toggle switch, the second dial-up respectively Switch;
First toggle switch, the device number for indicating the first communication module;
Second toggle switch, for demarcating the second communication module region.
Wherein, the first communication module and the second communication module include first memory, second memory respectively;
The first memory, for storing the data processed needed for the first communication module;
The second memory, for storing the broadcast data for sending.
It is preferred that the first communication module contains real-time clock, the specific time for identifying the information that receives.
It is preferred that also include the data processing module that is connected with the first communication module, and with the data processing mould The connected display module of block;
The data processing module, for processing the data that the first communication module is received, transmission processe Data afterwards are to the display module;
The display module, for showing specific data message.
A kind of data fusion method provided herein and device are described in detail above, it is used herein Specific case is set forth to the principle and implementation method of the application, and the explanation of above example is only intended to help and understands this The method and its core concept of application;Simultaneously for those of ordinary skill in the art, according to the thought of the application, specific Be will change in implementation method and range of application, in sum, this specification content should not be construed as to the application's Limitation.

Claims (2)

1. a kind of communication means of card reader,
Including a kind of card reader, the card reader includes:First communication module and connected second communication module;
The first communication module, for entering row data communication with upper layer device, and receives bottom using the first wireless channel Nodal information;
The second communication module, for continuing to send broadcast message to bottom layer node using second wireless channel;
The first communication module and the second communication module include the first toggle switch, the second toggle switch respectively;
First toggle switch, the device number for indicating the first communication module;
Second toggle switch, for demarcating the second communication module region;
The first communication module and the second communication module include first memory, second memory respectively;
The first memory, for storing the data processed needed for the first communication module;
The second memory, for storing the broadcast data for sending;
The first communication module contains real-time clock, the specific time for identifying the information that receives;
Also include the data processing module being connected with the first communication module, and the display being connected with the data processing module Module;
The data processing module, for processing the data that the first communication module is received, underlying device is believed Breath is cycled through to the display module;
The display module, for circulating display underlying device information;
It is characterized in that comprising the following steps:
Step A, first communication module receives the data message of upper layer device, and intercepts underlying device using first communication channel Data message, the data message that will be received is stored in first memory;Described first is processed by the way of poll Data in memory;
Step B, second communication module continues to send broadcast message to underlying device using the second communication channel;
Wherein first communication channel and the second communication channel are communication, and the two channel is different;
The step A is specifically included:
The first communication module processed respectively by the way of recursive call treatment the upper layer device data message that receives and Underlying device data message, until the data message of first memory module and the second memory module is all disposed;
Meanwhile, the data message of upper layer device is intercepted using wired connection mode, and bottom is intercepted using first communication channel setting Standby data message;
When receiving any data information, then current treatment operation is temporarily interrupted, by the data information memory in the first storage After device, the treatment operation before return;
When the first communication module processes the data message of the upper layer device, comprise the following steps:
The first communication module reads the toggle switch of itself, and destination host is determined whether according to toggle switch value;
It is then to receive the data message, after the completion of receiving and processing, is completed to the upper layer device feedback reception;
It is no, then abandon the data message;
When the second communication module sends broadcast message to the underlying device, the second toggle switch according to itself, in hair Region is identified in the broadcast message sent, region is recognized for the underlying device;
If the broadcast message that underlying device is controlled for the upper layer device that the first communication module is received, described first Communication module by the first communication channel be switched to the second communication channel identical radio communication channel, to described Two communication modules send the broadcast message, after sending successfully, the first communication channel are switched into original wireless communication immediately Channel;
The step A also includes that the data message of the underlying device that the first communication module will be received is sent to institute State upper layer device;
And/or the data message in the first memory is called by the data processing module, by after processing locality, passing through Display module carries out data output.
2. communication means according to claim 1, it is characterised in that the step A also includes, the first communication module The data message of the underlying device received according to internal real-time clock, mark, is selected according to Preset Time rule Selecting property is received.
CN201310143023.3A 2013-04-22 2013-04-22 A kind of card reader and its communication means Active CN103279723B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310143023.3A CN103279723B (en) 2013-04-22 2013-04-22 A kind of card reader and its communication means

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310143023.3A CN103279723B (en) 2013-04-22 2013-04-22 A kind of card reader and its communication means

Publications (2)

Publication Number Publication Date
CN103279723A CN103279723A (en) 2013-09-04
CN103279723B true CN103279723B (en) 2017-07-11

Family

ID=49062238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310143023.3A Active CN103279723B (en) 2013-04-22 2013-04-22 A kind of card reader and its communication means

Country Status (1)

Country Link
CN (1) CN103279723B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101146129A (en) * 2007-10-31 2008-03-19 北京航空航天大学 Sensor network and communication method for realizing node software based on middleware
CN101227367A (en) * 2008-02-19 2008-07-23 东南大学 Method for competing access period multilevel collocation of distributed wireless sensor network
CN101083586B (en) * 2006-05-31 2012-05-30 Sap股份公司 Modular monitor service for smart item monitoring

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9420441B2 (en) * 2010-07-07 2016-08-16 Futurewei Technologies, Inc. System and method for content and application acceleration in a wireless communications system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101083586B (en) * 2006-05-31 2012-05-30 Sap股份公司 Modular monitor service for smart item monitoring
CN101146129A (en) * 2007-10-31 2008-03-19 北京航空航天大学 Sensor network and communication method for realizing node software based on middleware
CN101227367A (en) * 2008-02-19 2008-07-23 东南大学 Method for competing access period multilevel collocation of distributed wireless sensor network

Also Published As

Publication number Publication date
CN103279723A (en) 2013-09-04

Similar Documents

Publication Publication Date Title
CN107852609A (en) System and method for connectivity management
KR101102349B1 (en) Method and Apparatus for Controlling Sleep Mode in Wireless Communication Networks
CN105120516B (en) A kind of location information acquisition frame under the environment based on intelligent perception
CN103249122B (en) Method, radio communication device and computer-readable recording medium
WO2013171577A1 (en) Method of configuring discontinuous reception mode parameters
CN106413061B (en) Narrow-band Internet of things communication system based on honeycomb
CN110235487A (en) Power for wireless device is saved
CN104035543A (en) Power saving management method and device for intelligent terminal
US9462549B2 (en) Systems and methods for optimizing power consumption associated with processing group addressed messages
US20120229261A1 (en) Apparatus for low power wireless communication
CN106686528B (en) Data transmission method and system, master device and slave device
CN110191449A (en) Switching method, device, storage medium, processor and the system of communication mode
CN105611505A (en) Message pushing method, message pushing device and terminal
CN108055696B (en) Method of controlling operation of a communication device, transceiver and computer readable medium for corresponding operation
CN108983942A (en) A kind of method and device of dynamic frequency
CN103634885B (en) A kind of identification card and operation method thereof
CN107613548B (en) Low-power-consumption realization method of wireless chip in AP mode and corresponding wireless chip
CN103279723B (en) A kind of card reader and its communication means
CN202190412U (en) Energy consumption control device and mobile terminal equipment comprising same
CN109429307A (en) Internet-of-things terminal and its moving method of state, system
CN102378346B (en) Method, device and system for controlling dormant state
CN110177343A (en) Processing method, device, storage medium, processor and the system of broadcast frame
CN108305024A (en) A kind of logistic track method, logistics business platform and terminal
CN205920513U (en) Communication attendance device that can remotely awaken up
CN107306440B (en) Internet of things data transmission method and Internet of things terminal

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