2021-03-04 08:15 AM
Hi,
I'm using CR95HF transceiver board for FTM communication with ST25DV64K tag. I've set up python script with ctypes module to use CR95HF.dll.
Everything works fine until I try to write and read longer messages in mailbox. For some strange reason, if i write msg of 105 bytes of data, mailbox length returns correct message length, but if I try to read the same data i get only 126 characters (63 bytes).
I've checked, by reading mailbox in parts, that first 126 characters are valid, but rest of it contains random characters.
I'm working with CR95HF.dll rev. 1.2 and MCU FW 3.7.1, so according to datasheets it should easily cover messages up to 256 bytes of data.
Do You have any idea what can be a root cause here?
I've already tried:
Solved! Go to Solution.
2021-03-05 07:38 AM
Hi
I believe I've reproduced your issue with the PC software executable for DEMO-CR95HF-A board. This needs further investigation but likely an issue with the CR95HF.DLL.
I'll keep you posted.
Rgds
BT
2021-03-05 11:57 AM
Hi,
thank You for sparing some time to reproduce this issue. I assume you've already checked that, but anyway:
I've tried both 10% and 100% modulation,
reading explicitly 69h bytes of data gives the same, corrupted results.
About the DLL itself, is there anything we can do to fix this bug (if it's really a bug)?
2021-03-08 07:20 AM
Hi,
can you make sure you are using the correct version of the CR95HF DLL. I've reproduced your issue with version 0.9 of this DLL but I do not face any issue with version 1.2.
Can you make sure that you do not have an old version of DLL in you path that would be used instead of version 1.2?
Since I've reinstalled the STSW-95HF001 package, I use DLL version 1.2 and this is working properly.
The DLL should be in C:\Program Files (x86)\CR95HF_Development_Software\CR95HF DLL 1.2 package and the modification date is 1/23/2017 4:58PM. CR95HFDll_GetDLLrev should return 1.2:
03-08-2021 >>> CR95HFDLL_GETDLLREV
<<< 1.2
Here are the results of the various command:
03-08-2021 16:23:36 READ DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AD020D
<<< 80050000470F00
03-08-2021 16:23:49 WRITE DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AE020D01
<<< 80040078F000
03-08-2021 16:23:56 READ DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AD020D
<<< 80050001CE1E00
03-08-2021 16:32:53 WRITE MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AA0269000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263646566676869
<<< 80040078F000
03-08-2021 16:32:59 READ DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AD020D
<<< 80050085E2DC00
03-08-2021 16:33:13 READ MESSAGE LENGTH (MB_LEN_Dyn)
>>> CR95HFDLL_SENDRECEIVE, 02AB02
<<< 8005006980F100
03-08-2021 16:33:43 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC020069
<<< 806E00000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768697A9600
03-08-2021 16:34:14 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC02201F
<<< 802400202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3FF62200
03-08-2021 16:34:21 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC02001F
<<< 802400000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1FA61D00
03-08-2021 16:34:25 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC02401F
<<< 802400404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F066300
03-08-2021 16:34:55 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC026009
<<< 800E0060616263646566676869A66400
Rgds
BT
2021-03-08 09:52 AM
Hi,
I was almost sure, but wanted to verify again - the one I'm using is 1.2 with the same modification date.
I extracted dll from that package and put it in a separate folder.
Additionally, I'm checking dll rev in the script by using mentioned DLL's function.
Still, the same issue, even when I try to read exactly 69h bytes of data I get only 3Dh.
Unfortunately, I wasn't able to use these commands in win app yet. I'll try to do it this evening.
2021-03-08 10:09 AM
Hi,
the PC software executable for DEMO-CR95HF-A board has an ISO15693-->Dynamic NFC Tags-->ST25DVxxK menu where you can easily send Read Message / Write Message / Read MB_Ctrl_Dyn command. Use the Inentory tab (click on Anticollision to find your tag) then go to FTM tab.
You can also go in the Toolbox menu and check the DLL version. If you still have issue, try un uninstall and then re-install .
Rgds
BT
2021-03-08 02:55 PM
Hi,
maybe I'm doing something differently or I missed something...
I've tried to connect via PC software executable for DEMO-CR95HF-A board and done these steps:
This is what I've got:
03-08-2021 23:23:19 WRITE MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AA020000
<<< 8005010F68EE00
Going through a shorter route: Inventory->Write msg, gives the same result 010F.
Could You share Your's log file from CR95HF app?
2021-03-09 01:55 AM
Hi,
I have the following setup:
In you steps, before step #7, you need to set MB_EN=1 in MB_CTRL_Dyn. Otherwise writing will be prohibited.
Also make sure to read the MB status in MB_CTRL_Dyn before reading the MB or writing the MB (RF is not allowed to write the MB until it is freed i.e. read by I2C or the watchdog has elapsed).
Here is my log:
03-09-2021 10:51:21 ANTICOLLISION
>>> CR95HFDLL_STCMD, 02A00126
<<< 800A0100A1813905002502E0
03-09-2021 10:51:21 RESET TO READY
>>> CR95HFDLL_SENDRECEIVE, 0226
<<< 80040078F000
03-09-2021 10:51:29 PRESENT PASSWORD
>>> CR95HFDLL_SENDRECEIVE, 02B302000000000000000000
<<< 80040078F000
03-09-2021 10:51:50 WRITE CONFIGURATION (STATIC REGISTER)
>>> CR95HFDLL_SENDRECEIVE, 02A1020D01
<<< 80040078F000
03-09-2021 10:51:54 READ CONFIGURATION (STATIC REGISTER)
>>> CR95HFDLL_SENDRECEIVE, 02A0020D
<<< 80050001CE1E00
03-09-2021 10:52:02 READ DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AD020D
<<< 80050000470F00
03-09-2021 10:52:08 WRITE DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AE020D01
<<< 80040078F000
03-09-2021 10:52:12 READ MESSAGE LENGTH (MB_LEN_Dyn)
>>> CR95HFDLL_SENDRECEIVE, 02AB02
<<< 80050000470F00
03-09-2021 10:52:17 READ DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AD020D
<<< 80050001CE1E00
03-09-2021 10:53:44 WRITE MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AA0269000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263646566676869
<<< 80040078F000
03-09-2021 10:53:51 READ DYNAMIC CONFIGURATION (MB_CTRL_Dyn @0x0D)
>>> CR95HFDLL_SENDRECEIVE, 02AD020D
<<< 80050085E2DC00
03-09-2021 10:53:55 READ MESSAGE LENGTH (MB_LEN_Dyn)
>>> CR95HFDLL_SENDRECEIVE, 02AB02
<<< 8005006980F100
03-09-2021 10:53:57 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC020000
<<< 806E00000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768697A9600
03-09-2021 10:54:20 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC02001F
<<< 802400000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1FA61D00
03-09-2021 10:54:28 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC02201F
<<< 802400202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3FF62200
03-09-2021 10:54:33 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC02401F
<<< 802400404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F066300
03-09-2021 10:54:48 READ MESSAGE (MB_Dyn Bytes)
>>> CR95HFDLL_SENDRECEIVE, 02AC026009
<<< 800E0060616263646566676869A66400
Rgds
BT
2021-03-09 02:20 AM
Hi,
following Your guide I was able to send and read single msg in windows app. Unfortunatelly, supposedly I cannot write MB message longer than 56 bytes with this board:
Could it be, that ST sells this kit with 2 different IC's?
Ok, I checked that IC FS2JAST2 is obsolete and I found that You wrote in another topic that board with rev. B has correct IC- FS2JAST4.
IDN command confirms that:
I'll try again 😉
2021-03-09 04:43 AM
Hi,
do you mean you have several M1054 boards, one has QJC and another one has QJE?
Rgds
BT
2021-03-09 05:58 AM
Hi,
no, I have a board labeled MB1054 B-02 A20080013. This board was once recognized as QJC.
I have uninstalled and installed again windows app (4th time 🙂 ) and for now board is being recognized properly.
I'm trying to automate all commands using built-in script tool. Strangely enough, while most of the time I don't get all data from MB - I was able to get full command from mailbox 2 times(in about 100 tries). I'll test it more tonight. Hopefully I'll find the golden sequence 🙂
Side note, I tried to do everything manually, but by the time I write whole message in this box:EH_Dyn_Reg VCC bit goes to 0 and my tag is no longer in FTM mode(as I said, it has a very aggressive power saving management).