-
Notifications
You must be signed in to change notification settings - Fork 518
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
🐛 IOS\Android disconnecting from bluetooth device after connecting if we don't write characteristics after 30 seconds. #1219
Comments
Hello @vipien |
Hi! Thanks for taking the time to check it. We tried to run the example app and we could not make it work. Is there a guide that we can follow? We have also tested it better. We know that is exactly after 30 seconds. It also happens in the Google Pixel we have for testing, not only in iPhones. The behavior is the same, we search, connect, and keep the app alive. If we do not print in the next 30 seconds it disconnects. We also know this is not a printer problem because we can connect with another app and it remains connected without printing. I hope this information is useful for you to find out why. For now we added a wait with 3 seconds after the connection is made and we print a "Connected to printer" label, but we don't like this solution. |
What problems do you have with example app? I'm aware of one issue with iOS and to solve it you would have to remove First of all I would like to confirm that it's not the printer that is closing connection. To do so I would need you to adjust our example app disconnectBeforeWrite to work with your printer, or test your app agains different device to confirm that connection also will be dropped. Preferably it would be both as one does not confirm the other. Additionally system level logs from xCode/Logcat could provide more insight. You can collect logs after using setLogLevel with |
Hi @vipien |
Prerequisites
Expected Behavior
We connect to the device and we remain connected even if we do not print a label.
Current Behavior
We connect to the device, in this case a Zebra Printer, and after some seconds (30) it automatically disconnect. We do not receive any error on the onDisconnected listener. If we connect and print (write characteristic) before disconnecting, it remains connected. We do not let the phone turn off the screen.
Library version
3.2.0
Device
Iphone 13 (17.5.1)
Google Pixel
Environment info
Steps to reproduce
Formatted code sample or link to a repository
Relevant log output
Additional information
No response
The text was updated successfully, but these errors were encountered: