1. Android Central Question's Avatar
    There is a 100 device limit in Android for the maximum number of paired Bluetooth devices. This causes problems for my App used for reading the meter status.

    Solutions
    Multiple solutions to the problem looks possible.

    * Solutions that replace the Bluetooth lib library all require some form of rooting the device.
    * Use AOSP and GSI to update system image of device.
    * Manufacturers use different solutions for partitioning etc. of phones so it’s very hard to create a portable solution even when using GSI.

    * Replace only the Bluetooth library
    Replacing only the lib may be more general, but it also requires rooting and installation of TWRP.

    * Use the ndk to patch/replace the pairing code or try to integrate the App deeper in the stack
    There is an interesting old paten for “Centralized Bluetooth Device Pairing”

    * Patch of Bluetooth library
    The idea is to just change BTM_SEC_MAX_DEVICE_RECORDS variable. If we can change or override this variable outside in some configuration file and do not build source is more desirable.
    If we can just build and replace component which allow it to keep more then 100 paired Bluetooth device is ideal
    The below code seems to be culprit as mentioned in this link (
    According to the Bluetooth implementation, if there are more than 100 device records the allocation will fail. The responsible BTM_SEC_MAX_DEVICE_RECORDS is defined in bt_target.h:
    /* The number of security records for peer devices. */
    #ifndef BTM_SEC_MAX_DEVICE_RECORDS
    #define BTM_SEC_MAX_DEVICE_RECORDS 100
    #endif
    This is then used inside btm_dev.c, specifically in BTM_SecAddDevice which returns false after 100 pairings:
    /* There is no device record, allocate one.
    * If we can not find an empty spot for this one, let it fail. */
    for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++)

    Query

    * If I update the #define BTM_SEC_MAX_DEVICE_RECORDS from 100 to lets say 1000, do I need to build the complete GIS image and install.

    * Or, can I only update the BT library?

    * Or, any other methods?
    05-19-2020 07:39 AM
  2. hallux's Avatar
    We had a similar thread earlier this year - https://forums.androidcentral.com/ge...h-devices.html

    Is this purely an Android issue or do other Bluetooth hosts have the same limitation? I don't have more than 100 Bluetooth devices to try pairing to my MBP to see if they can all pair.

    If you need additional help or have more questions or details to share, please join the site so you can reply in this thread. See this link for instructions on how to join Android Central.
    B. Diddy likes this.
    05-19-2020 07:49 AM
  3. anon(10614692)'s Avatar
    AFAIK the kernel restricts the limit
    Laura Knotek likes this.
    05-19-2020 10:59 AM

Similar Threads

  1. Replies: 3
    Last Post: 05-18-2020, 10:27 PM
  2. When Android 10?
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 05-18-2020, 05:15 PM
  3. Bluetooth disconnect notification
    By scrondar in forum Samsung Galaxy Watch Active 2
    Replies: 3
    Last Post: 05-18-2020, 11:58 AM
  4. Android system file system limit with 3G data unused
    By Android Central Question in forum Ask a Question
    Replies: 3
    Last Post: 05-17-2020, 11:01 PM
  5. Why will my new note 10 not connect to the Bluetooth on my VW 2016 Passat.
    By Android Central Question in forum Samsung Galaxy Note 10 & Note 10+ (2019)
    Replies: 2
    Last Post: 05-17-2020, 02:50 PM
LINK TO POST COPIED TO CLIPBOARD