2022-07-04 8:16 PM
Hello,
We currently have a desktop application based on C# for communicating between ST25R3911B-DISCO board and ST25DV dynamic tag. The application itself is similar to ST PC software for ST25R3911B-DISCO board but with limited functionalities as currently we only need Fast Transfer Mode for communication.
My PC software based on C# is able to perform inventory discovery successfully, and is also able to read the data from mailbox (verified by writing data to mailbox using ST software and reading data by using C# software). But issue arrives when i try to perform Mailbox write operation, the error returned is invalid command code for write operation. I looked at the ST25DV datasheet for RF commands and frame formats also the logs of the ST PC software to understand how the write operation data frame is transmiited but that's different from the data frame that's sent from my application. There are files in my project which adds the protocol header to data frame.
So can anyone please help me what could be the issue here. I have added the payload that sent from my application to ST25DV dynamic tag for both read and write operation below:
Here is the frame format that's sent for read operation which is working:
READ:
--------------------
0F-15-00-44-00-10-04-40-DE-00-0C-22-AC-02-81-38-3F-05-00-25-02-E0-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
1st byte is counter
AC - read cmd
Here is the frame format that's sent for write operation which is not working and throwing error of invalid cmd:
WRITE :
--------------------
01-18-00-44-00-13-04-40-DE-00-0C-22-AA-02-81-38-3F-05-00-25-02-E0-04-FF-FF-FF-FF-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
1st byte is counter
AA - write cmd
04 - data length
FF-FF-FF-FF - data
NOTES:
In both write and read packets, (4-5)bytes before CMD code is same (i.e "40-DE-00-0C-22") and bytes after CMD code is same (i.e "02-81-38-3F-05-00-25-02-E0")
So can you please let me know what could be the possible reason why i am getting this invalid command error, although my command is right.
Solved! Go to Solution.
2022-07-05 2:13 AM
okay thanks.
2022-07-05 2:30 AM
Hello,
when i send the corrected data frame 02-18-00-44-00-13-04-40-DE-00-0C-22-AA-02-81-38-3F-05-00-25-02-E0-03-FF-FF-FF-FF-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
i still get the error but this time it says "ERROR NO_INFO".
I have also attached the image for the same :
2022-07-05 2:36 AM
When i modify the length of the data to 3 instead of 4, i get the error as "ERROR_NO_INFO".
Attached the image of the response received :
2022-07-05 2:43 AM
Hi Nikhil,
See 7.6.31 Write Message in the ST25DV datasheet:
"Write Message could be executed only when Mailbox is accessible by RF (fast transfer mode is enabled, previous RF message was read or time-out occurs, no I2C message to be read). User can check it by reading b1 of MB_CTRL_Dyn “HOST_PUT_MSG�? which must be reset to “0�?.
Rgds
BT
2022-07-05 3:09 AM
Hello Brian,
The FTM mailbox is enabled and also have read the MB_CTRL_Dyn register and HOST_PUT_MSG is 0.
I again try to transmit data but still the same error exist (i.e ERROR_NO_INFO).
I have attached the FTM configuration register read value:
2022-07-05 4:38 AM
Hi,
see Table 19. MB_CTRL_Dyn and 5.1.2 Fast transfer mode usage in the ST25DV datasheet. There is already an existing message in your Mailbox. "Adding a message is only possible when fast transfer mode is enabled (MB_EN=1) and mailbox is free (HOST_PUT_MSG and RF_PUT_MSG cleared)." Make sure to empty the mailbox before writing a message. For your tests, you can use the ST25 tag editor GUI to reset the MB_CTRL_Dyn by writing 00 and then 01. You can also use the ST25 tag editor GUI to do some tests with the Write Message command.
Rgds
BT
2022-07-05 5:03 AM
Okay thanks. Got it working.