This week's book giveaway is in the Java in General forum.
We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line!
See this thread for details.
Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serial port  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I am searching how to set the flowcontrol(handshaking) to CTS/RTS(hardware) on
J2ME.
I checked the javadoc of javax.microedition.io.CommConnection,
but there is no explicit information about the Handshaking.
So what woul be the URI to operate my com port with the following setup:
Com port:7
Baud rate:9600
Parity:none:
Handshaking:Hardware(cts/rts)
stop bits:1
data bits:8

I just need to read the data from the com port using these parameters.

Thanks for the information and help,
PS: I am using Ibm J9 6.1
--
Romain
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure how it is for IBM J9, but for the Motorola IDEN phones the code looks like that:

String url = "comm:com0;baudrate=19200;databits=8;"+
"stopbits=1;parity=n;flowcontrol=h";
CommConnection cc = (CommConnection)Connector.open(url);

I think you won't need to specify the params after the baud rate, since those are the defaults.

Hope it helps,
Yuri
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"roms roms",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with display names get deleted.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!