• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connecting to Serial Port on Motorola i85s

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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,
thanks,
w.
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this might help, as might the previous discussion about IOExceptions:
http://forum.java.sun.com/thread.jsp?forum=50&thread=265834
 
Wayne Pau
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.open(parameter, Connector.READ_WRITE, false);
is = sc.openInputStream();
os = sc.openOutputStream();
ch = 0;
while (ch != 'Z')
{
ch = is.read();
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic