Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Serial Port Commuication.

 
Keshava Moorthy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody helps me details about serial port communication using JAVA
 
Michael Kroll
Author
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Keshava Moorthy:
Can somebody helps me details about serial port communication using JAVA

Hello Keshava,
what do you exaclty want to know about it? Perhaps I send you a code snippet showing you how to open a n Input-/OutputStream on a ComPort.
CommConnection is included in the Public Review Draft of PDAP. (Com port settings etc.)
Here's the code showing you how to handle CommConnections using the Generic Connection Framework:
StreamConnection sc = (StreamConnection)
Connector.open("comm:0;baudrate=9600");

InputStream is = sc.openInputStream();
OutputStream os = sc.openOutputStream();
// add code to read/write here ...
is.close(); // close the streams
os.close();
sc.close(); // close the CommConnection.

Do you need more specific infos?
 
Keshava Moorthy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am giving u full details about how I want serial port communication.
I have PC with Windows NT and PDA with Win CE OS connected through USB cable. I want to write simple read and write java program. Read will run in PDA and write in PC. By this configuration I want to do Serial port communication using JAVA APIs. Please provide me the details
TIA
Keshav
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just FYI. Serial port communication is also supported in MIDP 2.0.
 
Michael Kroll
Author
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
currently I'm writing a small document for the kobjects.org website how to install JavaComm and CEJavaComm in order to use my CommConnection for ME4SE. This will enable PJava based PDAs to commnicate with a desktop PC over a serial connection or even bluetooth. Hope to get it finished by this weekend.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!