2024-03-27 18:16:09

by Chris Laplante

[permalink] [raw]
Subject: Maximum Bonded Devices

Hi,

I have a customer with an issue where they are unable to get 30 devices paired and bonded when the BL5340PA (nRF5340) SoC as their central device.

Following details might help you out-
1. They are using the hci_usb sample code as the firmware on the SoC.
2. The stack on the host Linux system being used is BlueZ (version 5.66)

They are able to pair and bond with upto 8 devices pretty quickly and then this process slows down and they aren't able to pair with more than 12-15 sensors in a single go.
After the pairing and bonding process stagnates at around 12-15 sensors if they restart the host system (and in turn the SoC as well) they are able to pair with a few more sensors but not 30 sensors.
So far out of the things that they have tried out to identify the source of the problem it has something to do with the BlueZ stack configuration ( they are currently using the default stack configuration) and/ or the firmware configuration parameters.

Do you have any idea on what configuration parameters could be causing this behaviour and/ or what configuration changes need to be made so that they can achieve the target of pairing and bonding with 30 sensors. If you have any more questions please let me know.

I believe the default is set to something like 65K devices per MaxControllers in main.c as well as main.conf

parse_config_u16(config, "General", "MaxControllers",
&btd_opts.max_adapters,
0, UINT16_MAX);

# Maximum number of controllers allowed to be exposed to the system.
# Default=0 (unlimited)
#MaxControllers=0

I am assuming the issue isn't BlueZ specific but if there is any thoughts or guidance you may have it would be appreciated.

Thanks
Chris

THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS WRITTEN PERMISSION OF EZURIO


2024-03-27 21:01:47

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Maximum Bonded Devices

Hi Chris,

On Wed, Mar 27, 2024 at 2:15 PM Chris Laplante
<[email protected]> wrote:
>
> Hi,
>
> I have a customer with an issue where they are unable to get 30 devices paired and bonded when the BL5340PA (nRF5340) SoC as their central device.
>
> Following details might help you out-
> 1. They are using the hci_usb sample code as the firmware on the SoC.
> 2. The stack on the host Linux system being used is BlueZ (version 5.66)
>
> They are able to pair and bond with upto 8 devices pretty quickly and then this process slows down and they aren't able to pair with more than 12-15 sensors in a single go.
> After the pairing and bonding process stagnates at around 12-15 sensors if they restart the host system (and in turn the SoC as well) they are able to pair with a few more sensors but not 30 sensors.
> So far out of the things that they have tried out to identify the source of the problem it has something to do with the BlueZ stack configuration ( they are currently using the default stack configuration) and/ or the firmware configuration parameters.
>
> Do you have any idea on what configuration parameters could be causing this behaviour and/ or what configuration changes need to be made so that they can achieve the target of pairing and bonding with 30 sensors. If you have any more questions please let me know.

Don't think there is such thing about number of paired devices limit,
we just use lists so they be extended dynamically as you pair with
more devices, there might be a limit on how many the controller can
maintain connected simultaneously though, so perhaps you want to
explain a little better how the process of pairing goes, is that
serialized or you attempt to connect/pair everything in parallel?

> I believe the default is set to something like 65K devices per MaxControllers in main.c as well as main.conf
>
> parse_config_u16(config, "General", "MaxControllers",
> &btd_opts.max_adapters,
> 0, UINT16_MAX);
>
> # Maximum number of controllers allowed to be exposed to the system.
> # Default=0 (unlimited)
> #MaxControllers=0

These are the number of controllers, not to confuse with paired devices though.

> I am assuming the issue isn't BlueZ specific but if there is any thoughts or guidance you may have it would be appreciated.
>
> Thanks
> Chris
>
> THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS WRITTEN PERMISSION OF EZURIO



--
Luiz Augusto von Dentz

2024-03-27 21:04:49

by Chris Laplante

[permalink] [raw]
Subject: RE: Maximum Bonded Devices

Thanks Luiz

They are not trying to maintain 30 simultaneous connections if that is what you question was. They will only connect with say one at a time but they want to maintain up to 30 bonded devices in their database.

Thanks
Chris

-----Original Message-----
From: Luiz Augusto von Dentz <[email protected]>
Sent: Wednesday, March 27, 2024 5:01 PM
To: Chris Laplante <[email protected]>
Cc: [email protected]
Subject: Re: Maximum Bonded Devices

EXTERNAL EMAIL: Be careful with attachments and links.

Hi Chris,

On Wed, Mar 27, 2024 at 2:15 PM Chris Laplante <[email protected]> wrote:
>
> Hi,
>
> I have a customer with an issue where they are unable to get 30 devices paired and bonded when the BL5340PA (nRF5340) SoC as their central device.
>
> Following details might help you out-
> 1. They are using the hci_usb sample code as the firmware on the SoC.
> 2. The stack on the host Linux system being used is BlueZ (version 5.66)
>
> They are able to pair and bond with upto 8 devices pretty quickly and then this process slows down and they aren't able to pair with more than 12-15 sensors in a single go.
> After the pairing and bonding process stagnates at around 12-15 sensors if they restart the host system (and in turn the SoC as well) they are able to pair with a few more sensors but not 30 sensors.
> So far out of the things that they have tried out to identify the source of the problem it has something to do with the BlueZ stack configuration ( they are currently using the default stack configuration) and/ or the firmware configuration parameters.
>
> Do you have any idea on what configuration parameters could be causing this behaviour and/ or what configuration changes need to be made so that they can achieve the target of pairing and bonding with 30 sensors. If you have any more questions please let me know.

Don't think there is such thing about number of paired devices limit, we just use lists so they be extended dynamically as you pair with more devices, there might be a limit on how many the controller can maintain connected simultaneously though, so perhaps you want to explain a little better how the process of pairing goes, is that serialized or you attempt to connect/pair everything in parallel?

> I believe the default is set to something like 65K devices per
> MaxControllers in main.c as well as main.conf
>
> parse_config_u16(config, "General", "MaxControllers",
> &btd_opts.max_adapters,
> 0, UINT16_MAX);
>
> # Maximum number of controllers allowed to be exposed to the system.
> # Default=0 (unlimited)
> #MaxControllers=0

These are the number of controllers, not to confuse with paired devices though.

> I am assuming the issue isn't BlueZ specific but if there is any thoughts or guidance you may have it would be appreciated.
>
> Thanks
> Chris
>
> THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE
> AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE
> INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS
> WRITTEN PERMISSION OF EZURIO



--
Luiz Augusto von Dentz
THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS WRITTEN PERMISSION OF EZURIO

2024-03-27 21:10:32

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Maximum Bonded Devices

Hi Chris,

On Wed, Mar 27, 2024 at 5:04 PM Chris Laplante
<[email protected]> wrote:
>
> Thanks Luiz
>
> They are not trying to maintain 30 simultaneous connections if that is what you question was. They will only connect with say one at a time but they want to maintain up to 30 bonded devices in their database.

I have something like that in my device database, in fact in a crowded
environment you may see hundreds, perhaps they are marked with
auto-connect flag and then at some point you can't really pair more
because they are always connecting/disconnecting?

> Thanks
> Chris
>
> -----Original Message-----
> From: Luiz Augusto von Dentz <[email protected]>
> Sent: Wednesday, March 27, 2024 5:01 PM
> To: Chris Laplante <[email protected]>
> Cc: [email protected]
> Subject: Re: Maximum Bonded Devices
>
> EXTERNAL EMAIL: Be careful with attachments and links.
>
> Hi Chris,
>
> On Wed, Mar 27, 2024 at 2:15 PM Chris Laplante <[email protected]> wrote:
> >
> > Hi,
> >
> > I have a customer with an issue where they are unable to get 30 devices paired and bonded when the BL5340PA (nRF5340) SoC as their central device.
> >
> > Following details might help you out-
> > 1. They are using the hci_usb sample code as the firmware on the SoC.
> > 2. The stack on the host Linux system being used is BlueZ (version 5.66)
> >
> > They are able to pair and bond with upto 8 devices pretty quickly and then this process slows down and they aren't able to pair with more than 12-15 sensors in a single go.
> > After the pairing and bonding process stagnates at around 12-15 sensors if they restart the host system (and in turn the SoC as well) they are able to pair with a few more sensors but not 30 sensors.
> > So far out of the things that they have tried out to identify the source of the problem it has something to do with the BlueZ stack configuration ( they are currently using the default stack configuration) and/ or the firmware configuration parameters.
> >
> > Do you have any idea on what configuration parameters could be causing this behaviour and/ or what configuration changes need to be made so that they can achieve the target of pairing and bonding with 30 sensors. If you have any more questions please let me know.
>
> Don't think there is such thing about number of paired devices limit, we just use lists so they be extended dynamically as you pair with more devices, there might be a limit on how many the controller can maintain connected simultaneously though, so perhaps you want to explain a little better how the process of pairing goes, is that serialized or you attempt to connect/pair everything in parallel?
>
> > I believe the default is set to something like 65K devices per
> > MaxControllers in main.c as well as main.conf
> >
> > parse_config_u16(config, "General", "MaxControllers",
> > &btd_opts.max_adapters,
> > 0, UINT16_MAX);
> >
> > # Maximum number of controllers allowed to be exposed to the system.
> > # Default=0 (unlimited)
> > #MaxControllers=0
>
> These are the number of controllers, not to confuse with paired devices though.
>
> > I am assuming the issue isn't BlueZ specific but if there is any thoughts or guidance you may have it would be appreciated.
> >
> > Thanks
> > Chris
> >
> > THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE
> > AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE
> > INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS
> > WRITTEN PERMISSION OF EZURIO
>
>
>
> --
> Luiz Augusto von Dentz
> THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS WRITTEN PERMISSION OF EZURIO



--
Luiz Augusto von Dentz

2024-03-29 14:12:31

by Chris Laplante

[permalink] [raw]
Subject: RE: Maximum Bonded Devices

Hi Luiz,

Can you help out with the question below?

We are using Bluez Version 5.66, and in the daemon configuration file /etc/bluetooth/main.conf:
# Enables kernel experimental features, alternatively a list of UUIDs
# can be given.
# Possible values: true,false,<UUID List>
# Possible UUIDS:
# d4992530-b9ec-469f-ab01-6c481c47da1c (BlueZ Experimental Debug)
# 671b10b5-42c0-4696-9227-eb28d1b049d6 (BlueZ Experimental Simultaneous Central and Peripheral)
# 15c0a148-c273-11ea-b3de-0242ac130004 (BlueZ Experimental LL privacy)
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
# Defaults to false.
#KernelExperimental = false

If BlueZ support simultaneous central and peripheral roles, why is not allowed in config file, called as experimental and kernel support set to FALSE.
I will try to enable it in the config file in next steps, and I will see if it helps.

Related test of the roles, You are right, it is not so trivial. It has to be programmed/created. I will have a look if using python scripts will help a little.

-----Original Message-----
From: Luiz Augusto von Dentz <[email protected]>
Sent: Wednesday, March 27, 2024 5:10 PM
To: Chris Laplante <[email protected]>
Cc: [email protected]
Subject: Re: Maximum Bonded Devices

EXTERNAL EMAIL: Be careful with attachments and links.

Hi Chris,

On Wed, Mar 27, 2024 at 5:04 PM Chris Laplante <[email protected]> wrote:
>
> Thanks Luiz
>
> They are not trying to maintain 30 simultaneous connections if that is what you question was. They will only connect with say one at a time but they want to maintain up to 30 bonded devices in their database.

I have something like that in my device database, in fact in a crowded environment you may see hundreds, perhaps they are marked with auto-connect flag and then at some point you can't really pair more because they are always connecting/disconnecting?

> Thanks
> Chris
>
> -----Original Message-----
> From: Luiz Augusto von Dentz <[email protected]>
> Sent: Wednesday, March 27, 2024 5:01 PM
> To: Chris Laplante <[email protected]>
> Cc: [email protected]
> Subject: Re: Maximum Bonded Devices
>
> EXTERNAL EMAIL: Be careful with attachments and links.
>
> Hi Chris,
>
> On Wed, Mar 27, 2024 at 2:15 PM Chris Laplante <[email protected]> wrote:
> >
> > Hi,
> >
> > I have a customer with an issue where they are unable to get 30 devices paired and bonded when the BL5340PA (nRF5340) SoC as their central device.
> >
> > Following details might help you out-
> > 1. They are using the hci_usb sample code as the firmware on the SoC.
> > 2. The stack on the host Linux system being used is BlueZ (version 5.66)
> >
> > They are able to pair and bond with upto 8 devices pretty quickly and then this process slows down and they aren't able to pair with more than 12-15 sensors in a single go.
> > After the pairing and bonding process stagnates at around 12-15 sensors if they restart the host system (and in turn the SoC as well) they are able to pair with a few more sensors but not 30 sensors.
> > So far out of the things that they have tried out to identify the source of the problem it has something to do with the BlueZ stack configuration ( they are currently using the default stack configuration) and/ or the firmware configuration parameters.
> >
> > Do you have any idea on what configuration parameters could be causing this behaviour and/ or what configuration changes need to be made so that they can achieve the target of pairing and bonding with 30 sensors. If you have any more questions please let me know.
>
> Don't think there is such thing about number of paired devices limit, we just use lists so they be extended dynamically as you pair with more devices, there might be a limit on how many the controller can maintain connected simultaneously though, so perhaps you want to explain a little better how the process of pairing goes, is that serialized or you attempt to connect/pair everything in parallel?
>
> > I believe the default is set to something like 65K devices per
> > MaxControllers in main.c as well as main.conf
> >
> > parse_config_u16(config, "General", "MaxControllers",
> > &btd_opts.max_adapters,
> > 0, UINT16_MAX);
> >
> > # Maximum number of controllers allowed to be exposed to the system.
> > # Default=0 (unlimited)
> > #MaxControllers=0
>
> These are the number of controllers, not to confuse with paired devices though.
>
> > I am assuming the issue isn't BlueZ specific but if there is any thoughts or guidance you may have it would be appreciated.
> >
> > Thanks
> > Chris
> >
> > THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY
> > NATURE AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER
> > AND THE INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT
> > EXPRESS WRITTEN PERMISSION OF EZURIO
>
>
>
> --
> Luiz Augusto von Dentz
> THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE
> AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE
> INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS
> WRITTEN PERMISSION OF EZURIO



--
Luiz Augusto von Dentz
THE INFORMATION CONTAINED IN THIS DOCUMENT IS OF A PROPRIETARY NATURE AND IS INTENDED TO BE KEPT CONFIDENTIAL BETWEEN THE SENDER AND THE INTENDED RECIPIENT. IT MAY NOT BE REPRODUCED OR USED WITHOUT EXPRESS WRITTEN PERMISSION OF EZURIO