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. > 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html