Skip to main content
Explorer
March 6, 2025
Solved

c# visual studio ST25R3916_Interface.cs ST25R391x_Dll.iso15693TxRxNBytes

  • March 6, 2025
  • 1 reply
  • 356 views

I'm in trouble using dll with c# for using the mailbox.

Can someone help me?

Please @Ulysses HERNIOSUS , my friend, help me! I'm pain too!

 

Here is the code:

 

private void TxRxNBytes_Click(object sender, EventArgs e) {//This is a button click event handler

    sbyte[] rx = new sbyte[512];

    //Here following is the reversed uid byte sequence compared to the one reported from software ST25PC-NFC
    byte[] uid = [0x61, 0x92, 0x74, 0xD0, 0x01, 0x24, 0x02, 0xE0];

    

    ee = ST25R391x_Dll.iso15693Select(Handle, uid);    // ee=NoError

    sbyte[] tx = { 0x10 , unchecked((sbyte)0xAA) , 0x02 , 0x06 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 };

    ee = ST25R391x_Dll.iso15693TxRxNBytes(Handle, tx, 10, rx, ref uRxDim, 1);    //    ee=NoError...

 

// ... but microcontroller hosting ST25DV04K doesn't receve the GPO signaling.
//   Instead, using software ST25PC-NFC -> Fast Transfer Mode -> WriteMessage , the microcontroller hosting

//    ST25DV04K hit an interrupt due to MB_CTRL_Dyn -> RF_PUT_MSG and reading the mail box results the  

//    exact sequence {0x01,0x02,0x03,0x04,0x05,0x06}

 

What i'm doing wrong?
Can someone help me?

 

 

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    what are the values of the GPO and GPO_CTRL_Dyn registers? is the Write Message (0xAA) command successful, if not, what is the return code? Be aware that "MSGlength" parameter of the command is the number of Data bytes minus 1 (see §7.6.31 Write Message in the Datasheet). So, the MSGLength should be 05 for "01 02 03 04 05 06"

    Rgds

    BT

     

    1 reply

    Technical Moderator
    March 6, 2025

    Hi,

    what are the values of the GPO and GPO_CTRL_Dyn registers? is the Write Message (0xAA) command successful, if not, what is the return code? Be aware that "MSGlength" parameter of the command is the number of Data bytes minus 1 (see §7.6.31 Write Message in the Datasheet). So, the MSGLength should be 05 for "01 02 03 04 05 06"

    Rgds

    BT