2021-02-11 05:29 PM
Currently I am working on a project that uses the UHF RFID evaluation board ST25RU3993-HPEV, which is controlled by STM32L476RG.
For my project, I want to use Raspberry Pi to communicate with the evaluation board, so the use of Python is required. However, the Python code, according to ST, is still under development.
So I am wondering how I can approach this or if anyone has worked on this before? Appreciate all your kind support.
Solved! Go to Solution.
2021-05-03 09:10 AM
Hello,
good news !!!
The STUHFL 3.0.0 has been updated on st.com with the missing makefile.
As mentioned in previous message, first update libPath and copy all python files to raspberry file system.
Then generate STUHFL.so on Linux machine (as described in ./Documents/Middleware-ReleaseNote.txt).
Run python demo on raspberry.
CAUTION: please ensure python version being used on raspberry is above 3.6.
best regards,
Cedric.
2021-05-05 03:26 AM
Hi @Cedric Dalban
I have generated the *.so file on my raspberry:
For loading the libSTUHFL.so, i fixed the path, see picture below:
My python version is 3.7
I run the python demo by command : $ sudo python3 STUHFL_demo.py
it is able to connect to reader, read and write registers.
but the errors are kicked in after that:
************************************
* INVENTORY RUNNER DEMO
Tuning: ANTENNA_0, Algo: 3
Freq: 865700, cin:0, clen:0, cout:0
************************************
* GEN2 INVENTORY DEMO
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 232, in 'calling callback function'
File "../../../../Middleware/wrapper/python/STUHFL.py", line 2812, in inventoryFinishedCallback
Tuning: ANTENNA_0, Algo: 3
Freq: 865700, cin:0, clen:0, cout:0
************************************
* GEN2 GENERIC COMMAND DEMO
AttributeError: 'function' object has no attribute '_ICycleData__StatisticsFromNative'
Tuning: ANTENNA_0, Algo: 3
Freq: 865700, cin:0, clen:0, cout:0
No Tag (4294967289)
************************************
the full error log can be found here : https://drive.google.com/file/d/1bcaiQ-A45VlXVX6K6hgSB4BzTj8bt7NE/view?usp=sharing
Please help us.
Thanks a lot
2021-05-05 05:35 AM
Hello Vmai,
looking at your traces:
LIB:.3.0.0.0
Board SW:.0.0.0.0
Board HW:.0.0.0.0
it seems the communication between the library and the board has simply not been established (even more the read registers should not be all 0x00 ...)
Indeed, LIB reports 3.0.0.0 means the communication between the wrapper and lib is OK,
but Board SW/HW versions should be also 3.0.0.0 which would mean communication between lib and board is OK, that is not currently the case (versions are 0.0.0.0).
For the time being, I don't think Python is involved in the problem, you have a problem establishing connection with your board ...
Could you please try to run the Linux demo (cf Application-ReleaseNote.txt) which would ensure connections with board is OK ?
regards,
Cedric.
2021-05-05 08:53 AM
Hi @Cedric Dalban
my connection as below, could you please confirm :
2021-05-06 01:10 AM
hello Vmai,
at first sight your setup seems to be ok.
It is anyway recommended to add a power supply connected to the HPEV board.
At least your setup should reply with correct Board SW & HW versions.
2 points:
regards,
Cedric.
2021-05-06 09:30 AM
Hello Vmai,
I confirm that:
allows the connection between library and board to establish.
With these 3 listed modifications, the Python wrapper demo runs and completes correctly in Linux environment.
For the time being, the Python & java wrappers provided with release 3.0.0 have only been tested on Windows, the next release will ensure at least these 2 wrappers are correctly handled on Linux.
best regards,
Cedric.
2021-05-07 02:57 AM
Hi @Cedric Dalban
Thanks for your support.
Following your instruction, the python code is able to execute on my raspi without error.
you can see the log here : https://drive.google.com/file/d/188APc4586qijd9rovGrYNphe1QyF9oSZ/view?usp=sharing
thanks
Viet
2021-07-27 09:44 AM
@Cedric Dalban
I am getting this error
when I try to run the python wrapper. I have rebuilt the STUHFL.dll several times in VS2019, and have copied it and added it to many paths in my pycharm IDE. I am running SDK 3.0.0.0
Can you provide feedback?
Thanks