Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javax.comm does not found new ports

807603Dec 18 2007 — edited Dec 19 2007
I have an application using two serial ports and it works fine. I wanted to add some more devices to the system and bought an additional PCI card to get two more serial ports to my PC. I have debian and I created one new port manually and I can now see ports from ttyS0 to ttyS5 in /dev/. I have tested to read something from both new ports ttyS4 and ttyS5 when device is writing something to them and I can see the messages. So, I think that ports are working fine. Still for some reason when I call CommPortIdentifier.getPortIdentifiers() and go through the list, there are only ttyS0 and ttyS1. I tried using portmap.conf file and added there the needed lines but still it did not found them. I also added the needed two lines to javax.comm.properties and placed it to the /opt/jdk1.6/jre/lib/.

Ports are working because I can read something by writing 'cat /dev/ttyS4' but still javax.comm does not seem to find the ports. Any hints anyone??

user@mach:~$ ls -la /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 2007-12-18 15:42 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2007-12-18 14:58 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2005-02-26 08:39 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2005-02-26 08:39 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 2005-02-26 08:39 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 2007-12-17 13:33 /dev/ttyS5

user@mach:~$ dmesg | grep ttyS
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
ttyS04 at port 0x4400 (irq = 22) is a 16550A
ttyS05 at port 0x4408 (irq = 22) is a 16550A

Thanks,
Hannu J�rvinen
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2008
Added on Dec 18 2007
1 comment
165 views