nfc-sam: added some config operations.
This commit is contained in:
parent
f748ec1c59
commit
e6d96333f7
1 changed files with 16 additions and 0 deletions
|
@ -124,6 +124,22 @@ int main(int argc, const char* argv[])
|
|||
{
|
||||
nfc_target_info_t nti;
|
||||
|
||||
// Set connected NFC device to initiator mode
|
||||
nfc_initiator_init(pnd);
|
||||
|
||||
// Drop the field for a while
|
||||
nfc_configure(pnd,NDO_ACTIVATE_FIELD,false);
|
||||
|
||||
// Let the reader only try once to find a tag
|
||||
nfc_configure(pnd,NDO_INFINITE_SELECT,false);
|
||||
|
||||
// Configure the CRC and Parity settings
|
||||
nfc_configure(pnd,NDO_HANDLE_CRC,true);
|
||||
nfc_configure(pnd,NDO_HANDLE_PARITY,true);
|
||||
|
||||
// Enable field so more power consuming cards can power themselves up
|
||||
nfc_configure(pnd,NDO_ACTIVATE_FIELD,true);
|
||||
|
||||
// Read the SAM's info
|
||||
if (!nfc_initiator_select_tag(pnd,NM_ISO14443A_106,NULL,0,&nti)) {
|
||||
ERR("%s", "Reading of SAM info failed.");
|
||||
|
|
Loading…
Add table
Reference in a new issue