From b5ebfb07d424445bd3bf0468d54eefde9976a7ca Mon Sep 17 00:00:00 2001 From: TimoWielink Date: Sun, 7 Jun 2026 20:52:04 -0400 Subject: [PATCH 1/6] Implement Topuics Project Bellbird Signed-off-by: TimoWielink --- src/CdpPacket.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/CdpPacket.h b/src/CdpPacket.h index 3ed9e1cf..c68544d8 100644 --- a/src/CdpPacket.h +++ b/src/CdpPacket.h @@ -97,6 +97,18 @@ enum topics { sig = 0x17, //battery level bat = 0x18, + // external battery status + externalbattery = 0x19, + // bird detection event + birddetection = 0x1A, + // sleep status + sleepstatus = 0x1B, + // teensy status + teensystatus = 0x1C, + // tbeam status + tbeamstatus = 0x1D, + // boot status + boot = 0x1E, // Send duck commands dcmd = 0x16, //gps @@ -280,6 +292,18 @@ class CdpPacket { return "sensor"; case topics::bat: return "battery"; + case topics::externalbattery: + return "externalbattery"; + case topics::birddetection: + return "birddetection"; + case topics::sleepstatus: + return "sleepstatus"; + case topics::teensystatus: + return "teensystatus"; + case topics::tbeamstatus: + return "tbeamstatus"; + case topics::boot: + return "boot"; case topics::sig: return "signal health"; case topics::alert: From 5808bea47bbdb6e51ca7fca5cf525eb4d799b227 Mon Sep 17 00:00:00 2001 From: TimoWielink Date: Sun, 7 Jun 2026 23:53:38 -0400 Subject: [PATCH 2/6] Duck Crash error Signed-off-by: TimoWielink --- src/Ducks/DuckLink.h | 3 ++- src/Ducks/MamaDuck.h | 5 +++-- src/Ducks/PapaDuck.h | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Ducks/DuckLink.h b/src/Ducks/DuckLink.h index 33119626..7a8ca8b6 100644 --- a/src/Ducks/DuckLink.h +++ b/src/Ducks/DuckLink.h @@ -108,7 +108,8 @@ class DuckLink : public Duck { case reservedTopic::rrep: { //we still need to recieve rreps in case of ttl expiry RouteJSON rrepDoc = RouteJSON(rxPacket.data); - loginfo_ln("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Received Route Response from DUID: %s", rxPacket.sduid.data()); + std::string sourceDuid(rxPacket.sduid.begin(), rxPacket.sduid.end()); + loginfo_ln("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Received Route Response from DUID: %s", sourceDuid.c_str()); //destination = sender of the rrep -> the last hop to current duck std::optional last = rrepDoc.getlastInPath(); Duid lastInPath = last.value(); diff --git a/src/Ducks/MamaDuck.h b/src/Ducks/MamaDuck.h index 2ffbf4a9..c8f08853 100644 --- a/src/Ducks/MamaDuck.h +++ b/src/Ducks/MamaDuck.h @@ -130,7 +130,8 @@ private : RouteJSON rrepDoc = RouteJSON(rxPacket.data); std::optional last = rrepDoc.getlastInPath(); Duid lastInPath = last.has_value() ? last.value() : rxPacket.sduid; - loginfo_ln("Received Route Response from DUID: %s", rxPacket.sduid.data(), rxPacket.sduid.size()); + std::string sourceDuid(rxPacket.sduid.begin(), rxPacket.sduid.end()); + loginfo_ln("Received Route Response from DUID: %s", sourceDuid.c_str()); std::optional nextHop; if(rxPacket.duckType == DuckType::PAPA){ @@ -189,4 +190,4 @@ private : }; -#endif \ No newline at end of file +#endif diff --git a/src/Ducks/PapaDuck.h b/src/Ducks/PapaDuck.h index 65f6237d..63df5850 100644 --- a/src/Ducks/PapaDuck.h +++ b/src/Ducks/PapaDuck.h @@ -132,7 +132,8 @@ void ifNotBroadcast(CdpPacket rxPacket, bool relay = false) { RouteJSON rrepDoc = RouteJSON(rxPacket.data); std::optional last = rrepDoc.getlastInPath(); Duid lastInPath = last.has_value() ? last.value() : rxPacket.sduid; - loginfo_ln("Received Route Response from DUID: %s", rxPacket.sduid.data(), rxPacket.sduid.size()); + std::string sourceDuid(rxPacket.sduid.begin(), rxPacket.sduid.end()); + loginfo_ln("Received Route Response from DUID: %s", sourceDuid.c_str()); std::optional nextHop = this->router.getBestNextHop(rrepDoc.getDestination()); if((rrepDoc.getDestination() != this->duid) && (nextHop.has_value()) && (nextHop.value() != rxPacket.sduid)){ //and not papaduck_duid? From f132bb34e2274e94bcb3bbfe79042cc7882b17f5 Mon Sep 17 00:00:00 2001 From: TimoWielink Date: Mon, 8 Jun 2026 10:19:32 -0400 Subject: [PATCH 3/6] set timer to 4 minutes Signed-off-by: TimoWielink --- src/Ducks/Duck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ducks/Duck.h b/src/Ducks/Duck.h index 05f6883b..af19dc9b 100644 --- a/src/Ducks/Duck.h +++ b/src/Ducks/Duck.h @@ -486,7 +486,7 @@ class Duck { //Telemetry const int HEALTH_INTERVAL = 1000 * 60 * 15; //15 minutes - const int SIGNAL_INTERVAL = 1000 * 60;//0 * 7; //1 hour 2 min + const int SIGNAL_INTERVAL = 1000 * 60 * 4; //4 minutes int counter = 1; Timer<10> duckTimer; From 1e556e1f88448f6fc76d126d0c99433fd5f88ad0 Mon Sep 17 00:00:00 2001 From: TimoWielink Date: Mon, 8 Jun 2026 12:21:53 -0400 Subject: [PATCH 4/6] 10 omiute timer Signed-off-by: TimoWielink --- src/Ducks/Duck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ducks/Duck.h b/src/Ducks/Duck.h index af19dc9b..874875a0 100644 --- a/src/Ducks/Duck.h +++ b/src/Ducks/Duck.h @@ -486,7 +486,7 @@ class Duck { //Telemetry const int HEALTH_INTERVAL = 1000 * 60 * 15; //15 minutes - const int SIGNAL_INTERVAL = 1000 * 60 * 4; //4 minutes + const int SIGNAL_INTERVAL = 1000 * 60 * 10; //10 minutes int counter = 1; Timer<10> duckTimer; From 1ba54ca8fb672a2a34aa81a703d0e458a473caa4 Mon Sep 17 00:00:00 2001 From: TimoWielink Date: Mon, 8 Jun 2026 13:03:14 -0400 Subject: [PATCH 5/6] remove papa health signal apcket Signed-off-by: TimoWielink --- src/Ducks/Duck.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Ducks/Duck.h b/src/Ducks/Duck.h index 874875a0..f9d5cb9b 100644 --- a/src/Ducks/Duck.h +++ b/src/Ducks/Duck.h @@ -385,6 +385,10 @@ class Duck { */ static bool sendSignalData(void* p){ Duck* duckInstance = static_cast(p); + if (duckInstance->getType() == DuckType::PAPA) { + logdbg_ln("[DUCK] Skipping signal info send for PapaDuck."); + return true; + } int err; duckInstance->router.cullRoutingTable(); std::optional message = duckInstance->router.getEntriesFor(PAPADUCK_DUID, duckInstance->duid); From fa85c8f5c48718b2509f84becce5582a9d32a720 Mon Sep 17 00:00:00 2001 From: TimoWielink Date: Mon, 8 Jun 2026 13:09:53 -0400 Subject: [PATCH 6/6] add topic for tensy health Signed-off-by: TimoWielink --- src/CdpPacket.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/CdpPacket.h b/src/CdpPacket.h index c68544d8..2f0a6479 100644 --- a/src/CdpPacket.h +++ b/src/CdpPacket.h @@ -105,10 +105,12 @@ enum topics { sleepstatus = 0x1B, // teensy status teensystatus = 0x1C, - // tbeam status - tbeamstatus = 0x1D, + // teensy health status + teensyhealth = 0x1D, // boot status boot = 0x1E, + // tbeam status + tbeamstatus = 0x1F, // Send duck commands dcmd = 0x16, //gps @@ -300,6 +302,8 @@ class CdpPacket { return "sleepstatus"; case topics::teensystatus: return "teensystatus"; + case topics::teensyhealth: + return "teensyhealth"; case topics::tbeamstatus: return "tbeamstatus"; case topics::boot: