Based on wireless system for transmitting data and the method thereof of soft AP technology
Technical field
The present invention relates to radio transmission technical field, especially a kind of wireless system for transmitting data based on bluetooth, wifi/wapi (wireless fidelity/WLAN Authentication and privacy infrastructure) technology and soft AP technology and method thereof.
Background technology
Existing bluetooth BT(Blue Tooth) technology has been widely used in multiple, and mobile communication equipment becomes one of standard configuration substantially, realizes file-sharing between mobile device and transmission mutually by bluetooth.Simple, convenient owing to having, Bluetooth technology is applied fast and widely along with universal the obtaining of mobile communication equipment, and the mobile phone of the nearly all support bluetooth of Chinese market can carry out the transmission of bluetooth file.
The Bluetooth transmission file speed of current mobile phone is only about 60-100kB/s.Cannot meet the demands when transmission large files.Make a general survey of the wireless files transfer function of mobile phone on market, substantially still adopt the mode of bluetooth OPP and File Transfer Protocol, transmission rate is all very slow, and high-speed transfer becomes particularly important in a mobile device.
Along with the device end at present with wifi/wapi function gets 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: find network, transmitting software.The method realizing 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 also called multi-hop wireless network), the step operation of this type of networking bothers very much.The software realizing step two is all generally flying pigeon and ftp etc., and the operation of transmitting software is more loaded down with trivial details and mixed and disorderly, and needs two equipment to run corresponding software simultaneously.As can be seen here, existing wifi/wapi high speed data transfer implements following problem: one, traditional BT transmission, speed excessively slow (only having about 60-100Kb/s), can only transmit very little file.Two, utilize wifi/wapi to transmit, condition is too harsh, and setting operation is too complicated, adds transmitting software variation, makes to build transmission bad border and 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 based on soft AP technology and method thereof.
In order to achieve the above object, present invention employs 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 mutual main circuit board, CPU, memory cell and the wireless signal transceiver module be electrically connected, and it is characterized in that: described wireless signal transceiver module comprises bluetooth module, wifi/wapi module and soft AP module;
Two or more data communication equipments described are set up signal by bluetooth module and are connected and transmit data;
Or 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 transfer data.
Preferably, 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 of the connection of mutual circuit, and described wifi/wapi module comprises wifi/wapi chip and the wifi/wapi antenna of the connection of mutual circuit.
Preferably, 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 name of the WLAN (wireless local area network) of foundation is transferred to one or more data communication equipment by bluetooth module.
Preferably, 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 network name, and connect this WLAN (wireless local area network) by 802.11n agreement, after success, its IP address is sent Signal transmissions by bluetooth module, to this, there is the data communication equipment of soft AP module, this one or more data communication equipment enabling signal reception program simultaneously, this has the data communication equipment enabling signal transmission program of soft AP module, data-signal is sent to described one or more data communication equipment, after transfer of data completes, described data communication equipment returns to initial condition.
Preferably, 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.
Present invention also offers and a kind ofly adopt the above-mentioned wireless system for transmitting data based on soft AP technology to carry out the method for Wireless Data Transmission, it mainly comprises the following steps:
The data communication equipment described in step a. with soft AP module sends the one or more data communication equipment of message reference by bluetooth module, and whether inquiry supports wifi/wapi transfer of data;
If the described one or more data communication equipment of step b. supports wifi/wapi transfer of data, then this data communication equipment startup soft AP function with soft AP module sets up WLAN (wireless local area network), and the network name of this WLAN (wireless local area network) is transferred to one or more data communication equipment by bluetooth module;
Described in step c, one or more data communication equipment receives network name, and connect the WLAN (wireless local area network) of data communication equipment foundation that this has soft AP module, after success, its IP address is sent Signal transmissions by bluetooth module, to this, there is the data communication equipment of soft AP module, simultaneously described one or more data communication equipment enabling signal reception program;
Steps d. this has the data communication equipment enabling signal transmission program of soft AP module, sends data-signal to described one or more data communication equipment;
After step e. transfer of data completes, this has the data communication equipment of soft AP module and described one or more data communication equipment returns to initial condition.
Preferably, 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 step c connects the WLAN (wireless local area network) of data communication equipment foundation that this has soft AP module by 802.11n agreement, server is started after 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 transmission program, described one or more data communication equipment is connected by this WLAN (wireless local area network), and start to transmit data.
Compared to prior art, the present invention adopts bluetooth, wifi/wapi module and soft AP module to carry out transfer of data based under 802.11n agreement, equipment end can by bluetooth module search equipment around, after searching, the soft AP function of soft AP module is started 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 Bluetooth transmission mode, and utilize wifi/wapi to carry out complicated networking configuration relative to traditional third party software, use bluetooth and wifi/wapi transmission means are easier, more convenient operation.2, quick, conventional mobile phone generally once can only transmit a file, and the present invention can any number of file of disposable transmission, such as, transmit a large amount of picture, song or phone directory etc. simultaneously.3, supper-fast, utilize bluetooth, wifi/wapi module and soft AP module based on the transmission method carrying out transfer of data under 802.11n agreement, maximumly can reach more than 5 times that 260Mbps. is existing speed, substantially increase the practicality of mobile phone wireless transfer files.
Accompanying drawing explanation
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 Fig. 1, is the schematic diagram of the wireless system for transmitting data based on soft AP technology of the present invention.
As shown in Figure 1, the described wireless system for transmitting data based on soft AP technology, mainly comprise the first data communication equipment 101, second data communication equipment 102, several data communication equipments such as the 3rd data communication equipment 103 and N data communication equipment 104, described data communication equipment comprises mobile phone, PDA or notebook computer, wherein each data communication equipment comprises the main circuit board of power supply and electric connection 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 of the connection of mutual circuit, this wifi/wapi module 1013 comprises wifi/wapi chip and the wifi/wapi antenna of the connection of mutual circuit.
Described first data communication equipment 101 accesses the second data communication equipment 102 respectively by bluetooth module 1012, 3rd data communication equipment 103 is until whether N data communication equipment 104 supports wifi/wapi transfer of data, if support wifi/wapi transfer of data, set up signal and connect, this first data communication equipment 101 utilizes soft AP module 1011 to start soft AP function and sets up WLAN (wireless local area network), and the network name of the WLAN (wireless local area network) of foundation is transferred to the second data communication equipment 102 by bluetooth module 1012, 3rd data communication equipment 103 is until N data communication equipment 104.
Wherein, described second data communication equipment 102, 3rd data communication equipment 103 is until after N data communication equipment 104 receives network name, this WLAN (wireless local area network) is connected by 802.11n agreement, after success, its IP address is sent Signal transmissions to the first data communication equipment 101 by bluetooth module 1012, this second data communication equipment 102 simultaneously, 3rd data communication equipment 103 is until N data communication equipment 104 enabling signal reception program, this the first data communication equipment 101 enabling signal transmission program, to described second data communication equipment 102, 3rd data communication equipment 103 is until N data communication equipment 104 sends data-signal, after transfer of data completes, described data communication equipment returns 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 comprises the following steps:
The data communication equipment described in step a. with soft AP module sends the one or more data communication equipment of message reference by bluetooth module, and whether inquiry supports wifi/wapi transfer of data;
If the described one or more data communication equipment of step b. supports wifi/wapi transfer of data, then this data communication equipment startup soft AP function with soft AP module sets up WLAN (wireless local area network), and the network name of this WLAN (wireless local area network) is transferred to one or more data communication equipment by bluetooth module;
Described in step c, one or more data communication equipment receives network name, and connect the WLAN (wireless local area network) of data communication equipment foundation that this has soft AP module, after success, its IP address is sent Signal transmissions by bluetooth module, to this, there is the data communication equipment of soft AP module, simultaneously described one or more data communication equipment enabling signal reception program;
Steps d. this has the data communication equipment enabling signal transmission program of soft AP module, sends data-signal to described one or more data communication equipment;
After step e. transfer of data completes, this has the data communication equipment of soft AP module and described one or more data communication equipment returns to initial condition.
Wherein, the wifi/wapi chip of one or more data communication equipment described in step c connects the WLAN (wireless local area network) of data communication equipment foundation that this has soft AP module by 802.11n agreement, server is started after 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 transmission program, connect described one or more data communication equipment by this WLAN (wireless local area network), and start to transmit data.
As shown in Figures 2 and 3, the flow chart of client and server end in one embodiment of the invention is respectively.
In the present embodiment, first in the machine, select the data that will send, can be Single document, can be also multiple file, then select to send with bluetooth, then start to search for the equipment with bluetooth module around, after selection equipment, can judge whether the file that need send is greater than 1M, because wifi/wapi networking needs the regular hour, if the file that need send is less than 1M, send by traditional bluetooth with regard to direct; If the file that need send is greater than 1M, then can attempt using wifi/wapi transmission.
Judge whether the machine supports that wifi/wpai transmits, if do not support, then send file by traditional bluetooth; If support wifi/wpai transmission, then judge whether counterpart device supports that wifi/wpai transmits by bluetooth service Custom Attributes value, if counterpart device does not support that wifi/wpai transmits, then send file by traditional bluetooth; If counterpart device supports wifi/wpai transmission, then automatically enable wifi/wpai transmission, after being transmitted, recovering original network state, be transmitted.
Be described in detail with regard to the realization of transmit leg (client) with recipient's (server end) below.
Transmit leg is after selection is with wifi/wapi transmission, begin through a Custom Attributes value of bluetooth service to judge whether counterpart device supports that wifi/wapi transmits, if support wifi/wapi transmission, just start to set up bluetooth to connect, and start a newly-built WLAN (wireless local area network) based on soft AP technology, and the network name of this WLAN (wireless local area network) is sent to counterpart device (server end) with bluetooth connection, wait for the response of counterpart device, what counterpart device returned is an ip address, and corresponding port numbers, after receiving counterpart device information, start the network set up based on the WLAN (wireless local area network) of soft AP technology to connect, data are sent to counterpart device. after being sent completely, reduce self network, until terminate.
As shown in Figure 3, when opening bluetooth, create a bluetooth to connect, and give a self-defining property value, wait for the connection of miscellaneous equipment, judge whether connection, when soft AP received server-side is to when having a connection, soft AP server end and transmit leg swap data, after receiving soft AP network name, start interconnection network, after successful connection, self start a network to connect, and start to monitor a network port, then again transmitting IP address and port information to counterpart device, after network connection listens to the connection of miscellaneous equipment, start transfer of data, after being transmitted, reduction network, until terminate.
It is as follows that Data Transport Protocol of the present invention realizes part:
Transmit leg realizes sending according to the following steps:
1: send the file number needing transmission;
2: the length sending filename;
3: send filename;
4: send file size;
5: send data;
6: the file number circulation sent as required sends;
7: terminate.
Recipient realizes receiving according to the following steps:
1: receive file number;
2: the length receiving file name;
3: receive filename by the length receiving filename;
4: the data receiving file size;
5: according to the size of file, start to receive data;
6: according to the number of file, circulation receives;
7: terminate.