What is the difference between bt_coex_active=N and bt_coex_active=1?

  • 1
    Your question sounds a bit vague. Could you please provide more details ? – FloT Apr 9 '19 at 19:05

is an option for bluetooth and part of the wireless driver (iwlegacy; Intel PRO/Wireless 3945 and WiFi Link 4965 devices).

It is used to enable both wifi and bluetooth at the same time. Something that not always works.

  • 0 means not active (or false)
  • 1 means active (or true)

The valid options are listed in

/sys/module/[module name]/parameters/[optionname]

As an example using iwlwifi:


it shows bt_coex_active: Y.So N or 0 will be inactive and Y or 1 active.

|improve this answer|||||

In addition to Rinzwind's fine answer, I will add some additional details.

The difference between bt_coex_active=N and bt_coex_active=1 is that one of them may or may not be incorrect and therefore ineffective.

First, some background. The available and manipulable parameters to change the behavior of a kernel driver are found in modinfo . For example, here are the parameters found from modinfo iwlwifi, a common driver for Intel wireless devices:

parm:           swcrypto:using crypto in software (default 0 [hardware]) (int)
parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)
parm:           amsdu_size:amsdu size 0: 12K for multi Rx queue devices, 4K for other devices 1:4K 2:8K 3:12K (default 0) (int)
parm:           fw_restart:restart firmware in case of error (default true) (bool)
parm:           antenna_coupling:specify antenna coupling in dB (default: 0 dB) (int)
parm:           nvm_file:NVM file name (charp)
parm:           d0i3_disable:disable d0i3 functionality (default: Y) (bool)
parm:           lar_disable:disable LAR functionality (default: N) (bool)
parm:           uapsd_disable:disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3) (uint)
parm:           bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)
parm:           led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)
parm:           power_save:enable WiFi power management (default: disable) (bool)
parm:           power_level:default power save level (range from 1 - 5, default: 1) (int)
parm:           fw_monitor:firmware monitor - to debug FW (default: false - needs lots of memory) (bool)
parm:           d0i3_timeout:Timeout to D0i3 entry when idle (ms) (uint)
parm:           disable_11ac:Disable VHT capabilities (default: false) (bool)
parm:           remove_when_gone:Remove dev from PCIe bus if it is deemed inaccessible (default: false) (bool)

Therefore, we can change the behavior of the driver by invoking a parameter; in your case:

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi bt_coex_active=N

We can make the parameter permanent by writing a conf file. The driver iwlwifi already has a required file, so we can merely add the parameter to it:

sudo -i
echo "options iwlwifi bt_coex_active=N" >> /etc/modprobe.d/iwlwifi.conf

The > symbol means write to and overwrite if needed, the file. >> means append to the file. In the case of iwlwifi, we want 'append.'

But wait! How do we know that it is supposed to be Y or N or 1 or 0? The first clue is that the parameter is listed as being manipulable by a boolean expression (bool) and not as an integer (int), 0 or 1. Second, we can easily find out what the driver expects by loading the driver:

sudo modprobe iwlwifi

And then checking the parameter value:

cat /sys/module/iwlwifi/parameters/bt_coex_active

If the driver is loaded without any parameter, it will load the default for the driver; in this case, Y. We then know that, in this context, 'boolean' means Y or N.

Does the driver accept 1 or 0 as a replacement for Y and N? Again, we can easily check by simply trying it:

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi bt_coex_active=0
cat /sys/module/iwlwifi/parameters/bt_coex_active

The result is N, so we know that the driver is written to accept either Y or N or 1 or 0.

CAUTION: The bt_coexist parameter is available in several other non-Intel drivers. Some may or may not interchangeably accept Y or N or 1 or 0. The only way to find out for sure is to verify as above.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.