This tool can read current or change default HCI_LE_AUTOCONN_TIMEOUT value for Bluetooth adapter on Linux. The default value is defined for the kernel 5.15 at include/net/bluetooth/hci.h
:
#define HCI_LE_AUTOCONN_TIMEOUT msecs_to_jiffies(4000) /* 4 seconds */
and it can be too low if the advertising interval for a device is high (for power saving).
You can also change the value in /etc/bluetooth/main.conf, line LEAutoconnecttimeout
. The value in ms and will be applied at boot or when bluetooth service is restarted.
The tool changes timeout to hardcoded value 16000ms. You can change value NEW_LE_AUTOCONN_TIMEOUT
in the lower source file to required value .