55 #endif // HAVE_CONFIG_H
68 #define MAX_FRAME_LEN 264
70 static byte_t abtRx[MAX_FRAME_LEN];
73 static bool quiet_output =
false;
75 #define SYMBOL_PARAM_fISO14443_4_PICC 0x20
77 bool send_bytes (
const byte_t * pbtTx,
const size_t szTx)
81 printf (
"Sent data: ");
82 print_hex (pbtTx, szTx);
94 bool receive_bytes (
void)
103 printf (
"Received data: ");
104 print_hex (abtRx, szRx);
111 main (
int argc,
char *argv[])
117 ERR(
"Unable to connect to NFC device");
121 printf (
"Connected to NFC device: %s\n", pnd->
acName);
122 printf (
"Emulating NDEF tag now, please touch it with a second NFC device\n");
125 .nm.nmt = NMT_ISO14443A,
126 .nm.nbr = NBR_UNDEFINED,
127 .nti.nai.abtAtqa = { 0x00, 0x04 },
128 .nti.nai.abtUid = { 0x08, 0x00, 0xb0, 0x0b },
129 .nti.nai.btSak = 0x20,
130 .nti.nai.szUidLen = 4,
131 .nti.nai.szAtsLen = 0,
136 ERR(
"Could not come out of auto-emulation, no command was received");
141 printf (
"Received data: ");
142 print_hex (abtRx, szRx);
151 send_bytes((
const byte_t*)
"\x6a\x87",2);
155 send_bytes((
const byte_t*)
"\x6a\x87",2);
159 send_bytes((
const byte_t*)
"\x90\x00",2);
163 send_bytes((
const byte_t*)
"\x90\x00",2);
168 send_bytes((
const byte_t*)
"\x00\x0f\x10\x00\x3b\x00\x34\x04\x06\xe1\x04\x0e\xe0\x00\x00\x90\x00",17);
172 send_bytes((
const byte_t*)
"\x90\x00",2);
177 send_bytes((
const byte_t*)
"\x00\x21\x90\x00",4);
181 send_bytes((
const byte_t*)
"\xd1\x02\x1c\x53\x70\x91\x01\x09\x54\x02\x65\x6e\x4c\x69\x62\x6e\x66\x63\x51\x01\x0b\x55\x03\x6c\x69\x62\x6e\x66\x63\x2e\x6f\x72\x67\x90\x00",35);