AnsweredAssumed Answered

ST25R3911B + ST25 SDK + Raspberry Pi

Question asked by Amir Ben Ari on Apr 29, 2018
Latest reply on May 3, 2018 by Ulysses HERNIOSUS

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)

Outcomes