OMAP35x Wireless Connectivity WLAN Bluetooth Coexistence Application Note
From Texas Instruments Embedded Processors Wiki
This document provides an overview of the Bluetooth™-Wireless Fidelity (BT-WLAN) coexistence mechanism in WiLink products.
Literature Number: SPRAB96
January 2010
Contents |
Introduction
Overview
The SoftGemini 3.0 (SG 3.0) algorithm runs on a WLAN-embedded processor, enabling WLAN and Bluetooth (BT) technologies to coexist in a single product.
SoftGemini handles cases that involve BT Voice/Data and WLAN voice/data applications. It supports multiple and single antenna configurations, maintains reliable BT and WLAN network connections and maintains a reliable level of service for applications that use BT and WLAN.
SG3.0 Description
SG3.0 Features
- Improved power consumption.
- Optimized co-existence performance in any BT/WLAN use case, including BT point-to-multipoint operation.
- BT IP in the 1273 conveys all the necessary information for each BT activity directly to the WLAN IP via a shared memory.
- Self-contained co-existence architecture, with limited interface to other FW components.
- Fully host agnostic.
Top-Level Description
In the single antenna configuration, the WLAN subsystem uses an internal radio frequency (RF) switch in the WL1273FE device that enables the Bluetooth and WLAN operations to be multiplexed through a single antenna without any significant power degradation, such as that caused by a splitter.
The following figure shows the shared antenna scheme. An external filter is required between the WL1273FE and the external 2.4 GHz antenna.
Figure 1: Shared Antenna Scheme
The SoftGemini 3.0 mechanism is part of the embedded software (firmware) running in the WL1273 device. It governs the coexistence behavior by integrating the information received from the Bluetooth device through the shared interface and the processes running on the WLAN station (STA). Overall behavior control is achieved both through the signaling interface (to the Bluetooth device) and through WLAN traffic, which attempts to change the distribution of the WLAN traffic locally.
WLAN and BT IPs Interface
To enable high-rate information sharing between the two devices, without host intervention, a special algorithem has being developed which is called SoftGemini 3.0 solution. In the SoftGemini 3.0 solution, the WLAN acts as the master of the coexistence. The basic system scheme is shown below.
Figure 2: SoftGemini 3.0 Basic Scheme
Modes of Operation
SoftGemini 3.0 supports the following modes of operation. For more information, you may refer to Table 1.
- Disable Mode:
- The algorithm is inactive, regardless of the current BT state.
- The antenna is allocated for WLAN
- Bluetooth cannot share the WLAN antenna, and should be directly connected to an additional antenna
- Protective Mode:
- Bluetooth critical traffic is protected from WLAN interference
- Algorithm guarantees on-time allocation of the antenna to the Bluetooth
- During this mode, WLAN forces 802.11 Power Save entry
- Opportunistic Mode:
- More greedy approach to medium allocation
- Algorithm attempts statistically fair medium allocation for both WLAN and BT
Single Antenna Configuration
As mentioned previously, the fact that WLAN and Bluetooth share the same frequency band introduces certain constraints on the mutual behavior of the two radios. The system configuration selection can potentially impact these constraints and the resulting availability of the medium for the activity of each of these technologies.
In the single antenna configuration, the mutual-receive option is eliminated (this architecture contrasts with the separate-antenna configuration). The following rules apply in the shared-antenna configuration:
- Bluetooth TX is not allowed, if the switch is in WLAN state.
- WLAN TX is not allowed, if the switch is in Bluetooth state.
- Simultaneous RX is not possible because of a very high-power input signal.
- Switch-receive isolation for the BT in the WL1273FE is at least 30dB.
Demo Application
The demo application transfers stereo music to a headset over a BT link using a 5 MBps UDP downstream transmission running between the PC and the WLAN client on OMAP3530. The following shows the demo application setup components and links used for devices configuration and data transfer.
Figure 3: WLAN-Bluetooth Coexistence Demo Application Setup.
Setting Up
WLAN Configuration
To configure for WLAN:
1 Boot up the OMAP3530.
2 Wait until the kernel and file system init is completed.
3 Change the working folder to /demo.
...
...
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .’| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org omap3evm ttyS0
Arago 2009.09 omap3evm ttyS0
omap3evm login: root
root@omap3evm:~# cd demo
4 Perform WLAN Initialization by running the following sequence from the Linux prompt:
root@omap3evm:~/demo# cd wlan_scripts/
root@omap3evm:~/demo/wlan_scripts#./wl1271_wlan.sh
**************************************************
WL1271 DEMO MAIN MENU *
**************************************************
0: Exit from Demo
1: Wireless Demo
DEMO OPTION: 1
tiwlan0 (): not using net_device_ops yet
Old CONTROL_PADCONF_UART1_CTS value = 0x01000110
Old CONTROL_PADCONF_UART1_RTS value = 0x00000000
New CONTROL_PADCONF_UART1_CTS value = 0x01000104
New CONTROL_PADCONF_UART1_RTS value = 0x011c0000
GPIO-150 autorequested
Inside hPlatform_DevicePowerOff()
*************************************************************
* Set the tiwlan ip address as per the Access point network *
*************************************************************
TIWLAN0 IP: 10.1.2.117
TIWLAN: 3864.731852: pInitParams->RoamingScanning_2_4G_enable 0
Inside hPlatform_DevicePowerOn()
@@@ enable_mmc_power() 2
setting SDIO F&I clock Configuration
done setting SDIO F&I clock Configuration
SDIO clock Configuration is now set to 24Mhz
After sdioDrv_ConnectBus, iStatus=0
After SD_IO_GO_IDLE_STATE, iStatus=0
After VDD_VOLTAGE_WINDOW, iStatus=0
After SD_IO_SEND_RELATIVE_ADDR, iStatus=0
After SD_IO_SELECT_CARD, iStatus=0
After w 0x82, iStatus=0
After r 0x82, iStatus=0
After w 0xC8, iStatus=0
After CCCR_BUS_INTERFACE_CONTOROL, uCount=1
After CCCR_IO_ENABLE, uCount=1
Try to SDBus Connect again...
Inside hPlatform_DevicePowerOff()
Inside hPlatform_DevicePowerOn()
@@@ enable_mmc_power() 2
setting SDIO F&I clock Configuration
done setting SDIO F&I clock Configuration
SDIO clock Configuration is now set to 24Mhz
sdioDrv_InitHw() - request_irq FAILED!!
After sdioDrv_ConnectBus, iStatus=-16
Try to SDBus Connect again...
Inside hPlatform_DevicePowerOff()
Inside hPlatform_DevicePowerOn()
@@@ enable_mmc_power() 2
setting SDIO F&I clock Configuration
done setting SDIO F&I clock Configuration
SDIO clock Configuration is now set to 24Mhz
After sdioDrv_ConnectBus, iStatus=0
After SD_IO_GO_IDLE_STATE, iStatus=0
After VDD_VOLTAGE_WINDOW, iStatus=0
After SD_IO_SEND_RELATIVE_ADDR, iStatus=0
After SD_IO_SELECT_CARD, iStatus=0
After w 0x82, iStatus=0
After r 0x82, iStatus=0
After w 0xC8, iStatus=0
After CCCR_BUS_INTERFACE_CONTOROL, uCount=1
After CCCR_IO_ENABLE, uCount=1
CHIP VERSION... set 1273 chip top registers
Working on a 1273 PG 2.0 board.
Starting to process NVS...
No Nvs, Setting default MAC address
pHwInit->uEEPROMCurLen: 1c
ERROR: If you are not calibating the device, you will soon get errors !!!
Chip ID is 0x4030111.
FEM Type 1
Starting to download firmware...
Starting to download firmware...
Starting to download firmware...
Starting to download firmware...
Starting to download firmware...
Starting to download firmware...
Finished downloading firmware.
Firmware running.
--------------------------------------------------------------------
Driver Version : WiLink_Driver_6.1.3.01.5
Firmware Version: Rev 6.1.3.01.5_D
Station ID : 08-00-28-12-34-56
--------------------------------------------------------------------
Interrogate TX/RX parameters
Trying to associate with SSID ’RVR’
Connection established with supplicant
user_main, start
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/,
Bt coexsistance/, Report/ , dEbug/, biT/, aboUt, Quit
5 Establish AP connection by performing the following:
- Get the BSSID list:
- Start scanning using the following command on CLI: / scan start
- Wait a few seconds and display the BSSID list, as shown below:
/ connection Bssid_list
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/,
Bt coexsistance/, measuremeNt/, Report/, dEbug/, biT/, aboUt, Quit
BssId List: Num=10
MAC Privacy Rssi Mode Channel SSID
00.50.f1.12.03.38 1 -45 Infra 1 yaelb
''00.1d.46.7c.2c.42 0 -45 Infra 1 B''
00.16.47.93.66.20 1 -45 Infra 1 ****
00.1d.46.7c.2c.40 1 -45 Infra 1 test
00.16.47.93.66.21 0 -45 Infra 1 ****
00.16.46.b8.bf.e0 1 -49 Infra 6 Rachel_11g_wep
00.15.c6.5f.62.50 0 -54 Infra 6 123
00.23.69.7f.f1.af 0 -45 Infra 11 linksys11nys
00.14.a8.a0.ec.10 0 -67 Infra 11 ****
00.12.01.4d.da.70 1 -45 Infra 11 Cat
> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/,
Bt coexsistance/, measuremeNt/, Report/, dEbug/, biT/, aboUt, Quit
- Connect to the desired AP by performing the following:
/ connection connect B > Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, measuremeNt/, Report/, dEbug/, biT/, aboUt, Quit .../Connection> Bssid_list, Connect, Disassociate, Status, Full_bssid_list, wPs/ Trying to associate with SSID ’B’ OK Associated with 00:1d:46:7c:2c:42 ************ NEW CONNECTION ************ -- SSID = B -- BSSID = 0-1d-46-7c-2c-42 **************************************** CTRL-EVENT-CONNECTED - Connection to 00:1d:46:7c:2c:42 completed (auth) [id=3 id_str=]
Bluetooth Configuration
To configure for Bluetooth:
1 Connect the BlueZ stack to the user space and send the init script to the chip, as shown below:
> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/,
Bt coexsistance/, measuremeNt/, Report/, dEbug/, biT/, aboUt, Quit
/ Quit
root@omap3evm:~/demo/wlan_scripts# cd ../ bluetooth_scripts
root@omap3evm:~/demo/bluetooth_scripts# ./BT_Demo.sh
Starting BT Demo .......
/*
************************************************
* Cleaning BT
************************************************
*/
killall: obexftpd: no process killed
killall: bluetoothd: no process killed
killall: dbus-daemon: no process killed
killall: hciattach: no process killed
!!!!!!!!!!! Start from the MAIN MENU !!!!!!!!!!!!!!!!!
/*************************************************
* Initialize BT
************************************************
*/
''' '''
bluetoothd[1285]: Bluetooth daemon 4.40
bluetoothd[1285]: Starting SDP server
bluetoothd[1285]: Can’t create GN bridge
Set BT_EN of WL1271
WL1271: Powering on
Can’t get device info: No such device
Can’t get default adapter
No such adapter
< HCI Command: ogf 0x3f, ocf 0x0210, plen 5
01 30 D0 02 01
Send failed: File descriptor in bad state
+++++++++++++++++++++++++++++++++++++++++++++++++++++
MAIN NENU
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 - BT Scan Remote Devices
2 - BT Get capabilities of Remote Device
3 - OPP Test
4 - FTP Test
5 - HID Test
6 - HSP Test
7 - A2DP Test
8 - Pair Remote Device
9 - Unpair Remote Device
10 - Exit Without BT Shut Down
11 - Exit With BT Shut Down
====> Initialization timed out.
11
/*
* ************************************************
* Cleaning BT
* ************************************************ */
killall: obexftpd: no process killed
Soft Exit.......
root@omap3evm:~/demo/bluetooth_scripts#
root@omap3evm:~/demo/bluetooth_scripts#
root@omap3evm:~/demo/bluetooth_scripts#
root@omap3evm:~/demo/bluetooth_scripts# root@omap3evm:~/demo/bluetooth_scripts# ./BT_Demo.sh
Starting BT Demo .......
/*
* ************************************************ */
* Cleaning BT
* ************************************************ */
*/
''' '''
killall: obexftpd: no process killed
killall: bluetoothd: no process killed
killall: dbus-daemon: no process killed
killall: hciattach: no process killed
!!!!!!!!!!! Start from the MAIN MENU !!!!!!!!!!!!!!!!!
/* ************************************************ */
* Initialize BT
* ************************************************ */
bluetoothd[1314]: Bluetooth daemon 4.40
bluetoothd[1314]: Starting SDP server
bluetoothd[1314]: Can’t create GN bridge
Set BT_EN of WL1271
WL1271: Powering on
Found a Texas Instruments’ chip!
Firmware file : /lib/firmware/TIInit_7.2.31.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
bluetoothd[1314]: HCI dev 0 registered
bluetoothd[1314]: HCI dev 0 up
bluetoothd[1314]: Starting security manager 0
bluetoothd[1314]: Adapter /org/bluez/1314/hci0 has been enabled
bluetoothd[1314]: Failed to access HAL
Device setup complete
< HCI Command: ogf 0x3f, ocf 0x0210, plen 5
01 30 D0 02 01
> HCI Event: 0x0e plen 6
01 10 FE 00 30 0C
+++++++++++++++++++++++++++++++++++++++++++++++++++++
MAIN NENU
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 - BT Scan Remote Devices
2 - BT Get capabilities of Remote Device
3 - OPP Test
4 - FTP Test
5 - HID Test
6 - HSP Test
7 - A2DP Test
8 - Pair Remote Device
9 - Unpair Remote Device
10 - Exit Without BT Shut Down
11 - Exit With BT Shut Down
2 Perform an inquiry scan in order to discover the BT devices in the area, as shown below:
+++++++++++++++++++++++++++++++++++++++++++++++++++++
MAIN NENU
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 - BT Scan Remote Devices
2 - BT Get capabilities of Remote Device
3 - OPP Test
4 - FTP Test
5 - HID Test
6 - HSP Test
7 - A2DP Test
8 - Pair Remote Device
9 - Unpair Remote Device
10 - Exit Without BT Shut Down
11 - Exit With BT Shut Down
====> 1
/*
* **************** BT-Scan ***********************
* Scan for the remote BT devices
* ************************************************ */
Scanning ...
11:22:33:55:66:77
00:03:C9:87:29:83 n/a
00:22:5F:97:7B:42 ILL101763
00:12:D2:96:99:EA Nokia 6230i
00:12:1C:BB:05:46 Parrot MK6000v1.01c
00:13:FD:02:C0:5E Nokia 62
3 Perform Pairing with the Bluetooth device, as shown below:
+++++++++++++++++++++++++++++++++++++++++++++++++++++
MAIN NENU
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 - BT Scan Remote Devices
2 - BT Get capabilities of Remote Device
3 - OPP Test
4 - FTP Test
5 - HID Test
6 - HSP Test
7 - A2DP Test
8 - Pair Remote Device
9 - Unpair Remote Device
10 - Exit Without BT Shut Down
11 - Exit With BT Shut Down
====> 8
''' '''Help:
Before running Pairing-Test, ensure that we have the following mandatory inputs
a. BD Address of Remote BT-Device (Use Option-1 of MAIN MENU)
1. Continue...
2. Goto MAIN MENU
====> 1
/*
* **************** BT-Pair *****************
* Pair to a remote BT device
* ******************************************* */
Enter the BD Addr of remote Device to Pair
====> 00:12:1C:BB:05:46
method return sender=:1.0 -> dest=:1.2 reply_serial=2
object path "/org/bluez/1314/hci0"
Enter the object path as got in the above command to complete Pairing
====> /org/bluez/1314/hci0
Error org.bluez.Error.AlreadyExists: Device already exists
bluetoothd[1314]: link_key_request (sba=00:22:A5:C7:CB:50, dba=00:12:1C:BB:05:46)
Pairing success ...
Play Stereo Audio File over BT Link
To configure A2DP and play music file in the headset:
+++++++++++++++++++++++++++++++++++++++++++++++++++++
MAIN NENU
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 - BT Scan Remote Devices
2 - BT Get capabilities of Remote Device
3 - OPP Test
4 - FTP Test
5 - HID Test
6 - HSP Test
7 - A2DP Test
8 - Pair Remote Device
9 - Unpair Remote Device
10 - Exit Without BT Shut Down
11 - Exit With BT Shut Down
====> 7
Help:
Before running A2DP-Test, ensure that we have the following mandatory inputs
a. BD Address of Remote BT-Device (Use Option-1 of MAIN MENU)
b. The remote A2DP device is paired (Use Option-8 of MAIN MENU)
1. Start Audio...
2. Stop Audio...
3. Goto MAIN MENU
====> 1
/*
* ************************************* A2DP *********************************
* Advanced Audio Distribution Profile (A2DP) defines how the high quality
* audio can be streamed from one device to another over Bluetooth connection.
* ****************************************************************************
*/
Enter the BD Address of the A2DP device
====> 00:12:1C:BB:05:46
’/etc/asound.conf’ got updated, ensure that we will pair to the device 00:12:1C:BB:05:46 for A2DP
/*
* ************************************* A2DP *********************************
* Advanced Audio Distribution Profile (A2DP) defines how the high quality
* audio can be streamed from one device to another over Bluetooth connection.
* *****************************************************************************/
Select Any Audio File ...
The following files are available at gallery
Pop.wav Shmulik_TIer.vcf
Enter the Audio wav File Name''' ... '''
====> Pop.wav
bluetoothd[1314]: link_key_request (sba=00:22:A5:C7:CB:50, dba=00:12:1C:BB:05:46)
bluetoothd[1314]: Can’t open input device: No such file or directory (2)
bluetoothd[1314]: AVRCP: failed to init uinput for 00:12:1C:BB:05:46
Playing WAVE ’/home/root/demo/bluetooth_scripts/../gallery/Pop.wav’ :
Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
+++++++++++++++++++++++++++++++++++++++++++++++++++++
MAIN NENU
+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 - BT Scan Remote Devices
2 - BT Get capabilities of Remote Device
3 - OPP Test
4 - FTP Test
5 - HID Test
6 - HSP Test
7 - A2DP Test
8 - Pair Remote Device
9 - Unpair Remote Device
10 - Exit Without BT Shut Down
11 - Exit With BT Shut Down
====> 10
root@omap3evm:~/demo/bluetooth_scripts#
Run Iperf TCP Downstream
To run Iperf TCP downstream:
1 Run iperf server on a OMAP3530 platform, as shown below:root@omap3evm:~/demo# cd wlan root@omap3evm:~/demo/wlan# cd tools root@omap3evm:~/demo/tools# ./iperf_1.7 -s -i1 -p7000 ------------------------------------------------------------ Server listening on TCP port 4464 TCP window size: 85.3 KByte (default) ------------------------------------------------------------2 Run iperf client on a PC, as shown below:
> /iperf -c 10.1.2.117 -p7000 & ------------------------------------------------------------ Client connecting to 10.1.2.107, TCP port 7000 TCP window size: 16.0 KByte (default) ------------------------------------------------------------
Expected Results
This section describes the expected results.
On the WLAN side, IPERF server should not report any packet loss. The following shows typical IPERF server output:------------------------------------------------------------ Server listening on TCP port 4464 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 6] local 10.1.2.117 port 4464 connected with 10.1.2.107 port 2232 [ ID] Interval Transfer Bandwidth [ 6] 0.0- 1.0 sec 678 KBytes 5.55 Mbits/sec [ 6] 1.0- 2.0 sec 767 KBytes 6.28 Mbits/sec [ 6] 2.0- 3.0 sec 736 KBytes 6.03 Mbits/sec [ 6] 3.0- 4.0 sec 740 KBytes 6.06 Mbits/sec [ 6] 4.0- 5.0 sec 748 KBytes 6.13 Mbits/sec [ 6] 5.0- 6.0 sec 668 KBytes 5.47 Mbits/sec [ 6] 6.0- 7.0 sec 708 KBytes 5.80 Mbits/sec [ 6] 7.0- 8.0 sec 645 KBytes 5.29 Mbits/sec [ 6] 8.0- 9.0 sec 763 KBytes 6.25 Mbits/sec [ 6] 9.0-10.0 sec 732 KBytes 5.99 Mbits/sec
At the same time, Bluetooth audio quality should be good and should not be affected by the WLAN traffic activity.
Host Configuration Parameters
The following table shows the parameters that can be defined using the .ini file and the Command Line Interface (CLI).
Table 1: Host Configuration Parameters
| Parameter | Function | Unit | Range | Default Value |
|---|---|---|---|---|
| coexOperationMode | Defines the SG3.0 operation mode | 0: Co-ex operation is Disabled
1: Co-ex operation is configured to Protective mode 2: Co-ex operation is configured to Opportunistic mode | 0: Co-ex operation is Disabled | |
| coexBtPerThreshold | Defines the PER threshold in PPM of the BT voice that when reached triggers the raising of the priority of the BT voice by the BT IP until next NFS sample interval time, as defined in coexBtNfsSampleInterval.
Unit: PER value in PPM (part per million) = #Error_packets / #Total_packets | PPM | 1-10000000 | 7500 (1 voice packet (HV3) drop every 500msec) |
| coexAutoScan
CompensationMaxTime | This value specifies an absolute time in micro-seconds that limits the maximum scan duration compensation while in SG Active mode. | usec | 1-10000000 | 150000 |
| coexBtNfsSampleInterval | Defines the PER threshold of the BT voice that when reached triggers the raising of the priority of the BT voice until the next NFS sample interval time, as defined in coexBtNfsSampleInterval. | msec | 1-65000 | 400 |
| coexBtLoadRatio | Defines the load ratio for the BT. The WLAN ratio is: 100-coexBtLoadRatio. | Percent | 0-100 | 50 |
| coexAutoPsMode | Defines whether forcing 802.11 PS entry due to SG request is allowed or not. | TRUE: Co-ex is allowed to enter/exit PS automatically and transparently to the host.
FALSE: Co-ex is not allowed to enter/exit PS. It triggers an event to the host as notification of the need to enter/exit PS due to the change of the BT’s state. | TRUE | |
| coexAutoScanEnlarged
NumOfProbeReqPercent | Defines the compensation percentage of the number of probe requests in case scanning is initiated during a BT voice/BT ACL guaranteed link. | Percent | 0-255 (0 - No compensation) | 50 |
| coexAutoScanEnlarged
ScanWindowPercent | This parameter defines the compensation percentage of scan window size in case scan is initiated during BT voice/BT ACL Guaranteed link. | Percent | 0-255 (0 - No compensation) | 50 |



