- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在编写一个基于蓝牙的小型串行控制程序来与微 Controller 板上的串行 BT 调制解调器通信。它主要基于Android BluetoothChat 示例程序。
当我第一次从 Eclipse 运行该程序时,它安装并运行得很好。但是,我发现有一些问题,当我更改程序并重新运行它时,手机运行速度会非常慢。这在 Activity 管理器中报告为 btld 消耗了 94% 的 CPU 资源。此时唯一的解决办法是取出电池并重启手机。我曾尝试参加 Activity 并停止任何与 BT 相关的 Activity ,但这无济于事。
此外,我刚刚使用 Android 的标准 BluetoothChat 程序对其进行了测试,它做同样的事情。它不特定于我的附加代码。
我也相信,经过一些实验后,问题会在应用程序停止时发生,这会在您强制停止它或安装新包时发生。它变得非常烦人,因为每次它发生时,我都必须重新启动或取出电池 - 这可能需要 5 分钟的过程。根本不适合调试。
我在 HTC Inspire 4G (2.2) 上运行它,使用 Eclipse (Java) 等。
我的问题是:
如何阻止 btld 消耗资源?
更重要的是,是什么导致了这种情况发生,我是否应该在我的代码中做一些不同的事情?
有关更多信息,我在程序关闭然后关闭 BT 期间获得了 DDMS 的输出。看起来 DVM 很难停止 BT 服务。我删除了很多调试消息,除非它们与蓝牙等有关。
07-06 19:54:10.334: INFO/ActivityManager(1290): Force stopping package com.*******.*******.controller uid=10149
07-06 19:54:10.341: ERROR/PhoneApp(1446): -- PackageChangeBroadcastReceiver action = android.intent.action.PACKAGE_RESTARTED
07-06 19:54:10.441: DEBUG/BluetoothService(1290): Tracked app 3520 died
07-06 19:54:10.441: INFO/BTL-IFS-WRAPPER(1592): rx_data: socket disconnected.
07-06 19:54:10.441: INFO/BTL-IFS(1592): detach_client: ######## Detached client subsystem (BTS) fd -1 ########
07-06 19:54:10.441: INFO/BTL-IFS(1592): detach_client: @*@*@*@*@*@*@*@*@*@*@*@*@* (BTS) - close(-1)
07-06 19:54:10.441: INFO/BTL-IFS(1592): btl_if_notify_local_event: Notify local event BTLIF_SUBSYSTEM_DETACHED
07-06 19:54:10.441: DEBUG/(1592): btlif_bts_api_ctrl_cb: btlif_bts_api_ctrl_cb : id BTLIF_SUBSYSTEM_DETACHED (4113) on hdl 25
07-06 19:54:10.441: INFO/(1592): btlif_rfc_ctrl_chan_detached: client detached ctrl handle -1
07-06 19:54:48.621: WARN/SharedBufferStack(1794): waitForCondition(LockCondition) timed out (identity=68, status=0). CPU may be pegged. trying again.
07-06 19:54:48.621: WARN/SharedBufferStack(1794): mutex_flags = 4
07-06 19:54:48.621: WARN/SharedBufferStack(1794): [ head= 0, available= 0, queued= 1 ]reallocMask=00000000, inUse= 0, identity=68, status=0
07-06 19:54:49.621: WARN/SharedBufferStack(1794): waitForCondition(LockCondition) timed out (identity=68, status=0). CPU may be pegged. trying again.
07-06 19:54:49.621: WARN/SharedBufferStack(1794): mutex_flags = 4
07-06 19:54:49.621: WARN/SharedBufferStack(1794): [ head= 0, available= 0, queued= 1 ]reallocMask=00000000, inUse= 0, identity=68, status=0
07-06 19:54:53.611: WARN/ResourceType(1794): Failure getting entry for 0x7f090014 (t=8 e=20) in package 0: 0xffffffb5
07-06 19:54:59.621: WARN/SharedBufferStack(1794): waitForCondition(LockCondition) timed out (identity=68, status=0). CPU may be pegged. trying again.
07-06 19:54:59.621: WARN/SharedBufferStack(1794): mutex_flags = 4
07-06 19:54:59.621: WARN/SharedBufferStack(1794): [ head= 1, available= 0, queued= 1 ]reallocMask=00000000, inUse= 1, identity=68, status=0
07-06 19:55:00.621: WARN/SharedBufferStack(1794): waitForCondition(LockCondition) timed out (identity=68, status=0). CPU may be pegged. trying again.
07-06 19:55:00.621: WARN/SharedBufferStack(1794): mutex_flags = 4
07-06 19:55:00.621: WARN/SharedBufferStack(1794): [ head= 1, available= 0, queued= 1 ]reallocMask=00000000, inUse= 1, identity=68, status=0
07-06 19:55:14.641: WARN/SharedBufferStack(1794): waitForCondition(LockCondition) timed out (identity=68, status=0). CPU may be pegged. trying again.
07-06 19:55:14.641: WARN/SharedBufferStack(1794): mutex_flags = 4
07-06 19:55:14.641: WARN/SharedBufferStack(1794): [ head= 1, available= 0, queued= 1 ]reallocMask=00000000, inUse= 1, identity=68, status=0
07-06 19:55:26.621: WARN/SharedBufferStack(1290): waitForCondition(ReallocateCondition) timed out (identity=71, status=0). CPU may be pegged. trying again.
07-06 19:55:26.621: WARN/SharedBufferStack(1290): mutex_flags = a0
07-06 19:55:26.621: WARN/SharedBufferStack(1290): [ head= 0, available= 0, queued= 1 ]reallocMask=00000002, inUse= 0, identity=71, status=0
07-06 19:55:27.621: WARN/SharedBufferStack(1290): waitForCondition(ReallocateCondition) timed out (identity=71, status=0). CPU may be pegged. trying again.
07-06 19:55:27.621: WARN/SharedBufferStack(1290): mutex_flags = a0
07-06 19:55:27.621: WARN/SharedBufferStack(1290): [ head= 0, available= 0, queued= 1 ]reallocMask=00000002, inUse= 0, identity=71, status=0
07-06 19:55:28.621: WARN/SharedBufferStack(1290): waitForCondition(ReallocateCondition) timed out (identity=71, status=0). CPU may be pegged. trying again.
07-06 19:55:28.621: WARN/SharedBufferStack(1290): mutex_flags = a0
07-06 19:55:28.621: WARN/SharedBufferStack(1290): [ head= 0, available= 0, queued= 1 ]reallocMask=00000002, inUse= 0, identity=71, status=0
07-06 19:55:44.631: DEBUG/BluetoothService(1290): Already release wake lock for discoverable mode
07-06 19:55:44.631: DEBUG/BluetoothService(1290): Bluetooth state 12 -> 13
07-06 19:55:44.641: DEBUG/BluetoothHandsfree(1446): audioOff(): mPendingSco: false, mScoSocket: , mA2dpState: 0, mA2dpSuspended: false
07-06 19:55:44.641: INFO/BTL_IFC(1446): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_DISCONNECT_REQ (SCO) 0 pbytes (hdl 52)
07-06 19:55:44.641: INFO/BluetoothA2dpService(1290): A2DP profile has been disconnected
07-06 19:55:44.641: INFO/BTL_IFC(1446): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_DISCONNECT_REQ (SCO) 0 pbytes (hdl 52)
07-06 19:55:45.611: INFO/BLZ_WRAPPER(1446): btl_if_close: btl_if_close (50)
07-06 19:55:45.611: DEBUG/BLZ_WRAPPER(1446): btl_if_close: [btl_if_close] : (50:50), disc_pending 0, asnc 0, selct 0, flags 0
07-06 19:55:45.611: INFO/BTL_IFC(1446): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_DISCONNECT_REQ (AG) 2 pbytes (hdl 49)
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: wrp_close_s_only [50] (50:50) [brcm.bt.dtun]
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: data socket closed
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wsactive_del: delete wsock 50 from active list [ad3b32b8]
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: listen socket closed
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wsactive_del: delete wsock 50 from active list [ad3b32b8]
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: wsock fully closed, return to pool
07-06 19:55:45.611: DEBUG/BLZ_WRAPPER(1446): ws_async_del: [ws_async_del] : (-1:-1), disc_pending 0, asnc 0, selct 0, flags 0
07-06 19:55:45.611: INFO/BLZ_WRAPPER(1446): btl_if_close: btl_if_close (51)
07-06 19:55:45.611: DEBUG/BLZ_WRAPPER(1446): btl_if_close: [btl_if_close] : (51:51), disc_pending 0, asnc 0, selct 0, flags 0
07-06 19:55:45.611: INFO/BTL_IFC(1446): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_DISCONNECT_REQ (AG) 2 pbytes (hdl 49)
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: wrp_close_s_only [51] (51:51) [brcm.bt.dtun]
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: data socket closed
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wsactive_del: delete wsock 51 from active list [ad3b3b18]
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: listen socket closed
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wsactive_del: delete wsock 51 from active list [ad3b3b18]
07-06 19:55:45.611: DEBUG/WifiService(1290): setWifiEnabled( mAirplaneModeOverwridden=)false
07-06 19:55:45.611: DEBUG/BTL_IFC_WRP(1446): wrp_close_s_only: wsock fully closed, return to pool
07-06 19:55:45.611: DEBUG/BLZ_WRAPPER(1446): ws_async_del: [ws_async_del] : (-1:-1), disc_pending 0, asnc 0, selct 0, flags 0
07-06 19:55:45.611: INFO/BluetoothHeadsetService(1446): Headset profile has been disconnected
07-06 19:55:45.621: VERBOSE/BluetoothDataGatewayService(1290): #### DataGateway Service Received message ####
07-06 19:55:45.621: INFO/BrcmBtServiceLoader(1290): ***Received Bluetooth UNKNOWN_STATE_CHANGE Event**** : 13
07-06 19:55:45.641: VERBOSE/BtEventReceiver(2047): #### Received Bluetooth State Change Action ####
07-06 19:55:45.641: INFO/BluetoothService(1290): Got ACTION_PROFILE_DISCONNECTED, profile = 2
07-06 19:55:46.641: INFO/BluetoothService(1290): Got ACTION_PROFILE_DISCONNECTED, profile = 1
07-06 19:55:52.611: INFO/BluetoothService(1290): Got ACTION_PROFILE_DISCONNECTED, profile = 3
07-06 19:55:53.621: INFO/bluedroid(1290): bt_disable
07-06 19:55:53.621: INFO/bluedroid(1290): bt_disable: BT_LOCK_MUTEX()
07-06 19:55:53.621: INFO/bluedroid(1290): $#$#$#$# BTON_FMOFF_handling
07-06 19:55:53.621: INFO/bluedroid(1290): $#$#$#$# BTON_FMOFF_handling : receiving BT_OFF
07-06 19:55:53.621: INFO/bluedroid(1290): $#$#$#$# Stopping bluetoothd, try 10 times before giving-up ...
07-06 19:55:53.621: INFO/DTUN_HCID4(1651): ## bluetoothd terminate (15) ##
07-06 19:55:53.621: INFO/DTUN_HCID4(1651): main loop exiting
07-06 19:55:53.621: INFO/DTUN_HCID4(1651): hcid main loop exiting
07-06 19:55:53.621: INFO/DTUN_CLNT(1651): dtun_client_stop : iface [DTUN_INTERFACE] stopping...
07-06 19:55:55.631: DEBUG/ADAPTER(1651): Removing adapter /org/bluez/1651/hci0
07-06 19:55:55.631: DEBUG/DEVICE(1651): Removing device /org/bluez/1651/hci0/dev_00_06_66_04_11_88
07-06 19:55:55.631: DEBUG/DEVICE(1651): btd_device_unref(0xf518): ref=0
07-06 19:55:55.631: DEBUG/DEVICE(1651): device_free(0xf518)
07-06 19:55:55.631: DEBUG/DEVICE(1651): Removing device /org/bluez/1651/hci0/dev_00_1F_E2_DE_87_DD
07-06 19:55:55.631: DEBUG/DEVICE(1651): btd_device_unref(0xf7e8): ref=1
07-06 19:55:55.631: DEBUG/ADAPTER(1651): btd_adapter_unref(0xf180): ref=0
07-06 19:55:55.631: DEBUG/ADAPTER(1651): adapter_free(0xf180)
07-06 19:55:55.631: DEBUG/dhcp_util(1290): dhcp_stop fail. cnt: 1
07-06 19:55:55.631: INFO/DTUN_HCID4(1651): btl_cfg_set_bluetoothd_pid : service.brcm.bt.bluetoothd_pid = 0
07-06 19:55:55.641: INFO/DTUN_HCID4(1651): btl_cfg_set_bluetoothd_pid success : service.brcm.bt.bluetoothd_pid = 0, ret = 0
07-06 19:55:56.611: INFO/bluedroid(1290): $#$#$#$#$# Stopping btld, try 10 times before giving-up ...
07-06 19:55:56.631: DEBUG/WifiStateTracker(1290): Reset connections and stopping DHCP
07-06 19:55:56.711: VERBOSE/BTL_CFG(1592): btl_cfg_get_soft_onoff_enabled : service.brcm.bt.soft_onoff = 0
07-06 19:55:56.711: VERBOSE/BTL_CFG(1592): btl_cfg_get_soft_onoff_enabled : service.brcm.bt.soft_onoff = 0
07-06 19:55:56.711: INFO/BTL-IFS(1592): BTL_IF_UnregisterSubSystem: Unregistered subsystem [FM]
07-06 19:55:57.651: VERBOSE/BluetoothEventRedirector(1794): Received android.bluetooth.adapter.action.STATE_CHANGED
07-06 19:55:57.651: INFO/BluetoothEventRedirector(1794): EXTRA_STATE = 13
07-06 19:55:57.651: DEBUG/LocalBluetoothManager(1794): sky-setBluetoothStateInt :13
07-06 19:55:57.661: INFO/BTL-IFS(1592): BTL_IF_ServerShutdown: BTL-IF Server shutting down...
07-06 19:55:59.611: DEBUG/LocalBluetoothManager(1794): sky-getBluetoothState :13
07-06 19:56:00.711: WARN/BTLD(1592): BTA got unregistered event id 6
07-06 19:56:01.611: DEBUG/ASOCKWRP(1939): asocket_abort [51,52,53]
07-06 19:56:01.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: s 51, how 2
07-06 19:56:01.611: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: fd (51:51), bta 0, rc 1, wflags 0x20, cflags 0x2, port 9049
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: shutdown socket
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: wake up any waiting server threads
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: fd (51:51), bta 0, rc 1, wflags 0x20, cflags 0x2, port 9049
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: event BTLIF_BTS_EVT_ABORT matched
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): btlif_wait_response: unblocked fd (51:51), bta 0, rc 1, wflags 0x20, cflags 0x2, port 9049
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_poll: set errno 125 (Operation Canceled) l.2029
07-06 19:56:01.621: DEBUG/ASOCKWRP(1939): asocket_accept:ended poll socket fd:51, ret:-1
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_write: wrote 1 bytes out of 1 on fd 53
07-06 19:56:01.621: DEBUG/ASOCKWRP(1939): asocket_destroy
07-06 19:56:01.621: DEBUG/ASOCKWRP(1939): asocket_abort [51,52,53]
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: s 51, how 2
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: fd (51:51), bta 0, rc 1, wflags 0x20, cflags 0x2, port 9049
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: shutdown socket
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: wake up any waiting server threads
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: fd (51:51), bta 0, rc 1, wflags 0x20, cflags 0x2, port 9049
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: event BTLIF_BTS_EVT_ABORT matched
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_write: wrote 1 bytes out of 1 on fd 53
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_close: s 53
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_close: std close (53)
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_close: s 52
07-06 19:56:01.621: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_close: std close (52)
07-06 19:56:01.621: INFO/BLZ20_WRAPPER(1939): blz20_wrp_close: s 51
07-06 19:56:01.631: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_close: fd (51:51), bta 0, rc 1, wflags 0x20, cflags 0x2, port 9049
07-06 19:56:01.631: INFO/BLZ20_WRAPPER(1939): __close_prot_rfcomm: fd 51
07-06 19:56:01.631: INFO/BTL_IFC(1939): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_BTS_RFC_LISTEN_CANCEL (BTS) 8 pbytes (hdl 50)
07-06 19:56:01.631: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: wrp_close_s_only [51] (51:51) [brcm.bt.dtun]
07-06 19:56:01.631: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: data socket closed
07-06 19:56:01.631: DEBUG/BTL_IFC_WRP(1939): wsactive_del: delete wsock 51 from active list [ad3f73ac]
07-06 19:56:01.631: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: listen socket closed
07-06 19:56:01.631: DEBUG/BTL_IFC_WRP(1939): wsactive_del: delete wsock 51 from active list [ad3f73ac]
07-06 19:56:01.631: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: wsock fully closed, return to pool
07-06 19:56:01.631: DEBUG/BLZ20_WRAPPER(1939): btsk_dump_list: fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:01.631: DEBUG/BLZ20_WRAPPER(1939): btsk_free: success
07-06 19:56:01.761: INFO/BTL-BTAPP_AV(1592): AV disabled
07-06 19:56:02.661: WARN/BTLD(1592): BTA got unregistered event id 8
07-06 19:56:02.661: WARN/BTLD(1592): BTA got unregistered event id 12
07-06 19:56:03.641: DEBUG/ASOCKWRP(1939): asocket_abort [54,55,56]
07-06 19:56:03.651: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: s 54, how 2
07-06 19:56:03.651: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:03.651: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: shutdown socket
07-06 19:56:03.651: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: wake up any waiting server threads
07-06 19:56:03.651: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:03.651: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: event BTLIF_BTS_EVT_ABORT matched
07-06 19:56:03.651: DEBUG/BLZ20_WRAPPER(1939): btlif_wait_response: unblocked fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:03.651: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_poll: set errno 125 (Operation Canceled) l.2029
07-06 19:56:03.651: DEBUG/ASOCKWRP(1939): asocket_accept:ended poll socket fd:54, ret:-1
07-06 19:56:03.651: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_write: wrote 1 bytes out of 1 on fd 56
07-06 19:56:03.661: WARN/BTLD(1592): L2CAP - PSM: 0x0019 not found for deregistration
07-06 19:56:03.661: WARN/BTLD(1592): L2CAP - PSM: 0x0017 not found for deregistration
07-06 19:56:04.611: DEBUG/ASOCKWRP(1939): asocket_destroy
07-06 19:56:04.611: DEBUG/ASOCKWRP(1939): asocket_abort [54,55,56]
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: s 54, how 2
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: shutdown socket
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_shutdown: wake up any waiting server threads
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): btlif_signal_event: event BTLIF_BTS_EVT_ABORT matched
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_write: wrote 1 bytes out of 1 on fd 56
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_close: s 56
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_close: std close (56)
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_close: s 55
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_close: std close (55)
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): blz20_wrp_close: s 54
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): blz20_wrp_close: fd (54:54), bta 1, rc 7, wflags 0x20, cflags 0x2, port 9050
07-06 19:56:04.611: INFO/BLZ20_WRAPPER(1939): __close_prot_rfcomm: fd 54
07-06 19:56:04.611: INFO/BTL_IFC(1939): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_BTS_RFC_LISTEN_CANCEL (BTS) 8 pbytes (hdl 50)
07-06 19:56:04.611: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: wrp_close_s_only [54] (54:54) [brcm.bt.dtun]
07-06 19:56:04.611: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: data socket closed
07-06 19:56:04.611: DEBUG/BTL_IFC_WRP(1939): wsactive_del: delete wsock 54 from active list [ad3f7c0c]
07-06 19:56:04.611: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: listen socket closed
07-06 19:56:04.611: DEBUG/BTL_IFC_WRP(1939): wsactive_del: delete wsock 54 from active list [ad3f7c0c]
07-06 19:56:04.611: DEBUG/BTL_IFC_WRP(1939): wrp_close_s_only: wsock fully closed, return to pool
07-06 19:56:04.611: DEBUG/BLZ20_WRAPPER(1939): btsk_free: success
07-06 19:56:04.661: WARN/BTLD(1592): L2CAP - PSM: 0x0019 not found for deregistration
07-06 19:56:04.661: WARN/BTLD(1592): L2CAP - PSM: 0x0017 not found for deregistration
07-06 19:56:04.661: WARN/BTLD(1592): L2CAP - PSM: 0x0019 not found for deregistration
07-06 19:56:04.661: WARN/BTLD(1592): L2CAP - PSM: 0x0017 not found for deregistration
07-06 19:56:16.611: ERROR/bluedroid(1290): btld stop timed out
07-06 19:56:16.611: INFO/bluedroid(1290): $#$#$#$# New state is BTOFF_FMOFF_handling
07-06 19:56:16.611: INFO/bluedroid(1290): bt_disable: BT_UNLOCK_MUTEX()
07-06 19:56:23.641: DEBUG/LocalBluetoothManager(1794): sky-getBluetoothState :13
07-06 19:57:23.611: DEBUG/BluetoothService(1290): Bluetooth state 13 -> 10
07-06 19:57:23.631: VERBOSE/BluetoothEventRedirector(1794): Received android.bluetooth.adapter.action.STATE_CHANGED
07-06 19:57:24.611: INFO/BluetoothEventRedirector(1794): EXTRA_STATE = 10
07-06 19:57:24.611: DEBUG/LocalBluetoothManager(1794): sky-setBluetoothStateInt :10
07-06 19:57:24.621: DEBUG/VoldCmdListener(1203): asec list
07-06 19:57:28.631: VERBOSE/BluetoothDataGatewayService(1290): #### DataGateway Service Received message ####
07-06 19:57:28.631: INFO/BrcmBtServiceLoader(1290): ***Received Bluetooth OFF Event****
07-06 19:57:28.631: DEBUG/BluetoothServiceManager(1290): onBluetoothDisabled()
07-06 19:57:28.631: DEBUG/BluetoothServiceManager(1290): ***stopService(): Stopping service: bluetooth_ftp***
07-06 19:57:28.631: DEBUG/com_broadcom_bt_service_ftp_FTPService.cpp(1290): disableFtpServerNative
07-06 19:57:28.631: INFO/BTL_IFC(1290): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_FTPS_DISABLE (FTPS) 0 pbytes (hdl 0)
07-06 19:57:28.631: ERROR/BTL_IFC(1290): ##### ERROR : tx_data: write failed (-1)#####
07-06 19:57:28.631: ERROR/BTL_IFC(1290): ##### ERROR : BTL_IFC_CtrlSend: [BTL_IFC CTRL] send failed#####
07-06 19:57:28.631: DEBUG/com_broadcom_bt_service_ftp_FTPService.cpp(1290): Unregister Sub system SUB_FTPS
07-06 19:57:28.631: DEBUG/BluetoothServiceManager(1290): ***stopService(): Stopping service: bluetooth_pbs***
07-06 19:57:28.631: DEBUG/com_broadcom_bt_service_pbap_PBAPService.cpp(1290): disablePbapServerNative
07-06 19:57:28.631: INFO/BTL_IFC(1290): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_PBS_DISABLE (PBS) 0 pbytes (hdl 147)
07-06 19:57:28.631: DEBUG/com_broadcom_bt_service_pbap_PBAPService.cpp(1290): Send Disable Command Successfully
07-06 19:57:28.631: DEBUG/com_broadcom_bt_service_pbap_PBAPService.cpp(1290): Unregister Sub system SUB_PBS
07-06 19:57:28.631: INFO/BluetoothPBAPService(1290): onPbapDisabled
07-06 19:57:35.641: DEBUG/BluetoothServiceManager(1290): ServiceStateChanged: bluetooth_pbs, 1
07-06 19:57:35.641: DEBUG/BluetoothServiceManager(1290): Finishing service bluetooth_pbs
最佳答案
我发现一个可行的解决方案(适用于三星 galaxy mini)——这对用户来说非常不友好,而且“设计”不好(但 broadcom 固件错误无论如何都不是好的“设计”)——但总比让用户的手机卡住 - 完成后关闭蓝牙:
在我的 onDestroy() 和 onBackPressed() 中——我调用了我的 cleanup() 函数,它具有如下内容:
if(mBluetoothAdapter != null)
{
mBluetoothAdapter.disable();
}
mBluetoothAdapter = null;
注意:在官方 android sdk 的 bluetooth_chat 示例应用程序也发生 bt 使用后,同一部手机“卡住”(在使用 broadcom bt 堆栈的三星 galaxy 上)——同样的问题——所以这显然不是编程“设计”问题。
关于java - Btld 在应用程序停止后消耗资源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6550000/
我有一个简单的 HATEOAS 使用 构建的提供程序 Spring 这为我提供了以下资源: { "_links" : { "self" : { "href" : "http:/
这里是 Clojure 初学者,不确定问题中的术语是否正确。 我正在使用 clj-webdriver 出租车 API 构建网络抓取工具。它需要从多个站点抓取数据。以下实际上不是项目中的代码,但我已经对
我使用pthread lib 2.8,操作系统内核是arm上的Linux 2.6.37。在我的程序中,线程 A 使用 pthread 接口(interface)将调度优先级设置为 sched_get_
我有一个大约 400MB 的二进制文件,我想将其转换为 CSV 格式。输出的 CSV 文件将约为 1GB(根据我的计算)。 我读取二进制文件并将其存储在一个结构数组中(其他处理也需要),当用户想要将其
我在编写我的专业应用程序时遇到一个串口线程问题。我有cpu消耗。当我在我的项目中添加 SerialCtrl.h(来自项目 SerialCtrl http://www.codeproject.com/A
总结:似乎 c 代码的 RAM 消耗取决于变量排序。有没有办法自动优化? 更长的版本:在这里,我粘贴了两个版本的代码,它们仅在变量排序方面有所不同。 版本 1: static unsigned lon
我有一个处理图像编辑(裁剪和调整大小)的 Windows 应用程序项目。不幸的是,这些图像处理会消耗大量内存和 CPU 资源(很容易达到 600MB 或 50% cpu),而且它只是裁剪和调整大小 2
我创建了一个实例化类 10 亿次的循环,并且非常惊讶地看到它在 0 毫秒内运行并且根据 Windows 任务管理器没有消耗 CPU 时间。 正如您从下面的代码中看到的那样,我显然没有对默认构造函数执行
我们有以下用户名验证规则: 用户名可以包含字母数字字符 用户名可以有下划线、连字符或句号 现在假设用户名是 ASCII 用户名不能以句点开头或结尾 用户名不能开始、结束或有任何空格 我们有以下相同的正
如何获取 C# 中所有进程的列表,然后获取每个进程的当前内存和 CPU 消耗? 非常感谢示例代码。 最佳答案 Process class有一个 GetProcesses 方法,可以让您枚举正在运行的进
如何从 linux 2.6.32 机器上的源代码中限制 C 程序的物理内存消耗? 我需要确定系统使用的页面替换算法的类型。 问题是,如果不限制一个进程在内存中可以拥有的页面数量,就很难分析页面错误的模
我正在编写一个 Linux 应用程序,它观察其他应用程序并跟踪资源消耗。我计划使用 Java,但编程语言对我来说并不重要。目标很重要,所以我可以切换到另一种技术或使用模块。我的应用程序将任何选定的第三
我有一个图标,旁边有一个复选框,包含在一个面板中。面板有悬停效果,点击面板时想选中框。 我想使用或阻止复选框的所有事件,仅以编程方式选择它。我希望该框在屏幕上显示为“已启用”,而“在幕后”几乎不起作用
我正在使用服务 REST,它当前有 5025 条记录,但当我使用该服务时,只出现 1,000 条记录。我可以做什么来完全消耗所有记录? 这是我的代码示例: $http({ method:
我已经搜索了几个小时但没有成功,是否可以跟踪 Blob 容器上 SAS 凭据的消耗情况? 我将向几个客户提供 SAS 凭证,并且我希望能够跟踪他们的 SAS 使用情况(操作次数、带宽使用情况...)
我创建了具有 1.75 GB RAM 的 B1 应用服务计划。我还创建了一个应用程序服务并向其部署了 docker 镜像。现在我停止了 docker 镜像,它的状态已停止,并且它是该应用程序服务计划中
与我们的合作伙伴一起为我们的客户(一家售后汽车零部件零售商)开发一个项目,他们利用 AR 和 VR 做了很多很酷的事情。我们的想法是使用 Hololens 并尝试帮助我们的客户在其大型仓库中进行物流操
这是一个简短的 Haskell 程序,可以生成 440 Hz 的声音。它使用pulseaudio作为音频后端。 import GHC.Float import Control.Arrow import
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
tab.setOnCloseRequest(e -> { if (getEditorForTextArea(getSelectedTextArea()) != null
我是一名优秀的程序员,十分优秀!