-
Notifications
You must be signed in to change notification settings - Fork 305
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
Accessing serial devices from emulator (OSX 64bit/Eclipse Kepler 64bit) #10
Comments
Hello Alessandro, The serial library has been updated to support the OSX emulator. A
ln /dev/tty.usbserial-FTWDSO8Z /dev/ttyS0 Then use port name "/dev/ttyS0".
Let me know if you have problems or have questions. Thanks, On 6/16/14, 7:49 AM, Alessandro Da Rugna wrote:
|
I have some troubles instantiating a serial connection to a modbus device using the emulator. The hardware is a Serial-to-USB FTDI cable with a modbus device attached.
This works on the raspberry (I see the FTDI cable as /dev/ttyUSB0) and the modbus data connection is fine.
However if I try to use the same FTDI cable on my development machine things don't work.
In my "Run configuration" I specified the VM argument: -Dkura.ext.dir=/Users/ale/dev/tmp/ to a directory containing javax.comm.rxtx.properties file declaring the serial port (/dev/tty.usbserial-FTWDSO8Z).
When I try to access the port Kura says it doesn't exist:
Manually adding the port causes a different error. In Emulator project MANIFEST.MF I added to Import-Package section the following: javax.microedition.io, javax.comm;version="1.2.0"
and in Emulator.java I added the following line at the end of
activate()
method:CommPortIdentifier.addPortName("/dev/tty.usbserial-FTWDSO8Z", CommPortIdentifier.PORT_SERIAL, null);
Trying to use the port gives
My Java:
$> java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
My Eclipse:
$> file Eclipse.app/Contents/MacOS/eclipse
Eclipse.app/Contents/MacOS/eclipse: Mach-O 64-bit executable x86_64
My machine (OSX 10.9.3):
$> uname -a
Darwin Alessandros-MacBook-Pro.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Am I missing something? What else can I do to help resolve the issue?
Thank you.
The text was updated successfully, but these errors were encountered: