• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Java App Serial Connect to J2ME App

 
Elías Turbay
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, want to know how can I develop a Java app that send data, via Serial connection, to a J2ME app (a MIDlet that use this data to load a RecordStore).
I'm a new J2ME developer, that knows a bit about J2ME, and less about J2SE

Mainly I need help in the Java app running in the PC.
This app have to get the data from a MySQL Server (aprox 4000 records) and send the data via Serial connection to a Phone connected to the COM port.
This Phone must be running a MIDlet that receives this data to load a RecordStore.
I know how to do the last part... But I don't know how start with the Java App for the PC, and how to synchronize and serialize the data from MySQL to the MIDlet.

PD: I never used JDBC to connect to a DB Server... Where I can find information to do that?

From already thank you very much
[ October 11, 2005: Message edited by: Mark Spritzler ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This link has an artice on the Generic Connection Framework and should tell you how to do the network connection.

Java.sun.com has lots of technical articles to help on the J2ME side.

Mark
 
Elías Turbay
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot !

But I have another question:

How can I establish a connection to a Serial Port (COM1) with J2SE, because the GCF for J2SE (JSR 197) don't support CommConnection ....

As I mention before, I know just a bit about J2SE
 
Elías Turbay
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find something like "Java Comm API", but I can't believe that J2SE don't have a native API to connect to a Serial Port...
In addition, the Download link to this API (Version 2 for Windows) doesn't work
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using the Socket class in J2SE? What you basically need to do is create a J2SE Thread that is a Daemon thread, which means it is always running, waiting/listening to a particular port using the Socket class. Then the J2ME device connects to that port and now you have connection.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic