DerArtem, on 13 February 2013 - 07:55 PM, said:
There is the bdt tool to test bluedroid. When enabeling BT and then disabling is says that BT is already disabled. Looks like BT is not getting marked as enabled correctly...
root@android:/ # bdt set_aid_and_cap : pid 1221, uid 0 gid 0 ::::::::::::::::::::::::::::::::::::::::::::::::::: :: Bluedroid test app starting Loading HAL lib + extensions HAL library loaded (Success) INIT BT HAL REQUEST SUCCESS >enable ENABLE BT HAL REQUEST SUCCESS >disable DISABLE BT Bluetooth is already disabled
I/bluedroid( 778): enable D/bt-btif ( 778): BTIF ENABLE BLUETOOTH D/BTIF_CORE( 778): not disabled E/BluetoothAdapterState( 778): Error while turning Bluetooth On
I/bluedroid( 1197): init D/btif_config.c( 1197): btif_config_init(L124): in initialized:0 D/bt-btif ( 1197): in initialized:0 D/btif_config.c( 1197): dump_node(L117): root, p->name:Bluedroid, child/value:0x40548588, bytes:160, p->used:0, type:0, p->flag:0 D/bt-btif ( 1197): ts[7].used:0 D/bt-btif ( 1197): alloc_thread_slot ret:7 D/bt-btif ( 1197): h:7, cmd_fdr:7, cmd_fdw:10 D/bt-btif ( 1197): h:7, thread id:1079281200 I/bte_conf( 1197): Attempt to load stack conf from /etc/bluetooth/bt_stack.conf D/btif_config.c( 1197): dump_node(L117): found node, p->name:Address, child/value:0x405487f0, bytes:18, p->used:18, type:1, p->flag:0 D/bt-btif ( 1197): local bdaddr from bt_config.xml is 22:22:7e:b9:ed:31 I/GKI_LINUX( 1197): gki_task_entry: gki_task_entry task_id=1 [BTIF] starting D/bt-btif ( 1197): btif task starting D/bt-btif ( 1197): btif_associate_evt: notify ASSOCIATE_JVM E/BTIF_CORE( 1197): ### ASSERT : external/bluetooth/bluedroid/main/../btif/src/btif_core.c line 487 Callback is NULL (0) ### I/bluedroid( 1197): enable D/bt-btif ( 1197): BTIF ENABLE BLUETOOTH D/bt-btif ( 1197): bte_main_enable I/bt_hci_bdroid( 1197): init I/bt_vendor( 1197): init I/bt_vnd_conf( 1197): Attempt to load conf from /etc/bluetooth/bt_vendor.conf I/bt-btif ( 1197): libbt-hci init returns 0 I/bt_hci_bdroid( 1197): bt_hc_worker_thread started I/GKI_LINUX( 1197): gki_task_entry: gki_task_entry task_id=0 [BTU] starting I/bt_userial_vendor( 1197): userial vendor open: opening hci0 I/bt_userial_vendor( 1197): device fd = 11 open E/bt_vendor( 1197): vendor lib fw conf done I/bt-btif ( 1197): HC preload_cb 0 [0:SUCCESS 1:FAIL] I/ ( 1197): BTE_InitTraceLevels -- TRC_HCI I/ ( 1197): BTE_InitTraceLevels -- TRC_L2CAP I/ ( 1197): BTE_InitTraceLevels -- TRC_RFCOMM I/ ( 1197): BTE_InitTraceLevels -- TRC_AVDT I/ ( 1197): BTE_InitTraceLevels -- TRC_AVRC I/ ( 1197): BTE_InitTraceLevels -- TRC_A2D I/ ( 1197): BTE_InitTraceLevels -- TRC_BNEP I/ ( 1197): BTE_InitTraceLevels -- TRC_BTM I/ ( 1197): BTE_InitTraceLevels -- TRC_PAN I/ ( 1197): BTE_InitTraceLevels -- TRC_SDP I/ ( 1197): BTE_InitTraceLevels -- TRC_BTAPP D/bt-btif ( 1197): btif_task: received trigger stack init event I/bluedroid( 1197): enable D/bt-btif ( 1197): BTIF ENABLE BLUETOOTH D/BTIF_CORE( 1197): not disabled
I did an small modification (attached!) to the bluedroid library, to add debug dumps on reads and writes of the HCI channel. After deselecting the following options in the kernel config, i seem to be getting answers to the queries of the bluedroid stack
# CONFIG_BT_L2CAP is not set
# CONFIG_BT_SCO is not set
# CONFIG_BT_RFCOMM is not set
# CONFIG_BT_RFCOMM_TTY is not set
# CONFIG_BT_BNEP is not set
# CONFIG_BT_BNEP_MC_FILTER is not set
# CONFIG_BT_BNEP_PROTO_FILTER is not set
# CONFIG_BT_HIDP is not set
Also attached, for reference, the userial_vendor.c I am using...







Sign In
Create Account


Back to top










