diff --git a/docs/lora_region_preset_compatibility_client_spec.md b/docs/lora_region_preset_compatibility_client_spec.md index bb1749672f3..40e45809691 100644 --- a/docs/lora_region_preset_compatibility_client_spec.md +++ b/docs/lora_region_preset_compatibility_client_spec.md @@ -80,7 +80,7 @@ what you can receive: | field | max_count | | ----------------------------------- | ------------------------------------ | | `LoRaRegionPresetMap.groups` | 8 | -| `LoRaRegionPresetMap.region_groups` | 38 (= number of `RegionCode` values) | +| `LoRaRegionPresetMap.region_groups` | 39 (= number of `RegionCode` values) | | `LoRaPresetGroup.presets` | 11 | --- @@ -271,14 +271,14 @@ which is why they remain distinct groups despite sharing this preset list. `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, 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, IN_433, 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 that several groups can carry overlapping preset lists but remain distinct: groups 1, > 2 and 3 share the EU 86x superset yet differ in `default_preset`, and group **5** (ham diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 043bd59eff7..00b7638ccd7 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -197,6 +197,10 @@ const RegionInfo regions[] = { */ RDEF(IN, 865.0f, 867.0f, 100, 30, false, false, PROFILE_STD, PRESET(LONG_FAST), 0), + // G.S.R. 347(E), 2022: 433.05-434.79 MHz, 10 mW ERP, maximum 10% duty cycle. + // https://eservices.dot.gov.in/sites/default/files/circular-notifications/the-use-of-low-power-radio-frequency-devices-in-the-frequency-band-433.05-to-434.79-mhz-exemption-from-license-rules-2022.pdf + RDEF(IN_433, 433.05f, 434.79f, 10, 10, false, false, PROFILE_STD, PRESET(LONG_FAST), 0), + /* https://rrf.rsm.govt.nz/smart-web/smart/page/-smart/domain/licence/LicenceSummary.wdk?id=219752 https://iotalliance.org.nz/wp-content/uploads/sites/4/2019/05/IoT-Spectrum-in-NZ-Briefing-Paper.pdf diff --git a/test/test_admin_radio/test_main.cpp b/test/test_admin_radio/test_main.cpp index 4b88be70147..4a5eb3687c6 100644 --- a/test/test_admin_radio/test_main.cpp +++ b/test/test_admin_radio/test_main.cpp @@ -80,6 +80,18 @@ static void test_getRegion_returnsCorrectRegion_LORA24() TEST_ASSERT_TRUE(r->wideLora); } +static void test_getRegion_returnsCorrectRegion_IN433() +{ + const RegionInfo *r = getRegion(meshtastic_Config_LoRaConfig_RegionCode_IN_433); + TEST_ASSERT_NOT_NULL(r); + TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_IN_433, r->code); + TEST_ASSERT_EQUAL_STRING("IN_433", r->name); + TEST_ASSERT_FLOAT_WITHIN(0.001f, 433.05f, r->freqStart); + TEST_ASSERT_FLOAT_WITHIN(0.001f, 434.79f, r->freqEnd); + TEST_ASSERT_FLOAT_WITHIN(0.001f, 10.0f, r->dutyCycle); + TEST_ASSERT_EQUAL_UINT8(10, r->powerLimit); +} + static void test_getRegion_unsetCodeReturnsUnsetEntry() { const RegionInfo *r = getRegion(meshtastic_Config_LoRaConfig_RegionCode_UNSET); @@ -1765,6 +1777,7 @@ void setup() RUN_TEST(test_getRegion_returnsCorrectRegion_US); RUN_TEST(test_getRegion_returnsCorrectRegion_EU868); RUN_TEST(test_getRegion_returnsCorrectRegion_LORA24); + RUN_TEST(test_getRegion_returnsCorrectRegion_IN433); RUN_TEST(test_getRegion_unsetCodeReturnsUnsetEntry); RUN_TEST(test_getRegion_unknownCodeFallsToUnset);