cancel
Showing results for 
Search instead for 
Did you mean: 

C# Application for STEVAL-25R3916BA using ST25R3916DISCOComm.dll

_JJ_
Associate II

Hello

I have been trying to develop a GUI App to communicate with STEVAL-25R3916BA to read & write ISO15693 Tag Type-V. So far with reference from similar other questions asked previously on this forum I have been able to connect to EVAL board and at least read UID of the tag. This I was able to achieve thanks to response from @Ulysses HERNIOSUS responses. To achieve this I have used the example application comes with ST25PC-NFC & ST25 SDK.

 

The example project from ST. for C# does not have read/write example, I have tried my best to perform read/write using APIs from ST25R3916DISCOComm DLL, but so far no success, APIs comes back with no error & no data, if there is no error then why no data? 

I am trying to use iso15693ReadBlock & iso15693WriteBlock from DLL, and I have used ST25PC-NFC to write 0xFF to whole memory of Tag type-V, so I know what I'm reading is okay, as currently API for reading just reads 0 with no error! So I'm not sure if I'm doing anything wrong.

Based on another question (can't find the link), I have explored F/W code as well, dispatcher.c and en.steval-25r3916b-binary\STSW_ST25R018\Middlewares\ST\fw_3916\DISCO-STM32L4x6\Src\iso15693_3.c which defines 

iso15693ReadMultipleBlocks & iso15693WriteMultipleBlocks but based on my investigation on ST25R3916DISCOComm.dll does not have this APIs exported, Am I wrong here? I'm really confused!
(The same Multi-Block Read/Write APIs I can see being called from the console logs of ST25PC-NFC application.)

 I feel like I'm lost in this development, any direction & help would much appreciated.

 

BR

JJ

BR
JJ
12 REPLIES 12
_JJ_
Associate II

Hello again @Ulysses HERNIOSUS 

 

Thank you for your help so far, as per your suggestion I have been trying to build custom commands, in order to do that I am using ST25PC-NFC tool's Frame Builder, as I am only interested for ISO15693 for me it is Iso15693FrameBuilder tab. Again to start simply, to understand how to use iso15693TxRxNBytes() I am just trying to send Get-System-Info of the tag. So I built a frame using the tool and tried the same via tool to make sure I'm not sending any nonsense command, it works fine.

_JJ__0-1712748694674.png

I am sending the same frame via my program, but it is ending up in an ERROR 01, with Error code 02 Command not recognised (format error). Remaining two bytes are CRC16 (X-25).

_JJ__1-1712749468731.png

As I was not getting expected results I started retrospection of what could be wrong, every single time I was ending up doubting on Request_Flag byte, which is common input for any command, I started playing around it, tried to generate possible values via ST215PC-NFC tool, tried to execute it on tool, and then use the same Request Flag value to see if works on my program, but no success so far.

My code to send Get-Sys-Info command:

_JJ__2-1712749951534.png

For, CRC-16, in snippet it shows as ZERO, as I have left it like that, in other case I have calculated CRC16/X-25 and provided as part of command, in both case it has failed with the same Error Code. I have also maximised the timeout.

Could you please guide me, what am I missing here?

 

BR
JJ

Hi JJ,

With the API that you are using you should not use the CRC, it will be automatically generated inside firmware and appended. In your case you would end up with two extra data bytes followed by the real CRC.

AFAIK anyhow the firmware will adapt the Request Flag to fit the physical comm params - One subcarrier + high data rate, so your pre-calculated CRC would even be incorrect.

Only with the Physiscal variant (iso15693PhyTxRxNBytes) you need to supply a pre-calculated CRC.

BR, Ulysses

_JJ_
Associate II

Just Brilliant @Ulysses HERNIOSUS 

I have tried multiple custom commands based on your suggestion and it is working very well! I can not thank you enough for your help & guidance on this. Without it it'd be not possible to get to this stage for me.

Keep helping the community, Cheers!

BR
JJ