The config refactor in addf7ff6a broke health settings on GTR3 and GTS3
- GTS 3 and GTR 3 health configs use protocol v1. The only difference
seems to be that the steps goal is a SHORT instead of an INT.
- It needs a refactoring from the ground up to better handle different
versions, but this is enough to get the GTR 3 and GTS 3 working.
- File uploads are split in chunks, with the size dictated by the
watches. There seem to be 2 protocol versions, without any noticeable
differences
- Extract the file upload logic to a standalone class. This makes it
easier to keep track of concurrent requests, each of which have their
own session id
- Icons larger than 8KB will end up split in multiple chunks - we now
handle that correctly
- Notification icons are also requested in 2 different formats, but
the actual encoding seems to be the same, with only a different id
Using objects instead of primitives, reading from correct JSON
Added unregisterReceiver for GenericWeatherReceiver
Added GenericWeatherReceiver to manifest
This adds the functionality of long-pressing the launcher icon for directly connecting a device.
The devices are automatically added as shortcuts when they are being connected.
The helper library handles the maximum number of shortcuts automatically.
- use encryption to create data rather then replay captured BLE traffic
- use periodical data sender, as is required by the BLE module
- extract string resources
This has some advantages:
- Less stuff to download for building Gadgetbridge (CI Speedups)
- Shorter build time (no need to build shared library for all supported architectures)
- Easier debugging
- etc :P
What I did:
- remove all curves except B163 to make porting easier
- port to java with brain switched off
- fix the "java has no unsigned" bugs
- add some helpers to convert int[] to byte[] and back because java has no casts
The result is ugly, no one would write such crappy code from scratch, but I tried to
keep it as close to the C code as possible to prevent bugs. Since I did not know what
The previous one was too long, now that we loop it.
This one should be a sane default, even for devices that do not support
it (eg. Bip), as the total time is 1.5s.
- adds initial device support
- can control driving forward/back/left/right
- probably could be implemented further:
- battery reading
- device name?
- lights on
- fast/slow speed mode
- Reply with HTTP 404 to unknown weather endpoints
- Add some missing fields to weather responses
The official Zepp app itself gets a 404 when calling a /weather/tide
endpoint, so we don't know what the watch is supposed to receive.
Weather also seems to still not work correctly on the GTS 3, but this at
least fixes the request spam that was coming from the watch on the tide
endpoint.
Add support for (explicit) service intents.
Add support for setting flags for intents.
Add support for setting multiple categories for intents.
Add ability for Gadgetbridge to wake the Android device and leave the
lock screen to start activities when it is sleeping. A new activity
'WakeActivity' is used for this. (Must use 'trusted device' in Android)
Add dismiss-button to 'display over other apps' permission pop up.
Bangle.js can send "gadgetbridge" as package info to accomodate the
different GB build variants/flavours.
Use only getContext() and not getApplicationContext() when executing
the intents.
Fix heartrate notify staying on after manual measurement.
Fix "live measurement" to use "continue" packet instead of restarting measurement every second.
Add basic initial support for the Amazfit GTS 3 based on Xiaomi Smart Band 7 support.
What was already tested (other features might work too):
**Implemented features**
Connection
Reconnect after Airplane mode
Set time
Notifications
Send to band
Delete notifications on phone/band when deleted on the other
Calls
Custom notification icons
Handle + ack notification replies from band
Music (with youtube music)
Music Info
Volume
Music buttons
Find Phone from band / stop on band when stopped on phone
Battery Info (request, parse)
Flash Watchface
Night mode (mode, schedule)
Lift wrist (mode, schedule, sensitivity)
(Not) working features might be similar to Miband 7.
Tested on
FW: 7.42.5.1
HW: 0.76.17.4
Co-authored-by: Andreas Sedlmayer <sedlmayer.andreas89@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2871
Co-authored-by: sedy89 <sedy89@noreply.codeberg.org>
Co-committed-by: sedy89 <sedy89@noreply.codeberg.org>
This PR adds support for the flipper zero device.
It's main purpose currently is to provide an Intent-based API to Tasker and similar apps to play sub-GHz files.
In the future, file management and other features might be useful.
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2840
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
This PR aims to add support for the newer Fossil Gen. 6 Hybrid models, which are pretty similar to the older HR's.
Here's my checklist
- [x] make GB recognize and accept new watches
- [ ] find out how SPO2 is transmitted
- [ ] extend activity data to include Oxygen data
- [x] create timeout for requests to avoid deadlocks
- [x] fix device vibration on every reconnect
- [ ] create API for voice commands
- [x] figure out how the voice data works
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2775
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
...to allow intents to start activities on the android device.
Add pop-up asking for permission to "Display over other apps"
Add info for intents on Bangle.js
Add message to display on "Display over other apps" permission pop-up
Move permission to display over other apps to main build variant/flavor.
fix getting permission for display over other apps.
Clarify that permission to display over other apps is mainly for Bangle.js.
try to deal with possible outstanding steps count synced on the first sync of the day (those may spoil the whole day activity);
take into account timezone diffs between local time and UTC for check steps of a day;
add some extra logging to help investigate possible issues reported by users
inform GB about new activity samples immediately after the sync (solves "lazy" refresh of the device card)
If logging initialization failed, the file logger would not be removed
correctly, and it would log to a GB_LOGFILES_DIR_IS_UNDEFINED directory.
Remove the file logger from the root appender, regardless of it being
null or not.
The issue can be easily reproduced before the fix by throwing an
exception in FileUtils#getExternalFilesDir. Before the fix, it would
still log to the aforementioned directory.
Aditionally, update the Settings screen to reflect that writing log
files is not available in such cases.
1) The AutoConnectIntervalReceiver was completely disabled when a device went into WAITING_FOR_RECONNECT state
2) The logic inside AutoConnectIntervalReceiver was broken, so that a timer never got started
The notification, once enabled, can only be triggerd once per day, mind that when testing.
Packet structure:
```
00:c2:00:3a:01:00:00:00:01:88:13:00:00
00:c2:00: - chunked transfer type 2
3a: - command set goals/notificatrions
01: - 01 - set steps goal, 02 - set calories goal, 03 - both
00:00:00: - delimiter
01: - enable steps goal notification
88:13: - set steps goal (5000)
00:00 - delimiter
```
This is sent when goal notification switch is enabled in Zepp app:
```
00:c2:00:3a:03:00:00:00:01:40:1f:00:00:01:2c:01:00:00
00:c2:00: - chunked transfer type 2
3a: - command set goals/notificatrions
03: - 01 - set steps goal, 02 - set calories goal, 03 - both
00:00:00: - delimiter
01: - enable steps goal notification
40:1f: - steps goal (8000)
00:00: - delimiter
01: - enable calories goal notification (seems to be not used in Neo)
2c:01: - set calories goal (300)
00:00 - delimiter
```
And when disabled:
`00:c2:00:3a:03:00:00:00:00:40:1f:00:00:00:2c:01:00:00`
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2780
Co-authored-by: NekoBox <nekobox@noreply.codeberg.org>
Co-committed-by: NekoBox <nekobox@noreply.codeberg.org>
Also implemented a `force_calendar_sync` command for the pebble-like
implementation to cope with out of sync databases (calling the receiver
doesn't work as of now)
The 2nd TimeZone watchface widget was configured with an offset that
didn't take DST into account. This change makes it use the correct
offset.
Fixes#2761
- open app preferences screen from device card menu
- open auth preferences screen from DiscoveryActivity
- add explanation about Auth key, make it open wiki link, fix#2240
- add New protocol checkbox and explanation when first pairing Miband 6
Allows to install latest watchapps
It seems that every time the firmware gets a major update, the new watchapps
have a different minor version, we dont need to check for that because watchapps
seem to be compatible accross firmware versions
this PR aims to add device for multiple connected devices at once.
A lot of stuff already works, some things need to be done:
- [x] change DeviceCommunicationService to hold multiple devices and supports
- [x] implement connect / disconnect logic
- [x] widgets, not really suited for multiple devices, so far
- [x] change the notification to show multiple devices
- [ ] change GBDeviceService#onFindDevice and similar API functions to target individual devices, not all connected.
- [x] move auto-reconnect setting to device settings
- [x] fix music event crash
- [x] work out behaviour when pressing "connect" from notification
- [ ] handle service crashes
- [ ] suit coordinator methods for multiple devices of same kind
- [x] change ACL_CONNECTED receiver to connect to devices that are not currently registered in DeviceCommunicationService
- [ ] adjust after-boot auto-connection logic
- [ ] fix hanging device support. Device says disconnected, GB says connected
- [x] firmware updater doesn't work
My attempt to make onFindDevice work was to change the arguments to ```EventHandler#onFindDevice(GBDevice device, boolean start)```.
The Problem is that this forces the device-specific implementations to also accept GBDevice as an argument.
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org>
Co-authored-by: dakhnod <dakhnod@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2526
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>