简体   繁体   English

蓝牙扫描仪重新连接android

[英]Bluetooth scanner reconnect android

I have a Samsung Galaxy Xcover 4, and a scanner (Intermec SR61). 我有一台Samsung Galaxy Xcover 4和一台扫描仪(Intermec SR61)。 The Samsung Galaxy XCover 4 is running an application 24/7, and never goes to sleep. 三星Galaxy XCover 4正在24/7运行应用程序,并且从未进入睡眠状态。

The Intermec SR61 is connected to this phone, and when scanning barcode, the application reads the barcode and handle the data. Intermec SR61已连接到此手机,并且在扫描条形码时,应用程序将读取条形码并处理数据。

After 24 hours, the Intermec SR61 loses connectivity to the phone. 24小时后,Intermec SR61失去与手机的连接。 It won't reconnect. 它不会重新连接。 I have to reconnect it through the application (disable/enable). 我必须通过应用程序重新连接它(禁用/启用)。

Why does this happen, and what can I do to make sure that doesn't happen? 为什么会发生这种情况,我该怎么做才能确保不会发生这种情况?

I have created something similar and some phones connected to some scanners will do that. 我已经创建了类似的东西,并且某些连接到某些扫描仪的电话可以做到这一点。 It is either a Bluetooth bug, a phone bug or a hardware thing. 这可能是蓝牙错误,电话错误或硬件。

There is not much you can do about it, I am afraid. 恐怕您对此无能为力。 Possibly you can change some settings in the scanner (sleep mode or something). 可能您可以在扫描仪中更改某些设置(睡眠模式或其他)。

What I did to fix it, was to create a background process that keeps an eye on the connection and re-connects if it is gone. 我所做的修复工作是创建一个后台进程,该进程关注连接并在连接消失后重新连接。 That process even goes so far to switch the Bluetooth adapter off and on again (because of problems on a certain phone). 该过程甚至进行到关闭然后再打开蓝牙适配器为止(由于特定手机上的问题)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM