izivkov / CasioGShockSmartSync

Apache License 2.0
115 stars 12 forks source link

"Short press" time sync not working #48

Closed geebotron closed 1 year ago

geebotron commented 1 year ago

Describe the bug App hangs when time sync is requested, via short press, and the time setting fails to be applied.

To Reproduce Steps to reproduce the behavior:

  1. Open the app
  2. Short press lower right button on watch
  3. App responds with spinner graphic.
  4. No response from watch - reverts to previous state after a few moments.
  5. App hangs with spinner and eventually forces close.

Expected behavior App to push time setting to watch, and watch to give an OK message.

Smartphone (please complete the following information):

Additional context App doesn't appear to sync the time to the watch even when connected via bluetooth (long press lower left button), but the app doesn't hang in the attempt.

izivkov commented 1 year ago

@geebotron

OK, thanks for the info. Let us first get a baseline of the problem. Could you try the following steps:

  1. Make sure the official app is not running on you phone or another phone within Bluetooth range. This could interfere with the app.
  2. Stop and restart the app form the Android settings.
  3. When the app starts, press the "Forget" button, in case another watch was selected before.
  4. Connect to the watch by long-pressing the lower-left button, go to "Actions" and make sure only "Set Time" action is enabled. If you have too many actions enabled, they may interfere. Also to clarify, when you short-press lower-right button, the app will run whatever action is selected in the "Actions" screen. If "Set Time" action is selected, only then time will be set.
  5. Disconnect from the phone by pressing any button on the watch.
  6. Run the time-setting action again by short-pressing in the lower-right button.

If you set the time manually, by long-press lower-left button, and then press "Set Time" from the Time screen, does that work? The app will not set the time automatically, unlike the official app.

Please let me know the result, and we can take it from there.

izivkov commented 1 year ago

After looking at this watch a bit further, it is a new and it uses a different module than the GW-B5600, which I am familiar with. If you have tried all the steps above, and still cannot set the time, there might be some difference in the way the watched communicate. I do not have this watch, so cannot try it. We are trying to raise some funds to support more watches. But let me know if you cannot set the time after you have tried the above steps.

geebotron commented 1 year ago

I followed your instructions, and the result was the same for the short press time set, as I described above.

Using the long-press, then the manual set time on the time screen seems to work - but I get no aknowledgement from the watch i.e. no OK message, just the actual adjustment of the time.

izivkov commented 1 year ago

OK, I see this is a different model. Even though I do not have the watch, I will attempt to add support for it, based on these specs:

https://shockbase.org/watches/subseries_dyn.php?series=5600&subseries=DW-5600&modul=3229

I cannot release untested code, so are you willing to test my fix if I gave you an APK? I just cannot afford to buy all the models, since I am developing this app for free.

geebotron commented 1 year ago

Hmm. On further tinkering I am not convinced the app is setting the time, even via the set time feature on the time screen. It did appear to do this one time, but I can't get it to set it on subsequent attempts.

geebotron commented 1 year ago

Yes no problem - I will help you test this

izivkov commented 1 year ago

Yes, this is what I thought. The GW series has to send all its World Cities first, before setting the time. The DW has no World Cities, to the app gets stuck waiting for results (thus you see the red waiting circle forever). The DW should just send the time. This is what I am trying to do to support the DW.

izivkov commented 1 year ago

@geebotron Could you confirm the module in your watch is 3509?

From what I understand, there are 5 alarms, no reminders, one World City and One Home City, no Auto-light. Is this correct?

If you got a chance, could you also send me the screenshot of your "Time" screen.

Thanks.

geebotron commented 1 year ago

Yes. Before the model number (DW-B5600) is stamped the digits "3509".

I think you are correct about the other features too.

I don't seem to be able to upload a screenshot (using Octodroid on my phone), but I'll try from my desktop...

geebotron commented 1 year ago

screenshot

screenshot on IPFS here

izivkov commented 1 year ago

You can try this APK: https://drive.google.com/file/d/1Sl7unmrDj48BkLAWDh3HPKhujm1WRhAD/view?usp=drive_link

Alternatively, if you are comfortable building from code, I have created a branch here: https://github.com/izivkov/CasioGShockSmartSync/tree/dw-b5600-support

BTW, this is not the final version. I just want to see if we can set time. If it works, I will refine before releasing.

geebotron commented 1 year ago

Unfortunately I don't have a google account - and it appears the drive is not accessible to an anonymous user.

Could the apk be uploaded to github?

I have not built Android packages before. What minimum environment would I need?

Sorry to be a pain!

UPDATE: Just asked the wife to download it ;-)

izivkov commented 1 year ago

I could not upload it GitHub, but I have given you access to the same APK. You can try downloading again.

On Wed., Aug. 30, 2023, 4:17 p.m. geebotron, @.***> wrote:

Unfortunately I don't have a google account - and it appears the drive is not accessible to an anonymous user.

Could the apk be uploaded to github?

I have not built Android packages before. What minimum environment would I need?

Sorry to be a pain!

— Reply to this email directly, view it on GitHub https://github.com/izivkov/CasioGShockSmartSync/issues/48#issuecomment-1699779489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37SHOU3YMS6V32MVTE3XX6NT5ANCNFSM6AAAAAA4CETTU4 . You are receiving this because you commented.Message ID: @.***>

geebotron commented 1 year ago

I installed the debug app on the wife's phone, and the setting of the time seemed to work ok - from the time screen, but not via the "short press" of the lower right watch button.

From the Time screen, it gave a message "time set on watch" or something similar, and it had indeed set the time correctly.

izivkov commented 1 year ago

Ok, so the same problem, the red circle keeps spinning? I'll take a look

geebotron commented 1 year ago

Yes, same problem

izivkov commented 1 year ago

I updated the APK. Could you download again? BTW, I think you can download the APK to your phone now, I just had to give you permissions.

Can I ask you to verify that the manual setup actually works. Please set the watch to a different time using the watch buttons, Then connect the app with the Lower-Left button and try setting the time. When setting the time, you should see two messages at the bottom: "Setting time" and a few seconds later "Time Set". The correct time should be set on the watch, and RCVD displayed on it. After that, you should be able to operate the app as usual.

If this works, change time manually using the watch buttons again, and try the lower-right button. If the first method works, the seconds should work too.

Thanks for your help.

geebotron commented 1 year ago

The permissions you have granted are, I imagine, for my wife's google identity: I personally have no google credentials at all. The APK link still requires google credentials for access.

My wife is not around at this moment, but when she is I will commandeer her phone again!

izivkov commented 1 year ago

Ok, sorry about that. I changed the permissions of the file so anybody with a link can now download it.

The apk have a lot of restrictions, so if I send them via email, they most likely will be blocked. Anyways, I think you should be able to get it via the link now.

On Thu., Aug. 31, 2023, 8:05 a.m. geebotron, @.***> wrote:

The permissions you have granted are, I imagine, for my wife's google identity: I personally have no google credentials at all. The APK link still requires google credentials for access.

My wife is not around at this moment, but when she is I will commandeer her phone again!

— Reply to this email directly, view it on GitHub https://github.com/izivkov/CasioGShockSmartSync/issues/48#issuecomment-1700912228, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37TVGBGUYHB6FF2VLUTXYB42NANCNFSM6AAAAAA4CETTU4 . You are receiving this because you commented.Message ID: @.***>

geebotron commented 1 year ago

Yes - I can now download the debug app to my phone. I had to un-install the 'release' version in order to install the debug version.

I can confirm now that the debug version sets the time correctly, in both modes: short-press of lower right button, and long-press connection mode.

I manually set the time on the watch differing to the phone, and the app corrected the time via both mechanisms.

Looking good!

izivkov commented 1 year ago

Great! Thanks for your help.

I'll creat a proper release and will update the app on both playstore and f-driod.

In the meantime, let me know if you find any other functions, like in settings screen not working or missing. Also, see if alarms are working as expected. For the DW, I have removed the "events" screen, since it is not supported AFAIK.

Ivo

On Thu., Aug. 31, 2023, 10:38 a.m. geebotron, @.***> wrote:

Yes - I can now download the debug app to my phone. I had to un-install the 'release' version in order to debug version.

I can confirm now that the debug version sets the time correctl, in both modes: short-press of lower right button, and long-press connection mode.

I manually set the time on the watch differing to the phone, and the app corrected the time via both mechanisms.

— Reply to this email directly, view it on GitHub https://github.com/izivkov/CasioGShockSmartSync/issues/48#issuecomment-1701178157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37UF2JONT7WVXPULDE3XYCOYDANCNFSM6AAAAAA4CETTU4 . You are receiving this because you commented.Message ID: @.***>

geebotron commented 1 year ago

And thank you for the swift implementation of the 3509 spec. I will report any further issues I encounter...

izivkov commented 1 year ago

Closing this issue. Support for the DW-B5600 watch will be in version 10.2 of this app.

izivkov commented 1 year ago

@geebotron One thing I thought of, what happens if you try to run action 'set reminders from Google calendar". Does the app crash?

geebotron commented 1 year ago

No - the app does not crash: it reports "events sent to watch".

One thing I have noticed, is that setting the time from the time screen seems to introduce a random deviation from the phone time of up to 4 seconds. Setting the time via the "short-press" seem to result in a much more precise time sync, from phone to watch.

geebotron commented 1 year ago

Another thing: the "find my phone" action (long-press of lower right button) seems to trigger in the app, but produces no ring alert from the phone i.e. phone remains silent. The volume level setting appears to be normal, i.e. not zero.

izivkov commented 1 year ago

Ok, I'll check it out. It works for me, and I will see if it is a phone setting. You may want to try it on another phone, see it it makes a difference.

Also, make sure you have placed the phone somewhere and it is stationary, not holding it or moving it. The ring will stop as soon as the app detects that you have picked the phone up. i.e, it is moving.

I have released version 10.3 of the app, which removes some of the options like the "Event Actions" for the DW, and some other minor cleanup.

On Sat, Sep 2, 2023 at 9:00 AM geebotron @.***> wrote:

Another thing: the "find my phone" action (long-press of lower right button) seems to trigger in the app, but produces no ring alert from the phone i.e. phone remains silent. The volume level setting appears to be normal, i.e. not zero.

— Reply to this email directly, view it on GitHub https://github.com/izivkov/CasioGShockSmartSync/issues/48#issuecomment-1703826515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37XQY2ZQHTRNLHCDCM3XYMUWBANCNFSM6AAAAAA4CETTU4 . You are receiving this because you modified the open/close state.Message ID: @.***>