Hi,
rfalST25xVPollerPresentPassword API from rfal_st25xv.c can be used for password management (i.e. B3h Present Password command). Unfortunately the rfalST25xVPollerWritePassword API is missing (B1h Write Password command)
In order to have the latest version of this library, I would recommend to use the ST25 Embedded NFC library: you will find the demos from the X-CUBE-NFC6 package plus some new demos, all based on the latest ST25 reader library (aka RFAL). See st25r_st25dv-i2c_ftm.c in FTM demo in the ST25 Embedded NFC lib for code example with rfalST25xVPollerPresentPassword.
For the rfalST25xVPollerWritePassword, I would propose to add the following code in rfal_st25xv.c (and related prototype in rfal_st25xv.h)
/*******************************************************************************/
ReturnCode rfalST25xVPollerWritePassword( uint8_t flags, const uint8_t* uid, uint8_t pwdNum, const uint8_t *pwd, uint8_t pwdLen)
{
uint8_t data[RFAL_ST25xV_PWDNUM_LEN + RFAL_ST25xV_PWD_LEN];
uint8_t dataLen;
uint16_t rcvLen;
rfalNfcvGenericRes res;
if( (pwdLen > RFAL_ST25xV_PWD_LEN) || (pwd == NULL) )
{
return ERR_PARAM;
}
dataLen = 0U;
data[dataLen++] = pwdNum;
if( pwdLen > 0U )
{
ST_MEMCPY(&data[dataLen], pwd, pwdLen);
}
dataLen += pwdLen;
return rfalNfcvPollerTransceiveReq( RFAL_NFCV_CMD_WRITE_PASSWORD, flags, RFAL_NFCV_ST_IC_MFG_CODE, uid, data, dataLen, (uint8_t*)&res, sizeof(rfalNfcvGenericRes), &rcvLen );
}
Let me know whether this is working properly on your side.
Thanks
Rgds
BT