• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serial port

 
roms roms
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
 
Yuri Magrisso
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
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic