* Expansion: Wake thread on UART error flag
* Expansion: Stop UART async rx early
* FuriHalSerial: Fix RXFNE interrupt hang
---------
Co-authored-by: hedger <hedger@users.noreply.github.com>
* FeliCa: Handle non-hardware Polling commands
NFC TagInfo and possibly other readers rely on Polling commands with Request Code of 1 (default System Code request) or non-FFFF System Code to detect card type. Since the NFC controller doesn't seem to handle them in hardware and simply bubbles them up, and then the Flipper firmware will just ignore them and refuse to respond afterwards, this causes the reading operation to fail.
This commit adds a simple handler for such Polling commands so that readers behaving like NFC TagInfo could read the emulated card without failing.
* Only handle cases when System Code is not FFFF
The NFC controller should handle Polling commands with the System Code set to FFFF, so it's not necessary for the firmware to handle it.
* Remove system code logging
* More cleanups
* Remove the claim that we need a poller change
We already have enough information to determine whether or not the card supports NDEF since SYS_OP register value is included in all current Lite-S card dumps.
* Respond to 12FC polling command when needed
* Handle Polling with NDEF and Lite-S Service Code
This allows the reader to specifically select the service by naming the Service Code.
* Introduce API for manual handling of Polling commands
Introduce nfc_felica_listener_timer_anticol_start() and nfc_felica_listener_timer_anticol_stop(). These are for now just wrappers around the block_tx timer that can be used to delay the response until the desired Time Slot. Thanks to the loose timing constraints of FeliCa collision resolution protocol, no compensation seems to be necessary. Also enabled the block_tx timer for FeliCa listener, but with both compensation and fdt set to 0 to keep the original behavior of not using the timer during normal data exchange.
This API is now being used for handling Polling commands that are not handled by the NFC controller on the hardware side.
* Document target_time_slot
* Implement changes suggested by @RebornedBrain
* api: f18 version sync
* nfc: added stubs for `nfc_felica_listener_timer_anticol` for unit tests
---------
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
* CLI: Fix long delay with quick connect/disconnect
noticeable with qflipper, for some reason it sets DTR on/off/on again
so flipper starts CLI, stops it, then starts again
but cli shell is trying to print motd, and pipe is already broken
so each character of motd times out for 100ms
changing pipe timeout to 10ms works too, but is just a workaround
it didnt always happen, i think that variable time of loading ext cmds
made it so on ofw it usually manages to print motd before pipe is broken
on cfw with more ext commands it always hung, on ofw only sometimes
important part is bailing early in cli shell
in cli vcp i made it cleanup cli shell on disconnect so it doesnt stay
around after disconnecting usb, might free a little ram maybe
* cli_shell: possibly more robust fix?
* Fix use after free crash
* cli_shell: waste even less time
Co-Authored-By: WillyJL <me@willyjl.dev>
---------
Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
* unit_tests: clear startup order
* fam: ensure unique STARTUP order
* fbt: warn on same .order values within a group leading to non-determinitic builds
* fbt: better formatting for app order warning
---------
Co-authored-by: hedger <hedger@nanode.su>
* feat: pinning settings in favorites
* include archive in unit tests fw
* change settings icon
* update text with suggestions from the ui team
* Small touch of constness
---------
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
* feat: app chaining
* add `launch_current_app_after_deferred`, remove `get_referring_application`
* fix naming
* new api
* fix f18
* Added new function which enqueues external app from nfc app
* Added path to MFKey32 app
* Button "Crack nonces in MFKey32" added to ReadMenu scene
* SaveConfirm scene adjusted to move to different scenes depending on state
* SaveSuccess scene now moves to different scenes depending on SaveConfirm scene state
* MfKeyComplete scene shows different text when MFKey.fap present on the device
* Now MfKeyClassic scene can run external app
* fix deferred launches after errors
Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
Apparently both the mentioned Elitelux and Vivax models are the same, so they share the same codes. Sansui is a brand that is also associated with them as one of the available Sansui codes is the same as this one. This code might also work for the non-smart version of the Vivax TV, the TV-32LE114T2S2, but it has not been tested.
Co-authored-by: hedger <hedger@users.noreply.github.com>
* Support longer advertised BLE UUID
* BLE: support manufacturer data
* Don't pair when GapPairingNone
* Add PR feedback
---------
Co-authored-by: hedger <hedger@users.noreply.github.com>
* Update and fix JS docs
This could really use some automation, atleast for API reference
There are TypeScript definitions and typedocs, we don't need to be monkeys copying and reformatting this to API reference by hand
* Fix bugged character
* JS: Fix Number.toString() with decimals
* Fix
* Forgot this one
* docs: mention per-view child format
* Added @portasynthinca3 to docs' codeowners
* Updated CODEOWNERS
---------
Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
* Add div() to API
* Revert "Add div() to API"
This reverts commit e03b5c4244.
* Use / and %
* NFC: More MFC NDEF fixes
* Simplify duplicated code in MFC data generator
* NFC: Print NDEF hex data with pretty format
* NFC: Consider NDEF strings with last \0 byte as text
* Pretty Format: Add padding to last line to keep table width
---------
Co-authored-by: hedger <hedger@users.noreply.github.com>
* NFC: Possibly fix ISO15693-3 save crash with no data
* Also prevent malloc(0) if block size or count is 0
---------
Co-authored-by: hedger <hedger@users.noreply.github.com>
* libs: stricter constness for saving RAM with .rodata section; fbt: sdk: fixed signature generation for nested const params
* hal: additional fixes for constness in USB subsystem
* debug apps: additional usb-related fixes
* mjs: more consts for token parser
* fatfs: const driver struct
* hal: more consts for ble & nfc vars
* hal: made FuriHalSpiBusHandle static
* hal: made FuriHalI2cBusHandle static
* usb: restored previous api
* linter fixes
* API fixes
* Fix unaccessible flipper for binded access points
workaround to work with symlinked devices
* Fix return None if Flipper not started
* exception handling
* decreased timeouts
* Check environment variables for flipper path