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
I'm currently working on an app that uses libnfc, and when an error occurs, I'd like to be able to send display different error messages to my users based on which error was received on the NFC device. I'm using a PN532 board. Internally, the struct appears to have a last_status_byte field containing exactly what I want, but this value is not exposed to the user anywhere that I can find. I have tried the return value from nfc_initiator_transceive_bytes ,nfc_perror, nfc_strerror, and nfc_device_get_last_error. All of them opaquely hide the actual status behind a generic -20 RF transmission error, effectively hiding useful information for seemingly no good reason.
The text was updated successfully, but these errors were encountered:
Unless I'm completely missing something, I propose adding a method uint8_t nfc_device_get_last_status(const nfc_device *pnd) which provides access to this hidden value. I'm doing this now on my fork for my purposes mentioned above. If someone knows of a better way to do this that I missed, please share.
Closed the pull request. Upon further investigation, it seems that no matter what the actual error received from the board is, libnfc always returns a 1 (ETIMEOUT). If this is a known problem, it makes sense why this feature was not available. Because it appears to be related, I think this bug should expand to cover the ETIMEOUT problem.
I'm currently working on an app that uses libnfc, and when an error occurs, I'd like to be able to send display different error messages to my users based on which error was received on the NFC device. I'm using a PN532 board. Internally, the struct appears to have a
last_status_byte
field containing exactly what I want, but this value is not exposed to the user anywhere that I can find. I have tried the return value fromnfc_initiator_transceive_bytes
,nfc_perror
,nfc_strerror
, andnfc_device_get_last_error
. All of them opaquely hide the actual status behind a generic -20 RF transmission error, effectively hiding useful information for seemingly no good reason.The text was updated successfully, but these errors were encountered: