User manual
SCM3712 REFERENCE MANUAL 70
8.8.1.4. Return Value
Return Value
Value
Description
ERROR _SUCCESS
0
Successful execution
ERROR_GEN_FAILURE
31
Operation failed
ERROR_INSUFFICIENT_BUFFER
122
Input or output buffer too small
8.8.2. IOCTL_INITIATOR_CONNECT
8.8.2.1. Description
This IOCTL is sent to the device that would act as the initiator. On receiving this IOCTL,
the initiator firmware / driver would
- Check whether the device is already in P2P mode.
- If not, switch the device to P2P mode automatically.
- Check if the Poll command was previously sent and target successfully
detected.
- If not, poll for wPollTimems, detect the target device and connect it.
If wPollTime parameter is non-zero, the firmware / driver would poll for the target device
for wPollTimemilliseconds. Otherwise, the firmware / driver would poll for the target device
for 3000ms.
8.8.2.2. Input Buffer
typedefstruct _INITIATOR_CONNECT_PARAMS
{
BYTE byActivePassive, // 0x00 – Passive; 0x01 – Active
BYTE byBrTy; // 0x00 – 106kbps; 0x01 – 212kbps; 0x02 – 424kbps
BYTE byNext; // b0–NFCID3 present; b1–Gi present
BYTE byNFCID3i [10]; // NFC ID of the Initiator
WORD wPollTime; // Range from 1000ms to 5000ms
BYTE byGiLen; // Length of the general bytes
BYTE byGi [48]; // Generalbytesshall be optional and designate general information
} INITIATOR_CONNECT_PARAMS, *PINITIATOR_CONNECT_PARAMS;
8.8.2.3. Output Buffer
typedefstruct _INITIATOR_CONNECT_RESP
{
BYTE byTgNum;// Logical number attributed to the activated target
BYTE byNFCID3t [10]; // Random identifier of the target
BYTE byDIDt; // DID byte sent by the target
BYTE byBSt; // Supported send-bit rate by the target
BYTE byBRt; // Supported receive-bit rate of the target
BYTE byTO; // Timeout value of the target in transport protocol
BYTE byPPt; // Optional parameters of the target