parent
824382b385
commit
a6d3c50f94
|
@ -30,7 +30,9 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supports(GBDeviceCandidate candidate) {
|
public boolean supports(GBDeviceCandidate candidate) {
|
||||||
return candidate.getMacAddress().toUpperCase().startsWith(MiBandService.MAC_ADDRESS_FILTER);
|
String macAddress = candidate.getMacAddress().toUpperCase();
|
||||||
|
return macAddress.startsWith(MiBandService.MAC_ADDRESS_FILTER_1_1A)
|
||||||
|
|| macAddress.startsWith(MiBandService.MAC_ADDRESS_FILTER_1S);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -74,7 +76,7 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasValidUserInfo() {
|
public static boolean hasValidUserInfo() {
|
||||||
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER + ":00:00:00";
|
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER_1_1A + ":00:00:00";
|
||||||
try {
|
try {
|
||||||
UserInfo userInfo = getConfiguredUserInfo(dummyMacAddress);
|
UserInfo userInfo = getConfiguredUserInfo(dummyMacAddress);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -9,7 +9,8 @@ import static nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDevi
|
||||||
public class MiBandService {
|
public class MiBandService {
|
||||||
|
|
||||||
|
|
||||||
public static final String MAC_ADDRESS_FILTER = "88:0F:10";
|
public static final String MAC_ADDRESS_FILTER_1_1A = "88:0F:10";
|
||||||
|
public static final String MAC_ADDRESS_FILTER_1S = "C8:0F:10";
|
||||||
|
|
||||||
public static final UUID UUID_SERVICE_MIBAND_SERVICE = UUID.fromString(String.format(BASE_UUID, "FEE0"));
|
public static final UUID UUID_SERVICE_MIBAND_SERVICE = UUID.fromString(String.format(BASE_UUID, "FEE0"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue