Closed amir-hg closed 5 years ago
Hi, have you already set all necessary permissions for port usage? I'm using this library without any detection problems on armv7l.
Hi What permissions required ? I only added user to dialout and tty group? Should i do something else?
That should be enough; however, try running your application under root or using sudo. If it works then, then it's definitely a permissions issue.
Hitting the same problem on a NanoPI M4. Running the program as root makes no difference. This is armv8_32. The catch here https://github.com/Fazecast/jSerialComm/blob/53449d43bcbcf3396079752469a0ac276b8f5e83/src/main/java/com/fazecast/jSerialComm/SerialPort.java#L244 looks odd...
Very odd indeed. I have no idea off the top of my head. I may need to purchase a NanoPI M4 so I can replicate on my end to solve this issue.
I'm still not able to reproduce this issue. @deiruch could you post the output of both cat /proc/cpuinfo
and uname -a
from your device please?
Here you go:
# cat /proc/cpuinfo
processor : 0
model name : ARMv8 Processor rev 4 (v8l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
model name : ARMv8 Processor rev 4 (v8l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 2
model name : ARMv8 Processor rev 4 (v8l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 3
model name : ARMv8 Processor rev 4 (v8l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 4
model name : ARMv8 Processor rev 2 (v8l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 2
processor : 5
model name : ARMv8 Processor rev 2 (v8l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 2
# uname -a
Linux hostname 4.4.143 #32 SMP Mon Feb 4 13:08:20 CET 2019 aarch64 aarch64 aarch64 GNU/Linux
The aarch64
is confusing, as I'm running an aarch32hf
Zulu JVM
Thanks for all of that...extremely helpful! Turns out your hunch was exactly right...your CPU is reporting itself as an aarch64 device but your JVM is running in 32-bit HF mode. It looks like there is a system property that can be used to retrieve this information in mobile Java on ARM devices, so I implemented those changes and they are available as part of the new 2.5.2 release. Please test out your application with the newest code and close this issue if it appears to be working for you. Thanks!
Can no longer reproduce so assuming this was resolved with the updates in v2.5.2. Please re-open if still experiencing the problem.
Hi, How did you succeed in resolving the problem? Thanks in advance.
I still have the problem with 2.7.0. I am using raspberry pi os, and changed back the option arm_64bit=0
in /boot/config.txt for the moment. Since it is quite specific problem, I wouldn't say it is critical. But would be nice though to be able to somehow "force" which library is loading with a resource file in the classpath for instance (already had a short look at the source code ;) )
Oups just saw it was already possible to specify which library is loaded by defined os.arch_full
system property, 👍
The issue persists with 2.7.0. I am also using raspberry pi os with the flag arm_64bit enabled.
The exception that is being thrown is down below:
/tmp/jSerialComm/1641474161877-libjSerialComm.so: /tmp/jSerialComm/1641474161877-libjSerialComm.so: cannot open shared object file: No such file or directory
Please retry with the newly released v2.8.0.
Hi when I call this function SerialPort.getCommPorts(); i get the fowolling error
Caused by: java.lang.UnsatisfiedLinkError: /tmp/1555404181319-libjSerialComm.so: /tmp/1555404181319-libjSerialComm.so: cannot open shared object f ile: No such file or directory(SerialPort.java:248)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.fazecast.jSerialComm.SerialPort.
And linux architecture is : Linux FriendlyELEC 4.4.49-s5p6818 #4 SMP PREEMPT Sun Mar 24 14:12:46 +0430 2019 armv7l armv7l armv7l GNU/Linux
my current version library: 2.5.0 (from maven)