nfc_tag_transceive()

Write a command to one of the following connections: ISO 14443, ISO 15693, or ISO 18092.

Synopsis:

#include <nfc/nfc.h>
 
NFC_API nfc_result_t nfc_tag_transceive(const nfc_target_t *tag, nfc_tag_type_t type, const uchar_t *command, size_t command_length, uchar_t *response, size_t max_response_length, size_t *response_length)

Since:

BlackBerry 10.0.0

Arguments:

tag

The tag returned from the nfc_get_target() function.

type
The type of tag to write to. This must be one of the following types:
command

A pointer to the buffer holding the command to be sent.

command_length

The length of the command buffer.

response

A pointer to a preallocated response buffer.

max_response_length

The length of the preallocated response buffer. The maximum length cannot be larger than the size of NFC_TRANSCEIVE_RESPONSE_MAX_BUFFER_LENGTH.

response_length

The length of the response copied into the response buffer.

Library:

libnfc (For the qcc command, use the -l nfc option to link against this library)

Description:

This function writes a command to one of the following connections: ISO 14443, ISO 15693, or ISO 18092.

  • Feature set 1: When using an ISO 14443-3 connection, short frames (four bits representing ACK/NACK status) returned from the tag are not returned in the response buffer. They are mapped into the return code.
  • Feature set 2: When using an ISO 14443-3 connection, short frames (four bits representing ACK/NACK status) returned from the tag are returned in the response parameter and the response_length parameter is set to 1. The short frames are not mapped into the return code.

Returns:

NFC_RESULT_SUCCESS, or one of the following:

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus