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

STATE_LISTEN #8

Open
Near1999 opened this issue Mar 21, 2016 · 3 comments
Open

STATE_LISTEN #8

Near1999 opened this issue Mar 21, 2016 · 3 comments

Comments

@Near1999
Copy link

I do not use startAsServer() method but sometimes I got STATE_LISTEN after STATE_CONNECTING in onBluetoothServiceStateChanged. In that case, I cannot connect to my target device (microcontroller). disconnect() and reconnect() does not help. What should I do? Is it a bug?

@whilu
Copy link
Owner

whilu commented Mar 24, 2016

Thanks! Your target device (microcontroller) is BLE device? If you use BLE
device sdk, STATE_LISTEN is no use, it's only sent on
BluetoothService.

2016-03-21 21:56 GMT+08:00 Near1999 [email protected]:

I do not use startAsServer() method but sometimes I got STATE_LISTEN in
onBluetoothServiceStateChanged. In that case, I cannot connect to my
target device. disconnect() and reconnect() does not help. What should I
do? Is it a bug?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#8

@Near1999
Copy link
Author

No, bluetooth 3.0

@Near1999
Copy link
Author

Near1999 commented Apr 1, 2016

I found block of code that changes to STATE_LISTEN after STATE_CONNECTING and there is try_catch block that catches IOException. I think this link might help http://stackoverflow.com/questions/18657427/ioexception-read-failed-socket-might-closed-bluetooth-on-android-4-3

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

2 participants