krisbuist / timeular-zei-linux

Linux client for the Timeular ZEI
MIT License
32 stars 11 forks source link

cannot automatically reconnect after long disconnect #6

Closed andrewyates closed 5 years ago

andrewyates commented 5 years ago

Hi,

I'm encountering an issue where the app refuses to reconnect to the ZEI after it has been disconnected for a long time (overnight).

I haven't determined what threshold is required to count as a "long time." At the end of the day I place the ZEI on its stand and get the output shown below. The next morning the Linux app doesn't respond to ZEI changes until I restart it.

2018/11/21 18:50:49 ZEI disconnected 2018/11/21 18:50:49 Trying to connect to the ZEI

I'm wondering if this is some kind of Bluetooth timeout? Do you have any suggestions for what to check?

krisbuist commented 5 years ago

Hi,

I'm sorry to admit, but I wouldn't really know where to start. In terms of the Bluetooth connection, this tool relies on the currentlabs/ble library.

So I would recommend looking into the method "connectAndRun" in the (BluetoothManager)[https://github.com/krisbuist/timeular-zei-linux/blob/bfe4ccdcf13f325d7e8405b2201091959c7b9e67/BluetoothManager.go#L30]. Maybe the Bluetooth channel or connection doesn't get closed properly enough after a long time of inactivity.

I'm not really using this tool anymore since I'm using the native OSX application since about half a year

andrewyates commented 5 years ago

Thanks for looking into it. A kernel update seems to have fixed the issue, so I guess it was something specific to my hardware.