I\'m having trouble connecting my smartphone to my raspberry pi over bluetooth using an app.
My situation:
I\'m developing a bluetooth controlla
I think linux use bluetooth need specify the connect port.
try {
Method m = remoteDevice.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
try {
BluetoothSocket tmp = (BluetoothSocket)m.invoke(remoteDevice, 1);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
} catch (NoSuchMethodException e) {
e.printStackTrace();
}