fix custom name serial, bt mac, fix subghz starline

This commit is contained in:
MX 2022-09-11 15:03:44 +03:00
parent 37ce143527
commit 1c00709ea6
No known key found for this signature in database
GPG Key ID: 6C4C311DFD4B4AB5
4 changed files with 8 additions and 4 deletions

View File

@ -8,9 +8,10 @@
5. Run command with extra enviroment var before `./fbt` that variable should contain your custom name in alphanumeric characters - max length 8 chars
`CUSTOM_FLIPPER_NAME=Name ./fbt COMPACT=1 DEBUG=0 updater_package` - where `Name` write your custom name
6. Copy `dist/f7-C/f7-update-local` folder to microSD `update/myfw/` and run `update` file on flipper from file manager app (Archive)
7. Flash from microSD card only, .dfu update from qFlipper will not work properly since name and serial number will be changed
7. Flash from microSD card only!!!! .dfu update from qFlipper will not work properly since name and serial number will be changed
8. Done, you will have custom name, serial number and bluetooth mac address
9. Also you can skip 5-7 and flash with `CUSTOM_FLIPPER_NAME=Name ./fbt COMPACT=1 DEBUG=0 FORCE=1 flash_usb_full`
## Troubleshooting

View File

@ -1,6 +1,6 @@
#include <furi_hal.h>
#include <furi_hal_memory.h>
#include <furi_hal_mpu.h>
#include <furi_hal_memory.h>
#include <stm32wbxx_ll_cortex.h>

View File

@ -107,7 +107,7 @@ static void furi_hal_version_set_name(const char* name) {
// BLE Mac address
uint32_t udn = LL_FLASH_GetUDN();
if(version_get_custom_name(NULL) != NULL) {
udn = (uint32_t)*version_get_custom_name(NULL);
udn = *((uint32_t*)version_get_custom_name(NULL));
}
uint32_t company_id = LL_FLASH_GetSTCompanyID();
@ -318,7 +318,7 @@ size_t furi_hal_version_uid_size() {
const uint8_t* furi_hal_version_uid() {
if(version_get_custom_name(NULL) != NULL) {
return (const uint8_t*)((uint32_t)*version_get_custom_name(NULL));
return (const uint8_t*)&(*((uint32_t*)version_get_custom_name(NULL)));
}
return (const uint8_t*)UID64_BASE;
}

View File

@ -472,6 +472,9 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
uint32_t decrypt = 0;
uint64_t man_normal_learning;
int res = 0;
if(mfname == 0x0) {
mfname = "";
}
if(strcmp(mfname, "") == 0) {
for