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

Random disconnects #19

Open
AviyaSmila opened this issue Jul 3, 2019 · 8 comments
Open

Random disconnects #19

AviyaSmila opened this issue Jul 3, 2019 · 8 comments

Comments

@AviyaSmila
Copy link

Hi,
I`ve managed to connect to a custom device with the SDK but I have random disconnects that occur without any type pattern.
What can be the reason for this kind of problem?

@GiovanniVisentiniST
Copy link
Contributor

Hi,

what are you doing before the disconnection?
could be that you are sending/receiving too much data?
witch context do you use to connect, if the context die also your connection will die..
do you have any message from the log cat? (search for gatt and or bluetooth in the message tag, did not limit it to your application output)

Best Regards
Giovanni

@AviyaSmila
Copy link
Author

D/BluetoothGatt: onClientConnectionState() - status=8 clientIf=8 device=02:80:E1:00:00:AA
D/Bluetooth name: is not null
D/com.st.BlueSTSDK.Node: Node: PG_1234567890 Status: 8 newState: 0 boundState:10
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=8
D/Bluetooth name: is not null
E/com.st.BlueSTSDK.Node: Error connecting to the node:PG_1234567890
D/Bluetooth name: is not null
D/NodeStateListener: PG_1234567890 Connected->Dead
D/Connection Status: Dead
D/InputTransport: Input channel constructed: fd=69

This is the part where it disconnectss

@GiovanniVisentiniST
Copy link
Contributor

the status 8 should be a timeout error.. what did you do before the status change?

@AviyaSmila
Copy link
Author

sometimes it happens after sending data, sometimes after receiving data, sometimes it happens after doing nothing

@AviyaSmila
Copy link
Author

??

@AviyaSmila
Copy link
Author

@GiovanniVisentini ?

@GiovanniVisentiniST
Copy link
Contributor

try to add some breakpoint/ Log.d here:

//set the value to write and write it

and here:

WriteDescCommand command = mWriteDescQueue.peek();

to see if you have some write/enable notification pending that goes on timeout

another test could be to use another app that just connect to the node and see if the disconnection happen anyway, to see if it is a fw problem

Best Regards
Giovanni

@AviyaSmila
Copy link
Author

I`ts not FW problem as other apps are keeping steady connection to the device

leoek added a commit to lipsia/BlueSTSDK_Android that referenced this issue Oct 15, 2020
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