[Letux-kernel] Letux-4.11-rc and Bluetooth

H. Nikolaus Schaller hns at goldelico.com
Tue Apr 25 21:31:15 CEST 2017


> Am 25.04.2017 um 21:05 schrieb Andreas Kemnade <andreas at kemnade.info>:
> On Tue, 25 Apr 2017 20:02:39 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>> I just realized that we have switched for the serdev driver for GPS
>> in Letux-4.11-rc.
>> Since we have a special misc/w2cbw003 driver which similarily
>> checks for open()/close() on the /dev/tty we have broken
>> Bluetooth power management...
>> It is not difficult to fix, just some copy&paste the serdev parts
>> into the w2cbw003 bluetooth power driver. I will try to do asap.

Well, the copy&paste part was simple and I have pushed it to the w2sg-serdev branch.


But it is definitively not enough :(

The problem is that we have again a man-in-the-middle approach, i.e. on one
side the serdev interface and on the other a new /dev/tty. This works in
one direction only. The other is missing because we don't need it for GPS.

Next, hciattach assumes that it can tamper with the tty port's baud rate, flow
control etc. So this has to be passed to the serdev.

Makes a lot of additional glue code which has to be developed :(

Hm. Maybe a better strategy would be to not open the serdev?
AFAIR, this should make the /dev/ttyO remain available as standard UART.

But then we must install some "line discipline" to get notified about the
open()/close() actions. And I have no idea if the serdev API provides enough
struct pointers to get up to the pointer where we can install the ldisc.

I would even prefer this approach if it is possible... It would be much
less glue code and would avoid this double copying we have in the w2sg driver.

> Yes, noticed it also yesterday.
> BTW:
> For things like
> mdbus2 -s org.bluez /org/bluez/hci0 org.bluez.NetworkServer1.Register panu btbr0
> to work, we also need
> The former pand commandline tool works without. But it does not play
> well together with recent bluez.

I see. Have added it to the defconfig.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170425/9d80105a/attachment.asc>

More information about the Letux-kernel mailing list