parent
02cf0b3d60
commit
a2b022609f
8 changed files with 13 additions and 13 deletions
|
@ -108,7 +108,7 @@ target_io( nfc_target *pnt, const uint8_t *pbtInput, const size_t szInput, uint8
|
||||||
case 0xe0: // RATS (ISO14443-4)
|
case 0xe0: // RATS (ISO14443-4)
|
||||||
// Send ATS
|
// Send ATS
|
||||||
*pszOutput = pnt->nti.nai.szAtsLen + 1;
|
*pszOutput = pnt->nti.nai.szAtsLen + 1;
|
||||||
pbtOutput[0] = pnt->nti.nai.szAtsLen + 1; // ISO14443-4 says that ATS contains ATS_Lenght as first byte
|
pbtOutput[0] = pnt->nti.nai.szAtsLen + 1; // ISO14443-4 says that ATS contains ATS_Length as first byte
|
||||||
if(pnt->nti.nai.szAtsLen) {
|
if(pnt->nti.nai.szAtsLen) {
|
||||||
memcpy(pbtOutput+1, pnt->nti.nai.abtAts, pnt->nti.nai.szAtsLen);
|
memcpy(pbtOutput+1, pnt->nti.nai.abtAts, pnt->nti.nai.szAtsLen);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ nfc-emulate-uid \- NFC target emulation command line tool based on libnfc
|
||||||
.RI [ UID ]
|
.RI [ UID ]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B nfc-emulate-uid
|
.B nfc-emulate-uid
|
||||||
is a tag emulation tool that allows to choose any tag UID. Tag emulation is one
|
is a tag emulation tool that allows one to choose any tag UID. Tag emulation is one
|
||||||
of the main added features in NFC. But to avoid abuse of existing systems,
|
of the main added features in NFC. But to avoid abuse of existing systems,
|
||||||
manufacturers of the NFC controller intentionally did not support emulation of
|
manufacturers of the NFC controller intentionally did not support emulation of
|
||||||
fully customized UID but only of "random" UIDs, which always start with 0x08.
|
fully customized UID but only of "random" UIDs, which always start with 0x08.
|
||||||
|
|
|
@ -76,8 +76,8 @@
|
||||||
/** @note PN53x's normal frame:
|
/** @note PN53x's normal frame:
|
||||||
*
|
*
|
||||||
* .-- Start
|
* .-- Start
|
||||||
* | .-- Packet lenght
|
* | .-- Packet length
|
||||||
* | | .-- Lenght checksum
|
* | | .-- Length checksum
|
||||||
* | | | .-- Direction (D4 Host to PN, D5 PN to Host)
|
* | | | .-- Direction (D4 Host to PN, D5 PN to Host)
|
||||||
* | | | | .-- Code
|
* | | | | .-- Code
|
||||||
* | | | | | .-- Packet checksum
|
* | | | | | .-- Packet checksum
|
||||||
|
@ -91,8 +91,8 @@
|
||||||
*
|
*
|
||||||
* .-- Start
|
* .-- Start
|
||||||
* | .-- Fixed to FF to enable extended frame
|
* | .-- Fixed to FF to enable extended frame
|
||||||
* | | .-- Packet lenght
|
* | | .-- Packet length
|
||||||
* | | | .-- Lenght checksum
|
* | | | .-- Length checksum
|
||||||
* | | | | .-- Direction (D4 Host to PN, D5 PN to Host)
|
* | | | | .-- Direction (D4 Host to PN, D5 PN to Host)
|
||||||
* | | | | | .-- Code
|
* | | | | | .-- Code
|
||||||
* | | | | | | .-- Packet checksum
|
* | | | | | | .-- Packet checksum
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start bytes, packet lenght, lenght checksum, direction, packet checksum and postamble are overhead
|
* Start bytes, packet length, length checksum, direction, packet checksum and postamble are overhead
|
||||||
*/
|
*/
|
||||||
// The TFI is considered part of the overhead
|
// The TFI is considered part of the overhead
|
||||||
# define PN53x_NORMAL_FRAME__DATA_MAX_LEN 254
|
# define PN53x_NORMAL_FRAME__DATA_MAX_LEN 254
|
||||||
|
|
|
@ -508,7 +508,7 @@ acr122_usb_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, c
|
||||||
0x00, // len
|
0x00, // len
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // padding
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // padding
|
||||||
0xff, 0x00, 0x00, 0x00,
|
0xff, 0x00, 0x00, 0x00,
|
||||||
0x00, // pn532 command lenght
|
0x00, // pn532 command length
|
||||||
0xd4, // direction
|
0xd4, // direction
|
||||||
};
|
};
|
||||||
size_t szFrame = acr122_build_frame (abtFrame, sizeof(abtFrame), pbtData, szData);
|
size_t szFrame = acr122_build_frame (abtFrame, sizeof(abtFrame), pbtData, szData);
|
||||||
|
|
|
@ -91,7 +91,7 @@ uint8_t nfcforum_capability_container[] = {
|
||||||
// Notes:
|
// Notes:
|
||||||
// - I (Romuald) don't know why Nokia 6212 Classic refuses the NDEF message if MLe is more than 0xFD (any suggests are welcome);
|
// - I (Romuald) don't know why Nokia 6212 Classic refuses the NDEF message if MLe is more than 0xFD (any suggests are welcome);
|
||||||
// - ARYGON devices doesn't support extended frame sending, consequently these devices can't sent more than 0xFE bytes as APDU, so 0xFB APDU data bytes.
|
// - ARYGON devices doesn't support extended frame sending, consequently these devices can't sent more than 0xFE bytes as APDU, so 0xFB APDU data bytes.
|
||||||
// - I (Romuald) don't know why ARYGON device doesn't ACK when MLe > 0x54 (ARYGON frame lenght = 0xC2 (192 bytes))
|
// - I (Romuald) don't know why ARYGON device doesn't ACK when MLe > 0x54 (ARYGON frame length = 0xC2 (192 bytes))
|
||||||
0x00, 0xFF, /* MLc Maximum C-ADPU data size */
|
0x00, 0xFF, /* MLc Maximum C-ADPU data size */
|
||||||
0x04, /* T field of the NDEF File-Control TLV */
|
0x04, /* T field of the NDEF File-Control TLV */
|
||||||
0x06, /* L field of the NDEF File-Control TLV */
|
0x06, /* L field of the NDEF File-Control TLV */
|
||||||
|
|
|
@ -8,7 +8,7 @@ nfc-mfultralight \- MIFARE Ultralight command line tool
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B nfc-mfultralight
|
.B nfc-mfultralight
|
||||||
is a MIFARE Ultralight tool that allows to read or write
|
is a MIFARE Ultralight tool that allows one to read or write
|
||||||
a tag data to/from a
|
a tag data to/from a
|
||||||
.IR DUMP
|
.IR DUMP
|
||||||
file.
|
file.
|
||||||
|
|
|
@ -273,7 +273,7 @@ main(int argc, char *argv[])
|
||||||
fprintf (message_stream, "NFC Forum Tag Type 3 capacity: %d bytes\n", available_block_count * 16);
|
fprintf (message_stream, "NFC Forum Tag Type 3 capacity: %d bytes\n", available_block_count * 16);
|
||||||
|
|
||||||
uint32_t ndef_data_len = (data[11] << 16) + (data[12] << 8) + data[13];
|
uint32_t ndef_data_len = (data[11] << 16) + (data[12] << 8) + data[13];
|
||||||
fprintf (message_stream, "NDEF data lenght: %d bytes\n", ndef_data_len);
|
fprintf (message_stream, "NDEF data length: %d bytes\n", ndef_data_len);
|
||||||
|
|
||||||
uint16_t ndef_calculated_checksum = 0;
|
uint16_t ndef_calculated_checksum = 0;
|
||||||
for (size_t n = 0; n < 14; n++)
|
for (size_t n = 0; n < 14; n++)
|
||||||
|
|
|
@ -46,10 +46,10 @@ Remote relay over TCP/IP:
|
||||||
|
|
||||||
\fBsocat\fP
|
\fBsocat\fP
|
||||||
TCP-LISTEN:port,reuseaddr
|
TCP-LISTEN:port,reuseaddr
|
||||||
"EXEC:\fBnfc-relay-picc -i\fP,fdin=3,fdout=4"
|
"EXEC:\fBnfc-relay-picc \-i\fP,fdin=3,fdout=4"
|
||||||
\fBsocat\fP
|
\fBsocat\fP
|
||||||
TCP:remotehost:port
|
TCP:remotehost:port
|
||||||
"EXEC:\fBnfc-relay-picc -t\fP,fdin=3,fdout=4"
|
"EXEC:\fBnfc-relay-picc \-t\fP,fdin=3,fdout=4"
|
||||||
|
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
There are some differences with \fBnfc-relay\fP:
|
There are some differences with \fBnfc-relay\fP:
|
||||||
|
|
Loading…
Add table
Reference in a new issue