Results 1 to 3 of 3
hi
i install jdk1.6.0_18 and javax.comm 3 for linux in my asusEEE.
i can compile all java source, i can detect serial ports, but when i try open serial port ...
- 02-25-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 1
javax.comm for /dev/ttyS* IO errors
hi
i install jdk1.6.0_18 and javax.comm 3 for linux in my asusEEE.
i can compile all java source, i can detect serial ports, but when i try open serial port (ttyS0 or ttyS1), i have this error:
Exception in thread "main" java.lang.RuntimeException:
Error opening "/dev/ttyS1"
tcgetattr(): Input/output error
at com.sun.comm.LinuxDriver.getCommPort(LinuxDriver.j ava:66)
at javax.comm.CommPortIdentifier.open(CommPortIdentif ier.java:369)
...
i create source in c to open serial port, but when i try launch my compiled file, i have this same error (about IO error)
i logged as root
i think it's linux ports permission problem or...
maybe sameone has this problem and can help my
p.s. sorry, my english is bad
- 02-25-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
First of all, put a try/catch block around your code when you open the port in order to determine more precisely why this is happening. In any case, it's possible that you don't have permission to open the COM port as a normal user, or the options you used to open the port are invalid.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-03-2010 #3Just Joined!
- Join Date
- Apr 2009
- Posts
- 2
Do you have a physical serial port?
Are you sure you have a physical serial port? Most laptops nowadays do not have one.
If you are using a USB-to-serial adapter, the device name is /dev/ttyUSB0, not /dev/ttyS0
For USB converters you should be able to see the available devices in /dev
When a device is pluged in the name is there, when you unplug it, it disappearsCode:ls -l /dev/ttyUSB*


Reply With Quote