Receiving String from RFCOMM on PC, sent from Android

Im trying to get one string from phone (Android 2.3.3), sent to PC (Windows 7), im using RFCOMM basic connection, something like this

BluetoothSocket tmp = null;
        try {
            Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
            tmp = (BluetoothSocket) m.invoke(device, 1);
        } catch (Exception e) { 
            Log.i("bluetooth", e.getMessage());
        mmSocket = tmp;
        try {

and for output strings, something like this

String message = "TEST";
        try {
        } catch (IOException e) {
            Log.e("bluetooth", "ERROR: "+e);

And it basically works (Tried using HyperTerminal). What I would like to do is simply receive the string "TEST" on my PC, but with an java application, that later will control an microcontroller.



If your question is how to start with a Java Bluetooth application: I've had great success with BlueCove for Windows.

Need Your Help

Is there a more efficient way than this to load records associated with records in a list?

sql ruby-on-rails ruby database performance

I have a model Playlist, and a model User, both of which have_many of each other, through a join model PlaylistUser.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.