Return-Path: Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: Nexus 4 in BLE peripheral role with bluez stack From: Marcel Holtmann In-Reply-To: <5515ECE9.9080101@gmail.com> Date: Fri, 27 Mar 2015 17:01:07 -0700 Cc: linux-bluetooth@vger.kernel.org Message-Id: <0B4D986A-2913-46C0-8EB2-53EE29C67739@holtmann.org> References: <5515ECE9.9080101@gmail.com> To: Florian Grandel Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Florian, > I recently built an autonomous bluetooth LE network (based on Nordic nRF51822 central/nRF8001 peripheral µC) which I use for basic home automation tasks. > > To access this network from my Nexus 4 I need to put the phone in a peripheral role so it can connect to the nRF51822 central. > > As bluedroid won't support older Nexus phones in a peripheral role anytime soon and is difficult to hack I was looking into bluez as an alternative. I looked through the bluez source over the last few days, watched your latest commits and list conversations, read up all kind of README's and API docs. > > I'm pleased to see that you're actively working on the kernel-side LE advertising mgmt API and that you already implemented HAL stubs on the Android side for the Lollipop 5.0 peripheral role enhancements. > > It seems that the min requirement for peripheral role support in Android would be at least 5 concurrent multi-advertising instances. > > What is your schedule for the implementation of the multi-advertising stubs in the Android bluetoothd HAL daemon? Is someone working on it already? Would you welcome patches? (I never contributed to bluez, though, and would require a bit of initial 1:1 support...) > > Is there still something else missing on the kernel side or in userland to make multi-advertisement work? Or is it all just about HAL support now? the kernel side has currently only support for 1 advertising instance. That needs to be fixed or you need to do the rotation in the HAL and fake it that way. Ideally you do that in the kernel since it has better control over the hardware than userspace ever will be. However it would work by faking it in the HAL. The HAL also needs to be adapted to actually use the new mgmt advertising API. However that should be pretty trivial and straight forward. Patches are always welcome. Regards Marcel