Skip to content

region CLI command output truncated to ~5-10 entries due to packet payload limit #2166

@jirogit

Description

@jirogit

region command output is silently truncated when region names are long, because the reply is limited to a single LoRa packet payload.

In examples/simple_repeater/MyMesh.cpp:

uint8_t temp[166];
char *reply = (char *)&temp[5]; // reply = 161 bytes max

region_map.exportTo(reply, 160); // hard-coded 160 byte limit

With encryption overhead (CIPHER_MAC_SIZE=2 + CIPHER_BLOCK_SIZE=16), 161 bytes is already the physical maximum for a single packet. At 30-character names, only ~5 entries fit before truncation.

Proposed fix

Paging support for the region command:

region # page 1
region 2 # page 2
region 3 # page 3

Or a denser region list output using the existing exportNamesTo() which uses comma separators (1 byte) instead of newlines with indentation.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions