-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to retrieve com port properties #88
Open
rlishtaba
wants to merge
9
commits into
scream3r:2.8.0
Choose a base branch
from
gohai:processing
base: 2.8.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Opening /dev/cu.* doesn't require DCD to be asserted and succeeds immediately.
This includes /dev/tty.Bluetooth-Modem and friends.
Opening certain devices, such as serial endpoints over Bluetooth, can take a long time before they fail. Moreover, it's better to show devices even when the user currently doesn't have permissions to access them - else one might think of a problem with the device or driver, when a "sudo chmod 666" would do the trick.
Before dynamically extracting the matching native library, first try to load it using System.loadLibrary(). This is helpful when it's not desired to modify the host system (but rather make changes to java.library.path).
The command used to compile this on 10.9.1: g++ -shared -arch i386 -arch x86_64 -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/darwin" -I"/System/Library/Frameworks/IOKit.framework/Headers" -o libjSSC-2.8_universal.jnilib jssc.cpp
getPortProperties() returns a map with keys and values as string. The currently available properties are: idProduct (lowercase hexadecimal zero-padded to four digits), idVendor (same as idProduct), manufacturer, product, serial. This is currently implemented for Linux and OS X (only in the Universal binary). The command used to compile this on 10.9.1: g++ -shared -arch i386 -arch x86_64 -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/darwin" -I"/System/Library/Frameworks/IOKit.framework/Headers" -framework CoreFoundation -framework IOKit -o libjSSC-2.8_universal.jnilib jssc.cpp
Command used to compile on a current Raspbian: g++ -shared -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/usr/lib/jvm/jdk-7 -oracle-armhf/include -I/usr/lib/jvm/jdk-7-oracle-armhf/include/linux -o libjSSC-2.8_armhf.so jssc.cpp
This was built with: g++ -shared -I /usr/lib/jdk1.8.0_121/include -I/usr/lib/jdk1.8.0_121/include/linux -o libjSSC-2.8_aarch64.so jssc.cpp
See #113 for Windows support |
hiddenalpha
pushed a commit
to hiddenalpha/jssc
that referenced
this pull request
May 18, 2021
Use JDK5+ foreach Remove redundant conditionals Co-authored-by: Tomas Nieboer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.