Return-Path: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: LE mouse reconnect problem From: Marcel Holtmann In-Reply-To: Date: Thu, 3 Jul 2014 09:29:02 +0200 Cc: Johan Hedberg , Luiz Augusto von Dentz , "linux-bluetooth@vger.kernel.org" Message-Id: References: <20140629051442.GA31085@t440s.P-661HNU-F1> <20140629052949.GA32130@t440s> <5A1EE16D-11BB-414E-B572-92FBF305B4E5@holtmann.org> To: Ryan Press Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Ryan, >>>>> I have one other question with it. When it first reconnects the mouse >>>>> pointer is really jerky, like it's updating really slow. Then after a >>>>> few seconds it is normal; in fact it is very responsive compared to my >>>>> old Bluetooth mouse. With Windows 8.1 it reconnects lightning fast >>>>> when I turn it on, and it is not jerky at first. >>>>> >>>> this is a kernel issue with not remembering the previous connection parameters. What you see is that we start connecting with the default values and then the slave (the mouse) will correct us and tell us what connection parameters it needs. We accept them and actually change the LE link to use these parameters. However we end up forgetting them. So every time you connect this procedure keeps repeating itself. >>>> >>>> I fixed this as well, but for that you will need a bluetooth-next kernel where I enabled the management API for passive scanning and a modified bluetoothd that will then allow you a smooth experience. If the slave updates the connection parameters we remember them for devices using auto-connection. So once the connection is triggered via passive scanning the values will be remembered. >>>> >>>> At the moment, I have one minor issue with the re-connection within bluetoothd and once that is fixed this should be pretty instant. >>> >>> >>> Okay, great, glad to hear that you're already on it. I'm really >>> looking forward to the seamless Bluetooth experience on Linux! When >>> everything is ready and in the master branch let me know and I will >>> try them out. >> >> the current bluetooth-next tree and bluez.git should now make this work smoothly. The first connection after starting bluetoothd will still use the wrong connection parameters, but all future ones will be snappy. > > I have installed bluetooth-next and bluez git. I had to merge with > rc3 because rc1 wouldn't boot on my machine for some other reason. At > first I had rfkill soft blocked when resuming from standby but then I > pulled again and it fixed it. I saw Johan made a commit about blocked > devices maybe that was it. > > So it works really well! Connections are instant and the mouse > reconnects every time. The only time that connection is slow is the > first time after a reboot, like you mention above; that's not really a > problem. even the first time after boot should be fast now. Fast in a sense that we use the correct Connection Parameters since we remember them. The one thing it still has to do is service discovery which does take a bit indeed. On a side note, it seems that Microsoft released a -002 version of the mouse (check the product key under your battery) that will actually fall back to using ADV_IND instead of only doing ADV_DIRECT_IND. Regards Marcel