hw bwm name: help says 1-15 chars, matching the enforced limit
Client and firmware both cap the name at BWM_BLE_NAME_MAX_LEN (15); the help said 1-31. Also fix the define's comment: the ESP buffer is 32, the real bound is the BLE advertisement (17 chars). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ecf0e7b3f5
commit
dc96e3babe
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -722,7 +722,7 @@ static int CmdBwmName(const char *Cmd) {
|
||||
"hw bwm name --set MyPM5 --> set BLE name to 'MyPM5'");
|
||||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_str0(NULL, "set", "<name>", "new BLE name (1-31 chars); omit to read current name"),
|
||||
arg_str0(NULL, "set", "<name>", "new BLE name (1-15 chars); omit to read current name"),
|
||||
arg_param_end,
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
|
||||
+1
-1
@@ -978,7 +978,7 @@ typedef struct {
|
||||
#define CMD_PM5_BWM_BLE_NAME 0x017F // payload: [action:u8][name bytes if SET]
|
||||
#define BWM_BLE_NAME_ACTION_GET 0x00 // resp: current BLE device name string
|
||||
#define BWM_BLE_NAME_ACTION_SET 0x01 // req: name bytes follow the action byte; BWM reboots to apply
|
||||
#define BWM_BLE_NAME_MAX_LEN 15 // usable chars; ESP name buffer is 16 incl NUL
|
||||
#define BWM_BLE_NAME_MAX_LEN 15 // usable chars; BLE advert fits at most 17
|
||||
// PM5, toggle the power-save idle (48 MHz + WFI when idle). Used by `hw powersave`.
|
||||
#define CMD_PM5_POWERSAVE 0x0180
|
||||
// PM5, BWM power-save switch on the ESP (DFS, light sleep, low-duty advertising;
|
||||
|
||||
Reference in new issue
Block a user