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 {
mmSocket.connect();
and for output strings, something like this
String message = "TEST";
try {
mmOutStream.write(mensaje.getBytes());
} 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.
Thanks.
If your question is how to start with a Java Bluetooth application: I've had great success with BlueCove for Windows.