Wireless system for transmitting data and method thereof based on soft AP technology
Technical field
The present invention relates to radio transmission technical field, especially a kind of wireless system for transmitting data and method thereof based on bluetooth, wifi/wapi (wireless fidelity/WLAN Authentication and privacy infrastructure) technology and soft AP technology.
Background technology
Existing bluetooth BT(Blue Tooth) technology has been widely used in multiplely, becomes one of standard configuration on mobile communication equipment substantially, realizes file-sharing and transmission mutually between the mobile device by bluetooth.Simple, convenient owing to having, Bluetooth technology is along with universal the obtaining of mobile communication equipment used fast and widely, and the mobile phone of the nearly all support bluetooth of Chinese market can both carry out the transmission of bluetooth file.
The Bluetooth transmission file speed of mobile phone only is about 60-100kB/s at present.In the big file of transmission, can't meet the demands.Make a general survey of the wireless files transfer function of mobile phone on the market, still adopt the mode of bluetooth OPP and File Transfer Protocol basically, transmission rate is all very slow, and it is particularly important that high-speed transfer becomes in mobile device.
Along with the device end that has the wifi/wapi function at present is more and more, there is scheme to propose to utilize wifi/wapi to carry out the high-speed transfer of two equipment rooms, implemented two steps, one: set up network, two: seek network, transmitting software.The method of performing step one has two kinds: one, two equipment connect common wireless aps (wireless access node or local area network (LAN)) respectively, make two equipment be in consolidated network.Two, utilize the adhoc technology of wifi/wapi to set up adhoc network (being called multi-hop wireless network again), the step operation of this type of networking is trouble very.The software of performing step two all is flying pigeon and ftp etc. generally, and the operation of transmitting software is more loaded down with trivial details and mixed and disorderly, and needs two equipment to move corresponding software simultaneously.This shows that existing wifi/wapi high speed data transfer implements following problem: one, traditional BT transmits, and speed slow excessively (having only about 60-100Kb/s) can only be transmitted very little file.Two, utilize the wifi/wapi transmission, condition is too harsh, and setting operation is too complicated, adds the transmitting software variation, makes that build bad border of transmission bothers very much, and can not initiatively find other equipment in equipment end.
Summary of the invention
In view of the above problems, the invention provides a kind of wireless system for transmitting data and method thereof based on soft AP technology.
In order to achieve the above object, the present invention has adopted following technical scheme: a kind of wireless system for transmitting data based on soft AP technology, it comprises two or more data communication equipments, wherein each data communication equipment comprises power supply and the main circuit board, CPU, memory cell and the wireless signal transceiver module that electrically connect mutually, and it is characterized in that: described wireless signal transceiver module comprises bluetooth module, wifi/wapi module and soft AP module;
Described two or more data communication equipments are set up signal connection and transmission data by bluetooth module;
Perhaps, two or more data communication equipments are set up signal by bluetooth module and are connected, and utilize soft AP module to set up WLAN (wireless local area network), and by this WLAN (wireless local area network) and wifi/wapi module transmission data.
Preferable, the invention provides a kind of wireless system for transmitting data based on soft AP technology, wherein, described bluetooth module comprises Bluetooth chip and the Bluetooth antenna that mutual circuit connects, and described wifi/wapi module comprises wifi/wapi chip and the wifi/wapi antenna that mutual circuit connects.
Preferable, the invention provides a kind of wireless system for transmitting data based on soft AP technology, wherein, described data communication equipment utilizes soft AP module to start soft AP function and sets up WLAN (wireless local area network), and the network title of the WLAN (wireless local area network) set up is transferred to one or more data communication equipment by bluetooth module.
Preferable, the invention provides a kind of wireless system for transmitting data based on soft AP technology, wherein, described one or more data communication equipment receives the network title, and connect this WLAN (wireless local area network) by the 802.11n agreement, after the success its IP address is sent signal by bluetooth module and be transferred to the data communication equipment that this has soft AP module, this one or more data communication equipment enabling signal receives program simultaneously, this has the data communication equipment enabling signal router of soft AP module, send data-signal to described one or more data communication equipment, after transfer of data was finished, described data communication equipment returned to initial condition.
Preferable, the invention provides a kind of wireless system for transmitting data based on soft AP technology, wherein, described data communication equipment comprises mobile phone, PDA or notebook computer.
The present invention also provides a kind of and has adopted above-mentioned wireless system for transmitting data based on soft AP technology to carry out the method for wireless data transmission, and it mainly may further comprise the steps:
The described data communication equipment with soft AP module of step a. sends the one or more data communication equipment of message reference by bluetooth module, and whether inquiry supports the wifi/wapi transfer of data;
Step b. is if described one or more data communication equipment is supported the wifi/wapi transfer of data, then this data communication equipment startup soft AP function with soft AP module is set up WLAN (wireless local area network), and the network title of this WLAN (wireless local area network) is transferred to one or more data communication equipment by bluetooth module;
The described one or more data communication equipment of step c receives the network title, and connect the WLAN (wireless local area network) that this data communication equipment with soft AP module is set up, after the success its IP address is sent signal by bluetooth module and be transferred to the data communication equipment that this has soft AP module, simultaneously described one or more data communication equipment enabling signal receives program;
Steps d. this has the data communication equipment enabling signal router of soft AP module, sends data-signal to described one or more data communication equipment;
After step e. transfer of data was finished, this data communication equipment and described one or more data communication equipment with soft AP module returned to initial condition.
Preferable, the invention provides a kind of method of the wireless data transmission based on soft AP technology, wherein, the wifi/wapi chip of one or more data communication equipment described in the step c connects the WLAN (wireless local area network) that this data communication equipment with soft AP module is set up by the 802.11n agreement, start server after the successful connection, its IP address transfer had the data communication equipment of soft AP module to this, this data communication equipment with soft AP module starts router, connect described one or more data communication equipment by this WLAN (wireless local area network), and begin to transmit data.
Compared to prior art, the present invention adopts bluetooth, wifi/wapi module and soft AP module based on carrying out transfer of data under the 802.11n agreement, equipment end can be by the equipment around the bluetooth module search, after searching, start the soft AP function of soft AP module by bluetooth module, set up WLAN (wireless local area network), and carry out high speed data transfer by this WLAN (wireless local area network) and wifi/wapi module.
The present invention has the following advantages: 1, simple, mode of operation remains the Bluetooth transmission mode, utilizes wifi/wapi to carry out complicated networking configuration with respect to traditional third party software, uses bluetooth and easier, the more convenient operation of wifi/wapi transmission means.2, quick, conventional mobile phone generally can only once transmit a file, and the present invention can any a plurality of files of disposable transmission, for example transmit a large amount of pictures, song or phone directory etc. simultaneously.3, supper-fast, utilize bluetooth, wifi/wapi module and soft AP module based on the transmission method that carries out transfer of data under the 802.11n agreement, the maximum 260Mbps. that can reach is existing more than 5 times of speed, has improved the practicality of mobile phone wireless transfer files greatly.
Description of drawings
Fig. 1 is the schematic diagram of system of the present invention
Fig. 2 is the flow chart of client in one embodiment of the invention
Fig. 3 is the flow chart of server end in one embodiment of the invention.
Embodiment
Please refer to shown in Figure 1ly, be the schematic diagram of the wireless system for transmitting data based on soft AP technology of the present invention.
As shown in Figure 1, described wireless system for transmitting data based on soft AP technology, mainly comprise first data communication equipment 101, second data communication equipment 102, the 3rd data communication equipment 103 and N data communication equipment 104 wait several data communication equipments, described data communication equipment comprises mobile phone, PDA or notebook computer, wherein each data communication equipment comprises power supply and the main circuit board that electrically connects mutually, CPU, memory cell (not shown) and wireless signal transceiver module, described wireless signal transceiver module mainly comprises soft AP module 1011, bluetooth module 1012 and wifi/wapi module 1013, this bluetooth module 1012 comprises Bluetooth chip and the Bluetooth antenna that mutual circuit connects, and this wifi/wapi module 1013 comprises wifi/wapi chip and the wifi/wapi antenna that mutual circuit connects.
Described first data communication equipment 101 is visited second data communication equipment 102 respectively by bluetooth module 1012, whether the 3rd data communication equipment 103 supports the wifi/wapi transfer of data until N data communication equipment 104, if supporting the wifi/wapi transfer of data then to set up signal connects, this first data communication equipment 101 utilizes soft AP module 1011 to start soft AP functions and sets up WLAN (wireless local area network), and the network title of the WLAN (wireless local area network) set up is transferred to second data communication equipment 102 by bluetooth module 1012, the 3rd data communication equipment 103 is until N data communication equipment 104.
Wherein, described second data communication equipment 102, the 3rd data communication equipment 103 is after N data communication equipment 104 receives the network title, connect this WLAN (wireless local area network) by the 802.11n agreement, after the success its IP address is sent signal by bluetooth module 1012 and be transferred to first data communication equipment 101, this second data communication equipment 102 simultaneously, the 3rd data communication equipment 103 receives program until N data communication equipment 104 enabling signals, these first data communication equipment, 101 enabling signal routers, to described second data communication equipment 102, the 3rd data communication equipment 103 sends data-signal until N data communication equipment 104, after transfer of data was finished, described data communication equipment returned to initial condition.
As shown in Figure 2, the invention provides a kind of radio data transmission method based on soft AP technology, it mainly may further comprise the steps:
The described data communication equipment with soft AP module of step a. sends the one or more data communication equipment of message reference by bluetooth module, and whether inquiry supports the wifi/wapi transfer of data;
Step b. is if described one or more data communication equipment is supported the wifi/wapi transfer of data, then this data communication equipment startup soft AP function with soft AP module is set up WLAN (wireless local area network), and the network title of this WLAN (wireless local area network) is transferred to one or more data communication equipment by bluetooth module;
The described one or more data communication equipment of step c receives the network title, and connect the WLAN (wireless local area network) that this data communication equipment with soft AP module is set up, after the success its IP address is sent signal by bluetooth module and be transferred to the data communication equipment that this has soft AP module, simultaneously described one or more data communication equipment enabling signal receives program;
Steps d. this has the data communication equipment enabling signal router of soft AP module, sends data-signal to described one or more data communication equipment;
After step e. transfer of data was finished, this data communication equipment and described one or more data communication equipment with soft AP module returned to initial condition.
Wherein, the wifi/wapi chip of one or more data communication equipment described in the step c connects the WLAN (wireless local area network) that this data communication equipment with soft AP module is set up by the 802.11n agreement, start server after the successful connection, its IP address transfer had the data communication equipment of soft AP module to this, this data communication equipment with soft AP module starts router, connect described one or more data communication equipment by this WLAN (wireless local area network), and begin to transmit data.
As shown in Figures 2 and 3, be respectively the flow chart of client and server end in one embodiment of the invention.
In present embodiment, at first in this machine, select the data that to send, can be single file, also can be a plurality of files, selects to send with bluetooth again, the equipment that has bluetooth module around then beginning to search for, behind selection equipment, whether can judge the file that needs to send greater than 1M, because the wifi/wapi networking needs the regular hour, if the file that needs to send less than 1M, just directly sends with traditional bluetooth; If the file that needs to send greater than 1M, then can attempt using the wifi/wapi transmission.
Judge that whether this machine supports the wifi/wpai transmission, if do not support, then sends file with traditional bluetooth; If support the wifi/wpai transmission, then judge by Custom Attributes value of bluetooth service whether method, apparatus is supported the wifi/wpai transmission, if method, apparatus is not supported the wifi/wpai transmission, then send file with traditional bluetooth; If method, apparatus is supported the wifi/wpai transmission, then enable the wifi/wpai transmission automatically, after transmission is finished, recover original network state, transmission is finished.
Realization with recipient's (server end) is described in detail with regard to transmit leg (client) below.
Transmit leg is after selecting with the wifi/wapi transmission, begin to judge by a Custom Attributes value of bluetooth service whether method, apparatus is supported the wifi/wapi transmission, if support the wifi/wapi transmission, just beginning to set up bluetooth connects, and begin a newly-built WLAN (wireless local area network) based on soft AP technology, and the network title of this WLAN (wireless local area network) connected with bluetooth send to method, apparatus (server end), wait is to the response of method, apparatus, what method, apparatus was returned is an ip address, and corresponding ports number, after receiving the other side's facility information, begin to set up network connection based on the WLAN (wireless local area network) of soft AP technology, to the other side's equipment sending data. after being sent completely, the reduction self networks is until end.
As shown in Figure 3, when opening bluetooth, create a bluetooth and connect, and give a self-defining property value, wait for the connection of miscellaneous equipment, judged whether connection, when soft AP server end has received connection, soft AP server end and transmit leg swap data, receive that soft AP network name is referred to as after, begin to connect network, after the successful connection, self start a network and connect, and begin to monitor a network port, then transmitting IP address and port information again gives method, apparatus, after the network connection listened to the connection of miscellaneous equipment, the beginning transfer of data was after transmission is finished, the reduction network is until end.
Data Transport Protocol of the present invention realizes that part is as follows:
Transmit leg is realized sending according to the following steps:
1: send the file number that needs transmission;
2: the length that sends filename;
3: send filename;
4: send file size;
5: send data;
6: the file number circulation that sends as required sends;
7: finish.
The recipient realizes receiving according to the following steps:
1: receive the file number;
2: the length that receives file name;
3: receive filename by the length that receives filename;
4: the data that receive file size;
5:, begin to receive data according to the size of file;
6: according to the number of file, circulation receives;
7: finish.