I'm attempting to use the new nfc_scanner_* APIs in the Flipper Zero SDK.
The thing I'm observing is that the NfcScanner's internal logging shows it gets through the NfcScannerStateIdle handler, but never reaches NfcScannerStateFindChildrenProtocols (and therefore not NfcScannerStateComplete either, so it never calls my callback). But the ostensibly identical sequence of NFC API calls that the built-in nfc app uses, works perfectly.
The main difference between my example app and the built-in nfc app is that my app's main thread sleeps after starting the scanner, while the built-in nfc app's main thread is running the event loop for the view dispatcher.
Reproduction
Place the following files into applications_user/nfc_scanner:
Running my example app above, I see the following debug logs:
354500679 [I][Loader] Loading /ext/apps/nfc_scanner.fap
354500712 [I][Elf] Total size of loaded sections: 299
354500714 [I][Loader] Loaded in 35ms
354500717 [I][NfcScanner] Scanning NFC cards for 5 seconds...
354500721 [I][AnimationManager] Unload animation 'L1_Tv_128x47'
354500726 [D][NfcScanner] Found 5 base protocols
354506074 [I][NfcScanner] Finished scanning!
354506088 [I][Loader] App returned: 0
354506090 [I][Loader] Application stopped. Free heap: 141968
If I instead run the built-in nfc app and click "Read", with the same NFC card by the reader, I see:
354700335 [D][NfcScanner] Found 5 base protocols
354700399 [D][Nfc] FWT Timeout
354700424 [D][Nfc] FWT Timeout
354700476 [D][Nfc] FWT Timeout
354700504 [D][Nfc] FWT Timeout
354700519 [D][NfcScanner] Found 4 children
354700576 [D][Nfc] FWT Timeout
354700579 [D][Nfc] FWT Timeout
354700612 [D][Nfc] FWT Timeout
354700646 [D][Iso14443_4aPoller] Read ATS success
354700688 [I][NfcScanner] Detected 1 protocols
354700856 [I][Elf] Total size of loaded sections: 888
354700858 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354700898 [I][Elf] Total size of loaded sections: 420
354700900 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354700941 [I][Elf] Total size of loaded sections: 872
354700944 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354700994 [I][Elf] Total size of loaded sections: 1244
354700996 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354701046 [I][Elf] Total size of loaded sections: 1324
354701049 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354701092 [I][Elf] Total size of loaded sections: 1724
354701094 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354701137 [I][Elf] Total size of loaded sections: 1768
354701140 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354701182 [I][Elf] Total size of loaded sections: 1464
354701186 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354701228 [I][Elf] Total size of loaded sections: 636
354701232 [D][Fap] Library for NfcSupportedCardPlugin, API v. 1 loaded
354701235 [D][NfcSupportedCards] Loaded 9 plugins
354701252 [D][Iso14443_4aPoller] Read ATS success
Describe the bug.
I'm attempting to use the new
nfc_scanner_*
APIs in the Flipper Zero SDK.The thing I'm observing is that the
NfcScanner
's internal logging shows it gets through theNfcScannerStateIdle
handler, but never reachesNfcScannerStateFindChildrenProtocols
(and therefore notNfcScannerStateComplete
either, so it never calls my callback). But the ostensibly identical sequence of NFC API calls that the built-innfc
app uses, works perfectly.The main difference between my example app and the built-in
nfc
app is that my app's main thread sleeps after starting the scanner, while the built-innfc
app's main thread is running the event loop for the view dispatcher.Reproduction
applications_user/nfc_scanner
:Target
f7, firmware version 0.97.1.
Logs
Running my example app above, I see the following debug logs:
If I instead run the built-in
nfc
app and click "Read", with the same NFC card by the reader, I see:Anything else?
No response