Mac OS X Port Project. The goal of this Project is to produce a high-quality, open source version of JDK 7 for the Mac. The final release has the following goals.
Active2 years, 3 months ago
I have just started experimenting with Serproxy and Arduino to get some serial data into Flash Builder/Flex. Serproxy seems to work fine and seems to connect to whatever port is specified. However, I am not able to see or read any data from the serial port using ActionScript. This is odd, because the Arduino should be printing data on a loop.
Serial communication in Java on OS X. Ask Question 2. I've used NeuronRobotics nrjavaserial with great success on Linux and Mac OS/X. It embeds a native library into the jar file and then presents a Java interface. This is code for the Linux version - the biggest change will be the serial port name (the '/dev/rfcomm0') part. Java SerialPort is the world's first, and still foremost commercial Java serial port API. Since its introduction in 1996, Java SerialPort has been the most robust and versatile—dare we say the best—Java developer tool for interacting with serial ports on any platform. Serial.write works great, Arduino gets the data and show it in a LCD Display. The problem is Serial.read. When the program is running, it keep read from serial port (around every 40 ms), but that doesn't mean Arduino sent something. Arduino sends a byte only when a button is pushed.
The only thing I can think of is that I am not setting the correct serial port number. I have been trying to figure out how to find out what number should be set, that is, 5331, 5332, 5333, etc.
How do I find out the port number? Is there a way to do this using Terminal on OS X maybe?
dsolimano7,61733 gold badges4141 silver badges5757 bronze badges
Bob-obBob-ob71044 gold badges1212 silver badges3434 bronze badges
4 Answers
You can find your Arduino via Terminal with
then you can read that serial port using the screen command, like this
Java Serial Port Library
for example:
Sr.RichieSr.Richie4,60544 gold badges3030 silver badges6060 bronze badges
ioreg -p IOUSB -l -b | grep -E '@|PortNum|USB Serial Number'
Java Serial Port Access
Nadi HassanNadi Hassan
I was able to screen using the device's name anyway so that wasn't the issue. I was actually just trying to find the port number, i.e. 5331, 5332 etc. I managed to find this by a trial and error process using an app called TCP2Serial from the app store on Mac OS X. It isn't free but that's fine as long as I know it works!
Worth the 99c :)http://itunes.apple.com/us/app/tcp2serial/id506186902?mt=12
Bob-obBob-ob71044 gold badges1212 silver badges3434 bronze badges
mac os x don't use com numbers. you have to use something like'ser:devicename' , 9600
HarmHarm
Not the answer you're looking for? Browse other questions tagged macosterminalserial-portarduino or ask your own question.
This is a fork of the RXTX library with a focus onease of use and embeddability in other libraries.
Some of the features we have added
- A simplified serial port object called
NRSerialPort
. See below for anexample. - Self-deployment of native libraries (all native code is stored inside the JARand deployed at runtime). No more manual installation of native code.
- Arm Cortex support (Gumstix). The war report cnn.
- Android Support (requires a rooted phone to access the serial hardware).
- Single Makefile compile which simplifies the compilation of project binaries.
- https://poweruploans.weebly.com/cool-edit-pro-portable-windows-7.html. Gradle support for JAR creation.
- Removal of partially-implemented RXTX code to streamline the library for justserial port access.
- Full Eclipse integration for testing application code against sources.
- RFC 2217 support provided byincorporating the jvser library. Adi ad2000b 8-channel high definition audio codec drivers.
And a bunch of bug fixes
- Fixed the memory access error that causes OS X to crash the JVM when
serial.close()
is called. - Fixed the Windows serial port zombie bind that prevents re-accessing serialports when exiting on an exception.
- Fixed erroneous printouts of native library mis-match.
Maven
- Checkout the repository.
- Build with Gradle.
The resulting JAR will be found in the
build/libs/
directory.Native code is built using the Makefile found in the root of the repository.After the native code is built, the JAR is rebuilt.
Building on Windows
You'll need some installation of GCC. We recommend theTDM-GCC distribution of mingw64-w64.
Building on OS X
We're pretty big on maintaining backwards compatibility as far as reasonable.Our OS X natives target OS X 10.5, so to build them, you'll need an appropriateSDK installed. This StackOverflow answerprovides pointers for getting the appropriate SDK installed.