Linux bluetooth development
 help / color / mirror / Atom feed
From: "Patrick Shirkey" <pshirkey@boosthardware.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [bluetooth]  btusb issues
Date: Fri, 24 Oct 2014 00:46:39 +1100 (EST)	[thread overview]
Message-ID: <50422.86.105.94.79.1414071999.squirrel@boosthardware.com> (raw)
In-Reply-To: <20141023122933.GA29656@aemeltch-mobl1.fi.intel.com>


On Thu, October 23, 2014 11:29 pm, Andrei Emeltchenko wrote:
> Hi Patrick,
>
> On Thu, Oct 23, 2014 at 09:59:23PM +1100, Patrick Shirkey wrote:
>>
>> On Thu, October 23, 2014 7:59 pm, Patrick Shirkey wrote:
>> > Hi,
>> >
>> > I have now got backports to run with bluez instead of bluedroid and
>> the
>> > btusb driver instead of rtk_btusb.
>> >
>> > However the android bluetooth system does not want to run for me.
>
> So what is not working? Do you have logcat with "BlueZ" and "bluetothd"
> logs?
>

It is working better now and I can see the BLE device in the Settings UI.

For reference I had to add the following insmod commands to my init file
to get all the backports drivers to load.

# Bluez bluetooth and backports modules
    insmod /system/vendor/modules/compat.ko
    insmod /system/vendor/modules/bluetooth.ko
    insmod /system/vendor/modules/btusb.ko
    insmod /system/vendor/modules/rfcomm.ko
    insmod /system/vendor/modules/bnep.ko


And I had to double check that Crypto configs were set (which is
referenced in the aosp-bluez docs on the website):

CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y



> Best regards
> Andrei Emeltchenko
>
>> >
>>
>> For reference purposes I have got bluez running on an 8723au chipset
>> with
>> the btusb driver from the "new" branch of the btusb git repo.
>>
>> Here's an overview of the steps required:
>>
>> - Patch the 3.4 kernel with the patch files from the aosp-bluez "misc"
>> repo
>> - Completely replace bluedroid in the android tree with bluez including
>> the modifed bionic tree from the aosp-bluez repo
>> - Cross compile the backports drivers replacing btusb.c with the version
>> from the "new" branch in the git repo.
>> - Copy the modules from the backports tree to the linux tree before
>> building the firmware image. (overwrite the .ko files generated by the
>> kernel build)
>> - Include the firmware binary images from the git repo "new" branch in
>> the
>> android build so they are copied to the /system/etc/firmware/ folder in
>> the firmware image
>> - Modify the init.rc script to include the init.bluetooth.rc file
>> - Modify the <platform>.mk file (in this case
>> /device/softwinner/wing-k70/wing-k70.mk) to load the following modules
>> on
>> boot:
>>     /system/vendor/modules/compat.ko
>>     /system/vendor/modules/bluetooth.ko
>>     /system/vendor/modules/btusb.ko
>>
>> enable debug logging with :
>>
>> setprop persist.sys.bluetooth.debug 1
>>
>>
>>
>> # btmgmt info
>> hci0:	addr CC:D2:9C:73:CB:45 version 6 manufacturer 93 class 0x000000
>> 	supported settings: powered connectable fast-connectable discoverable
>> bondable link-security ssp br/edr hs le advertising debug-keys privacy
>> 	current settings: bondable ssp br/edr le
>> 	name BlueZ for Android
>> 	short name
>>
>>
>> # haltest
>> audio_hw_device_open returned -98
>> hw_get_module_by_class returned -2
>> thread_evt_cb: evt=ASSOCIATE_JVM
>> if_bluetooth->init: BT_STATUS_SUCCESS
>> get_profile_interface(handsfree) : 0xb6e58134
>> get_profile_interface(a2dp) : 0xb6e580ec
>> get_profile_interface(avrcp) : 0xb6e58100
>> get_profile_interface(health) : 0xb6e583d0
>> get_profile_interface(hidhost) : 0xb6e580a0
>> get_profile_interface(pan) : 0xb6e580d0
>> get_profile_interface(gatt) : 0xb6e581ac
>> get_profile_interface(socket) : 0xb6e58094
>> if_bluetooth->init: BT_STATUS_DONE
>> if_av->init: BT_STATUS_SUCCESS
>> if_rc->init: BT_STATUS_SUCCESS
>> if_gatt->init: BT_STATUS_FAIL
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> if_hf->init: BT_STATUS_FAIL
>> if_hh->init: BT_STATUS_SUCCESS
>> if_pan->init: BT_STATUS_FAIL
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> if_hl->init: BT_STATUS_SUCCESS
>> >
>>
>>
>> # btmgmt le on
>> hci0 Set Low Energy complete, settings: bondable ssp br/edr le
>> # btmgmt find
>> Unable to start discovery. status 0x0f (Not Powered)
>> # btmgmt power on
>> hci0 Set Powered complete, settings: powered bondable ssp br/edr le
>> # btmgmt find
>> Discovery started
>> hci0 dev_found: BC:6A:29:AB:2C:AA type LE Public rssi -44 flags 0x0000
>> AD
>> flags 0x06 eir_len 25
>>
>>
>>
>>
>>
>> --
>> Patrick Shirkey
>> Boost Hardware Ltd
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


--
Patrick Shirkey
Boost Hardware Ltd

      reply	other threads:[~2014-10-23 13:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  8:59 [bluetooth] btusb issues Patrick Shirkey
2014-10-23 10:59 ` Patrick Shirkey
2014-10-23 12:29   ` Andrei Emeltchenko
2014-10-23 13:46     ` Patrick Shirkey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50422.86.105.94.79.1414071999.squirrel@boosthardware.com \
    --to=pshirkey@boosthardware.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox