anroid2.1的蓝牙问题,rfcomm error
我们平台现在从1.6升级到2.1,蓝牙现在出现问题,连接蓝牙耳机的时候出现
RFCOMM async connect() error: Connection refused(111), nr = -1,的问题,相关log如下
D/BluetoothDeviceService( 1818): 00:1A:0E:EC:14:B4 bond state 0 -> 2
(0)
V/BluetoothEventRedirector( 1972): Received
android.bluetooth.intent.action.BOND_STATE_CHANGED_ACTION
V/BluetoothEventRedirector( 1972): Received
android.bluetooth.intent.action.REMOTE_NAME_UPDATED
D/BluetoothDeviceService( 1818): 00:1A:0E:EC:14:B4 bond state 2 -> 1
(0)
D/BT HSHFP( 1860): Loaded priority 00:1A:0E:EC:14:B4 = 0
V/BluetoothEventRedirector( 1972): Received
android.bluetooth.intent.action.BOND_STATE_CHANGED_ACTION
D/BT HSHFP( 1860): Saved priority 00:1A:0E:EC:14:B4 = 100
D/LocalBluetoothDevice( 1972): []
D/LocalBluetoothDevice( 1972): Adding: CONNECT Address:00:1A:0E:EC:
14:B4 Profile:HEADSET TimeSent:not yet
D/LocalBluetoothDevice( 1972): workQueue.size() == 1 || TimeOut ->
process command now
D/LocalBluetoothDevice( 1972): processCommands:[CONNECT Address:00:1A:
0E:EC:14:B4 Profile:HEADSET TimeSent:not yet]
D/BT HSHFP( 1860): Headset state 0 -> 1, result = 1
D/BT HSHFP( 1860): Handsfree SDP request
D/LocalBluetoothDevice( 1972): Command sent successfully:CONNECT
Address:00:1A:0E:EC:14:B4 Profile:HEADSET TimeSent:12:03:08 AM
V/BluetoothEventRedirector( 1972): Received
android.bluetooth.intent.action.HEADSET_STATE_CHANGED
D/BT HSHFP( 1860): SDP request returned 1 (320 ms)
D/BT HSHFP( 1860): RFCOMM connection try to connect for 20 seconds
I/BT HSHFP( 1860): Created RFCOMM socket fd 38.
I/BT HSHFP( 1860): async connect is in progress (Operation now in
progress)
E/BT HSHFP( 1860): RFCOMM async connect() error: Connection refused
(111), nr = -1
D/BT HSHFP( 1860): RFCOMM connection attempt took 132 ms
W/BT HSHFP( 1860): headset.waitForAsyncConnect() error: -1
D/BT HSHFP( 1860): Rfcomm error
D/BT HSHFP( 1860): Headset state 1 -> 0, result = 0
V/BluetoothEventRedirector( 1972): Received
android.bluetooth.intent.action.HEADSET_STATE_CHANGED
I/BluetoothEventRedirector( 1972): Failed to connect BT headset
连接蓝牙耳机的时候发现没有要输入pin码,然后直接出现了这个错误,不是太懂蓝牙这方面的东西,希望大家能帮帮忙,谢谢