2018-04-29 07:25 AM
Hi,
As though there are libraries available for Mac OS X, my simple application randomly (almost always) crashes, and it has something to do with the dynamic libraries provided, specifically streader.dylib.
Any thoughts would be appreciated.
I'm running a MacBook Pro with macOS High Sierra version 10.13.4.
My code:
public
static
void
main(String[]args
)throws
STException {
stReader
=new
STReader();
boolean
connected
=stReader
.connect();
connected
=stReader
.connect();RFGenericReader
mActiveRFReader
=stReader
;
if
(connected
) {System.
out
.println('Connected!'
);
String
name
=mActiveRFReader
.getName();System.
out
.println(name
+' is connected'
);
stReader
.initialize();List<
byte
[]>uidList
=new
ArrayList<>();
try
{
uidList
=mActiveRFReader
.getTransceiveInterface().inventory(RFReaderInterface.InventoryMode.NFC_TYPE_5
);
if
(!uidList
.isEmpty()) {Iso15693Command
cmd
=new
Iso15693Command(mActiveRFReader
.getTransceiveInterface(),null
);
cmd
.setFlag(Iso15693Protocol.HIGH_DATA_RATE_MODE
);
cmd
.resetToReady();
System.
out
.println(Helper.convertByteArrayToHexString(Helper.reverseByteArray(uidList
.get(0))));}
}
catch
(STExceptione
) {
e
.printStackTrace();}
}
}
Sometimes it crashes at mActiveRFReader
.getName()
[Console output]:
Connected!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#
SIGSEGV (0xb) at pc=0x000000011081bd48, pid=6725, tid=0x0000000000002803
#
# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C
[streader.dylib+0xd48]
Java_com_st_st25pc_model_readers_st_STReader_getName+0x18
And sometimes it crashes at
mActiveRFReader
.getTransceiveInterface().inventory(RFReaderInterface.InventoryMode.NFC_TYPE_5
)[Console output]
:Connected!
CR95HF is connected
Switching to: READER_MODE_ISO15693_MODE
#
# A fatal error has been detected by the Java Runtime Environment:
#
#
SIGSEGV (0xb) at pc=0x0000000120fc6dc6, pid=6714, tid=0x0000000000001803
#
# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C
[streader.dylib+0xdc6]
Java_com_st_st25pc_model_readers_st_STReader_selectReaderMode+0x46
And sometimes I get the following, which I'm not sure what it means
[Console output]
:Connected!
CR95HF is connected
Switching to: READER_MODE_ISO15693_MODE
=> txString 010D
<= rxString
=> txString 02A8
<= rxString
=> txString 260100
<= rxString
=> txString 060100
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
=> txString 0104
<= rxString
Solved! Go to Solution.
2018-09-12 12:42 AM
Hi amir,
I really encourage you to switch on real CR95HF board. ST25R3911 not supported in Linux (and so MacOS) OS yet.
BR,
Victor
2018-04-30 12:30 AM
Hi Amir,
Please, could you provide us following information in order to reproduce issue :
- version of ST25 NFC java application ? run Java application, then go into Help=>About.
We're investigating this issue, then will come back to you soon.
thx and br,
Vincent
2018-04-30 12:37 AM
Sorry, forgot to mention that I'm using SDK version 1.1.0.
There's no Help => About when running the ST25 example Java app, but its the same one that comes with the 1.1.0 SDK version
2018-04-30 12:39 AM
I've run the examples Java app.
Status of ''No reader is connected'' does not change even though Reader is attached.
2018-04-30 12:55 AM
OK thx. I'm investigating with these information.
stay tuned..
Br,
vincent
2018-05-02 07:25 AM
hi Amir,
I have made some tests under Eclipse/MacOS env, and it works fine at my end , with SDK1.1.0 + CR95HF.
When you run your demo app, do you use eclipse or directly java -jar command ?I will continue investigations...
br,
Vincent
2018-05-02 08:10 AM
OK thx Amir.
Best thing would be to send me your whole environment if possible.
Normally, st25R3911 is not supported yet in Linux and MacOS as libraries don't exist for Linux. I don't understand how it could be identified as CR95HF. If you have got an CR95HF, it would be nice to make some tests again, then to le me know status.Thx and br,Vincent
2018-05-02 09:49 AM
Hi Victor,
It happens both ways (Eclipse and java -jar).
I would say that the board is NOT CR95HF, it is ST25R3911B-DISCO which for some reason is identified as CR95HF.
Also, at another
it was suggested that ST25R3911B is not supported on Linux any how.2018-09-12 12:42 AM
Hi amir,
I really encourage you to switch on real CR95HF board. ST25R3911 not supported in Linux (and so MacOS) OS yet.
BR,
Victor