I am writing a custom application that transfers bytes of sensor information from my own custom board to an app I am basing off of the ST25SDK (specifically V1.2.0). My application was failing to read the mailbox (yes, it's enabled) through the RF channel, failing with an "ST25SDK: transfer finished with error message".
When I download the ST25AndroidApp and compile from source, I also ran into this same error message when attempting to read a Data transfer from the tag. In looking at my debug output, it appears to be trying to read 1 less byte than I write in my embedded application.
More details: So my application writes 18 bytes of data into the Fast Mailbox. When I debug the Read from Tag command, the following line appears to read my 18 bytes written by the embedded (I2C) app.
int length = mST25DVTag.readMailboxMessageLength();
However, further down that function, when I step further into the function and enter into mST25DVTag.readMialboxMessage ...
tmpBuffer = mST25DVTag.readMailboxMessage((byte) offset, size);
I eventually run into the following line from within the library (FastTransferModeCommand.class);
return this.mIso15693CustomCommand.readMsg((byte)mbAddress, this.computeMsgLengthParam(size), flag, this.mUid);
this.computeMsgLengthParam(size) takes my 18 byte message box length, subtracts 1 and reads only 17 bytes from the message box.
Can someone help me understand why this is the case?
Could this be the source of my "transfer finished with error" message?