Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1664 from helium/mv/as923_1b
Browse files Browse the repository at this point in the history
add as923_1b region
  • Loading branch information
jeffgrunewald authored Jun 20, 2022
2 parents f3b5dcb + bd5396a commit e253af4
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/sys.config
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
'CN779' => [779.5, 779.7, 779.9],
'AU915' => [916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0, 918.2],
'AS923_1' => [923.2, 923.4, 923.6, 923.8, 924.0, 924.2, 924.4, 924.6],
'AS923_1B' => [922.0, 922.2, 922.4, 922.6, 922.8, 923.0, 923.2, 923.4],
'AS923_2' => [921.4, 921.6, 921.8, 922.0, 922.2, 922.4, 922.6, 922.8],
'AS923_3' => [916.6, 916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0],
'AS923_4' => [917.3, 917.5, 917.7, 917.9, 918.1, 918.3, 918.5, 918.7],
Expand Down
1 change: 1 addition & 0 deletions config/testnet-sys.config
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
'CN779' => [779.5, 779.7, 779.9],
'AU915' => [916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0, 918.2],
'AS923_1' => [923.2, 923.4, 923.6, 923.8, 924.0, 924.2, 924.4, 924.6],
'AS923_1B' => [922.0, 922.2, 922.4, 922.6, 922.8, 923.0, 923.2, 923.4],
'AS923_2' => [921.4, 921.6, 921.8, 922.0, 922.2, 922.4, 922.6, 922.8],
'AS923_3' => [916.6, 916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0],
'AS923_4' => [917.3, 917.5, 917.7, 917.9, 918.1, 918.3, 918.5, 918.7],
Expand Down
2 changes: 1 addition & 1 deletion priv/countries_reg_domains.csv
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ MO,22.198745,113.543873,Macau,AS923_1,zone3
MK,41.608635,21.745275,North Macedonia,EU868,zone1
MG,-18.766947,46.869107,Madagascar,EU868,zone1
MW,-13.254308,34.301525,Malawi,,zone1
MY,4.210484,101.975766,Malaysia,AS923_1,zone3
MY,4.210484,101.975766,Malaysia,AS923_1B,zone3
MV,3.202778,73.22068,Maldives,,zone3
ML,17.570692,-3.996166,Mali,EU433,zone3
MT,35.937496,14.375416,Malta,EU868,zone1
Expand Down
4 changes: 4 additions & 0 deletions src/miner_lora_throttle.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
-type region() ::
'AS923'
| 'AS923_1'
| 'AS923_1B'
| 'AS923_2'
| 'AS923_3'
| 'AS923_4'
Expand All @@ -42,6 +43,7 @@
| 'KR920'
| 'US915'
| 'region_as923_1'
| 'region_as923_1b'
| 'region_as923_2'
| 'region_as923_3'
| 'region_as923_4'
Expand Down Expand Up @@ -72,6 +74,7 @@ model(Region) ->
case Region of
'AS923' -> ?COMMON_DUTY;
'AS923_1' -> ?COMMON_DUTY;
'AS923_1B' -> ?COMMON_DUTY;
'AS923_2' -> ?COMMON_DUTY;
'AS923_3' -> ?COMMON_DUTY;
'AS923_4' -> ?COMMON_DUTY;
Expand All @@ -87,6 +90,7 @@ model(Region) ->
%% NOTE: Starting with poc-v11 the Regions are tagged
%% And we don't support region_cn779
'region_as923_1' -> ?COMMON_DUTY;
'region_as923_1b' -> ?COMMON_DUTY;
'region_as923_2' -> ?COMMON_DUTY;
'region_as923_3' -> ?COMMON_DUTY;
'region_as923_4' -> ?COMMON_DUTY;
Expand Down
6 changes: 5 additions & 1 deletion test/miner_ct_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,11 @@ config_node({Miner, {GwApiPort, UDPPort, JSONRPCPort}, ECDH, PubKey, _Addr, SigF
'CN470' => [486.3, 486.5, 486.7, 486.9, 487.1, 487.3, 487.5, 487.7 ],
'CN779' => [779.5, 779.7, 779.9],
'AU915' => [916.8, 917.0, 917.2, 917.4, 917.5, 917.6, 917.8, 918.0, 918.2],
'AS923' => [923.2, 923.4, 923.6, 923.8, 924.0, 924.2, 924.4, 924.5, 924.6, 924.8],
'AS923_1' => [923.2, 923.4, 923.6, 923.8, 924.0, 924.2, 924.4, 924.6],
'AS923_1B' => [922.0, 922.2, 922.4, 922.6, 922.8, 923.0, 923.2, 923.4],
'AS923_2' => [921.4, 921.6, 921.8, 922.0, 922.2, 922.4, 922.6, 922.8],
'AS923_3' => [916.6, 916.8, 917.0, 917.2, 917.4, 917.6, 917.8, 918.0],
'AS923_4' => [917.3, 917.5, 917.7, 917.9, 918.1, 918.3, 918.5, 918.7],
'KR920' => [922.1, 922.3, 922.5, 922.7, 922.9, 923.1, 923.3],
'IN865' => [865.0625, 865.4025, 865.985]}])
end,
Expand Down
6 changes: 6 additions & 0 deletions test/miner_poc_test_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ poc_v11_vars() ->
region_eu868_params => region_params_eu868(),
region_au915_params => region_params_au915(),
region_as923_1_params => region_params_as923_1(),
region_as923_1b_params => region_params_as923_1b(),
region_as923_2_params => region_params_as923_2(),
region_as923_3_params => region_params_as923_3(),
region_as923_4_params => region_params_as923_4(),
Expand All @@ -51,6 +52,7 @@ poc_v11_vars() ->
region_urls() ->
[
{region_as923_1, ?region_as923_1_url},
{region_as923_1b, ?region_as923_1b_url},
{region_as923_2, ?region_as923_2_url},
{region_as923_3, ?region_as923_3_url},
{region_as923_4, ?region_as923_4_url},
Expand Down Expand Up @@ -89,6 +91,10 @@ region_params_as923_1() ->
Params = make_params(?REGION_PARAMS_AS923_1),
blockchain_region_params_v1:serialize(blockchain_region_params_v1:new(Params)).

region_params_as923_1b() ->
Params = make_params(?REGION_PARAMS_AS923_1B),
blockchain_region_params_v1:serialize(blockchain_region_params_v1:new(Params)).

region_params_as923_2() ->
Params = make_params(?REGION_PARAMS_AS923_2),
blockchain_region_params_v1:serialize(blockchain_region_params_v1:new(Params)).
Expand Down
63 changes: 63 additions & 0 deletions test/miner_poc_v11_vars.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"https://github.com/helium/lorawan-h3/blob/main/serialized/AS923-1.res7.h3idx?raw=true"
).

-define(region_as923_1b_url,
"https://github.com/helium/lorawan-h3/blob/main/serialized/AS923-1B.res7.h3idx?raw=true"
).

-define(region_as923_2_url,
"https://github.com/helium/lorawan-h3/blob/main/serialized/AS923-2.res7.h3idx?raw=true"
).
Expand Down Expand Up @@ -300,6 +304,65 @@
]
]).

-define(REGION_PARAMS_AS923_1B, [
[
{<<"channel_frequency">>, 922000000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 922200000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 922400000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 922600000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 922800000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 923000000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 923200000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
],
[
{<<"channel_frequency">>, 923400000},
{<<"bandwidth">>, 125000},
{<<"max_eirp">>, 160},
{<<"spreading">>,
[{25, 'SF12'}, {25, 'SF11'}, {25, 'SF10'}, {67, 'SF9'}, {139, 'SF8'}, {256, 'SF7'}]}
]
]).

-define(REGION_PARAMS_AS923_2, [
[
{<<"channel_frequency">>, 923200000},
Expand Down

0 comments on commit e253af4

Please sign in to comment.