Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

扫描到开启蓝牙的设备之后,会报如下的错误 >>>> ERROR #6

Closed
superoidlau opened this issue Nov 24, 2016 · 4 comments
Closed

Comments

@superoidlau
Copy link

BtHelperClient: prepare to connect: FC:64:BA:94:23:96 小米手机
11-24 14:34:55.926 21733-9464/com.uniview.mybluetooth W/BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
11-24 14:35:02.376 21733-9464/com.uniview.mybluetooth W/System.err: java.io.IOException: read failed, socket might closed or timeout, read ret: -1

我在网上找了以下解决方案:http://stackoverflow.com/questions/18657427/ioexception-read-failed-socket-might-closed-bluetooth-on-android-4-3

@a-voyager 不知道这个问题你遇到没有。

@Hale-ma
Copy link

Hale-ma commented Dec 18, 2016

我也会出这个问题,不知道作者有功夫更新嘛

@MIkeeJY
Copy link

MIkeeJY commented Feb 16, 2017

@Hale-ma @Forecheng 作者的库 首先是没问题的 类似的问题建议多多google stackoverflow解决

http://stackoverflow.com/questions/25009052/getbluetoothservice-called-with-no-bluetoothmanagercallback-for-android-nexus

作者那个连接的代码是有注释的 你切换成
mSocket = (BluetoothSocket) remoteDevice.getClass().getMethod("createRfcommSocket", new Class[] {int.class}).invoke(remoteDevice,1);
image

这个就可以了

@superoidlau
Copy link
Author

@MIkeeJY 谢谢,后来在stackoverflow找到解决办法,方法和你描述的一样。thank you

@superoidlau
Copy link
Author

This issue is solved, close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants