test MQTT bridge

This commit is contained in:
prabathbr
2026-06-24 21:42:22 +10:00
parent 263f04ec3f
commit 90d2c9302f
10 changed files with 521 additions and 8 deletions
+8
View File
@@ -533,6 +533,8 @@ uint8_t MyMesh::handleAnonClockReq(const mesh::Identity& sender, uint32_t sender
reply_data[8] |= 0x01; // is bridge, type UART
#elif WITH_ESPNOW_BRIDGE
reply_data[8] |= 0x03; // is bridge, type ESP-NOW
#elif WITH_MQTT_BRIDGE
reply_data[8] |= 0x04; // is bridge, type MQTT
#endif
if (_prefs.disable_fwd) { // is this repeater currently disabled
reply_data[8] |= 0x80; // is disabled
@@ -1198,6 +1200,9 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
#if defined(WITH_ESPNOW_BRIDGE)
, bridge(&_prefs, _mgr, &rtc)
#endif
#if defined(WITH_MQTT_BRIDGE)
, bridge(&_prefs, _mgr, &rtc)
#endif
#if defined(WITH_MQTT_UPLINK)
, mqtt(rtc, self_id)
#endif
@@ -1254,6 +1259,9 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
_prefs.bridge_channel = 1; // channel 1
StrHelper::strncpy(_prefs.bridge_secret, "LVSITANOS", sizeof(_prefs.bridge_secret));
#if defined(WITH_MQTT_BRIDGE)
_prefs.bridge_peer_port = 1883;
#endif
// GPS defaults
_prefs.gps_enabled = 0;