File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Connecting to Serial Port on Motorola i85s Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Connecting to Serial Port on Motorola i85s" Watch "Connecting to Serial Port on Motorola i85s" New topic

Connecting to Serial Port on Motorola i85s

Wayne Pau

Joined: Jun 14, 2002
Posts: 3
I'm just about to dev some stuff for a contract using this IDen phone. I'm doing my research now and I can't find any more information on Serial Port connection other than the connection string.
ie. "comm:0;baudrate=4800;stopbits=1;parity=n;databits=8;flowcontrol=n/n;"
but what about the reading protocol? This one J2ME book on connection framework went into HTTP, socket and this other protocol, but nothing on the "comm". Is it just like reading from any other stream in J2ME?
Does anyone know anymore about this? Has anyone tried reading from the serial port? Does the phone have a buffer?
I'm newbie, so go easy. If anyone has done this, give me info or point in the right direction I'd be super thankful,
a sanjuan
Ranch Hand

Joined: Jun 12, 2002
Posts: 164
this might help, as might the previous discussion about IOExceptions:
Wayne Pau

Joined: Jun 14, 2002
Posts: 3
Hey guys,
I got the COMM to work.
these are the few things I've learned.
1. The emulator doesn't really work for comm port testing. You really need to put it down to the phone, since the phone doesn't really have serial port access if HyperTerminal in availiable.
2. there are a few connection stream examples availiable.. but for the i85s, this one works.
String parameter = "comm:0;baudrate=9600;stopbits=1;parity=e;databits=7;flowcontrol=s/s;";
The one I got from Ericsson didn't seem to work.
3. I'm stil having trouble with matching the stuff coming down the serial steam to the datastream. I'm getting a 'Z' down the pipe when I'm using HyperTermninal and it's great... however when I'm using my other serial device.. which on HyperTerminal shows 'Z', the phone doesn't see it.
sc = (StreamConnection), Connector.READ_WRITE, false);
is = sc.openInputStream();
os = sc.openOutputStream();
ch = 0;
while (ch != 'Z')
ch =;
b.append((char) ch);
sMessage = b.toString();
(doesn't get out of loop.. because it doesn't get the 'Z')
if anyone has more info about 3.. pls let me know.
I agree. Here's the link:
subject: Connecting to Serial Port on Motorola i85s
It's not a secret anymore!