Summary
I’ve discovered that the ATTN pin does not fire when environment variables are changed in Notehub, even when configured with `mode: “arm,env,files”`. The ATTN pin works correctly for inbound commands (`command.qi`), showing that the hardware and interrupt configuration are correct.
This behavior has been present since at least firmware 7.x in my experience, but wasn’t a blocker earlier. It’s now critical for us as async `web.put` requests are a key part of our current design, and these also don’t trigger ATTN when results are ready.
Environment
- Notecard: NOTE-WBNAW (Wi-Fi + Cell)
- Firmware: notecard-10.1.1.17497
- Notecard Connection: Wi-Fi
- Host: ESP32-S3 via UART
ATTN Configuration
{“req”:“card.attn”,“mode”:“arm,env,files”,“on”:true,“files”:[“command.qi”,“webreq.dbx”]}
Verification confirms `modified` is being monitored (via `env` mode).
Observed Behavior
| Trigger | Expected | Actual |
|---|---|---|
| Environment variable change | ATTN fires | |
| Async web.get result | ATTN fires | |
| Inbound note | ATTN fires | |
Key Finding
When an inbound command triggers ATTN, the response includes *both* `command.qi` AND `modified`:
{“files”:[“command.qi”,“modified”],“set”:true}
I believe this means Notecard knows environment variables changed, but does not trigger ATTN for them independently. env.modified also shows that Notecard sees the changes to the environment variables.
Reproduction
I’ve created a diagnostic tool to reproduce this issue:
-
Tool README & instructions: notecard-tests/attn-test-tool at main · elert-ltd/notecard-tests · GitHub
-
Example test log: notecard-tests/attn-test-tool/example_log.txt at main · elert-ltd/notecard-tests · GitHub
-
Detailed bug report: https://github.com/elert-ltd/notecard-tests/blob/main/attn-test-tool/BUG_REPORT.md
The tool includes an automated test (press `M`) that monitors for 2 minutes and reports whether ATTN fired when environment variables change, as well as various other tests for async/sync web.* requests and inbound queues.