You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While tracking down some bugs I suspect were introduced with the NFC refactor I discovered an interesting condition that can occur in the 15693 emulation code.
In signal_reader_callback in iso15693_parser.c when a SOF is recieved it then sets the expected demodulation mode to either 1or4 or 1or256 depending on what the SOF looked like. After this mode has been set remaining calls to the callback look for data encoded in that modulation only. The issue is that readers will generally only use one of the two modulations exclusively (for example picopass only supports the higher speed 1of4 mode) and there is no timeout that resets the state back to Iso15693ParserStateParseSoF, so under real world conditions sometimes a bit of noise can trigger the wrong mode at which point emulation will stop working until it is manually restarted as we never encounter the appropriate end of frame.
I'd expect that the demodulator would upon encountering invalid modulation reset the state back to Iso15693ParserStateParseSoF so that it can start from the beginning again.
When emulation stops working (everything looks fine on the FZ side of things, but the reader will not be able to see anything) add a breakpoint on the signal_reader_callback function
Observe that instance->state is Iso15693ParserStateParseFrame and instance->mode is Iso15693ParserMode1OutOf256 which isn't used by picopass and that in all subsequent calls to this function the state and mode remains unchanged
Target
No response
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Describe the bug.
While tracking down some bugs I suspect were introduced with the NFC refactor I discovered an interesting condition that can occur in the 15693 emulation code.
In
signal_reader_callback
iniso15693_parser.c
when a SOF is recieved it then sets the expected demodulation mode to either 1or4 or 1or256 depending on what the SOF looked like. After this mode has been set remaining calls to the callback look for data encoded in that modulation only. The issue is that readers will generally only use one of the two modulations exclusively (for example picopass only supports the higher speed 1of4 mode) and there is no timeout that resets the state back toIso15693ParserStateParseSoF
, so under real world conditions sometimes a bit of noise can trigger the wrong mode at which point emulation will stop working until it is manually restarted as we never encounter the appropriate end of frame.I'd expect that the demodulator would upon encountering invalid modulation reset the state back to
Iso15693ParserStateParseSoF
so that it can start from the beginning again.Reproduction
signal_reader_callback
functioninstance->state
isIso15693ParserStateParseFrame
andinstance->mode
isIso15693ParserMode1OutOf256
which isn't used by picopass and that in all subsequent calls to this function the state and mode remains unchangedTarget
No response
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: