• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Serial port

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic