How to communicate between J2ME midlet and PC?
Incredible_Honk is almost right. The key is to use the (standard) system property "microedition.commports". This provides a comma separated list of COM ports available to your application. To open a connection, use CommConnection
as follows:
CommConnection con = (CommConnection) Connector.open("com:<commport name>");
Typically this will provide access to a serial USB connection, possibly also infrared, if available. Iterate through each one to see which one matches the connection you are looking for.
On Windows, at least you need to install the correct drivers for your phone first. This will allow you to open the serial connection and communicate with the application.
source to share
There is no general way to do this. It hardly depends on the capabilities of the mobile. There may be a vendor API giving you special access to the USB, but I don't know about it.
Some telephones support communication via serial ports. Have a look at the javax.microedition.io.CommConnection interface for more information.
source to share