* New types for felica poller
* New functions for felica data transmissions
* Felica memory map extended with new fields
* Init/deinit of mbedtls context added for felica encryption
* Functions for session key and mac calculations added
* Raw felica_poller implementation added
* Removed MAC type parameter from check_mac function
* Replaced all data fields needed for auth with context structure
* Clean up felica_poller.c
* Now RC block is filled with random numbers
* New parameter for counting well-read blocks
* Some cleanups
* Felica file save and load logic added
* Now we use card key from context for session key calculation
* Copying card key to card block from auth context when both authentications succeeded, otherwise decrement blocks count by 1
* New felica poller event added
* Moved some data structions to public namespace
* FelicaAuthenticationContext struct moved to felica.h
* Field type and name changed for better ones
* Helper functions for felica_auth added to the app
* New scene for felica card key input added
* Logic for felica key input added
* Auth context request processing added
* Added block index definitions and replaced all index numbers with them
* More macro defines
* Replace nesting with do while block
* New function for write operations mac calculation added
* Replace nesting with do while block
* Make functions static for now because they are used internally
* Wrote some comments
* Raw felica render implementation
* New felica scenes
* Adjusted felica dump rendering according design requirements
* New felica scene added
* Helper for switching scene during unlock added
* Added warning scene and transfer to it
* Moved unlock scene logic to separate files
* Magic number changed
* New felica render logic
* Felica scenes adjusted according to design requirements
* Felica poller cleanups
* Some asserts added and some fixed
* Replcaed asserts to checks in public api
* Fixed pvs warnings in felica_poller
* New event for felica_poller added for incomplete read actions
* Handling of new poller event added
* Update SConscript with felica files
* Update api_symbols.csv with felica functions
* Sync API versions
Co-authored-by: あく <alleteam@gmail.com>
* Api Symbols: replace asserts with checks
* Api Symbols: replace asserts with checks part 2
* Update no args function signatures with void, to help compiler to track incorrect usage
* More unavoidable void
* Update PVS config and code to make it happy
* Format sources
* nfc: fix checks
* dead code cleanup & include fixes
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
* nfc_util functions for processing bytes moved into bit_lib
* bitlib test update
* bit_lib moved from lfrfid to standalone lib
* Added bit functions for any supported data types
* Error fix and api add
* Added test for 64
* Added doc
* Testcase for 64 rewrited
* Realization error fix
* API version bump
* sync api version, fix after-merge old libs usage
* fix build errors
* build fix
* fbt format
Co-authored-by: assasinfil <nfa57643@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
* mf classic listener: reset state before sleep and after nack
* Fix PVS warnings
* Fix PVS and compiler disagree on builtins
Co-authored-by: あく <alleteam@gmail.com>
* nfc_util_bytes2num_little_endian function added
* f18 target api version sync
* Bump api version
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
* New scenes for ultralight poller write mode
* Added new button and transition logic for write operation
For now write is only possible for NTAG21x cards with default password and no AUTHLIM set
* Poller states extended
* Enums and datatypes extended for new poller mode
* Added mode field to poller instance datatype
* New states for poller added in order to implement write mode
* Added new event type for locked cards in order to simplify state flow
* New logic for poller write commands
* Scenes adjustments
* Scenes renamed
* New field added to poller instance
* Now we write in 'page per call' mode
* Now function takes callback return value into account
* Callback will be called only in write mode
* Event type added
* Log adjusted and start page to write set
* Logs added and check in now false at start, then it moves to true
* Now mf_ultralight_poller_handler_request_write_data halts card in case of check failure and stops poller
* All fail events now returns NfcCommandStop callback
* In case of fail we move back properly
* Remove garbage
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
* nfc: st25tb: rework async poller
* nfc: st25tb: introduce sync poller
* nfc: st25tb: add write support
* nfc: st25tb: rewrite poller to use better states
* nfc: st25tb: move to mode request state after success
* nfc: st25tb: minor bug fixes
* type wasn't properly set on ready event
* sending NfcCustomEventPollerFailure on St25tbPollerEventTypeFailure caused poller to being freed and ultimately resulted in a thread crash
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
* Update Mifare Classic generators to create more accuate data
* Check the transfer buffer validity for NACK
* Fix the AC issues
* CRC errors don't really affect emulation, checking for them isn't worth it
* Make ATQA logic a bit easier to understand
* mf classic: change log level
* mf classic: fix log level
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
* Added basic template of Felica listener
* Raw nfc felica listener functions
* Added functions to setup chip for felica listener
* Cleanup function templates from unnecessary parts
* Removed todo comment
* Updated api versions
* Adjusted chip config for felica
* Set proper chip passive target mode for felica
* Added felica function to unit tests
* Update furi_hal_nfc_felica.c
* Removed duplication
Co-authored-by: gornekich <n.gorbadey@gmail.com>
* Listener log level changed to Trace
* Show pages count without pwd pages in case of no auth success
* Fixed unit tests
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
* Furi: remove direct FreeRTOS timers use
* Furi: eliminate FreeRTOS headers leak. What did it cost? Everything...
* SubGhz: proper public api for protocols. Format Sources.
* Furi: slightly less redundant declarations
* Desktop: proper types in printf
* Sync API Symbols
* Furi: add timer reset and fix dolphin service, fix unit tests
* Furi: proper timer restart method naming and correct behavior in timer stopped state.
---------
Co-authored-by: hedger <hedger@nanode.su>
* Increase MF DESFire result buffer
* Ignore chunks that do not fit into the result buffer and show warning
* Display information about partial files
Co-authored-by: あく <alleteam@gmail.com>
* firmware: remove nfc lib build settings section
* furi hal nfc: fix nfc irq gpio deinit
* lib nfc: remove deprecated exception from sources
* nfc: use ASK demodulator in transparent mode
* mf ultralight: add upper page bound for NTAGI2C1K
* furi hal nfc: set event if nfc event was started
* nfc: fix PVS warnings
* lib signal reader: remove gpio pull setting in alloc
* furi: added math.h include for compatibility with existing apps
* nfc: remove resolved TODO in mf desfire poller
* bump api symbol version
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: あく <alleteam@gmail.com>
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.
Starring:
- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer
Supporting roles:
- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance
Special thanks:
@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
* FuriHal: enable HSI in stop mode only if we use STOP0, proper SMPS selected clock assert
* Furi: fix double crash caused by bkpt use outside of debug session
* Libs: update ERC and MGG contrast
* Fix various crashes with LIB_DEBUG=1
* BadUsb: size_t where it should be and proper printf types
* Various fixes and make PVS happy
* FuriHal: proper CCID status and make PVS happy
* boot: update mode: graceful handling of corrupted stage file
---------
Co-authored-by: hedger <hedger@nanode.su>
* Storage: count opened files
* Storage: sd mount
* Storage: prompt to mount SD card if not mounted
* F18: update API
* F18: update API version
* Fix logger naming scheme
* Storage: storage_files_count -> storage_open_files_count
Co-authored-by: あく <alleteam@gmail.com>
* added filename mode setting
* added furi_flag checks for when filename_mode is set
* changed naming for ibutton, lfrfid and subghz
* requested changes from PR
* Lib: gather all naming bits and pieces under name generator module. Properly bump api version. FuriHal: fix RTC flag enum.
* PR requested changes
* bug fix for arg type
* added functionality for other application scenes
* Lib: cleanup name generator API, simplify usage. Sync API symbols.
* Lib: proper size type in name_generator. Cleanup.
* FuriHal: cleanup rtc api usage across firmware
Co-authored-by: あく <alleteam@gmail.com>
* NFC CLI: Fix multiple apdu commands from not working when one of them gives an empty response
* Make PVS happy
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
* NFC: Fix key invalidation (again~)
* NFC: shouldn't be there
This code get called each time we check for B key
Co-authored-by: あく <alleteam@gmail.com>
* NFC: Improved MFC emulation on some readers
* NFC: Improved emulation on some readers (part 2): Some Android devices don't like this
* NFC: Improved emulation on some readers (part 3): I knew that during the emulation timings are critical, but one log breaks all...
* NFC: Improved emulation on some readers (part 4): Add fixes to Detect reader and refactor code
* NFC: Improved emulation on some readers (part 5)
* NFC: Improved emulation on some readers (part 6): GUI doesn't update without delay
* NFC: Improved emulation on some readers (part 7): Reworked emulation flow, some bug fixes and improvements
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>