diff --git a/features_config.h b/features_config.h index 03cf288b4dd..51f3e0bb40e 100644 --- a/features_config.h +++ b/features_config.h @@ -11,22 +11,22 @@ // List of compatible firmwares #define TOTP_FIRMWARE_OFFICIAL_STABLE (1) #define TOTP_FIRMWARE_OFFICIAL_DEV (2) -#define TOTP_FIRMWARE_XTREME (3) +#define TOTP_FIRMWARE_XTREME_UL (3) // End of list // Checking FlipC.org definitions (https://github.com/playmean/fap-list/issues/9) #if defined(TARGET_FIRMWARE_OFFICIAL) #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE #elif defined(TARGET_FIRMWARE_UNLEASHED) -#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_DEV +#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL #elif defined(TARGET_FIRMWARE_XTREME) -#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME +#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL #endif // End of FlipC.org definition checks -// If target firmware is not yet set, default it to Xtreme as I'm using it, and it is cool :) +// If target firmware is not yet set, default it to Xtreme\Unleashed as I'm using it, and it is cool :) #ifndef TOTP_TARGET_FIRMWARE -#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME +#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL #endif // List of available font for TOTP code diff --git a/services/crypto/crypto.c b/services/crypto/crypto.c index 03d9c9d5180..2e13f67bb9d 100644 --- a/services/crypto/crypto.c +++ b/services/crypto/crypto.c @@ -90,7 +90,7 @@ CryptoSeedIVResult max_i = uid_size; } - const uint8_t* uid = furi_hal_version_uid(); + const uint8_t* uid = (const uint8_t*)UID64_BASE; for(uint8_t i = 0; i < max_i; i++) { plugin_state->iv[i] = plugin_state->iv[i] ^ uid[i]; } diff --git a/workers/bt_type_code/bt_type_code.c b/workers/bt_type_code/bt_type_code.c index 9d89a6df4f9..4d5707b483a 100644 --- a/workers/bt_type_code/bt_type_code.c +++ b/workers/bt_type_code/bt_type_code.c @@ -13,7 +13,7 @@ #include "../type-code-common.h" #include "../../features_config.h" -#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME +#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL #define TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN FURI_HAL_BT_ADV_NAME_LENGTH #define TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN GAP_MAC_ADDR_SIZE #endif @@ -29,7 +29,7 @@ struct TotpBtTypeCodeWorkerContext { Bt* bt; bool is_advertising; bool is_connected; -#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME +#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL char previous_bt_name[TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN]; uint8_t previous_bt_mac[TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN]; #endif @@ -39,7 +39,7 @@ static inline bool totp_type_code_worker_stop_requested() { return furi_thread_flags_get() & TotpBtTypeCodeWorkerEventStop; } -#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME +#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL static void totp_type_code_worker_bt_set_app_mac(uint8_t* mac) { uint8_t max_i; size_t uid_size = furi_hal_version_uid_size(); @@ -49,7 +49,7 @@ static void totp_type_code_worker_bt_set_app_mac(uint8_t* mac) { max_i = TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN; } - const uint8_t* uid = furi_hal_version_uid(); + const uint8_t* uid = (const uint8_t*)UID64_BASE; memcpy(mac, uid, max_i); for(uint8_t i = max_i; i < TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN; i++) { mac[i] = 0; @@ -161,7 +161,7 @@ TotpBtTypeCodeWorkerContext* totp_bt_type_code_worker_init() { furi_delay_ms(200); bt_keys_storage_set_storage_path(context->bt, HID_BT_KEYS_STORAGE_PATH); -#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME +#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL memcpy( &context->previous_bt_name[0], furi_hal_bt_get_profile_adv_name(FuriHalBtProfileHidKeyboard), @@ -184,7 +184,7 @@ TotpBtTypeCodeWorkerContext* totp_bt_type_code_worker_init() { furi_hal_bt_start_advertising(); -#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME +#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL bt_enable_peer_key_update(context->bt); #endif @@ -211,7 +211,7 @@ void totp_bt_type_code_worker_free(TotpBtTypeCodeWorkerContext* context) { furi_delay_ms(200); bt_keys_storage_set_default_path(context->bt); -#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME +#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL furi_hal_bt_set_profile_adv_name(FuriHalBtProfileHidKeyboard, context->previous_bt_name); furi_hal_bt_set_profile_mac_addr(FuriHalBtProfileHidKeyboard, context->previous_bt_mac); #endif