A kind of input equipment based on WIFI Direct
The present invention relates to a kind of input equipment based on WIFI Direct.
Current Android input equipment (mouse, keyboard) dull and stereotyped, mobile phone all utilizes bluetooth to transmit, and part notebook computer is also to use bluetooth.The advantage of bluetooth is that low in energy consumption, speed also can meet this demand point.But it is shorter that the problem of bluetooth equipment maximum connects distance exactly, and in a lot of applications, Android flat board, mobile phone and notebook computer may, only with WIFI module, but without bluetooth module, just cannot use bluetooth input to transmit.Although there is now radio keyboard mouse, great majority still transmit by USB, can take the USB interface of notebook for notebook computer, and, mobile phone dull and stereotyped for the Android that there is no USB interface, cannot use especially.
Summary of the invention
The technical problem to be solved in the present invention, is to provide a kind of input equipment based on WIFI Direct, solves the problem that cannot input when there is no bluetooth module and there is no USB interface.
The present invention is achieved in that
An input equipment based on WIFI Direct, comprises that a WIFI module, information acquisition module and connection arrange module;
A described WIFI module is used for and input request devices communicating;
Described information acquisition module is for gathering user's input message and sending to input request equipment by a WIFI module;
Described connection arranges module and is set to p2p pattern and when input request device request connects, connects input request equipment for a WIFI module.
Further, described input equipment is for installing the input equipment of Android system.
Further, described user's input message is click keys information or position mobile message.
And the present invention also provides a kind of input request equipment based on WIFI Direct, it is characterized in that: comprise that the 2nd WIFI module, connection request module and input message receive respond module;
The 2nd described WIFI module is for communicating with the input equipment based on WIFI Direct;
Described connection request module is used for scanning WIFI Direct equipment demonstration around after user's connection request being detected, and for the WIFI Direct equipment that connects this user's selection after user selects WIFI Direct equipment being detected;
Input message receives respond module for when receiving the input message of input equipment, response input message.
Further, described input request equipment is Android system equipment.
Tool of the present invention has the following advantages: realized the demand without the man-machine interaction under bluetooth occasion, do not taken USB interface simultaneously.Meanwhile, output device of the present invention also has advantages of long transmission distance.
Accompanying drawing explanation
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is input equipment based on WIFI Direct of the present invention and the structural representation of input request equipment.
Refer to shown in Fig. 1, below the present invention is described in detail.
As shown in Figure 1, a kind of input equipment 1 based on WIFI Direct, comprises a WIFI module 10, information acquisition module 11 and connects module 12 is set.Input equipment 1 is for being connected with input request equipment 2.Input equipment 1 is preferably the input equipment that Android system is installed, and in use Android system, has the simple advantage of exploitation.Input request equipment 2 comprises that the 2nd WIFI module 20, connection request module 21 and input message receive respond module 22.Input request equipment 2 can be Android system equipment or Windows system equipment.
When using the present invention to input, first should open the power supply of input equipment 1.Input equipment 1, from mobility, uses battery to power to input equipment 1.For saves energy consumption, extend the service time of input equipment 1, input equipment 1 includes power switch and power management module, the time that power management module does not collect user's input information at information acquisition module 11, while being greater than Preset Time, closing input equipment 1 or input equipment 1 is entered to standby electricity-saving mode.When input equipment 1 powers on, connection arranges module 12 a WIFI module 10 is set to p2p pattern.P2p pattern is that main equipment pattern during WIFI Direct connects is for waiting for the connection of other equipment.
Then the connection request module 21 of input request equipment 2 scans WIFI Direct equipment around and shows after user's connection request being detected, and connection request module 21 scannings WIFI Direct equipment is around operated in the WIFI module under p2p pattern near being specially and using the 2nd WIFI module 20 scannings.After showing, user can select the implementor name of input equipment 1, and connection request module 21 is detecting the WIFI Direct equipment that connects this user's selection after user selects WIFI Direct equipment.
Particularly, connection request module 21 connects and module 12 is set can detects when being connected with input equipment 1, then connect and module 12 is set automatically confirms and being connected of input request equipment 2, thereby set up the connection of the WIFI Direct of input equipment 1 and input request equipment 2.
Connect after foundation, if user has, carry out input action on input equipment 1, input action comprises that button is clicked input and input (moving as mouse moves with roller) is moved in position, and user's input message is click keys information or position mobile message.Information acquisition module 11 can gather user's input message and send to input request equipment 2 by a WIFI module 10.The input message of input request equipment 2 receives the input message that respond module 22 can receive input equipment 1, then responds input message (realize key-press input and move position).The transmitting procedure of input message is transmitted after input message can being packaged into tcp data bag again.The input of clicking for button is preferably used ascii table to carry out coding and decoding to keying input information.
When input request equipment 2 is Android system equipment, input request equipment 2 is when receiving position mobile message, position mobile message is recalculated into the some position of the mouse point of screen, and on screen, draws corresponding mouse point according to a position, thereby complete the response to position mobile message.
To sum up, the present invention can realize without bluetooth with without the input of the much information in USB situation.
Although more than described the specific embodiment of the present invention; but being familiar with those skilled in the art is to be understood that; our described specific embodiment is illustrative; rather than for the restriction to scope of the present invention; those of ordinary skill in the art are in equivalent modification and the variation done according to spirit of the present invention, all should be encompassed in the scope that claim of the present invention protects.