2024-07-10 08:08 AM - edited 2024-07-10 08:11 AM
Hi,
I rarely see that the api rfalNfcvPollerExtendedReadMultipleBlocks() returns RFAL_ERR_WRONG_STATE .
When will this api return this error code ?
My state machine is as follows:
while(1)
{
rfalNfcDiscover();
rfalNfcGetActiveDevice()
rfalNfcDeactivate(RFAL_NFC_DEACTIVATE_IDLE)
rfalFieldOnAndStartGT()
rfalNfcvPollerExtendedReadMultipleBlocks()
rfalFieldOff()
}
All apis return RFAL_ERR_NONE when the issue happens, other than "read extended multiple blocks" api ..
Solved! Go to Solution.
2024-07-11 12:43 AM
Hello Jack5,
in your user code you should not be calling rfalFieldOnAndStartGT() and rfalFieldOff(), these two functions are handled inside rfalNfc layer. When being notified about found tags your code should get the rfalNfcGetDevicesFound(), then rfalNfcSelect() one and then you can start data exchange (either through rfal_nfc layer but it is also o.k in this state to bypass by using rfalNfcvPoller*() functions.
BR, Ulysses
2024-07-11 12:43 AM
Hello Jack5,
in your user code you should not be calling rfalFieldOnAndStartGT() and rfalFieldOff(), these two functions are handled inside rfalNfc layer. When being notified about found tags your code should get the rfalNfcGetDevicesFound(), then rfalNfcSelect() one and then you can start data exchange (either through rfal_nfc layer but it is also o.k in this state to bypass by using rfalNfcvPoller*() functions.
BR, Ulysses