Return-Path: MIME-Version: 1.0 In-Reply-To: <1384985340-2902-1-git-send-email-andre.guedes@openbossa.org> References: <1384985340-2902-1-git-send-email-andre.guedes@openbossa.org> From: Andre Guedes Date: Wed, 4 Dec 2013 12:35:09 -0200 Message-ID: Subject: Re: [RFC v3 00/12] LE auto connection and connection parameters To: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Ping. On Wed, Nov 20, 2013 at 7:08 PM, Andre Guedes wrote: > Hi all, > > The main changes from the previous version are: > * Debugfs interface to add auto connect address instead of new mgmt > commands. > * We always stop LE scanning in favor of connection establishment even if > the controller supports scanning and connection at the same time. > * Background scanning is now controlled in one single place (hci_update_ > background_scan function). > * RCU was replaced by hdev->lock to protect hdev->le_conn_params list. After > all the changes since the original version of this patch set, I realized > we always operate on hdev->le_conn_params with hdev->lock held so there is > no point in use RCU to protect this list. > > In order to test the LE auto connection mechanism please follow the > instructions below. > > To add a new auto connection address we write on le_auto_conn file following > the format
. > > The
values are: > * 0 for public address > * 1 for random address > > The values are (for more details see struct hci_conn_params): > * 0 for disabled > * 1 for always > * 2 for link loss > > So for instance, if you want the kernel autonomously establishes connections > with device AA:BB:CC:DD:EE:FF (public address) every time the device enters in > connectable mode (starts advertising), you should run the command: > $ echo "AA:BB:CC:DD:EE:FF 0 1" > /sys/kernel/debug/bluetooth/hci0/le_auto_conn > > To get the list of connection parameters configured in kernel, read the > le_auto_conn file: > $ cat /sys/kernel/debug/bluetooth/hci0/le_auto_conn > > Finally, to clear the connection parameters list, write an empty string: > $ echo "" > /sys/kernel/debug/bluetooth/hci0/le_auto_conn > > Regards, > > Andre Guedes > > > Andre Guedes (12): > Bluetooth: Save connection interval parameters in hci_conn > Bluetooth: Group list_head fields from strcut hci_dev together > Bluetooth: Introduce connection parameters list > Bluetooth: Use connection parameters if any > Bluetooth: Stop scanning on LE connection > Bluetooth: Introduce hdev->pend_le_conn list > Bluetooth: Introduce LE auto connection infrastructure > Bluetooth: Re-enable background scan in case of error > Bluetooth: Temporarily stop background scanning on discovery > Bluetooth: Auto connection and power on > Bleutooth: Add support for auto connect options > Bluetooth: Add le_auto_conn file on debugfs > > include/net/bluetooth/hci_core.h | 43 +++++- > net/bluetooth/hci_conn.c | 39 ++++- > net/bluetooth/hci_core.c | 318 +++++++++++++++++++++++++++++++++++++++ > net/bluetooth/hci_event.c | 60 ++++++++ > net/bluetooth/mgmt.c | 25 ++- > 5 files changed, 473 insertions(+), 12 deletions(-) > > -- > 1.8.4 >