The invention relates to a data transmission method for communication networks, for example, wireless LANS. More particularly, the invention relates to a method and an apparatus for avoiding data buffer overrun by a data rate adjusting mechanism in a wireless communication system.
A conventional wireless communication system 10 as shown in
If the data rate between a 802.11g station and an AP is 54 Mbps, the transmitted data (or transmitted packets) received by the wireless device will be queued at the USB device and the queued buffer will overrun if the bandwidth of USB full speed mode is only 12 Mbps. If the queued buffer is overrun, then the consequent transmitted data (or consequent transmitted packets) will not be received and will be re-tried from the AP, resulting in occupying extra wireless bandwidth of the wireless communication system.
In other words, the host computer will detect the supporting rate of the USB interface if the connector of the wireless device 110 with USB 1.1 interface is attached to the host computer 120. The supported data rate between the AP and the wireless device will be 1. 2 Mbps, 5.5 Mbps, 6 Mbps, 9 Mbps, 11 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and up to 54 Mbps if the wireless communication system adopts IEEE 802.11g standard. Although with a data rate up to 54 Mbps, read errors may occur due to the faster input (for example, 54 Mbps) between the AP and the wireless device and the slower output (for example, 12 Mbps) between the wireless device and the host computer. The transmission bottle neck will be at the USB interface as the full speed mode of the USB interface only supports a rate of up to 12 Mbps. That is to say the transmission data will queue at the USB interface. Therefore, the transmitted packet must be re-tried (or be re-sent) from the AP if the transmission queue buffer is overrun, the resulting transmission data (transmission packets) will occupy a part of the transmission bandwidth.
Three problems will occur in a conventional wireless communication system, which includes an AP, a host computer connected to a wireless device with an USB interface:
(1) The data buffer will overrun if the data rate between the host computer and the wireless device is faster than the buffer can be transmitted to the host computer.
(2) The transmission efficiency of the communication system will decrease if the data rate is much lower the USB support rate.
(3) The system reliability will be reduced if an unsuitable setting exists, for example the data rate between AP and the wireless device is faster than the supporting rate of the USB interface, which will cause the read error.
The disadvantages of the prior art follow:
(1) A larger data buffer is needed: The reduction in probability of data overrun can be achieved by increasing the buffer size, but the tradeoff is higher cost.
(2) Loss of data or reading error will occur in a communication system due to the receiving device being unable to accept data at the transmitted data rate, for example the data rate between the AP and the wireless device is much faster than the support rate of the USB interface.
It is therefore an objective of this invention to provide an improved data transmission method and apparatus in a communication network, which is designed for use with a portable computer connected to a wireless device with a USB interface or the like.
In accordance with the foregoing and other objectives of this invention, a new method and apparatus of data transmission is provided to avoid data buffer overrun via a dynamic adjusting data rate mechanism for the purpose of increasing the transmission efficiency of the communication system.
According to one embodiment of the present invention, the data transmission method is provided for a communication system, the communication system includes an AP (access point) and a host device connected to a wireless device with an USB interface circuit, the wireless device includes a data buffer for receiving data from the AP, comprising the steps of attaching the wireless device to the host device with the USB interface device; determining a first USB mode of the wireless device; detecting a first USB supporting rate according to the first USB mode; determining a first data rate between the AP and the wireless device according to the first data rate to avoid read errors; decreasing the first data rate to a second data rate between the AP and the wireless device if a utilization rate of the data buffer is larger than a first threshold value, wherein the second data rate is lower than the first data rate; increasing the first data rate to a third data rate if a utilization rate of the data buffer is less than a second threshold value (10%), wherein the third data rate is greater than the first data rate.
A wireless communication system including an AP and a wireless device is provided, the communication system includes an AP, a wireless device coupled to a host computer via USB interface, wherein the wireless device includes a first processor, an RF section, a data buffer (or Packet buffer) for receiving the transmission data from the AP, a MAC circuit coupled to the RF section, a buffer utilization detecting means for detecting a buffer status of the data buffer (or Packet buffer) and a USB interface circuit, wherein the host connected to the wireless device with the USB interface circuit, the host includes a second processor, a packet buffer controller includes a USB interface mode controller and a data rate controller for dynamically adjusting the data rate between the AP and the wireless device.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The invention provides a data transmission method and apparatus of a wireless communication system including an AP and a wireless device connected to a host using an USB interface. As shown in
The wireless device 210 includes a first processor 213, an RF section 212, a data buffer (or packet buffer) 218 for receiving the transmission data from the AP 230, a MAC controller 216 coupled to the RF section 212, a buffer utilization detecting device 219 for detecting a buffer status of the data buffer 218 (or packet buffer) and an interface circuit for the USB interface 270.
The host 220 is connected to the wireless device 210 using the USB interface 270. The host 220 includes a second processor 222 and a packet buffer controller 240. The packet buffer controller 240 includes an USB interface mode controller 242 and a data rate controller 224 for dynamically adjusting the data rate between the AP and the wireless device.
(1) At step S400, the wireless device is connected to the host computer using the USB interface.
(2) At step S410, the USB mode of the USB interface is detected.
(3) At step S412, a wireless connection with maximum support rate up to 54 Mbps is established if the USB mode is USB 2.0 standard.
(4) At step S414, a wireless connection with maximum support rate up to 12 Mbps is established if the USB mode is USB 1.1 standard.
A wireless communication system 30 includes an AP 330 and a mobile communication apparatus 300.
The mobile communication apparatus 300 includes a wireless device 310 and a host 320 connected to the wireless device 310 with a connection interface 370.
The wireless device 310 includes a RF section 312, a baseband processor 314, a data buffer 318 for receiving the transmission data from the AP 330, a MAC controller 316 coupled to the RF section 312, a buffer utilization detecting device 319 for detecting a buffer status of the data buffer and an interface circuit for the connection interface 370.
The host 320 is connected to the wireless device 310 using the connection interface 370. The host 320 includes a processor 322 and a packet buffer controller 340. The packet buffer controller 340 includes a connection interface mode controller 342 and a data rate controller 324 for dynamically adjusting the data rate between the AP 330 and the wireless device 310.
The present invention can be applied to the following communication systems:
1. An AP and a portable computer connected to a 802.11a/g wireless LAN card with an USB interface adaptor.
2. An AP and a Notebook PC connected to a 80211a/b/g wireless LAN card with an connection interface adapter.
The hardware of the wireless device of the preferred embodiment can have an internal processor 213 as shown in
The following examples can be applied to the data rate adjusting mechanism of the preferred embodiments of the present invention.
Definitions
1. USB bus Bandwidth for Rx=Bulk In Data (bits)/SOF time (125 μs for High speed, 1 ms for Full speed)
2. Wireless Support Rates(data rate between the AP and the wireless device):
3. Device Rx buffer utilization ratio=Rx Data in Packet Buffer/Total Rx Buffer
4. Rx buffer overrun: Device Rx buffer utilization ratio==100% and receive more Packets.
Dynamic Rx Data Rate Control flow
1. Initial Rx Data Rate is maximum wireless support rate. (54 Mbps for 802.11a/g, 11 Mbps for 802.11b).
2. Rx Data Rate Control while overrun: Set maximum Rx Data Rate<=USB bus bandwidth for Rx.
3. Rx Data Rate Control while Rx buffer utilization ratio<50%: increase maximum Rx Data Rate up to the maximum support rate.
The data rate adjusting mechanism is to adjust the current rate to a Dynamic Rx Data Rate according to the range of USB bus bandwidth.
In conclusion, the data transmission method and system of the invention has the following advantages. First, it can reduce the power consumption by decreasing the data rate between the AP and the wireless device. Second, it is possible by means of a simple data transmission method to avoid data buffer overrun by using a smaller data buffer.
The invention has been described using exemplary preferred embodiments. However, it is to be understood that the scope of the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements. The scope of the claims, therefore, should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. Those who are skilled in this technology can still make various alterations and modifications without departing from the scope and spirit of this invention. Therefore, the scope of the present invention shall be defined and protected by the following claims and their equivalents.