Hi Khan,
Can you first verify you can use the Linux native
tool minicom to
connect to your /dev/ttyS1?
Does this work on your device?
minicom dfl ttyS1
You might need to build minicom for your device
depending on which
Linux distro you are using)
Hinkmond
------------------------------------------------------
Hi Hinkmond,
Instead of using minicom on my device, i used hyper-terminal of Windows XP to
verify that whether i can connect to /dev/ttyS1 and /dev/ttyS2 or not?
My target device has 3 serial ports. The /dev/ttyS0 port of device was connected
to my linux machine (to boot the device). And, I connected the other ports (i.e.
/dev/ttyS1 and /dev/ttyS2) with a Windows XP machine (one at a time) and
diverted the output of [b]cat[/b] command to the serial ports.
Both the ports were found to be available and fully functional, as the
hyper-terminal window on Windows XP machine showed the exact contents of the
file for both the ports.
After this, I need to know that how can i connect to the ports using
CDC/Foundation Profile, as i am still unable to open the ports.
I am using the following code to open the port:
try {
CommConnection comPort = (CommConnection) Connector.open("comm:/dev/ttyS1");
}
And, the output of stack trace is:
javax.microedition.io.ConnectionNotFoundException: The requested protocol does
not exist /dev/ttyS1
Whatever I pass in Connector.open(), its portion after "comm:" is taken as a
protocol. And an exception occurs and says that requested protocol does not
exist.
So, what could be the reason after the serial ports have been verified to be
available?
Regards,
Khan.
[Message sent by forum member 'sandykhan' (sandykhan)]
http://forums.java.net/jive/thread.jspa?messageID=266450