* Store app flags in FAP header
* Add app flag to UnloadAssetPacks to free RAM
* Unload asset packs in NFC and MFKey
* Clearer size units
* Update changelog
* Future proof logic
* Sync apps
* Unused icons to check later
* Exclude disabled icons from firmware
* Format
* Also report free flash in gh comment
* Fix free flash calc
* Fix?
* Fix??
* Split to next line
* Remove dead icons
* Some spring cleaning of icons cooker
* Improve unused icons script
* Disable icons that cant be used in asset packs
* These will need a workaround for external
* Revert "These will need a workaround for external"
This reverts commit fb23d97952.
* Here's the workaround: split assets lib
now there is "assets" and "fwassets"
firmware links with fwassets and includes all icons
however not all of them are exposed to api
if an app needs a firmware icon not in api, it can use fap_libs=["assets"]
this will link against this dummy assets lib
it only contains the icons that arent exposed to api
this way, an app using assets lib will still benefit from asset packs
but at same time, we can remove pointless icons from dfu blob
* Update changelog
* NFC: Add NDEF Parser for MFUL, MFC and SLIX
* Fix inefficiency in MAD checking
* NFC: NDEF parser less RAM waste for contact vcards
* Fix typo
* Make PVS Happy
* NFC: hide TODO in 3rd party plugin
Co-authored-by: あく <alleteam@gmail.com>
* Update ndef.c
included mifare classic support
* Update application.fam
* Update ndef.c
* Update ndef.c
* Update ndef.c
* Update ndef.c
* Update ndef.c for better parsing
Because mifare classic 1k has a sector trailer, the ndef parser might conflict with it if the payload is long enough or if there's too many payloads. This code removes all sector trailer in a new buffer and uses that for parsing without any problems.
* Rewrite NDEF as protocol agnostic
* Move type name buffer to stack when possible
* Parse URI without heap buffer
* Reduce binary sizes by using preprocessor defines
* Parse MFC without clone buffer and support MAD2
* Keep message count between different TLVs
* Simplify macro check
* Simplify length conversion
* Improve output of unparsed types
* Add some more logging
* Fix WiFi parsing
* Check MAD key before reading
* Rename ndef_read() to ndef_get()
* Update changelog
* Wording
---------
Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
* adding smartrider_parser
* adding SmartRider parser
new parser for SmartRider cards, a public transport smart card system used in Western Australia.
extracts and interprets key information from the card, including:
-Current balance
-Card serial number
-Concession type
-Purchase cost
-Details of the last two trips (including tag on/off status, cost, route, transaction number, and journey number)
* optimising
- removed all logging to simplify output.
- used early returns for clearer error handling.
- optimized setups outside loops to improve memory use.
- simplified flows by removing unnecessary loops.
- placed variables closer to their use for better readability.
- cached data blocks to streamline data handling.
- added a helper function for parsing trips, reducing redundancy.
- corrected loop counter types to avoid compile-time errors.
* cleaning displayed data
- removed transaction (txn) and journey (jrn) numbers to declutter the trip details.
- shortened "previous trip" to "prev trip" to optimize screen space usage.
* added and refined displayed data
added auto load field "threshold amount / reload amount"
changed serial to display first two digits as SR0 for consistency with physical card.
* Format
* Improved Verification Process
- Added definitions for STANDARD_KEY_2 and STANDARD_KEY_3
- Enhanced smartrider_verify function to check for all three specific keys:
- STANDARD_KEY_1 in Sector 0 as Key A
- STANDARD_KEY_2 in Sector 6 as Key A
- STANDARD_KEY_3 in Sector 6 as Key B
- Implemented read operations to verify actual key values stored on the card
- Added comparisons between read key data and expected key values
- Improved debug logging for each step of the verification process
* Integrated Verification into Parse Function
- Added key verification for sectors 0 and 6
- Implemented do-while loop structure for early exit on verification failure
- Moved block readability checks inside verification process
- Added parsed flag to indicate successful parsing
- Updated return value to reflect parsing success
- Maintained existing parsing logic and output format
* fixed false positives
recieved some cuid cards today so was able to test for myself can confirm works... finally
changes made:
-updated key assignment in smartrider_read
-simplified key verification in smartrider_parse
-improved error handling and logging
-streamlined data parsing process
-corrected key checking logic
-added checks for required block readability
-improved flow control with strategic breaks
-adjusted block data access method
* small optimizations
- refactored `smartrider_verify` and `smartrider_read` by abstracting repeated key operations into `authenticate_and_read` function for improved code maintainability.
- optimized `smartrider_read` by introducing a loop for key setup, reducing redundancy and improving efficiency.
- streamlined error handling in `smartrider_read` by replacing do-while loop with conditional checks.
- changed standard key references to use `standard_keys` array indices
* formatting
* Delete duplicate smartrider.c
* updated smartrider.c
* found 'fbt format'
* transaction parsing updates
-removed last trip/prev trip wording and replaced with "Trip History" header
-added date in front of each transaction
-only shows transaction cost if it's higher than 0
-changed tag on/tag off to +/- to save room
-added 8 more transactions to Trip History
-verified still working and formatted with fbt
* fixed reboot with partially unlocked card
-added bounds checking for all block accesses to prevent out-of-range memory access
-implemented improved error handling with an error_occurred flag
-introduced a maximum iteration count for date calculation to prevent infinite loops
-used snprintf with size limits for all string operations to avoid buffer overflows
-added validation for trip count to ensure it doesn't exceed the maximum allowed
-implemented checks to skip unread or out-of-range blocks during trip parsing
-added safeguards against corrupted or invalid timestamp data
* optimized SmartRider card parsing and verification
- replaced do-while loop with direct error checks in smartrider_parse
- optimized key verification using direct memcmp in smartrider_verify
- introduced inline functions for common operations (e.g., set_key, read_le16)
- replaced bubble sort with insertion sort for trip data
- simplified date calculation using a lookup table for days in month
- used uint_fast8_t for loop counters to allow compiler optimization
- added __attribute__((hot)) to key functions for aggressive optimization
- removed redundant variable declarations and function calls
- optimized memory usage with static const arrays for required blocks
- simplified error handling in smartrider_read and authenticate_and_read
- used __builtin_memcpy and __builtin_memcmp for potential compiler optimizations
- tested and formatted with fbt
* small fixes
-renamed "Trip History" to "Tag On/Off History"
-fixed date calculation to account for leap years
-misc changes
* Update changelog
---------
Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
* csc parser
* Added verification through keys. Recognize new cards.
* Correct typo, add comments
* Updated output word choice
* Added verify key in csc_parse to avoid false positive
* Format
* updated verification process
- Deleted key-based verification
- Added memory based checksum and backup block checks to ensure better verification performance
* Formatting and More Verify Steps
Added card type checks and verify for csc specific memory format
Formatted the code (indentation etc.)
* Update csc.c
* Test cleanup parser a bit
* Update changelog
---------
Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
* Parser for Santiago, Chile BIP transit card
It's used for all public transportation in the city of Santiago, Chile
(bus, subway). We've reverse-engineered most of the non-zero bits of
data found, and checked them across dozens of cards.
* Update to use bit_lib instead of nfc_util
* PR feedback
Co-authored-by: Rodrigo Basoalto <basoalto@fintual.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
* Merge remote-tracking branch 'origin/dev' into dev
* Add basic API interface (inspired by advanced plugins example), modify NfcSupportedCardsLoadContext to contain a pointer to a resolver
* WIP: API resolver implemented / passed to plugin via context, still having resolution issues
* Attempt to add constants to the nfc_app_api_table list
* WIP: We're defining the constants directly in nfc_app_api.c to see if this fixes our woes, which it does not.
* WIP: Remove furi_assert(false) (lmao)
* Working implementation of Gallagher decoding via exposed plugin API
* lib: api_hashtable: change log level for symbol not found message
* nfc app: alloc composite resolver along with supported cards
* nfc app: rework nfc api structure
* nfc app: fix memory leakage in supported cards
Co-authored-by: gornekich <n.gorbadey@gmail.com>
* Create ITSO parser
Standard for UK transport cards outside of Oyster
* Update application.fam with ITSO parser
* Update date buffer to fix access outside array
* nfc app: use rtc function in itso plugin
---------
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>