rfcomm

Bluetooth RFCOMM / SDP connection to a RS232 adapter in android

Hello All, I am trying to use the Bluetooth Chat sample API app that google provides to connect to a bluetooth RS232 adapter hooked up to another device. Here is the app for reference: http://developer.android.com/resources/samples/BluetoothChat/index.html And here is the spec sheet for the RS232 connector just for reference: http://...

SPP Socket createRfcommSocketToServiceRecord will not connect

Hello, I want to use Android 2.1 to connect to an external Bluetooth device, wich is offering an SPP port to me. In this case it is an external GPS unit. When I'm trying to connect I can't connect an established socket while being in the "client" mode. Then if I try to set up a socket (being in the server role), to RECEIVE text from my P...

How to prevent Android bluetooth RFCOMM connection from dying immediately after .connect()?

This problem has been solved! Thanks a lot to Brad, Denis and junkie! You're the heroes! :) This is the working code. It connects to Zeemote and reads data from it. ===== Code ===== public class ZeeTest extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...

RFCOMM Before Android 2.0?

I have several apps which I wrote using the standard SDK. They all connect to RFCOMM devices using bluetooth, so at present, I can only support devices which are 2.0 or newer. What options are available for backporting a bluetooth app to pre-2.0 apps while re-writing as little code as possible? Thank you. ...

Why can't HTC Droid running OTA 2.1 communicate with RFCOMM?

Yesterday we received OTA Android 2.1 on my wife's HTC Droid - HOORAY!!! I am finally able to load my carputer app on her phone. Well we loaded it, but it doesn't work. Specifically, it connects but sees no I/O!!! I paired, re-paired, and re-paired again, every time its the same problem: connect() says we connected successfully, but a...

Android SPP bluetooth to non Android device

Hi, I'm trying to mimic the success of gilead(http://stackoverflow.com/questions/2660968/) but so far his code in my app fails. I've tried multiple UUIDs but nothing works. When I run sdptool records [address] I get $ sdptool records 00:12:F3:04:80:80 sdptool records 00:12:F3:04:80:80 Service Name: SPP Service RecHandle: 0x10001 Servi...

Receiving a File via RFCOMM on Android

Hey guys, does someone know how to receive a file on android via RFCOMM? I'm a newby to bluetooth issues, so please have patience with me. I'm looking for an approach to receive data via RFCOMM as a stream and store it somewhere on my phone. Saving data is not the problem, it works quite fine. The main issue is the implementation of t...

SystemIO Exception when opening RFCOMM in Mono

I have a Mono application which opens a RFCOMM connection (/dev/rfcomm0) but when I run as a user, I get a System.IO.IOException Interrupted system call. I'm running this on openSUSE 11.2. Unhandled Exception: System.IO.IOException: Interrupted system call at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filena...

listenUsingRfcommWithServiceRecord fails on Android 2.1: wrp_sock_create: socket create failed (Permission denied)

I'm trying to open a bluetooth server socket on an Android (2.1-update1 on a GT-I5700) phone and it fails. I have run out of ideas. Some pointers on what I am missing would be welcome. Bluetooth is on, so that shouldn't be a problem. I'm also pretty sure permissions are ok: <uses-permission android:name="android.permission.BLUETOOTH">...

Android Bluetooth: Software Caused Connection Abort IOException?

I have problems with BluetoothChat I can't connect Droid . I always get this IOException 08-09 20:58:24.889: INFO/BluetoothChat(17378): MESSAGE_STATE_CHANGE: 3 08-09 20:58:51.053: DEBUG/BluetoothService(17378): BT_SEND_MESSAGE 08-09 20:58:51.108: ERROR/BluetoothService(17378): disconnected 08-09 20:58:51.108: ERROR/BluetoothService(173...

Data Transmisison error using SPP over Bluetooth on Android

I've been having an issue with data integrity using an RFCOMM socket over Bluetooth in Android. I don't have any issues connecting, but the data I receive is garbled and not the same as the data that is sent. The data is sent by an RS232 device over a Bluetooth adapter, which the phone connects to. There isn't a problem with the adapter ...

Android: General Direction for Bluetooth SPP App with Multiple UI Activities (Multithreading/Handlers)

I am relatively new to Android but have some experience with Java. This may be more of a Multithreading/handler issue as apposed to Bluetooth. I am writing an Application that has multiple layouts with buttons. I have set up onClickListners for the buttons. Some buttons will change the activity and bring up a new layout with new button...

Android: Multithreading-Bluetooth SPP/RFCOMM-How to keep my BluetoothSocket and OutputStream active when changing Activities

I am pretty new to Android and very new to Multithreading. I am writing an android application that contains multiple activities that implement onClickListners which sends a Bluetooth message on button click to . I have successfully been able to connect and keep my BluetoothSocket and OutputStream open while in one activity. I do not do...

Could more than one RFCOMM channels be created per time?

Question: Could more than one RFCOMM channels be created per time? Testing method: Create connections from Cellphone(Samsung GALAXY S) to two terminals in the PC. PC has two different bluetooth devices(build-in and USB dongle) and using different COM ports, say COM1 and COM2. Steps: Testing each connection from cellphone to differ...

Android to Dumbphone Bluetooth

Greetings Coders. I'm trying to establish a connection between my Android Phone and an old Dumbphone. When I use this: tmp = device.createRfcommSocketToServiceRecord(UUID.randomUUID()); I get: "Exception: Service Discovery Failed" With This: Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class}); t...