Rename ATC_TLSR_Paper to ATC_BLE_OEPL

It seems the old github repo is named ATC_TLSR_Paper, but the firmware (without published source) we use now is called ATC_BLE_OEPL

At least the author calls it ATC_BLE_OEPL now

https://www.youtube.com/watch?v=9oKWkHGI-Yk
This commit is contained in:
Andreas Shimokawa
2025-07-03 23:57:54 +02:00
parent 7e7f554045
commit b0bb0f0eb5
11 changed files with 69 additions and 69 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
* Initial support for Garmin Descent Mk3
* Initial support for Redmi Watch 5
* Initial support for Yawell rings R10 and R11
* Initial support for ATC_TLSR_Paper (experimental)
* Initial support for ATC_BLE_OEPL (experimental)
* Experimental support for Amazfit Balance 2
* CMF Watch Pro: Firmware update
* Fossil/Skagen Hybrids: Add calendar support
@@ -650,7 +650,7 @@ public class DeviceSettingsPreferenceConst {
public static final String PREF_DEVICE_STRESS_TEST_CONNECT_PARALLEL = "pref_device_stress_test_connect_parallel";
public static final String PREF_DEVICE_STRESS_TEST_DISPOSE = "pref_device_stress_test_dispose";
public static final String PREF_ATC_TLSR_PAPER_MODEL = "pref_atc_tlsr_paper_model";
public static final String PREF_ATC_TLSR_PAPER_BLE_ADV_INTERVAL = "pref_atc_tlsr_paper_ble_adv_interval";
public static final String PREF_ATC_TLSR_PAPER_OEPL_PROTOCOL_ENABLE = "pref_atc_tlsr_paper_oepl_protocol_enable";
public static final String PREF_ATC_BLE_OEPL_MODEL = "pref_atc_ble_oepl_model";
public static final String PREF_ATC_BLE_OEPL_BLE_ADV_INTERVAL = "pref_atc_ble_oepl_ble_adv_interval";
public static final String PREF_ATC_BLE_OEPL_OEPL_PROTOCOL_ENABLE = "pref_atc_ble_oepl_oepl_protocol_enable";
}
@@ -967,9 +967,9 @@ public class DeviceSpecificSettingsFragment extends AbstractPreferenceFragment i
addPreferenceHandlerFor(PREF_CALENDAR_MAX_DESC_LENGTH);
addPreferenceHandlerFor(PREF_CALENDAR_TARGET_APP);
addPreferenceHandlerFor(PREF_ATC_TLSR_PAPER_MODEL);
addPreferenceHandlerFor(PREF_ATC_TLSR_PAPER_BLE_ADV_INTERVAL);
addPreferenceHandlerFor(PREF_ATC_TLSR_PAPER_OEPL_PROTOCOL_ENABLE);
addPreferenceHandlerFor(PREF_ATC_BLE_OEPL_MODEL);
addPreferenceHandlerFor(PREF_ATC_BLE_OEPL_BLE_ADV_INTERVAL);
addPreferenceHandlerFor(PREF_ATC_BLE_OEPL_OEPL_PROTOCOL_ENABLE);
final Preference dischargeIntervalsSet = findPreference(PREF_BATTERY_DISCHARGE_INTERVALS_SET);
if (dischargeIntervalsSet != null) {
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.atctlsrpaper;
package nodomain.freeyourgadget.gadgetbridge.devices.atcbleoepl;
import android.bluetooth.le.ScanFilter;
import android.content.Context;
@@ -33,12 +33,12 @@ import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.atctlsrpaper.ATCTLSRPaperDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.atcbleoepl.ATCBLEOEPLDeviceSupport;
public class ATCTLSRPaperCoordinator extends AbstractDeviceCoordinator {
public class ATCBLEOEPLCoordinator extends AbstractDeviceCoordinator {
@Override
public int getDeviceNameResource() {
return R.string.devicetype_atc_tlsr_paper;
return R.string.devicetype_atc_ble_oepl;
}
@Override
@@ -54,7 +54,7 @@ public class ATCTLSRPaperCoordinator extends AbstractDeviceCoordinator {
@NonNull
@Override
public Class<? extends DeviceSupport> getDeviceSupportClass(final GBDevice device) {
return ATCTLSRPaperDeviceSupport.class;
return ATCBLEOEPLDeviceSupport.class;
}
@Override
@@ -65,8 +65,8 @@ public class ATCTLSRPaperCoordinator extends AbstractDeviceCoordinator {
@NonNull
@Override
public Collection<? extends ScanFilter> createBLEScanFilters() {
ParcelUuid ATCTLSRPaperService = new ParcelUuid(ATCTLSRPaperDeviceSupport.UUID_SERVICE_MAIN);
ScanFilter filter = new ScanFilter.Builder().setServiceUuid(ATCTLSRPaperService).build();
ParcelUuid ATCBLEOEPLService = new ParcelUuid(ATCBLEOEPLDeviceSupport.UUID_SERVICE_MAIN);
ScanFilter filter = new ScanFilter.Builder().setServiceUuid(ATCBLEOEPLService).build();
return Collections.singletonList(filter);
}
@@ -77,14 +77,14 @@ public class ATCTLSRPaperCoordinator extends AbstractDeviceCoordinator {
@Override
public InstallHandler findInstallHandler(final Uri uri, final Context context) {
ATCTLSRPaperInstallHandler installHandler = new ATCTLSRPaperInstallHandler(uri, context);
ATCBLEOEPLInstallHandler installHandler = new ATCBLEOEPLInstallHandler(uri, context);
return installHandler.isValid() ? installHandler : null;
}
@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
return new int[]{
R.xml.devicesettings_atc_trsr_paper
R.xml.devicesettings_atc_ble_oepl
};
}
}
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.atctlsrpaper;
package nodomain.freeyourgadget.gadgetbridge.devices.atcbleoepl;
import android.content.Context;
import android.net.Uri;
@@ -24,11 +24,11 @@ import nodomain.freeyourgadget.gadgetbridge.activities.InstallActivity;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
public class ATCTLSRPaperInstallHandler implements InstallHandler {
public class ATCBLEOEPLInstallHandler implements InstallHandler {
private final Context mContext;
private final Uri mUri;
public ATCTLSRPaperInstallHandler(Uri uri, Context context) {
public ATCBLEOEPLInstallHandler(Uri uri, Context context) {
mContext = context;
mUri = uri;
}
@@ -31,7 +31,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.UnknownDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.aawireless.AAWirelessCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.asteroidos.AsteroidOSDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.atctlsrpaper.ATCTLSRPaperCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.atcbleoepl.ATCBLEOEPLCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.bandwpseries.BandWPSeriesDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.banglejs.BangleJSCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.binary_sensor.coordinator.BinarySensorCoordinator;
@@ -725,7 +725,7 @@ public enum DeviceType {
GENERIC_HEADPHONES(GenericHeadphonesCoordinator.class),
TEST(TestDeviceCoordinator.class),
ULTRAHUMAN_RING_AIR(UltrahumanDeviceCoordinator.class),
ATC_TLSR_PAPER(ATCTLSRPaperCoordinator.class);
ATC_BLE_OEPL(ATCBLEOEPLCoordinator.class);
private DeviceCoordinator coordinator;
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.atctlsrpaper;
package nodomain.freeyourgadget.gadgetbridge.service.devices.atcbleoepl;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
@@ -54,10 +54,10 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB;
import nodomain.freeyourgadget.gadgetbridge.util.StringUtils;
import nodomain.freeyourgadget.gadgetbridge.util.UriHelper;
public class ATCTLSRPaperDeviceSupport extends AbstractBTLESingleDeviceSupport {
public class ATCBLEOEPLDeviceSupport extends AbstractBTLESingleDeviceSupport {
public static final UUID UUID_SERVICE_MAIN = UUID.fromString("00001337-0000-1000-8000-00805f9b34fb");
public static final UUID UUID_CHARACTERISTIC_MAIN = UUID.fromString("00001337-0000-1000-8000-00805f9b34fb");
private static final Logger LOG = LoggerFactory.getLogger(ATCTLSRPaperDeviceSupport.class);
private static final Logger LOG = LoggerFactory.getLogger(ATCBLEOEPLDeviceSupport.class);
private static final byte[] COMMAND_GET_CONFIGURATION = new byte[]{0x00, 0x05};
private static final byte[] COMMAND_ENABLE_OEPL = new byte[]{0x00, 0x06};
private static final byte[] COMMAND_DISABLE_OEPL = new byte[]{0x00, 0x07};
@@ -74,7 +74,7 @@ public class ATCTLSRPaperDeviceSupport extends AbstractBTLESingleDeviceSupport {
private int current_chunk = -1;
public ATCTLSRPaperDeviceSupport() {
public ATCBLEOEPLDeviceSupport() {
super(LOG);
addSupportedService(UUID_SERVICE_MAIN);
}
@@ -255,9 +255,9 @@ public class ATCTLSRPaperDeviceSupport extends AbstractBTLESingleDeviceSupport {
LOG.info("decoded data: version={}, width={}, height={}, nr_colors={}, w/h swapped={}, model={} ble_adv_interval={}, oepl_enabled={}", version, epaper_width, epaper_height, epaper_colors, is_wh_swapped, model, ble_adv_interval, oepl_enabled);
SharedPreferences.Editor editor = GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()).edit();
editor.putString(DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_MODEL, String.valueOf(model));
editor.putString(DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_BLE_ADV_INTERVAL, String.valueOf(ble_adv_interval));
editor.putBoolean(DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_OEPL_PROTOCOL_ENABLE, oepl_enabled);
editor.putString(DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_MODEL, String.valueOf(model));
editor.putString(DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_BLE_ADV_INTERVAL, String.valueOf(ble_adv_interval));
editor.putBoolean(DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_OEPL_PROTOCOL_ENABLE, oepl_enabled);
editor.apply();
final TransactionBuilder builder = new TransactionBuilder("set initialized");
@@ -267,16 +267,16 @@ public class ATCTLSRPaperDeviceSupport extends AbstractBTLESingleDeviceSupport {
@Override
public void onSendConfiguration(String config) {
if (DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_MODEL.equals(config)
|| DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_BLE_ADV_INTERVAL.equals(config)
|| DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_OEPL_PROTOCOL_ENABLE.equals(config)
if (DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_MODEL.equals(config)
|| DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_BLE_ADV_INTERVAL.equals(config)
|| DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_OEPL_PROTOCOL_ENABLE.equals(config)
) {
TransactionBuilder builder;
SharedPreferences sharedPrefs = GBApplication.getDeviceSpecificSharedPrefs(getDevice().getAddress());
try {
builder = performInitialized("Sending configuration for option: " + config);
if (DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_MODEL.equals(config)) {
String display_model = sharedPrefs.getString(DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_MODEL, "1");
if (DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_MODEL.equals(config)) {
String display_model = sharedPrefs.getString(DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_MODEL, "1");
int model = Integer.parseInt(display_model);
if (model == 10000) {// HACK: this is for the HS 213 BWRY JD type
builder.write(getCharacteristic(UUID_CHARACTERISTIC_MAIN), COMMAND_CONFIGURE_HS_154_BWRY_JD);
@@ -284,13 +284,13 @@ public class ATCTLSRPaperDeviceSupport extends AbstractBTLESingleDeviceSupport {
builder.write(getCharacteristic(UUID_CHARACTERISTIC_MAIN), new byte[]{0x00, 0x04, 0x00, (byte) model});
}
}
if (DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_BLE_ADV_INTERVAL.equals(config)) {
String bt_adv_interval = sharedPrefs.getString(DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_BLE_ADV_INTERVAL, "1000");
if (DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_BLE_ADV_INTERVAL.equals(config)) {
String bt_adv_interval = sharedPrefs.getString(DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_BLE_ADV_INTERVAL, "1000");
int interval = Integer.parseInt(bt_adv_interval);
builder.write(getCharacteristic(UUID_CHARACTERISTIC_MAIN), new byte[]{0x00, 0x08, (byte) ((interval >> 8) & 0xff), (byte) (interval & 0xff)});
}
if (DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_OEPL_PROTOCOL_ENABLE.equals(config)) {
boolean enable_oepl_protocol = sharedPrefs.getBoolean(DeviceSettingsPreferenceConst.PREF_ATC_TLSR_PAPER_OEPL_PROTOCOL_ENABLE, true);
if (DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_OEPL_PROTOCOL_ENABLE.equals(config)) {
boolean enable_oepl_protocol = sharedPrefs.getBoolean(DeviceSettingsPreferenceConst.PREF_ATC_BLE_OEPL_OEPL_PROTOCOL_ENABLE, true);
if (enable_oepl_protocol) {
builder.write(getCharacteristic(UUID_CHARACTERISTIC_MAIN), COMMAND_ENABLE_OEPL);
} else {
+4 -4
View File
@@ -4985,7 +4985,7 @@
<item>90</item>
</string-array>
<string-array name="atc_tlsr_paper_models">
<string-array name="atc_ble_oepl_models">
<item name="29">Gici 213 BW SSD</item>
<item name="13">Gici 213 BW ST</item>
<item name="30">Gici 213 BW UC</item>
@@ -5039,7 +5039,7 @@
</string-array>
<string-array name="atc_tlsr_paper_models_values">
<string-array name="atc_ble_oepl_models_values">
<item>29</item>
<item>13</item>
<item>30</item>
@@ -5091,7 +5091,7 @@
<item>39</item>
</string-array>
<string-array name="atc_tlsr_paper_ble_adv_interval">
<string-array name="atc_ble_oepl_ble_adv_interval">
<item name="1000">625ms</item>
<item name="3200">2000ms</item>
<item name="4000">2500ms</item>
@@ -5102,7 +5102,7 @@
<item name="10000">6250ms</item>
</string-array>
<string-array name="atc_tlsr_paper_ble_adv_interval_values">
<string-array name="atc_ble_oepl_ble_adv_interval_values">
<item>1000</item>
<item>3200</item>
<item>4000</item>
+5 -5
View File
@@ -2051,7 +2051,7 @@
<string name="devicetype_bandw_pseries">Bowers and Wilkins P series</string>
<string name="devicetype_earfun_air_s">EarFun Air S</string>
<string name="devicetype_earfun_air_pro_4">EarFun Air Pro 4</string>
<string name="devicetype_atc_tlsr_paper">ATC_TLSR_Paper</string>
<string name="devicetype_atc_ble_oepl">ATC_BLE_OEPL</string>
<string name="choose_auto_export_location">Choose export location</string>
<string name="notification_channel_name">General</string>
<string name="notification_channel_high_priority_name">High-priority</string>
@@ -4085,8 +4085,8 @@
<string name="pref_calendar_target_app_title">Target app on watch for calendar events</string>
<string name="same_image_already_on_device">same image already on device</string>
<string name="sending_image">sending image</string>
<string name="pref_atc_tlsr_paper_model_title">Display Model</string>
<string name="pref_atc_tlsr_paper_ble_adv_interval_title">BLE Advertising Interval</string>
<string name="pref_atc_tlsr_paper_oepl_protocol_enable_title">Enable OEPL protocol</string>
<string name="pref_atc_tlsr_paper_oepl_protocol_enable_summary">Disable this if only using BLE to save power</string>
<string name="pref_atc_ble_oepl_model_title">Display Model</string>
<string name="pref_atc_ble_oepl_ble_adv_interval_title">BLE Advertising Interval</string>
<string name="pref_atc_ble_oepl_oepl_protocol_enable_title">Enable OEPL protocol</string>
<string name="pref_atc_ble_oepl_oepl_protocol_enable_summary">Disable this if only using BLE to save power</string>
</resources>
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:defaultValue="1"
android:entries="@array/atc_ble_oepl_models"
android:entryValues="@array/atc_ble_oepl_models_values"
android:key="pref_atc_ble_oepl_model"
android:summary="%s"
android:title="@string/pref_atc_ble_oepl_model_title" />
<ListPreference
android:defaultValue="3200"
android:entries="@array/atc_ble_oepl_ble_adv_interval"
android:entryValues="@array/atc_ble_oepl_ble_adv_interval_values"
android:key="pref_atc_ble_oepl_ble_adv_interval"
android:summary="%s"
android:title="@string/pref_atc_ble_oepl_ble_adv_interval_title" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="pref_atc_ble_oepl_oepl_protocol_enable"
android:layout="@layout/preference_checkbox"
android:summary="@string/pref_atc_ble_oepl_oepl_protocol_enable_summary"
android:title="@string/pref_atc_ble_oepl_oepl_protocol_enable_title" />
</androidx.preference.PreferenceScreen>
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:defaultValue="1"
android:entries="@array/atc_tlsr_paper_models"
android:entryValues="@array/atc_tlsr_paper_models_values"
android:key="pref_atc_tlsr_paper_model"
android:summary="%s"
android:title="@string/pref_atc_tlsr_paper_model_title" />
<ListPreference
android:defaultValue="3200"
android:entries="@array/atc_tlsr_paper_ble_adv_interval"
android:entryValues="@array/atc_tlsr_paper_ble_adv_interval_values"
android:key="pref_atc_tlsr_paper_ble_adv_interval"
android:summary="%s"
android:title="@string/pref_atc_tlsr_paper_ble_adv_interval_title" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="pref_atc_tlsr_paper_oepl_protocol_enable"
android:layout="@layout/preference_checkbox"
android:summary="@string/pref_atc_tlsr_paper_oepl_protocol_enable_summary"
android:title="@string/pref_atc_tlsr_paper_oepl_protocol_enable_title" />
</androidx.preference.PreferenceScreen>