diff --git a/docs/lora_region_preset_compatibility_client_spec.md b/docs/lora_region_preset_compatibility_client_spec.md index 0a818ff41a1..d2debef3f80 100644 --- a/docs/lora_region_preset_compatibility_client_spec.md +++ b/docs/lora_region_preset_compatibility_client_spec.md @@ -257,14 +257,14 @@ so they are stable as listed here: `region_groups` (region → group_index): -| group | regions | -| ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0 | US, EU_433, CN, JP, ANZ, ANZ_433, RU, KR, TW, IN, NZ_865, TH, UA_433, UA_868, MY_433, MY_919, SG_923, PH_433, PH_868, PH_915, KZ_433, KZ_863, NP_865, BR_902, LORA_24 | -| 1 | EU_868 | -| 2 | EU_866 | -| 3 | EU_N_868 | -| 4 | ITU1_2M, ITU2_2M, ITU3_2M | -| 5 | ITU2_125CM | +| group | regions | +| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0 | US, EU_433, CN, JP, ANZ, ANZ_433, RU, KR, TW, IN, NZ_865, TH, UA_433, MY_433, MY_919, SG_923, PH_433, PH_868, PH_915, KZ_433, KZ_863, NP_865, BR_902, LORA_24 | +| 1 | EU_868 | +| 2 | EU_866 | +| 3 | EU_N_868 | +| 4 | ITU1_2M, ITU2_2M, ITU3_2M | +| 5 | ITU2_125CM | > Note groups **3** and **5** carry the same preset list (NARROW\_\*) but are distinct groups > because they differ in `licensed_only`. Decoders must key on the group, not on the preset diff --git a/src/graphics/draw/MenuHandler.cpp b/src/graphics/draw/MenuHandler.cpp index e6f1fa10ea5..349fe9c4acf 100644 --- a/src/graphics/draw/MenuHandler.cpp +++ b/src/graphics/draw/MenuHandler.cpp @@ -242,7 +242,6 @@ void menuHandler::LoraRegionPicker(uint32_t duration) {"TH", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_TH}, {"LORA_24", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_LORA_24}, {"UA_433", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_UA_433}, - {"UA_868", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_UA_868}, {"MY_433", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_MY_433}, {"MY_919", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_MY_919}, {"SG_923", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_SG_923}, diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h index 26befddc6ca..3b7606e123a 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h @@ -57,7 +57,6 @@ enum MenuAction { SET_REGION_TH, SET_REGION_LORA_24, SET_REGION_UA_433, - SET_REGION_UA_868, SET_REGION_MY_433, SET_REGION_MY_919, SET_REGION_SG_923, diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp index 6c1a1c79eab..1d4ac8355e6 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp @@ -835,10 +835,6 @@ void InkHUD::MenuApplet::execute(MenuItem item) applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_UA_433); break; - case SET_REGION_UA_868: - applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_UA_868); - break; - case SET_REGION_MY_433: applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_MY_433); break; @@ -1735,7 +1731,6 @@ void InkHUD::MenuApplet::showPage(MenuPage page) items.push_back(MenuItem("TH", MenuAction::SET_REGION_TH, MenuPage::EXIT)); items.push_back(MenuItem("LoRa 2.4", MenuAction::SET_REGION_LORA_24, MenuPage::EXIT)); items.push_back(MenuItem("UA 433", MenuAction::SET_REGION_UA_433, MenuPage::EXIT)); - items.push_back(MenuItem("UA 868", MenuAction::SET_REGION_UA_868, MenuPage::EXIT)); items.push_back(MenuItem("MY 433", MenuAction::SET_REGION_MY_433, MenuPage::EXIT)); items.push_back(MenuItem("MY 919", MenuAction::SET_REGION_MY_919, MenuPage::EXIT)); items.push_back(MenuItem("SG 923", MenuAction::SET_REGION_SG_923, MenuPage::EXIT)); diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index e53ebb699b5..477f33d22dd 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -478,6 +478,12 @@ NodeDB::NodeDB() LOG_DEBUG("Number of Device Reboots: %d", myNodeInfo.reboot_count); #endif + // UA_868 is obsolete; migrate to EU_868 before resetRadioConfig() below validates the region. + if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UA_868) { + LOG_INFO("UA_868 region is obsolete, migrating saved config to EU_868"); + config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868; + } + resetRadioConfig(); // If bogus settings got saved, then fix them // nodeDB->LOG_DEBUG("region=%d, NODENUM=0x%x, dbsize=%d", config.lora.region, myNodeInfo.my_node_num, numMeshNodes); diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 84d0f79062b..b577a7f35e0 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -184,11 +184,9 @@ const RegionInfo regions[] = { /* 433,05-434,7 Mhz 10 mW - 868,0-868,6 Mhz 25 mW - https://nkrzi.gov.ua/images/upload/256/5810/PDF_UUZ_19_01_2016.pdf + https://zakon.rada.gov.ua/laws/show/262-2026-п */ RDEF(UA_433, 433.0f, 434.7f, 10, 10, false, false, PROFILE_STD, PRESET(LONG_FAST), 0), - RDEF(UA_868, 868.0f, 868.6f, 1, 14, false, false, PROFILE_STD, PRESET(LONG_FAST), 0), /* Malaysia