4.9.2 Enable/Disable Wi-Fi/BT Co-existence support

To configure Wi-Fi®/Bluetooth® coexistence (Wi-Fi/Bluetooth co-ex) PTA settings, use the WILC sysfs nodes in Linux root file-system (rootFS). These sysfs entries are created when the WILCS02 driver is loaded successfully. There are four sysfs configuration entries to setup the Wi-Fi/Bluetooth co-ex PTA settings. These configurations file nodes can be listed using ls command.
Note: PTA configuration entries are in bold.
# ls /sys/wilc/
ant_swtch_mode         coex_enabled           fw_dbg_mod_filter
antenna1               coex_inteface_type     p2p_mode
antenna2               coex_wlan_bt_priority
coex_antenna_mode      fw_dbg_level

The following table contains more details on these sysfs nodes and their default values when they are created.

Table 4-4. Sysfs Nodes and Default Values for Wi-Fi®/Bluetooth® Coexistence PTA Settings
NodeValue
coex_antenna_mode
  • 0 - Dedicated antenna (default)
  • 1 - Shared antenna
coex_inteface_type
  • 0 - Three wire interface BT_Act, BT_Prio, WLAN_Act (default)
  • 1 - Two wire interface BT_Prio, WLAN_Act
coex_wlan_bt_priority
  • 1 - WLAN Tx priority greater than BT low priority
  • 2 - WLAN Rx priority greater than BT low priority
  • 3 - WLAN Tx/Rx priority greater than BT low priority(default)
coex_enabled
  • 1 - Enabled
  • 0 - Disabled (default)
  • To read the values of the Wi-Fi/Bluetooth co-ex, use the following cat command:
    # cat /sys/wilc/coex_antenna_mode
    0
    # cat /sys/wilc/coex_inteface_type
    0
    # cat /sys/wilc/coex_wlan_bt_priority
    3
    # cat /sys/wilc/coex_enabled
    1
  • To modify the values of the Wi-Fi/Bluetooth co-ex, use the following echo command:
    # echo <value> > /sys/wilc/coex_antenna_mode
    # echo <value> > /sys/wilc/coex_wlan_bt_priority
    # echo <value> > /sys/wilc/coex_inteface_type
    # echo <value> > /sys/wilc/coex_enabled

The Wi-Fi/Bluetooth PTA default configurations are applied during the WLAN host driver/firmware initialization. To change the PTA configurations, modify the configurations once the network interface (wlan0) is up.

Note:
  1. Changing the configuration parameters (for example, coex_antenna_mode, coex_wlan_bt_priority and more) does not take effect while the Wi-Fi/Bluetooth co-ex is running. The recommendation is to change these parameters before enabling the Wi-Fi/Bluetooth co-ex by using the coex_enabled command.
  2. To turn OFF Bluetooth operation while the Wi-Fi/Bluetooth co-ex is enabled, perform the following steps:
    1. Use the following command to disable the Wi-Fi/Bluetooth co-ex feature:
      echo <value> > /sys/wilc/coex_enabled
    2. When turning the Bluetooth operation back ON, the Bluetooth must be turned ON first. This is to avoid leaving the PTA pins floating when the Bluetooth operation is OFF without enabling the Wi-Fi/Bluetooth co-ex.