AnsweredAssumed Answered

How to change Bluetooth state (BLE to BT) in marshmallow ?.

Question asked by Thanaraj Subramani on Sep 23, 2016
Latest reply on Aug 15, 2017 by Namrata Nalawade

Hi All,

 

   We are trying to Up the Bluetooth (BT) in marshmallow. But its always take BLE Only mode.How to re-direct this proccess to BT only mode.

   Bluetooth stae is moving 10 to 14, We need only BT state 10 to 11. How to TURN ON BT MODE ?

 

CURRENT_LOG::

 

      

01-02 00:46:26.283 441 778 D BluetoothManagerService: enable(): mBluetooth =null mBinding = false
01-02 00:46:26.283 441 778 D BluetoothManagerService: enable returning
01-02 00:46:26.283 441 458 D BluetoothManagerService: Message: 1
01-02 00:46:26.284 441 458 D BluetoothManagerService: MESSAGE_ENABLE: mBluetooth = null
01-02 00:46:26.296 441 458 I ActivityManager: Start proc 1012:com.android.bluetooth/1002 for service com.android.bluetooth/.btservice.AdapterService
01-02 00:46:26.299 153 332 W audio_hw_primary: out_set_parameters routing=2, ret 0, out -1243027712
01-02 00:46:26.310 153 331 W audio_hw_primary: ret -32, pcm write 768 error wait error: hw 0x501c0 app 0x507c0 avail 0x0
01-02 00:46:26.310 153 331 W audio_hw_primary: : Unknown error -32
01-02 00:46:26.824 1012 1012 D AdapterServiceConfig: Adding HeadsetService
01-02 00:46:26.828 1012 1012 D AdapterServiceConfig: Adding A2dpService
01-02 00:46:26.830 1012 1012 D AdapterServiceConfig: Adding HidService
01-02 00:46:26.830 1012 1012 D AdapterServiceConfig: Adding HealthService
01-02 00:46:26.830 1012 1012 D AdapterServiceConfig: Adding PanService
01-02 00:46:26.830 1012 1012 D AdapterServiceConfig: Adding GattService
01-02 00:46:26.831 1012 1012 D AdapterServiceConfig: Adding BluetoothMapService
01-02 00:46:26.909 1012 1012 I bt_bluedroid:
01-02 00:46:26.909 1012 1012 I bt_bluedroid: =================> Open bluetooth stack start module->name=Bluetooth Stack
01-02 00:46:26.909 1012 1012 I bt_bluedroid:
01-02 00:46:26.909 1012 1012 I bt_bluedroid: ===================> Open bluetooth stack end
01-02 00:46:26.929 441 458 D BluetoothManagerService: Message: 20
01-02 00:46:26.929 441 458 D BluetoothManagerService: Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@f87b940:true
01-02 00:46:26.930 1012 1012 D BluetoothAdapterState: make() - Creating AdapterState
01-02 00:46:26.936 1012 1024 I BluetoothAdapterState: Entering OffState
01-02 00:46:26.940 1012 1012 I bt_bluedroid: init
01-02 00:46:26.940 1012 1012 I bt_bluedroid:
01-02 00:46:26.940 1012 1012 I bt_bluedroid: ================> bluetooth.c: init function
01-02 00:46:26.955 1012 1025 I bt_stack_manager:
01-02 00:46:26.955 1012 1025 I bt_stack_manager: ++++++=============== BT_UTILS_MODULE init successfully
01-02 00:46:26.963 1012 1025 I bt_stack_manager:
01-02 00:46:26.963 1012 1025 I bt_stack_manager: ===================== BTIF_CONFIG_MODULE init successfully
01-02 00:46:26.970 1012 1025 I bt_main :
01-02 00:46:26.970 1012 1025 I bt_main : ============================> HCI LAYER got interface completed hci=-1350437239
01-02 00:46:26.970 1012 1025 I bt_bte_conf: bte_load_ble_conf attempt to load ble stack conf from /etc/bluetooth/ble_stack.conf
01-02 00:46:26.972 1012 1025 E bt_osi_config: config_new unable to open file '/etc/bluetooth/ble_stack.conf': No such file or directory
01-02 00:46:26.972 1012 1025 I bt_bte_conf: bte_load_ble_conf file >/etc/bluetooth/ble_stack.conf< not found
01-02 00:46:26.972 1012 1025 I bt_stack_config: init attempt to load stack conf from /etc/bluetooth/bt_stack.conf
01-02 00:46:26.973 1012 1025 I bt_btif_core:
01-02 00:46:26.973 1012 1025 I bt_btif_core: ===================== bte_main_boot_entry completed successfully
01-02 00:46:26.973 1012 1025 I bt_btif_core:
01-02 00:46:26.973 1012 1025 I bt_btif_core: =================== PROPERTY_BT_BDADDR_PATH getting /data/misc/bluetooth/bdaddr address 0 0 0 0 0 0
01-02 00:46:26.976 1012 1025 I bt_stack_manager:
01-02 00:46:26.976 1012 1025 I bt_stack_manager: ===================== btif_init_bluetooth init successfully
01-02 00:46:26.976 1012 1012 I bt_bluedroid: get_profile_interface socket
01-02 00:46:26.976 1012 1012 I bt_bluedroid:
01-02 00:46:26.976 1012 1012 I bt_bluedroid: ====================> get_profile_interface socket
01-02 00:46:26.976 1012 1012 I bt_bluedroid:
01-02 00:46:26.976 1012 1012 I bt_bluedroid: ================> bluetooth.c: get_adapter_property function type=2
01-02 00:46:26.977 1012 1012 I bt_bluedroid:
01-02 00:46:26.977 1012 1012 I bt_bluedroid: ================> bluetooth.c: get_adapter_property function type=1
01-02 00:46:26.978 1012 1028 I bt_btif_core:
01-02 00:46:26.978 1012 1028 I bt_btif_core: ===============> btif_core.c:bt_jni_msg_ready p_msg->event=40961
01-02 00:46:26.978 1012 1028 I bt_btif_core: btif_jni_associate Associating thread to JVM
01-02 00:46:26.979 1012 1028 I bt_btif_core:
01-02 00:46:26.979 1012 1028 I bt_btif_core: ===============> btif_core.c:bt_jni_msg_ready p_msg->event=40961
01-02 00:46:26.992 1012 1012 I bt_bluedroid: get_profile_interface sdp
01-02 00:46:26.992 1012 1012 I bt_bluedroid:
01-02 00:46:26.992 1012 1012 I bt_bluedroid: ====================> get_profile_interface sdp
01-02 00:46:26.999 441 441 D BluetoothManagerService: BluetoothServiceConnection: com.android.bluetooth.btservice.AdapterService
01-02 00:46:26.999 441 458 D BluetoothManagerService: Message: 40
01-02 00:46:27.000 441 458 D BluetoothManagerService: MESSAGE_BLUETOOTH_SERVICE_CONNECTED: 1
01-02 00:46:27.002 1012 1023 I bt_bluedroid: config_hci_snoop_log
01-02 00:46:27.004 441 458 D BluetoothManagerService: Calling onBluetoothServiceUp callbacks
01-02 00:46:27.004 441 458 D BluetoothManagerService: Broadcasting onBluetoothServiceUp() to 5 receivers.
01-02 00:46:27.011 1012 1028 D BluetoothAdapterProperties: Address is:00:23:A7:80:70:81
01-02 00:46:27.011 1012 1028 I bt_btif_core:
01-02 00:46:27.011 1012 1028 I bt_btif_core: ===============> btif_core.c:bt_jni_msg_ready p_msg->event=40961
01-02 00:46:27.013 441 441 D BluetoothManagerService: Bluetooth Adapter name changed to EVK_MX6SL
01-02 00:46:27.013 441 441 D BluetoothManagerService: Stored Bluetooth name: EVK_MX6SL
01-02 00:46:27.018 1012 1028 D BluetoothAdapterProperties: Name is: EVK_MX6SL
01-02 00:46:27.021 1012 1024 D BluetoothAdapterState: Current state: OFF, message: 0
01-02 00:46:27.026 1012 1024 D BluetoothAdapterProperties: Setting state to 14
01-02 00:46:27.026 1012 1024 I BluetoothAdapterState: Bluetooth adapter state changed: 10-> 14
01-02 00:46:27.027 441 458 D BluetoothManagerService: Message: 60
01-02 00:46:27.027 441 458 D BluetoothManagerService: MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 10, newState=14
01-02 00:46:27.027 441 458 D BluetoothManagerService: BLE State Change Intent: 10 -> 14
01-02 00:46:27.029 1012 1024 D BluetoothBondStateMachine: make
01-02 00:46:27.042 1012 1012 I BtGatt.JNI: classInitNative(L912): classInitNative: Success!
01-02 00:46:27.043 1012 1024 I BluetoothAdapterState: Entering PendingCommandState
01-02 00:46:27.050 1012 1029 I BluetoothBondStateMachine: StableState(): Entering Off State
01-02 00:46:27.051 1012 1012 D BluetoothAdapterService: getAdapterService() - returning com.android.bluetooth.btservice.AdapterService@7b58a9c
01-02 00:46:27.053 1012 1012 D BtGatt.DebugUtils: handleDebugAction() action=null
01-02 00:46:27.054 1012 1012 D BtGatt.GattService: Received start request. Starting profile...
01-02 00:46:27.054 1012 1012 D BtGatt.GattService: start()
01-02 00:46:27.059 1012 1012 I bt_bluedroid: get_profile_interface gatt
01-02 00:46:27.059 1012 1012 I bt_bluedroid:
01-02 00:46:27.059 1012 1012 I bt_bluedroid: ====================> get_profile_interface gatt
01-02 00:46:27.060 1012 1012 D BluetoothAdapterService: getAdapterService() - returning com.android.bluetooth.btservice.AdapterService@7b58a9c
01-02 00:46:27.060 1012 1012 D BtGatt.AdvertiseManager: advertise manager created
01-02 00:46:27.061 441 454 I ActivityManager: Waited long enough for: ServiceRecord{fcd61a1 u0 com.android.calendar/.alerts.InitAlarmsService}
01-02 00:46:27.069 1012 1012 V BluetoothAdapterState: isTurningOff()=false
01-02 00:46:27.070 1012 1012 V BluetoothAdapterState: isTurningOn()=false
01-02 00:46:27.070 1012 1012 V BluetoothAdapterState: isBleTurningOn()=true
01-02 00:46:27.077 1012 1012 V BluetoothAdapterState: isBleTurningOff()=false
01-02 00:46:27.079 1012 1024 D BluetoothAdapterState: Current state: PENDING_COMMAND, message: 4
01-02 00:46:27.079 1012 1024 I bt_bluedroid: enable
01-02 00:46:27.079 1012 1024 I bt_bluedroid:
01-02 00:46:27.079 1012 1024 I bt_bluedroid: ================> bluetooth.c: enable function
01-02 00:46:27.079 1012 1025 I bt_stack_manager:
01-02 00:46:27.079 1012 1025 I bt_stack_manager: ================ Stack initialized successfully
01-02 00:46:27.079 1012 1025 D bt_stack_manager: event_start_up_stack is bringing up the stack.
01-02 00:46:27.080 1012 1025 I bt_stack_manager:
01-02 00:46:27.080 1012 1025 I bt_stack_manager: =============== BTIF_CONFIG_MODULE module_start_up completed successfully
01-02 00:46:27.094 1012 1025 I bt_main :
01-02 00:46:27.094 1012 1025 I bt_main : =========== bte_main_enable BTSNOOP_MODULE start up successfully
01-02 00:46:27.094 1012 1025 I bt_hci : start_up
01-02 00:46:27.094 1012 1025 I bt_hci :
01-02 00:46:27.094 1012 1025 I bt_hci : =================================> hci_layer start_up fuction
01-02 00:46:27.107 1012 1025 I bt_vendor: alloc value 0xaf81fced
01-02 00:46:27.107 1012 1025 I bt_vendor: Redpine vendor init got called here!!!
01-02 00:46:27.144 1012 1025 I bt_vendor: Mutyam****protocol enable
01-02 00:46:27.144 1012 1025 I bt_vendor:
onebox_hdev_open: device `hci0' already running
01-02 00:46:28.144 1012 1025 I bt_vendor:
01-02 00:46:28.144 1012 1025 I bt_vendor: =================================> Before userial vendor init
01-02 00:46:28.144 1012 1025 I bt_vendor:
01-02 00:46:28.144 1012 1025 I bt_vendor: =================================> Before vendor call back init
01-02 00:46:28.144 1012 1025 I bt_vendor:
01-02 00:46:28.144 1012 1025 I bt_vendor: =================================> After vendor call back init
01-02 00:46:28.145 1012 1025 I bt_vendor:
01-02 00:46:28.145 1012 1025 I bt_vendor: =======> BT rsi vendor opcode 0
01-02 00:46:28.145 1012 1025 I bt_vendor:
01-02 00:46:28.145 1012 1025 I bt_vendor: =======> BT rsi vendor opcode 0
01-02 00:46:28.145 1012 1025 D bt_hci : start_up starting async portion
01-02 00:46:28.145 1012 1032 I bt_hci : event_finish_startup
01-02 00:46:28.145 1012 1032 I bt_hci_h4: hal_open
01-02 00:46:28.145 1012 1032 I bt_vendor:
01-02 00:46:28.145 1012 1032 I bt_vendor: =======> BT rsi vendor opcode 3
01-02 00:46:28.145 1012 1032 I bt_vendor:
01-02 00:46:28.145 1012 1032 I bt_vendor: =============> Before userial vendor open
01-02 00:46:28.150 1012 1032 I bt_vendor: device fd = 49 open
01-02 00:46:28.152 1012 1032 I bt_vendor:
01-02 00:46:28.152 1012 1032 I bt_vendor: =======> BT rsi vendor opcode 1
01-02 00:46:28.152 1012 1032 I bt_vendor: firmware callback
01-02 00:46:28.152 1012 1032 I bt_hci : firmware_config_callback
01-02 00:46:28.152 1012 1025 I bt_main :
01-02 00:46:28.152 1012 1025 I bt_main : =========== bte_main_enable HCI_MODULE start up successfully
01-02 00:46:28.159 1012 1032 W bt_hci : filter_incoming_event command complete event with no matching command. opcode: 0xc03.
01-02 00:46:28.168 1012 1040 I bt_btu : btu_task pending for preload complete event
01-02 00:46:28.168 1012 1040 I bt_btu_task: Bluetooth chip preload is complete
01-02 00:46:28.168 1012 1040 I bt_btu : btu_task received preload complete event
01-02 00:46:28.180 1012 1040 I bt_btu_task:
01-02 00:46:28.180 1012 1040 I bt_btu_task: ========================> btu_task.c:btu_init_core completed
01-02 00:46:28.183 1012 1040 I bt_btu_task:
01-02 00:46:28.183 1012 1040 I bt_btu_task: ========================> btu_task.c:BTE_InitStack completed
01-02 00:46:28.183 1012 1040 I bt_btu_task:
01-02 00:46:28.183 1012 1040 I bt_btu_task: ========================> btu_task.c:bta_sys_init completed
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_HCI
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_L2CAP
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_RFCOMM
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_AVDT
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_AVRC
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_A2D
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_BNEP
01-02 00:46:28.183 1012 1040 I : BTE_InitTraceLevels -- TRC_BTM
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_GAP
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_PAN
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_SDP
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_GATT
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_SMP
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_BTAPP
01-02 00:46:28.184 1012 1040 I : BTE_InitTraceLevels -- TRC_BTIF
01-02 00:46:28.184 1012 1040 I bt_btu_task:
01-02 00:46:28.184 1012 1040 I bt_btu_task: =================> bt jni thread initialization is ok
01-02 00:46:28.184 1012 1028 I bt_btif_core:
01-02 00:46:28.184 1012 1028 I bt_btif_core: ===============> btif_core.c:bt_jni_msg_ready p_msg->event=40961
01-02 00:46:28.184 1012 1028 I bt_btif_core:
01-02 00:46:28.184 1012 1028 I bt_btif_core: ==================> btif_task: received trigger stack init event
01-02 00:46:28.184 1012 1028 I bt_btif_core:
01-02 00:46:28.184 1012 1028 I bt_btif_core: =================> BTA_EnableBluetooth before
01-02 00:46:29.395 153 332 W audio_hw_primary: no standby

 

 

By default its moving to BLE mode.We don't want that So where I have to re-direct to BT Mode(state 10  to 11).

 

Please give solution for this issue.

 

 

Thanks in Advance.

Outcomes