I have the following code in an Android application for receiving the information sent by a bluetooth device:
BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothServerSocket bssock = mAdapter.listenUsingRfcommWithServiceRecord("Dummy", UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));
BluetoothSocket bs = bssock.accept();
InputStream is = bs.getInputStream();
When the debugger reaches the fourth line (the one with accept()), I see the following lines in the log (LogCat):
BluetoothEventLoop.cpp - event_filter: Received signal org.bluez.Device.....
BtOppRfcommListener - Accepted connection from 00:07:CF:58:77:B3
BtOpp Service - Start Obex Server
Obex Server Session - java.io.IOException: Software caused connection abort
The IOException is not propagated to my code. It just hangs out and nothing else happens. Every time I try to send the information to the phone, same thing happens.
Any help will be really appreciated.