The data transmission method of wireless system for transmitting data and this system of employing
Technical field
The present invention relates to the radio transmission techniques field, especially a kind of based on the wireless system for transmitting data of bluetooth and wifi/wapi (Wireless Fidelity/WLAN Authentication and Privacy Infrastructure) technology and the data transmission method of this system of employing.
Background technology
Existing bluetooth (BT) technology has been widely used in various electronic, becomes one of standard configuration on mobile communication equipment substantially, by file-sharing between the bluetooth realization mobile device and transmission mutually.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.
At present, the not practical application as yet of bluetooth 3.0 standards, bluetooth 2.1+EDR transmission rate theoretical peak is 3Mbps.Be subject to Bluetooth technology itself, hardware interface, memory read write operation and bluetooth drive all multifactor influences such as optimization, and 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 slow, and once can only send a file.
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
The purpose of this invention is to provide a kind of based on the wireless system for transmitting data of bluetooth and wifi/wapi technology and the data transmission method of this system of employing.
The objective of the invention is by realizing by the following technical solutions:
Wireless system for transmitting data, comprise WLAN (wireless local area network) and two or more data communication equipments, wherein each data communication equipment comprises main circuit board, CPU, memory cell and the wireless signal transceiver module that power supply is connected with mutual circuit, described wireless signal transceiver module comprises bluetooth module and wifi/wapi module, bluetooth module comprises Bluetooth chip and the Bluetooth antenna that mutual circuit connects, and the wifi/wapi module comprises wifi/wapi chip and the wifi/wapi antenna that mutual circuit connects;
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, by WLAN (wireless local area network) and wifi/wapi module transmission data.
As the preferred technical solution of the present invention, described data communication equipment comprises mobile phone, PDA or notebook computer.
Adopt said system to carry out the method for wireless data transmission, this method may further comprise the steps:
Step 1: first data communication equipment sends message reference second data communication equipment by bluetooth module, and whether inquiry supports the wifi/wapi transfer of data;
Step 2: if second data communication equipment is supported the wifi/wapi transfer of data, then first data communication equipment is set up WLAN (wireless local area network), and the network title is transferred to second data communication equipment;
Step 3: second data communication equipment connects the WLAN (wireless local area network) that first data communication equipment is set up, and after the success IP address is sent signal by bluetooth module and is transferred to first data communication equipment, and the second data communication equipment enabling signal receives program simultaneously;
Step 4: the first data communication equipment enabling signal router sends data-signal to second data communication equipment;
Step 5: after transfer of data was finished, first data communication equipment and second data communication equipment returned to initial condition.
As the preferred technical solution of the present invention, first data communication equipment is by SPP protocol access second data communication equipment in the described step 1.
As the preferred technical solution of the present invention, first data communication equipment self is set up the adhoc net in the described step 2, and gives second data communication equipment with adhoc network title by the SPP protocol transmission.
As the preferred technical solution of the present invention, the wifi/wapi chip of described second data communication equipment connects described adhoc network by 802.11 agreements, start server after the successful connection, its own IP address is transferred to first data communication equipment, first data communication equipment starts router, connect second data communication equipment by the adhoc network, and begin to transmit data.
The invention has the beneficial effects as follows: with respect to prior art, the present invention adopts BT+wifi/wapi to carry out transfer of data, equipment end can be by the equipment around the BT search, after searching, can dispose complicated adhoc configuration automatically by BT, finally carry out high speed data transfer by wifi/wapi.
The present invention has the following advantages: 1, simple, mode of operation remains the Bluetooth transmission mode, utilizes wifi/wapi and adhoc to carry out complexity with respect to traditional third party software and is provided with, and uses easier, the more convenient operation of BT-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, quick, the highest 1MB/s that surpasses of BT+wifi/wapi transmission rate also more than 800kB/s, is about 10 times of general mobile phone generally, has improved the practicality of mobile phone wireless transfer files greatly.
Description of drawings
The invention will be further described below in conjunction with accompanying drawing and specific embodiment:
Fig. 1 is the flow chart of client of the present invention;
Fig. 2 is the flow chart of server end of the present invention.
Embodiment
As depicted in figs. 1 and 2, wireless system for transmitting data, comprise WLAN (wireless local area network) and two above data communication equipments, wherein each data communication equipment comprises main circuit board, CPU, memory cell and the wireless signal transceiver module that power supply is connected with mutual circuit, described wireless signal transceiver module comprises bluetooth module and wifi/wapi module, bluetooth module comprises Bluetooth chip and the Bluetooth antenna that mutual circuit connects, and the wifi/wapi module comprises wifi/wapi chip and the wifi/wapi antenna that mutual circuit connects; 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, by WLAN (wireless local area network) and wifi/wapi module transmission data.In the present embodiment, described data communication equipment comprises mobile phone, PDA or notebook computer.
Radio data transmission method, this method may further comprise the steps:
Step 1: first data communication equipment sends message reference second data communication equipment by bluetooth module, and whether inquiry supports the wifi/wapi transfer of data;
Step 2: if second data communication equipment is supported the wifi/wapi transfer of data, then first data communication equipment is set up WLAN (wireless local area network), and the network title is transferred to second data communication equipment;
Step 3: second data communication equipment connects the WLAN (wireless local area network) that first data communication equipment is set up, and after the success IP address is sent signal by bluetooth module and is transferred to first data communication equipment, and the second data communication equipment enabling signal receives program simultaneously;
Step 4: the first data communication equipment enabling signal router sends data-signal to second data communication equipment;
Step 5: after transfer of data was finished, first data communication equipment and second data communication equipment returned to initial condition.
In the present embodiment, first data communication equipment is by SPP protocol access second data communication equipment in the described step 1; First data communication equipment self is set up the adhoc net in the step 2, and gives second data communication equipment with adhoc network title by the SPP protocol transmission; The wifi/wapi chip of second data communication equipment connects described adhoc network by 802.11 agreements, start server after the successful connection, its own IP address is transferred to first data communication equipment, first data communication equipment starts router, connect second data communication equipment by the adhoc network, and begin to transmit data.
Workflow of the present invention is as follows, as shown in Figure 1, at first the data that selection will send in equipment can be monofiles, also can be a plurality of files, select to send with bluetooth, the equipment that has bluetooth around then beginning to search for is behind selection equipment again, can judge that whether file is greater than 1M, if greater than 1M then can attempt using wifi/wapi transmission (the wifi/wapi networking needs the regular hour, if file is too little, just directly with traditional bluetooth transmission).Bring into use the SPP agreement of bluetooth, with the other side's mobile communication, ask whether the other side supports the wifi/wpai transmission, if support, the prompting user, whether need to enable the wifi/wapi transmission to improve transmission speed, after the user selected "Yes", equipment end began networking, began to enable the wifi/wapi transmission. 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 whether support wifi/wapi to send to method, apparatus by a Custom Attributes value of SPP service, if exist, just beginning to set up SPP connects, and begin a newly-built adhoc network, and the name of network connected the other side's (server end) equipment that sends to spp, wait for the other side's response, what the other side returned is an ip address, and corresponding ports number, receive the other side's information after, begin to set up network and connect, send data to the other side. after being sent completely, the reduction self networks.
As shown in Figure 2, when opening bluetooth, create a SPP service, and give a self-defining property value, wait for the connection of miscellaneous equipment, when the SPP service end has received connection, SPP service end and transmit leg swap data, after receiving that the adhoc network name is referred to as, begin to connect network, after the successful connection, self start a network and connect, and begin to monitor a network port, then transmit IP address and port information again and give method, apparatus, after the network connection listens to the connection of miscellaneous equipment, the beginning transfer of data, after transmission is finished, the reduction network.
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.