@@ -1,8 +1,8 @@
# Amazfish
-Companion application for Huami Devices (such as Amazfit Bip, Cor, MiBand2/3 and GTS and GTS) and the Pinetime Infinitime
+Companion application for Huami Devices (such as Amazfit Bip, Cor, MiBand2/3 and GTS and GTS) and the Pinetime Infinitime.
-Requires sailfish version 3.0.3.8 or above due to changes in the base sailfish image
+Requires Sailfish version 3.0.3.8 or above due to changes in the base Sailfish image. Instructions for [compilation](https://github.com/piggz/harbour-amazfish/blob/master/documentation/build-instructions.md) including for other operating systems can be found in the `documentation/` directory.
## Installation
* Install the ["chum" repository](https://chumrpm.netlify.app/) (by downloading the RPM file and running `devel-su pkcon install-local RPM_FILENAME` )
@@ -15,55 +15,58 @@
### Gold
-These are devices I have, have tested and will try not to break any functioanlity for an include:
+These are devices I have, have tested, and will try not to break any functionality for any included:
* Amazfit Bip
* Amazfit GTS
* Amazfit GTR2
- * Pinetime Infinitme
+ * Pinetime InfiniTime
* Bangle.js
### Silver
-These are devices which are properly implemented in the application, but I do not have and are tested by the commuity, and include:
+These are devices which are properly implemented in the application, but I do not have and are tested by the community, and include:
* Amazfit BipS
* Amazfit Bip Lite
* Amazfit GTS2
-I do not promise not to break funcaionality in these, but will fix where I can
+I do not promise not to break functionality in these, but will fix where I can.
### Bronze
-These are devices which use a protocol that is close to another suppored device, and so is treated like that device. Your mileage may vary with these devices.
+These are devices which use a protocol that is close to another supported device, and so is treated like that device. Your mileage may vary with these devices.
* MiBand 2/3/4
* Amazfit Cor
## Note for GTR2 / GTS2 owners
-These watches fail to follow the bluetooth specification, which states that the "Appearance" characterstic should be readable without auth/encryption. Infact, it seems this
-characterstic is not readnable at all, even though it is available, and this causes a failure in Bluez. It seems like Android/iOS are less strict in this regard.
+These watches fail to follow the Bluetooth specification, which states that the "Appearance" characteristic should be readable without auth/encryption. In fact, it seems this
+characteristic is not readable at all, even though it is available, and this causes a failure in Bluez. It seems like Android/iOS are less strict in this regard.
A patch has been added to Bluez which makes it not read the characteristic if it has previously been read and cached, and this allows us to work around the issue.
The device cache is in /var/lib/bluetooth/[host mac address]/[watch mac address/info.
As root, add the line
-Appearance=0x0192
-under the [General] heading and restart bluetooth with
-systemctl restart bluetooth
+
+ Appearance=0x0192
+
+under the [General] heading and restart Bluetooth with
+
+ systemctl restart bluetooth
Do this after pairing the watch in Amazfish.
## Powered by KEXI
-As of version 0.5.1, actiivity data is retrieved into an sqlite database. Becuase I think it is important to allow individuals to be in control of their own data, and that they should have the ability to analyse it themsleves, I have chosen to store data in a KEXI compatible database. This will allow you to copy the database from the phone, and open it up inside KEXI on Linux/Windows/Mac and perform queries and reports on it. This added ability means i link to a couple of KDE libraries, which should be installed automatically.
+As of version 0.5.1, activity data is retrieved into an SQLite database. Because I think it is important to allow individuals to be in control of their own data, and that they should have the ability to analyze it themselves, I have chosen to store data in a KEXI compatible database. This will allow you to copy the database from the phone, and open it up inside KEXI on Linux/Windows/Mac and perform queries and reports on it. This added ability means I link to a couple of KDE libraries, which should be installed automatically.
## Firmware Download - READ FIRST - I am not liable if you brick your watch ;)
-Read this for info about which files to flash https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Amazfit-Bip
+Read this for info about which files to flash: <https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Amazfit-Bip>
File download has been tested using an Amazfit Bip and GTS.
-The firmware is split into multiple files on these devices. With the official MiFit app, all are downloaded automatically in the correct oder. With this app, you have to send each file individually. The firmwares are available by extracting the Zepp apk, and looking in the assets/ folder for files named Mili_chaohu.* for the Bip. GTS firmware files can be found online, the device name is kestrelw, but be sure the files your arw downloadling are legitimate. When you select a file, its type and version will be determined, and you will be prevented from sending invalid files.
+The firmware is split into multiple files on these devices. With the official MiFit app, all are downloaded automatically in the correct order. With this app, you have to send each file individually. The firmware files are available by extracting the Zepp apk, and looking in the assets/ folder for files named Mili_chaohu.* for the Bip. GTS firmware files can be found online, the device name is kestrelw, but be sure the files you are downloading are legitimate. When you select a file, its type and version will be determined, and you will be prevented from sending invalid files.
The firmware (.fw) requires a matching font (.ft) and resource (.res). Send the firmware first, the app will send a reboot command at the end of the transfer, and the watch will boot up into a mode where it needs the matching font and resource sent. Just wait for the app to connect again, then send the font and resource.
@@ -79,26 +82,26 @@
# Server Side Pairing Code
-The newer devices (GTS, BipS etc) requires a server-side pairing key which requires inital pairing with an android device. To get the key, follow the instructions here and enter into Amzafish when prompted, WITHOUT 0x at the beginning.
+The newer devices (GTS, BipS etc) requires a server-side pairing key which requires initial pairing with an android device. To get the key, follow the instructions here and enter into Amazfish when prompted, WITHOUT 0x at the beginning.
See https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Amazfit-GTS
*Pairing Issues*
-Pairing works for myself, sometimes I have to try twice. If pairing doesnt work at all, then try:
+Pairing works for myself, sometimes I have to try twice. If pairing doesn't work at all, then try:
- keep the app open, and pair again in the BT settings page of sailfish
- in the sailfish BT settings page, delete all entries and try again
- turn off/on BT on the phone
- factory reset the watch
+ Keep the app open, and pair again in the BT settings page of sailfish
+ In the sailfish BT settings page, delete all entries and try again
+ Turn off/on BT on the phone
+ Factory reset the watch
-Check if after all this, pairing works from the sailfish BT settings page. It should pair and connect just fine from there. If that doesnt work, my app wont either.
+Check if after all this, pairing works from the sailfish BT settings page. It should pair and connect just fine from there. If that doesn't work, my app wont either.
-Not all features currently implemented
+Not all features currently implemented.
***May not work on all devices***
-Uses Bluetooth Low Energy to communicate with the watch, this is known to be problematic on some devices. it is known to work on the Xiaomi Mido. Probably also works on the FP2 and is tested ont he XA2.
+Uses Bluetooth Low Energy to communicate with the watch, this is known to be problematic on some devices. It is known to work on the Xiaomi Mido. Probably also works on the FP2 and is tested on the XA2.
Implemented
Pairing
@@ -115,17 +118,17 @@
Todo
More Settings
- Support other devices (maybe eg MiBand2, as it is similar)
+ Support other devices (maybe e.g. MiBand2, as it is similar)
Tip:
On your device, create a symlink in /home/nemo to /home/nemo/.local/share/harbour-amazfish
-This way, you can easilty copy the database off the phone using MTP.
+This way, you can easily copy the database off the phone using MTP.
## Button Actions
-Bip and GTS notify when the watch button is pressed. This is captured by amazfish which allows running actions on theses presses. An action can be ran on 2,3 or 4 presses.
-To confiure the actions, goto Settings > Application > Button Actions.
+Bip and GTS notify when the watch button is pressed. This is captured by Amazfish which allows running actions on theses presses. An action can be ran on 2,3 or 4 presses.
+To configure the actions, go to Settings > Application > Button Actions.
A custom script can be used, the script must be called harbour-amazfish-script.sh and be in the home folder.
Example which sends a OTP code to the watch as a message:
@@ -140,5 +143,5 @@
Credits to:
- The gadgetbridge devs, which gave me a lot of hints and inspiration from their device code.
+ The Gadgetbridge devs, which gave me a lot of hints and inspiration from their device code.
https://codeberg.org/Freeyourgadget/Gadgetbridge
|
@@ -5,7 +5,7 @@
The application can be built and deployed like any normal Sailfish application using the SDK, once some additional dependencies have been installed in the
build target which are not available by default.
-To get into the build machine (if started by Sailifsh IDE)
+To get into the build machine (if started by Sailfish IDE)
`ssh -l mersdk localhost -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk`
Use the `sb2-config` command to make your ARM target the default
@@ -29,17 +29,19 @@
etc as pointed out by build errors.
(although ctrl-B should offer to install them)
-## In Ubuntu 20.04, with default Ubuntu repository, QT is in version 5.12.8
+## Debian based distributions
+
+In Ubuntu 20.04, with default Ubuntu repository, QT is in version 5.12.8. Tested with Mobian (Debian bookworm/sid) and Phosh on the PinePhone Pro.
### Install dependencies
-Most dependencies can be installed from the Ubuntu package repositories:
+Most dependencies can be installed from the system's package repositories:
```
sudo apt update
-sudo apt install -y qt5-default libkdb3-dev libkf5contacts-dev libkf5coreaddons-dev qtlocation5-dev qtconnectivity5-dev qtpositioning5-dev qml-module-qtbluetooth
+sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libkdb3-dev libkf5contacts-dev libkf5archive-dev libkf5coreaddons-dev qtlocation5-dev qtconnectivity5-dev qtpositioning5-dev qml-module-qtbluetooth qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qt-labs-settings qml-module-org-kde-kirigami2 qml-module-org-kde-bluezqt
```
-Two depedencies can be found on git repos
+Two dependencies can be found on git repos
https://git.sailfishos.org/mer-core/nemo-qml-plugin-dbus
and
https://git.sailfishos.org/mer-core/qtmpris
@@ -70,13 +72,13 @@
### Prepare git repo
-Clone amazfish repository:
+Clone Amazfish repository:
```
git clone https://github.com/piggz/harbour-amazfish.git
cd harbour-amazfish
```
-Initialise and sync submodules:
+Initialize and sync submodules:
```
git submodule init
@@ -113,7 +115,11 @@
You can now run the `make` command again, and the build process should end successfully.
### Installing Amazfish and enabling background service.
-Once you have built the project, run `sudo make install` to install the service daemon and program files.
+Once you have built the project, run this command to install the service daemon and program files:
+
+```
+sudo make install
+```
Amazfish will be installed to: `/usr/local/share/harbour-amazfish-ui`
|