From 7e0989819cfbc55718af3c29649e41f8809b319a Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 30 Mar 2026 15:13:20 -0700 Subject: [PATCH 1/6] - Add hotspot_key, region to multi_buy_inc_req_v1 - Add denied to multi_buy_inc_res_v1 --- src/service/multi_buy.proto | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/service/multi_buy.proto b/src/service/multi_buy.proto index 84acff4c..84ae879f 100644 --- a/src/service/multi_buy.proto +++ b/src/service/multi_buy.proto @@ -2,9 +2,18 @@ syntax = "proto3"; package helium.multi_buy; -message multi_buy_inc_req_v1 { string key = 1; } +import "region.proto"; -message multi_buy_inc_res_v1 { uint32 count = 1; } +message multi_buy_inc_req_v1 { + string key = 1; + bytes hotspot_key = 2; + region region = 3; +} + +message multi_buy_inc_res_v1 { + uint32 count = 1; + bool denied = 2; +} service multi_buy { rpc inc(multi_buy_inc_req_v1) returns (multi_buy_inc_res_v1); From cb9fcc0802b88bc9e30f8fcb64b1a06921ea24f0 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 31 Mar 2026 13:34:50 -0700 Subject: [PATCH 2/6] Add multibuy_v1 message and optional multibuy field to route_v1 --- src/service/iot_config.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/service/iot_config.proto b/src/service/iot_config.proto index 87f3c4bb..a67ce11f 100644 --- a/src/service/iot_config.proto +++ b/src/service/iot_config.proto @@ -114,6 +114,18 @@ message server_v1 { } } + +// Server Route definition +message multibuy_v1 { + // address, ex: https://endpoint.test.com + string host = 1; + // port, ex: 8080 + uint32 port = 2; + // if true, hpr will drop the packet when the server is unavailable. Otherwise use HPR's default multibuy server + bool fail_on_unavailable = 3; +} + + // Route definition message route_v1 { // UUID @@ -130,6 +142,8 @@ message route_v1 { bool locked = 7; // If true, routes are blocked whose devaddrs have empty session key filters bool ignore_empty_skf = 8; + // Set custom multibuy settings for this route + multibuy_v1 multibuy = 9; } // ------------------------------------------------------------------ From 3881e3cbbe7660a77871ae92769f055d473b9eb2 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 31 Mar 2026 17:48:48 -0700 Subject: [PATCH 3/6] Add protocol to multibuy --- src/service/iot_config.proto | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/service/iot_config.proto b/src/service/iot_config.proto index a67ce11f..37ca2a1a 100644 --- a/src/service/iot_config.proto +++ b/src/service/iot_config.proto @@ -117,12 +117,17 @@ message server_v1 { // Server Route definition message multibuy_v1 { - // address, ex: https://endpoint.test.com - string host = 1; + enum Protocol { + http = 0; + https = 1; + } + Protocol protocol = 1; + // address, ex: endpoint.test.com + string host = 2; // port, ex: 8080 - uint32 port = 2; + uint32 port = 3; // if true, hpr will drop the packet when the server is unavailable. Otherwise use HPR's default multibuy server - bool fail_on_unavailable = 3; + bool fail_on_unavailable = 4; } From 6b0dca14975012fcfaf73c2615868d19e6a54a0f Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 31 Mar 2026 21:53:02 -0700 Subject: [PATCH 4/6] Fix naming --- src/service/iot_config.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/service/iot_config.proto b/src/service/iot_config.proto index 37ca2a1a..df1d1778 100644 --- a/src/service/iot_config.proto +++ b/src/service/iot_config.proto @@ -116,7 +116,7 @@ message server_v1 { // Server Route definition -message multibuy_v1 { +message multi_buy_v1 { enum Protocol { http = 0; https = 1; @@ -126,7 +126,7 @@ message multibuy_v1 { string host = 2; // port, ex: 8080 uint32 port = 3; - // if true, hpr will drop the packet when the server is unavailable. Otherwise use HPR's default multibuy server + // if true, hpr will drop the packet when the server is unavailable. Otherwise use HPR's default multi_buy server bool fail_on_unavailable = 4; } @@ -147,8 +147,8 @@ message route_v1 { bool locked = 7; // If true, routes are blocked whose devaddrs have empty session key filters bool ignore_empty_skf = 8; - // Set custom multibuy settings for this route - multibuy_v1 multibuy = 9; + // Set custom multi_buy server settings for this route + multi_buy_v1 multi_buy = 9; } // ------------------------------------------------------------------ From 066df43612ec6695a2fc65e941570351030e71fb Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 1 Apr 2026 10:23:27 -0700 Subject: [PATCH 5/6] Fix comment len --- src/service/iot_config.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/iot_config.proto b/src/service/iot_config.proto index df1d1778..9ccdfc72 100644 --- a/src/service/iot_config.proto +++ b/src/service/iot_config.proto @@ -126,7 +126,8 @@ message multi_buy_v1 { string host = 2; // port, ex: 8080 uint32 port = 3; - // if true, hpr will drop the packet when the server is unavailable. Otherwise use HPR's default multi_buy server + // if true, hpr will drop the packet when the server is unavailable. + // Otherwise use HPR's default multi_buy server bool fail_on_unavailable = 4; } From c5c5896a69ffd5ecc11d87567e487341fbea803c Mon Sep 17 00:00:00 2001 From: Macpie Date: Wed, 1 Apr 2026 10:25:45 -0700 Subject: [PATCH 6/6] Fmt --- src/service/iot_config.proto | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/service/iot_config.proto b/src/service/iot_config.proto index 9ccdfc72..bcc15e4a 100644 --- a/src/service/iot_config.proto +++ b/src/service/iot_config.proto @@ -114,7 +114,6 @@ message server_v1 { } } - // Server Route definition message multi_buy_v1 { enum Protocol { @@ -126,12 +125,11 @@ message multi_buy_v1 { string host = 2; // port, ex: 8080 uint32 port = 3; - // if true, hpr will drop the packet when the server is unavailable. + // if true, hpr will drop the packet when the server is unavailable. // Otherwise use HPR's default multi_buy server bool fail_on_unavailable = 4; } - // Route definition message route_v1 { // UUID