Return-Path: Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: bt dongle goes awry after too many connections From: Marcel Holtmann In-Reply-To: <54FDCEBC.2050705@ubnt.com> Date: Mon, 9 Mar 2015 10:10:52 -0700 Cc: Tim Tisdall , linux-bluetooth@vger.kernel.org Message-Id: <14B1E1BA-C93F-42BC-B2DD-0C8DBE6C68AA@holtmann.org> References: <6EDCDCB4-6F4D-4DE6-88DB-88D333FC2CCC@holtmann.org> <54FDBBD2.10608@ubnt.com> <185295B8-ABD9-4EDF-B290-12C430CCA906@holtmann.org> <54FDCEBC.2050705@ubnt.com> To: Andrejs Hanins Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Andrejs, >>>>> If you do not need BR/EDR, you can switch that off and it might free the radio resources you need for the many LE connections. >>>> Would someone please tell me how you do that? I haven't seen this >>>> being done before. Is it an HCI command? ioctl command to the >>>> kernel? >>> ControllerMode = le >>> in /etc/bluetooth/main.conf >> which might at least need a 3.13.x kernel to actually work correctly. While the API is there, we have made significant fixes to the LE only mode in later kernels. Using a dual-mode controller in LE only mode actually needed some extra care. >> >> As I said, if it is not 3.18.x or 3.19.x kernel, then personally I would not bet on it. We have made sure that bug fixes are put into the -stable kernels for these release. Anything older has no guarantee anymore. > Sure, I noticed that lots of work has been done lately in regard to LE, so I'm indeed using 5.28 daemon@3.19.x kernel in LE-only mode and so far so good. > One of the useful things which still seems to be missing is the control over LE advertisements via D-Bus iface. "Discoverable" property change does not affect LE advs. I'm currently using 'hciconfig hci0 leadv' to make it work. But still, LE advs stop and do not re-start after adapter is connected/disconnected to some peripheral. you might want to try "btmgmt advertising on" instead. It will toggle the connectable and discoverable settings accordingly. You also really want the kernel take control over advertising. Otherwise you have to keep re-enabling after each connection. The controller will turn it off once a connection has been created. The kernel does take care of that for you if you use the mgmt interface. Regards Marcel