diff --git a/zephcore/app/CompanionMesh.cpp b/zephcore/app/CompanionMesh.cpp index 3776978..309afd7 100644 --- a/zephcore/app/CompanionMesh.cpp +++ b/zephcore/app/CompanionMesh.cpp @@ -1836,7 +1836,7 @@ bool CompanionMesh::handleProtocolFrame(const uint8_t *data, size_t len) uint8_t rsp[81]; rsp[0] = PACKET_DEVICE_INFO; rsp[1] = 9; // FIRMWARE_VER_CODE - v9 = client_repeat support - rsp[2] = MAX_CONTACTS / 2; + rsp[2] = (MAX_CONTACTS / 2 > 255) ? 255 : (MAX_CONTACTS / 2); // protocol byte, app multiplies by 2 rsp[3] = MAX_GROUP_CHANNELS; put_le32(&rsp[4], prefs.ble_pin ? prefs.ble_pin : 123456); // BLE PIN memcpy(&rsp[8], fw_build, 12); diff --git a/zephcore/boards/common/prod.conf b/zephcore/boards/common/prod.conf index f5ffb8f..04d15b7 100644 --- a/zephcore/boards/common/prod.conf +++ b/zephcore/boards/common/prod.conf @@ -11,6 +11,6 @@ CONFIG_LOG=n # Disable asserts (saves flash, removes CMake warning) CONFIG_ASSERT=n -# Max contacts for production (Check board configs for overrides, too low RAM can freeze the device with this setting!) -# nRF/ESP like RAK and Wio Tracker / S3,C6 should handle it. -CONFIG_ZEPHCORE_MAX_CONTACTS=750 +# Max contacts for production (App protocol limit: 510, encoded as uint8 * 2, so you can set it higher, but the current app can't display it or work with it) +# Check board configs for overrides — too low RAM can freeze the device. +CONFIG_ZEPHCORE_MAX_CONTACTS=510