Commit Graph
14001 Commits
Author SHA1 Message Date
MsprgandClaude Fable 5 d852118de5 client: build the tab completion vocabulary at runtime from the command tree
Tab completion used a generated table (pm3line_vocabulary.h, refreshed by
hand via `make commands`) that drifted from the real command tables: new
commands were missing (e.g. `hw bwm*`), removed ones lingered, and the
"offline" flag depended on the platform of whoever regenerated it
(IfPm5() returns true offline on PM5 builds).

Build the vocabulary at startup instead:

- cmdparser: add walkCommandsRecursive(), a tree walk using a fourth
  internal sentinel (XX_internal_command_walk_XX) next to the dump ones.
  It hands each leaf to a visitor as its command_t chain (ancestors +
  leaf). A dispatch counter detects entries shown like a category but
  with their own parser (reveng) and reports them as leaves.
- pm3line_vocabulary: dynamic vocabulary holding the IsAvailable()
  predicates of every command and its ancestor categories, so completion
  applies exactly the rule CmdsHelp() uses, live, for both offline and
  connected devices. Script entries ("script run <relpath>") come from
  the same directories `script list` scans, sorted, including
  subdirectories with the path `script run` needs.
- pm3line: readline and linenoise completers consume the live vocabulary.
  The walk runs with output disabled so category handlers stay silent.
- Drop pm3_help2list.py and the header regeneration from `make commands`.

Behaviour change: entries whose category is hidden by `help` (e.g. `mem`,
`usart` offline) are no longer offered, matching `help`; when connected,
commands the device does not support are no longer offered either.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 14:29:04 +02:00
Philippe Teuwen a6b4107066 Add --on to hw bwmcharge, same syntax as hw bwmautooff 2026-08-28 13:17:05 +02:00
Niel Nielsen 33535330e1 Enhance WiFi command with stop option and error messages
Updated command handling for WiFi configuration to include a stop option and adjusted error messages accordingly.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Philippe Teuwen f08792fef0 Add -n to hf 14a reader 2026-08-28 10:29:26 +02:00
iceman1001 77a9f45db6 texts 2026-08-28 01:16:30 +02:00
iceman1001 377d7cd612 since it still felt a bit slow, Claude came up with the idea of burst mode transfers. A new sim module firmware 'sim022.bin' and we now can auto-negotiate for TA1 = 0x95 which give us 125 000 bits/s which is almost 10x from the 10752 bits/s we were doing before. Thanks Claude! 2026-08-28 01:16:11 +02:00
MsprgandClaude Fable 5 f2c214722c hf felica liteauth: use NULL instead of "" for options without a long name
argtable treats the long option field as a string to scan; an empty
literal makes arg_parse() read one byte past it. AddressSanitizer flags
it as a global-buffer-overflow whenever the command's help is built,
e.g. on every `proxmark3 --fulltext`. Every other command in the client
passes NULL here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 23:34:45 +02:00
iceman1001 e2cf7dee5f clean up old firmware files 2026-08-27 22:40:50 +02:00
iceman1001 7bdd6760a2 maur 2026-08-27 22:37:59 +02:00
iceman1001 76181dfb8e sim module firmware is now v4.60, (sim020.bin) it adds a better drain when T=0 exits abnormal (abort). Better waiting time floor, with faster ETU which doesnt shrink with WWT.\n Changes to i2c with SDA timings, also modified the fixed msleep(100) with an idle time waiting which leads to 107 ms off from every iteration.\n Added a ATR cache to remember which TA1 was autonegotiated. This impact i2c comms speed with sim module for same card. 'smart pps' is better documented.\n The sam_common.c now also logs 61xx and GET_RESPONSE :) and generic long-form ASN-1 lengths. trace list -t 7816 now also shows rdr frames in us. \n All in all, this should lead for 'emv reader -w' to go from 5.87sec to 2.78sec. 'hf seos sam' is down to 1.92sec. 'hw ping' is down to 0.57sec. A USB round trip is down from 20.8ms to 1.3ms. It should give a snappier end user experience 2026-08-27 22:37:32 +02:00
Niel Nielsen 63112fad75 Merge branch 'RfidResearchGroup:master' into WIFI-test 2026-08-27 16:58:47 +02:00
Niel Nielsen fe0b6c46b2 Add hostname parameter to WiFi command
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-27 16:44:35 +02:00
iceman1001 9040f60f17 text 2026-08-27 15:41:43 +02:00
iceman1001 5c38ce0a1d added a wake up pipeline to see if sim module actually is doing things or not. Might not work well on Windows machines... proxspace I am looking at you. but in short this would make comms between device and client faster 2026-08-27 15:35:45 +02:00
iceman1001 bbe0c11e4c reverting 2026-08-27 14:26:35 +02:00
iceman1001 f78890cb03 no table when no AID found 2026-08-27 14:25:40 +02:00
iceman1001 8b9f3951b1 fix overeager padding being added to string array 2026-08-27 13:42:14 +02:00
Niel Nielsen 862341207c Implement CmdBWMWifi for WiFi connection setup
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-27 13:25:49 +02:00
Niel Nielsen 57ea719363 Add CmdBWMWifi function for WiFi BWM logging
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-27 13:17:31 +02:00
iceman1001 2b00e3f513 better adaptive table output in 2026-08-27 12:46:33 +02:00
iceman1001 3ba5936c70 faster client polling. Should make the pm3 client more spiffy 2026-08-27 12:44:30 +02:00
iceman1001 aeb5347b87 next sim module firmware sim017.bin, 2026-08-27 09:26:08 +02:00
iceman1001 dabc7d645b shaving off some time with ATR. Revert back the timings for i2c bus. still a very slow bus 2026-08-27 02:47:45 +02:00
iceman1001 7488b5bb79 fix to work with different SAMs. Fixed some overflow bugs and better asn1 decoding. Also enjoys the speed up from i2c sim module. Thanks Claude 2026-08-27 01:59:33 +02:00
iceman1001 84ad2fb8d4 new sim module firmware, shorter delays for T=0 transfers 2026-08-27 01:38:46 +02:00