harbour-contrac icon indicating copy to clipboard operation
harbour-contrac copied to clipboard

Receiving of keys seems to freeze after a while

Open Matzt opened this issue 4 years ago • 6 comments

Hi there! First of all thanks a lot for the effort you put into developing a corona-app for SFOS. I very much appreciate it and it was one of the reasons I finally switched from my good old Jolla 1 to Xperia XA2. I've been using the app for roughly a week now and it seems that the app isn't able to receive any keys after a while. This happened to me twice. The first time I was able to receive roughly (I don't remember the exact number since I suffer from https://github.com/llewelld/harbour-contrac/issues/61 as well) 170 keys, the second time it was only 24. The sent keys counter keeps running though. Restarting the app doesn't seem to make a difference, rebooting the phone gets it going again. I almost exclusively use bluetooth for contrac and at least before the second freeze I didn't connect to any other device. I also don't run Amazfish. My device is Sony XA2 single sim running SFOS 3.4.0.24 and contrac 0.7.4. Dimpflmoser seems to have the same problem (https://github.com/llewelld/harbour-contrac/issues/66) but the post was too unspecific so I opened a new one to focus on this. Please let me know if I con provide any other useful Information.

Matzt avatar Nov 05 '20 19:11 Matzt

I have the impression that this is linked to putting the phone in and out of flight mode. At least I was receiving keys till I went to bed and put on flight mode yesterday and I didn't get any today yet. Could be the switch to a new day as well though. I give it a little more try.

Matzt avatar Nov 06 '20 10:11 Matzt

Thanks for your reports and for the continued investigation.

If you're switching the phone to flight mode this will deactivate Bluetooth, and it's likely this is what's causing the issue. Unfortunately right now there's no check for this in the code (see #32 and #59), so the daemon isn't aware. When Bluetooth is reactivated, the daemon doesn't therefore go through the required steps to re-establish scanning/sending.

I apologise for this; it's something that clearly needs fixing. It's at the top of my Contrac to-do list.

llewelld avatar Nov 06 '20 11:11 llewelld

Just to confirm this: Yes, it's the flight mode, I've tested it a few times by now ;-)

Matzt avatar Nov 08 '20 15:11 Matzt

Thanks for checking, and for raising it. It's definitely something that needs fixing.

llewelld avatar Nov 08 '20 15:11 llewelld

Just to confirm this: Yes, it's the flight mode, I've tested it a few times by now ;-)

Would it be a workaround to deactivate 'Scan and send active' and reactivate it again?

dimpflmoser avatar Nov 10 '20 20:11 dimpflmoser

Yes it is. I've checked two variants:

  1. deactivate "scan and send" -> flight mode on -> flight mode off -> activate "scan and send
  2. flight mode on -> flight mode off -> deactivate "scan and send" -> activate "scan and send

Both work. Thanks for the idea :-)

Matzt avatar Nov 11 '20 08:11 Matzt