Skip to content

fix(pn532): restore Apple Wallet Express Mode polling - #3

Merged
Ruhanpaco merged 1 commit into
Ruhanpaco:mainfrom
grapefizz:agent/apple-wallet-express-mode
Aug 18, 2026
Merged

fix(pn532): restore Apple Wallet Express Mode polling#3
Ruhanpaco merged 1 commit into
Ruhanpaco:mainfrom
grapefizz:agent/apple-wallet-express-mode

Conversation

@grapefizz

Copy link
Copy Markdown
Contributor

What changed

  • restore the PN532 polling sequence required for Apple Wallet's Aliro ECP announcement
  • send ECP only after an empty Type-A poll and reset CIU_BitFraming before the raw frame
  • drain the expected InCommunicateThru timeout response so the next poll remains synchronized
  • enable the ECP beacon by default and rebuild it when Matter changes the reader group identifier
  • update the README and roadmap to describe the implementation and remaining hardware validation

Why

The previous ECP path rewrote CRC and RF timeout registers, omitted the required bit-framing write, and sent the beacon before Type-A discovery configured the PN532. That left the command stream out of sync, causing every following InListPassiveTarget command to fail with 0x4A: no ACK.

This follows the working PN532 ECP cadence: ordinary Type-A poll, byte-aligned ECP broadcast when no target is found, then the next Type-A poll.

Impact

Apple Wallet can automatically present the provisioned Aliro credential while the phone is locked instead of requiring the user to open Wallet and select it first. The corrected path still needs confirmation on the physical test lock before it is described as hardware-verified.

Validation

  • ./tools/check_consistency.py — 0 problems, 0 notes
  • git diff --check upstream/main...HEAD
  • ECP source invariant checks for poll order, bit framing, response draining, and reader-ID refresh

ESP-IDF is not installed in the local environment, so a full firmware build was not run locally.

Use the PN532’s correct ECP sequence, drain the expected timeout
response, enable ECP by default, and refresh the beacon after Matter
reader identity changes.
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 717686d9-7b6e-493d-926d-f925d03034a6


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@grapefizz
grapefizz marked this pull request as ready for review August 18, 2026 17:53
@Ruhanpaco
Ruhanpaco merged commit 323ce24 into Ruhanpaco:main Aug 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants