piggz / harbour-amazfish

Amazfit Bip support for SailfishOS
GNU General Public License v3.0
103 stars 51 forks source link

Calender Entries are Blank (no text only Time) with SFOS-Update 4.5 #256

Closed FingusDE closed 1 year ago

FingusDE commented 1 year ago

With updating to SailfishOS 4.5 on Tama Community-Port Amazfish only send blank Calender Entries to the Watch (Amazfit GTS).

FingusDE commented 1 year ago

Still there: Bildschirmfoto_20230222_001 grafik

theseer commented 1 year ago

I'm having the same problem on my GTS 2.

It appears also that the data transfer for the statistics is broken, as I don't have any history step count or other health data anymore. Not sure if that is related in anyway.

I'll try to debug this a bit maybe later today - maybe I can figure something out ;)

theseer commented 1 year ago

I spent some time over the last days looking into this, but didn't find an obvious culprit as of yet.

Looking at the journal log (journalctl -f) when using the debug "update calendar", I can see the data is complete with title when sending. So it's not a problem with the calendar itself.

I'll debug some more :)

piggz commented 1 year ago

This seems to work Ok on my GTR2

theseer commented 1 year ago

I didn't have much time yet to debug further but given nothing changed in terms of the application itself and the log shows the calendar data is at least received correctly, it must be something related to the OS.

@piggz: Are you using the official bluetooth stack or your patched version despite being on the latest OS version?

piggz commented 1 year ago

Im using the official BT stack ... the change that was in my version is now incorporated into Sailfish

theseer commented 1 year ago

There goes my - currently - last idea :-/

piggz commented 1 year ago

Ive just created 2 test entries in my calender, and both appeared on the phone just fine, except that the time is missing the minutes, so ill certainly look at that.

theseer commented 1 year ago

So maybe that's a regression to my fix with the minutes in #253 ? Even though I don't see how..

piggz commented 1 year ago

Hang on, i may not have restarted my daemon.....

piggz commented 1 year ago

Ah ok, that interesting, since restarting the daemon with the fix in #253, i have the minutes but no text!

piggz commented 1 year ago

Ok, ive fixed it. In addition to the off-by-one, removing the 0x00 on the line below fixes both the minutes, and the missing text.

theseer commented 1 year ago

I have an idea:

The change I suggested for #253 adds a byte to the output, pushing the following \00 by one position. Maybe the additional \00 is now superflous and the culprit, marking the string as emtpy (c-style string termination)?

theseer commented 1 year ago

Yeah, that :-)

piggz commented 1 year ago

Which is strange because that doesnt match GB

piggz commented 1 year ago

Ah no, this is correct, as per https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/master/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java#L1079 date 0x00 title 0x00