capabilities: report device frame size so the client can adapt

PM3_CMD_DATA_SIZE went 512 -> 624 without a capabilities bump, so a new
client connects to old firmware and every oversized command dies at the
device's length check with no message.

Append max_cmd_data_size, bump to v9. The client now accepts an older
capabilities struct - it only ever grows by appending, so an older layout
is a prefix - and defaults the frame size for pre-v9 firmware.
SendCommandNG bounds by the device value instead of the compile time one.

Also zero init capabilities_t on the device, it leaked stack bytes.
This commit is contained in:
iceman1001 committed 2026-08-30 20:13:38 +02:00
1 parent 6d2c35b05b
commit 9e2092fc66
4 files changed
+60 -8

No files matched your search

+1
View File
@@ -106,6 +106,7 @@ size_t GetCommunicationRawReceiveNum(void);
bool OpenProxmarkSilent(pm3_device_t **dev, const char *port, uint32_t speed);
bool OpenProxmark(pm3_device_t **dev, const char *port, bool wait_for_port, int timeout, bool flash_mode, uint32_t speed);
int TestProxmark(pm3_device_t *dev);
uint16_t pm3_max_cmd_data_size(void);
void CloseProxmark(pm3_device_t *dev);
void StartReconnectProxmark(void);