Summary of the invention
It is an object of the invention to provide a kind of terminal digital information transmission method based on proximity transducer and dressPut, solve in prior art because of the problem being unfavorable for product miniaturization containing complicated transmission circuit.
According to an aspect of the invention, it is provided a kind of terminal digital information transmission side based on proximity transducerMethod, comprises the following steps:
As sending the mobile phone of terminal and utilizing the foundation of respective proximity transducer logical as the mobile phone receiving terminalLetter link;
After setting up described communication link, described transmission terminal is by being switched on and off by Binary Zero and 1 informationIts proximity transducer, produces corresponding to Binary Zero and the discontinuous signal of 1 information;
Described reception terminal receives described discontinuous signal with its proximity transducer, thus obtains sending the two of terminal and enterSystem 0 and 1 information.
Preferably, described described transmission terminal is by being switched on and off it close to passing by Binary Zero and 1 informationSensor, produces the discontinuous signal corresponding to Binary Zero and 1 information and includes:
Described transmission terminal, by closing its proximity transducer by Binary Zero information, produces corresponding to Binary ZeroFirst discontinuous signal of information;
Described transmission terminal, by connecting its proximity transducer by binary one information, produces corresponding to binary oneSecond discontinuous signal of information.
Preferably, described described reception terminal receives described discontinuous signal with its proximity transducer, thus obtainsThe Binary Zero and 1 information that send terminal include:
When described reception terminal receives described second discontinuous signal with its proximity transducer, receive described transmissionThe Binary Zero of terminal transmission and the packet of 1 information.
Preferably, also include:
Raw information waiting for transmission is converted into Binary Zero and the packet of 1 information by described transmission terminal, and willIt is saved in the buffer area of described transmission terminal.
Preferably, also include:
Described reception terminal receives Binary Zero and the multiple packets of 1 information that described transmission terminal sendsAfter, the Binary Zero included in multiple packets that will be received and 1 information reverting are raw information, and willIt is saved in the buffer area of described reception terminal.
Preferably, send terminal to described reception terminal described in and send Binary Zero and multiple packets of 1 informationIn be respectively equipped with check information, in order to utilize described check information distinguish described packet.
According to a further aspect in the invention, it is provided that a kind of terminal digital information transmission based on proximity transducer fillsPut, including:
Set up communication link module, for as sending the mobile phone of terminal and utilizing each as the mobile phone receiving terminalFrom proximity transducer set up communication link;
Producing discontinuous signal module, for after setting up described communication link, described transmission terminal is by entering with twoSystem 0 and 1 information is switched on and off its proximity transducer, produces the interrupted letter corresponding to Binary Zero and 1 informationNumber;
Receiver module, receives described discontinuous signal for described reception terminal with its proximity transducer, thus obtainsSend Binary Zero and 1 information of terminal.
Preferably, described generation discontinuous signal module includes:
First discontinuous signal unit, for described transmission terminal by closing it close to sensing by Binary Zero informationDevice, produces the first discontinuous signal corresponding to Binary Zero information;
Second discontinuous signal unit, for described transmission terminal by connecting it close to sensing by binary one informationDevice, produces the second discontinuous signal corresponding to binary one information.
Preferably, described receiver module includes:
Receive unit, for receiving described second discontinuous signal when described reception terminal with its proximity transducerTime, receive Binary Zero and the packet of 1 information that described transmission terminal sends.
Preferably, also include:
Storage unit, is converted into Binary Zero and 1 information for described transmission terminal by raw information waiting for transmissionPacket, and be saved into the buffer area of described transmission terminal.
Compared with prior art, the beneficial effects of the present invention is:
The present invention is by realizing basic half-duplex operation close to optical sensor;By contrast, range phase therewithNear NFC technique needs the coil antenna that complicated external circuit, special transceiving chip and area is the biggest, carriesHigh product cost and design complexities, be unfavorable for the miniaturization of end product;And the biography of the medium and long distances such as bluetoothTransmission protocol equipment constitutes complexity, relates to standard patent more, is unfavorable for product cost declining;Infrared transceiver module needsWant special modular circuit;And the present invention realizes circuit simply, can be as closely point-to-point communication modeA kind of the most supplementary.
Detailed description of the invention
Below in conjunction with accompanying drawing to a preferred embodiment of the present invention will be described in detail, it will be appreciated that described belowPreferred embodiment be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Fig. 1 shows a kind of based on proximity transducer the terminal digital information transmission that the embodiment of the present invention providesMethod flow diagram, as it is shown in figure 1, comprise the following steps:
Step S101: as sending the mobile phone of terminal and utilizing as the mobile phone receiving terminal respective close to passingSensor sets up communication link;
Step S102: after setting up described communication link, described transmission terminal is by believing with Binary Zero and 1Breath is switched on and off its proximity transducer, produces corresponding to Binary Zero and the discontinuous signal of 1 information;
Step S103: described reception terminal receives described discontinuous signal with its proximity transducer, thus is sent outMake arrangements for his funeral end Binary Zero and 1 information.
Wherein, described described transmission terminal is by being switched on and off it close to passing by Binary Zero and 1 informationSensor, produces the discontinuous signal corresponding to Binary Zero and 1 information and includes: described transmission terminal is by entering with two0 information of making closes its proximity transducer, produces the first discontinuous signal corresponding to Binary Zero information;DescribedMake arrangements for his funeral and hold by connecting its proximity transducer by binary one information, produce corresponding to the second of binary one informationDiscontinuous signal.Described described reception terminal receives described discontinuous signal with its proximity transducer, thus is sent outMake arrangements for his funeral the Binary Zero of end and 1 information includes: when its proximity transducer of described reception terminal receives described theDuring two discontinuous signals, receive Binary Zero and the packet of 1 information that described transmission terminal sends.
Present invention additionally comprises: raw information waiting for transmission is converted into Binary Zero and 1 letter by described transmission terminalThe packet of breath, and it is saved into the buffer area of described transmission terminal.
Present invention additionally comprises: described reception terminal receives Binary Zero and 1 letter that described transmission terminal sendsAfter multiple packets of breath, the Binary Zero included in multiple packets that will be received and 1 information reverting areRaw information, and it is saved into the buffer area of described reception terminal.
Wherein, send terminal to described reception terminal described in and send Binary Zero and multiple packets of 1 informationIn be respectively equipped with check information, in order to utilize described check information distinguish described packet.
Fig. 2 shows a kind of based on proximity transducer the terminal digital information transmission that the embodiment of the present invention providesDevice schematic diagram, as in figure 2 it is shown, include: set up communication link module 201, produce discontinuous signal module 202And receiver module 203.Described set up communication link module 201, for as the mobile phone of transmission terminal and workRespective proximity transducer is utilized to set up communication link for receiving the mobile phone of terminal;Described generation discontinuous signal module202, for after setting up described communication link, described transmission terminal is by connecting by Binary Zero and 1 informationWith its proximity transducer of closedown, produce corresponding to Binary Zero and the discontinuous signal of 1 information;Described receiver module203, receive described discontinuous signal for described reception terminal with its proximity transducer, thus obtain sending terminalBinary Zero and 1 information.
Specifically, described generation discontinuous signal module 202 includes: the first discontinuous signal unit, is used forDescribed transmission terminal, by closing its proximity transducer by Binary Zero information, produces corresponding to Binary Zero informationThe first discontinuous signal;Second discontinuous signal unit, for described transmission terminal by connecing by binary one informationIts proximity transducer logical, produces the second discontinuous signal corresponding to binary one information.Described receiver module203 include: receive unit, for receiving described second interrupted with its proximity transducer when described reception terminalDuring signal, receive Binary Zero and the packet of 1 information that described transmission terminal sends.
Present invention additionally comprises: storage unit, for described transmission terminal, raw information waiting for transmission is converted intoBinary Zero and the packet of 1 information, and it is saved into the buffer area of described transmission terminal.
Fig. 3 shows that the close of two mobile terminals that the embodiment of the present invention provides passes device signal processing schematic diagram,As it is shown on figure 3, include mobile phone A and mobile phone B.
1, first information to be transmitted is converted into binary data, the most only 0 and 1 sequence represented, willData are put in the middle of caching standby, then pass through AP chip controls infrared emission LED close to optical sensor, withThese 0,1 sequences open and close infrared emission LED.AP chip controls LED closes expression information 0, with LEDOpen expression information 1.In this way can obtain in data communication use emitter, infrared light have andWithout representing information 1 and 0, if there being one just can read transmitting terminal with the reception device of sensing light changeChange.
2, also have an infrared light detection part owing to proximity transducer is internal, it can with perception receive redThe strong and weak change of outer light, all can outwards produce one when the infrared ray received exceedes or is less than a certain thresholdingInterrupt signal, informs that the optical signal of mobile phone A P chip exterior has occurred and that change, AP chip are now read close to lightData in sensor, if reading is expressed as 1 more than high light intensity threshold value, represent 0 less than light intensity thresholding, are situated betweenError code is represented between two thresholdings.The threshold value of general high light intensity is more than low light intensity threshold value.
3, for realizing data transmission, it is desirable to have opening close to optical sensor of two mobile phones simultaneously.Two mobile phonesBetween data interaction only open the infrared emission close to optical sensor with semiduplex communication pattern, i.e. A mobile phoneLED, represents transmission 1 and 0 information by the either on or off of LED, and the infrared inspection close to optical sensor only opened by B mobile phoneSurvey module, by coordinating the information sequence receiving 1 and 0 with mobile phone A P chip, be stored in corresponding slow after receiving informationDeposit central pending, be then converted to other message form by AP chip.So complete an essential informationSending and receive, its signal flow diagram is as shown in Figure 1.
4, in order to strengthen the quality of communication, the information of transmitting can use specific coding tools to pack it,Make it comprise check information, after receiving terminal receives an information bag, the information received can be verified, asFruit occurs that error code then abandons the information received;Need to carry out in place of setting up communication linkage certain shake hands mutual,I.e. A mobile phone sends the sequence of request communication, within a specified time receives the reply sequence allowing communication that B mobile phone sendsAfter row, continue to send next packet;If without replying, retransmitted etc. after the time to be specified, if retransmitting the most stillCommunication is then interrupted without replying.
Fig. 4 shows the flow process that the data between two mobile terminals that the embodiment of the present invention provides send and receiveFigure, as shown in Figure 4, comprises the following steps:
The first step: in data issuing side (mobile phone A) by data conversion module by initial data piecemeal, packing,It is converted into the data sequence fitting through proximity transducer transmission, is stored in data in mobile phone caching, waits APController is taken, subsequently into next step.
Second step: AP controller (mobile phone A end) controls to pass through close to optical sensor according to the sequence of 0 and 1Infrared LED sends the default packet established the link, and then waits that mobile phone B gives a response, now B mobile phoneOpen close to optical sensor receiving path.If mobile phone do not received by (such as 1ms) A mobile phone at the appointed timeThe response bag agreeing to link that B beams back, mobile phone A can send request again, if (example in regulation request number of timesSuch as 10 times) B mobile phone the most do not responds, then A mobile phone interrupt requests, and return, to user, the letter that request is failedBreath.If receiving B mobile phone method to send the packet agreeing to link, and being received by A mobile phone, mobile phone A then startsNext step sends the data needing transmission.
3rd step: after A, B mobile phone establishes the link, A mobile phone starts to send first packet to B mobile phone,Then A mobile phone waits the reception normal response bag that B mobile phone sends.If at the appointed time (such as 1ms)A mobile phone does not receive the correct response of B mobile phone, and A mobile phone can resend at a certain time interval and just now send outThe packet sent;If it exceeds stipulated number (such as 10 times), A mobile phone is returned to telex network failureInformation;If B mobile phone sends response bag within stipulated time and stipulated number and is received by A mobile phone, AMobile phone begins to be ready for sending second packet, and each packet has the packet header of sequence information, is used for distinguishingThe order of the most several packets.By that analogy, until all data are sent, after send to B mobile phoneEnd packet, is used for terminating transmission.And the information of end of transmission is reported to A mobile phone.
4th step: B mobile phone sends same after the request bag that the request receiving A mobile phone for the first time establishes the link immediatelyThe response bag of meaning link;If receive is packet, first carry out CRC check, if data correctly, are depositedIn mobile phone inner buffer, and send the normal response bag of reception to mobile phone A;If the data received are the most justTrue then abandon this data;If it is identical with the packet sequence number in caching to receive next packet, then abandon thisBag.Data processing module is transmitted directly to for the packet mobile phone B in caching and resolves to initial data for mobile phoneUse.If receiving the ending message that mobile phone A sends, then report the information received to B mobile phone, finallyThe data parsing received, it is reduced into the initial data of transmission.
The present invention is the digital information transmission utilizing proximity transducer to realize between two mobile phones, has following the most excellentPoint:
1, it has widened the range of application of proximity transducer, is simultaneously achieved a kind of new data in mobile phone transmission sideFormula, has provided the user more enriching experiences.
2, use close to optical sensor as data communication owing to operating distance is short, do not have electromagnetic radiation, communicationDisguised high, power is low radiationless to human body, can and wireless data transmission mode wired as other effectiveSupplement.
3, without complicated external circuit, design is easy easily to be realized, beneficially end product cost declining.
Although above the present invention being described in detail, but the invention is not restricted to this, the art technologyPersonnel can carry out various amendment according to the principle of the present invention.Therefore, all amendments made according to the principle of the invention,All should be understood to fall into protection scope of the present invention.