AnsweredAssumed Answered

Problem with NxpRdLib, initialization

Question asked by Stéphane Joly on Sep 19, 2019
Latest reply on Oct 9, 2019 by Stéphane Joly

Hello,

I'm developing a software in C++ on Windows to program the Ntag424DNA.

I'm using NxpRdLib_v14.1.0.1907, dll from folder NxpRdLib_v14.1.0.1907\NxpRdLib\Public\lib_x86\2010\debug

 

I'm blocked after the first initialization phbalReg_PcscWin_Init.

It returns Status 0x0120 =  PH_COMP_BAL + PH_ERR_INVALID_DATA_PARAMS

It must be an error with the size of wSizeOfDataParams, but I wonder what might be wrong.

 

Here is my very basic code:

    uint8_t      myAtr[256];
    phStatus_t   status;
    phbalReg_PcscWin_DataParams_t   balPcsc;

 

    uint16_t size = sizeof(phbalReg_PcscWin_DataParams_t);

 

    //Initialize the Reader (BAL)
    status = phbalReg_PcscWin_Init(
        &balPcsc,                                // [In] Pointer to this layer's parameter structure.
        sizeof(phbalReg_PcscWin_DataParams_t),   // [In] Specifies the size of the data parameter structure.
        myAtr,                                   // [In] Pointer to buffer used for storing the ATR after card activation.
        sizeof(myAtr)                            // [In] Size of the ATR buffer.
        );

 

Any clue what could go wrong ?

Thanks and Regards, Stéphane

Outcomes