Hi everybody, I'm trying for hours and couldn't find an answer anywhere online nor in my Logs. I'm trying to establisch an RFCOMM Link by Bluetooth between an external Device that implements the SPP 1.04 Profile. Here is the output from sdptool:
sudo sdptool browse Inquiring ... Browsing 00:0B:0D:8E:D4:33 ... Service Name: SPP slave Service Description: Bluetooth SPP V1.04 Service RecHandle: 0x10000 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1 Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100 The Device just provides this and doesn't have any input or screen. And it does work with Linux etc. I'm using the following Code in order to establish an Connection: private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); private static String address = "00:0B:0D:8E:D4:33"; This happens in onCreate(): mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); Then in onResume: //Starting an discovery mBluetoothAdapter.startDiscovery(); //getting the device BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address); Log.e(TAG, device.getName() + " connected"); //establishing socket try { btSocket = device.createRfcommSocketToServiceRecord(MY_UUID); } catch (IOException e) { Log.e(TAG, "ON RESUME: Socket creation failed.", e); } Log.e(TAG, "TRYING TO CONNECT"); //Connecting the socket try { btSocket.connect(); Log .e(TAG,"ON RESUME: BT connection established, data transfer link open."); } catch (IOException e) { //Fehlerausgabe wenn das nicht funktioniert -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en