cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3911B + ST25 SDK + Raspberry Pi

Amir Ben Ari
Associate II
Posted on April 29, 2018 at 16:15

Hi,

I'm having trouble working with ST25R3911B while its connected to a Raspberry Pi.

My need is to have a program that can read/pool on the ST25 to read RFID tags if they are present.

I've downloaded the ST25 SDK and created a Java application according to the provided examples, compiled successfully.

The problem is that the libraries provided with the SDK for Linux are 64 bit, while RPI are arm32v7, not arm64.

At first, I got the following exception:

Java HotSpot(TM) Client VM warning: You have loaded library /usr/lib/libhidapi-libusb.so which might have disabled stack guard. The VM will try to fix the stack guard now.

It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

Exception in thread 'main' java.lang.UnsatisfiedLinkError: /usr/lib/libhidapi-libusb.so: /usr/lib/libhidapi-libusb.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)

I've managed to build and install libhidapi-libusb with apt-get install 

libhidapi-libusb0 and was probably able to correctly load the libraries as the exception was gone.

But.. the following message I couldn't do the same, as streader.so is built for 64bit and I have no way to build/install it myself. What should I do?

Java HotSpot(TM) Client VM warning: You have loaded library /home/pi/ST25SDK-1.1.0/readers/st/resources/linux/x64/streader.so which might have disabled stack guard. The VM will try to fix the stack guard now.

 

It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

 

Exception in thread 'main' java.lang.UnsatisfiedLinkError: /home/pi/ST25SDK-1.1.0/readers/st/resources/linux/x64/streader.so: /home/pi/ST25SDK-1.1.0/readers/st/resources/linux/x64/streader.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)

 

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

 

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)

 

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)

 

at java.lang.Runtime.load0(Runtime.java:809)

 

at java.lang.System.load(System.java:1086)

 

at com.st.st25pc.model.readers.st.STReader.<init>(STReader.java:85)

 

at freshkeep.rfid.Main.main(Main.java:31)
1 ACCEPTED SOLUTION

Accepted Solutions
Damien G.
ST Employee
Posted on April 30, 2018 at 16:08

Hello Amir,

sorry for the time you spent on this issue. The ST25R3911B-Disco board is not supported on Linux.

Dynamically linked library 'streader.so' manages both ST25R3911-Disco and CR95HF reference boards.

The SDK v1.1.0 only supports the cr95hf reference board in 64-bit Linux.

The information is buried in the readme.txt located in folder \integration\pc\examples\st25PcDemoApp\exe\.

We can provide a 32-bit Linux version of the streader.so for the CR95HF reader if you are interested.

Other options exist also if you want to use the ST25R3911 circuit.

Best regards

View solution in original post

4 REPLIES 4
Damien G.
ST Employee
Posted on April 30, 2018 at 16:08

Hello Amir,

sorry for the time you spent on this issue. The ST25R3911B-Disco board is not supported on Linux.

Dynamically linked library 'streader.so' manages both ST25R3911-Disco and CR95HF reference boards.

The SDK v1.1.0 only supports the cr95hf reference board in 64-bit Linux.

The information is buried in the readme.txt located in folder \integration\pc\examples\st25PcDemoApp\exe\.

We can provide a 32-bit Linux version of the streader.so for the CR95HF reader if you are interested.

Other options exist also if you want to use the ST25R3911 circuit.

Best regards

Gidi
ST Employee
Posted on May 01, 2018 at 17:17

Correction:

Linux demo of ST25R3911B for Raspberry PI using XNUCLEO NFC05A1

http://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/stsw-st25r009.html

Posted on May 02, 2018 at 10:14

Hi Gidi,

the XNUCLEO NFC0A1 board is the other option I was referring to in my response.

However, the ST25 SDK only supports the ST25R3911B-Disco board.

Ulysses HERNIOSUS
ST Employee
Posted on May 03, 2018 at 11:28

Hi Amir,

actually the further down mentioned by Gidi courld really be an option for you:

Linux demo of ST25R3911B for Raspberry PI using XNUCLEO NFC05A1

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fst25-nfc-rfid-software%2Fstsw-st25rhtml

It is a ready made demonstration for Raspberry PI which will show the UIDs of tags and allow exchange of APDUs or arbitrary frames.

In this case the ST25R3911B is directly attached to an SPI of the Raspberry PI.

Regards, Ulysses