You are reading a single comment by @François and its replies. Click here to read the full conversation.
  • Here's what we know from Emil:

    Unfortunately, no platforms I'm aware of have well-defined behaviour
    nor documented APIs to handle the case when the maximum number of
    connections is reached. It seems people working on Bluetooth stacks
    have not really thought, cared about or even tested what will or
    should happen if users have many BLE devices. As an example, the
    Bluetooth stack in Android hangs if you have 7 BLE connections and try
    to establish the 8th with "autoConnect=true" (in the way that it will
    never again connect to BLE devices until Bluetooth is restarted, even
    if the 7 get disconnected). If you have GATT notifications you listen
    to in Windows and are above the maximum number of connections, you get
    no event telling this, so some notifications will not be delivered to
    your computer (since the peripheral can't connect). Generally among
    most platforms some random error code is thrown (general failure,
    internal error, unspecified error, gatt error) when you actively try
    to connect a new device when the maximum number of connections has
    been reached. Sometimes a better error code like "no resources" is
    thrown. The non-existing documentation of error codes that is
    unfortunately general among all BLE implementations is very annoying
    when you are an app developer (Windows must be the worst when they're
    trying to map BLE errors to their general 0x80... HRESULT error
    codes).

    Source: https://github.com/WebBluetoothCG/web-bl­uetooth/issues/342#issuecomment-26811708­5

About

Avatar for François @François started