-
Notifications
You must be signed in to change notification settings - Fork 56
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
Transmission between android device is not working #3
Comments
@Rahil1991 Android bluetooth is very buggy on particular devices. If you happen to fix the issue or find workaround, feel free to submit pull request. |
Same thing here on Asus Zenfone 2 Laser (ASUS_Z00ED). |
@mrp14 Library is specifically designed to call all Bluetooth API methods only on main threads (except for reading/writing of BluetoothSocket, which is explicitly permitted to be used from another threads). But, of course, maybe there is a bug somewhere in the code of the library. |
I finally saw that you queuing system only use UI Thread. I tried to call the connect method into UIThread but with no changes. The problem mustn't be there. Here is what i'm getting in the log :
|
@mrp14 Due to Android models fragmentation and very unstable Bluetooth stack (prior to 7.0), it can either be a bug in stack itself or the library. Anyway, it can be debugged and fixed only using real device that it occurs on. |
That's exactly what i'm trying to do, maybe it would be useful for others too. Do you have any clue on how I can investigate this IOException ? EDIT : Here is the full log :
As you can see, bt listeting is stopped before the accept method has finished. I tried to remove the stop call in the activity onStop (to see what happens), and I'm now getting :
EDIT 2 : I reduced advertiseData sent (only device name) : I'm not getting the data too large error anymore, but socket accept method hangs and never returns. |
@mrp14 Maybe it's some specific bug in that version of the BT stack that limits listening to only 3 channels. Or maybe using BLE conflicts with RFCOMM listening methods of Bluetooth API. You can try to reproduce the bug with pure Bluetooth/BLE Android API — create same amount of listening BluetoothServerSockets and try to advertise something on BLE. |
I'm going to try it. |
@mrp14 I've wrote message to your email. |
send me the solidarity source code. I want it as well |
each time i got this,
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=5
i use moto g,Hp tablet ,Samsung s4 for testing.
The text was updated successfully, but these errors were encountered: